/* ─────────────────────────────────────────
   TOKENS
───────────────────────────────────────── */
:root {
  /* Palette */
  --color-bg:        #FDF9FA;
  --color-text:      #1A1418;
  --color-muted:     #83676F;
  --color-accent:    #CE2A64; /* #D4306A darkened — WCAG AA 4.54:1 on bg */
  --color-border:    #E2E2E2;
  --color-white:     #FFFFFF;

  /* Per-project accents */
  --color-custimoo:        #0D9278; /* large text — check contrast */
  --color-custimoo-ui:     #0A7A67; /* ~4.6:1 — small text */
  --color-propbinder:      #6B5FF5;
  --color-propbinder-ui:   #5248D8; /* ~5.5:1 — small text */
  --color-cloud-factory:   #6058C2;
  --color-pfe:             #006970;

  /* Type */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.375rem;
  --text-2xl:  1.75rem;
  --text-3xl:  2.25rem;
  --text-4xl:  3rem;
  --text-5xl:  4rem;

  /* Spacing */
  --space-1:  0.25rem;  /* 4px */
  --space-2:  0.5rem;   /* 8px */
  --space-3:  0.75rem;  /* 12px */
  --space-4:  1rem;     /* 16px */
  --space-5:  1.25rem;  /* 20px */
  --space-6:  1.5rem;   /* 24px */
  --space-8:  2rem;     /* 32px */
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --max-width:    1200px;
  --gutter:       clamp(1.25rem, 5vw, 2.5rem);
  --radius-sm:    4px;
  --radius-md:    8px;
  --radius-lg:    16px;

  /* Motion */
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 200ms;
  --duration-base: 400ms;
  --duration-slow: 700ms;
}

/* ─────────────────────────────────────────
   SELECTION
───────────────────────────────────────── */
::selection {
  background-color: color-mix(in srgb, var(--color-accent) 25%, transparent);
  color: var(--color-text);
}

/* ─────────────────────────────────────────
   RESET
───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

/* ─────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p + p { margin-top: var(--space-4); }

.text-muted { color: var(--color-muted); }
.text-accent { color: var(--color-accent); }

/* ─────────────────────────────────────────
   LAYOUT UTILITIES
───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--space-24);
}

.section--lg {
  padding-block: var(--space-32);
}

/* ─────────────────────────────────────────
   HEADER / NAV
───────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-block: var(--space-6);
  background-color: var(--color-bg);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-base) var(--ease-out),
              background-color var(--duration-base) var(--ease-out);
}

.site-header.scrolled {
  border-bottom-color: var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  color: var(--color-project, var(--color-accent));
  transition: opacity var(--duration-fast);
}

.nav__logo svg {
  width: auto;
  height: 36px;
}

.nav__logo:hover {
  opacity: 0.75;
}

.nav__links {
  display: flex;
  gap: var(--space-12);
  align-items: center;
}

.nav__label--mobile { display: none; }

.nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted) !important;
  transition: color var(--duration-fast) var(--ease-out);
}

.nav__link:hover,
.nav__link.slash-link:hover,
.nav__links .slash-link:hover {
  color: var(--color-accent) !important;
}

.nav__link.active {
  color: var(--color-accent) !important;
}

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.site-footer {
  background: var(--color-accent);
  margin-top: 0;
}

.footer__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-8);
  padding-block: var(--space-12);
}

.footer__logo {
  display: flex;
  align-items: center;
  color: var(--color-white);
  opacity: 0.95;
  transition: opacity var(--duration-fast);
}

.footer__logo:hover {
  opacity: 1;
}

.footer__signature {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.footer__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-4);
}

.footer__socials {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
}

.footer__social-link {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7) !important;
  transition: color var(--duration-fast);
}

.footer__social-link:hover {
  color: var(--color-white) !important;
}

.footer__email {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7) !important;
  transition: color var(--duration-fast);
}

.footer__email:hover {
  color: var(--color-white) !important;
}

.footer__copy {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.45);
}

/* ─────────────────────────────────────────
   PAGE WRAPPER (for transitions)
───────────────────────────────────────── */
.page-wrapper {
  padding-top: 80px; /* header height */
}

/* ─────────────────────────────────────────
   PLACEHOLDER IMAGE
───────────────────────────────────────── */
.placeholder-img {
  background-color: var(--color-border);
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  object-fit: cover;
}

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

/* Text slide-up on hover — Lusion-style */
.btn__label {
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--ease-out);
}

.btn__label::after {
  content: attr(data-text);
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  white-space: nowrap;
}

.btn:hover .btn__label {
  transform: translateY(-100%);
}

.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-white);
  transition: background-color var(--duration-fast) var(--ease-out);
}

.btn--primary:hover {
  background-color: var(--color-text);
}

.btn--outline {
  border: 1px solid var(--color-text);
  color: var(--color-text);
  transition: background-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}

.btn--outline:hover {
  background-color: var(--color-text);
  color: var(--color-bg);
}

/* ─────────────────────────────────────────
   TAGS
───────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 12%, transparent);
  color: var(--color-muted);
  border: none;
}


/* ─────────────────────────────────────────
   SCROLL REVEAL (initial state — GSAP handles rest)
───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 768px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }

  h3 { font-size: var(--text-xl); }

  .nav__links {
    gap: var(--space-6);
  }

  .nav__label--desktop { display: none; }
  .nav__label--mobile  { display: inline; }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer__right {
    align-items: flex-start;
  }

  .footer__socials {
    align-items: flex-start;
  }

  .section--lg {
    padding-block-end: var(--space-4);
  }

  .section {
    padding-block: var(--space-8);
  }
}

@media (max-width: 480px) {
  h1 { font-size: var(--text-3xl); }
  .nav__links {
    gap: var(--space-4);
  }
}

/* ─────────────────────────────────────────
   FOCUS STYLES (WCAG 2.4.7)
───────────────────────────────────────── */
:focus-visible {
  outline: none;
}

:focus:not(:focus-visible) {
  outline: none;
}

#wavy-focus-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  overflow: visible;
}

/* ─────────────────────────────────────────
   SKIP LINK (WCAG 2.4.1)
───────────────────────────────────────── */
.skip-link {
  position: fixed;
  top: calc(-1 * var(--space-16));
  left: var(--space-4);
  z-index: 9999;
  background: var(--color-text);
  color: var(--color-bg);
  padding: var(--space-3) var(--space-6);
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top 0.1s;
}

.skip-link:focus {
  top: var(--space-4);
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* ─────────────────────────────────────────
   REDUCED MOTION (WCAG 2.3.3)
───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  /* Make all reveal elements immediately visible */
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
