/* ==========================================================================
   ENTEGMA — Design & Video
   Global stylesheet
   --------------------------------------------------------------------------
   Table of contents
   01. Custom properties (design tokens)
   02. Reset & base
   03. Typography
   04. Layout helpers
   05. Buttons & links
   06. Neomorphic primitives (surfaces, shadows, chips)
   07. Header & navigation
   08. Hero (canvas + parallax layers)
   09. Sections & shared blocks
   10. Masonry / Pinterest grid
   11. Cards, stats, timeline, accordion
   12. Forms
   13. Footer
   14. Floating UI (back to top, lightbox)
   15. Scroll animations
   16. Responsive breakpoints
   17. Accessibility & print
   ========================================================================== */


/* ==========================================================================
   01. CUSTOM PROPERTIES (DESIGN TOKENS)
   ========================================================================== */

:root {
  /* --- Brand palette (as specified) ------------------------------------ */
  --color-primary:    #2d3248;  /* deep indigo — headings, dark surfaces   */
  --color-accent:     #bb1133;  /* crimson — links, highlights, focus      */
  --color-brand-bg:   #d4084f;  /* vivid magenta-red — hero & CTA backdrop */
  --color-text:       #1e1e1c;  /* near-black — body copy                  */
  --color-secondary:  #f5f5f3;  /* bone white — the neomorphic canvas      */

  /* --- Derived tones ---------------------------------------------------- */
  --color-surface:        var(--color-secondary);
  --color-surface-sunken: #eeeeeb;
  --color-text-muted:     #5f6068;
  --color-text-invert:    #fdfdfc;
  --color-border:         rgba(45, 50, 72, 0.10);

  /* Neomorphism relies on two light sources: a highlight from the top-left
     and a shade from the bottom-right, both sampled from the surface tone. */
  --nm-light: #ffffff;
  --nm-dark:  #cfcfc9;

  /* --- Elevation ladder -------------------------------------------------- */
  --shadow-xs: 3px 3px 6px var(--nm-dark), -3px -3px 6px var(--nm-light);
  --shadow-sm: 5px 5px 12px var(--nm-dark), -5px -5px 12px var(--nm-light);
  --shadow-md: 9px 9px 20px var(--nm-dark), -9px -9px 20px var(--nm-light);
  --shadow-lg: 16px 16px 34px var(--nm-dark), -12px -12px 30px var(--nm-light);
  --shadow-inset: inset 5px 5px 11px var(--nm-dark),
                  inset -5px -5px 11px var(--nm-light);
  --shadow-inset-sm: inset 3px 3px 6px var(--nm-dark),
                     inset -3px -3px 6px var(--nm-light);
  /* Neomorphic shadows on the dark/brand surfaces need their own tones. */
  --shadow-dark: 10px 10px 22px rgba(0, 0, 0, 0.34),
                 -8px -8px 20px rgba(255, 255, 255, 0.06);
  --shadow-dark-inset: inset 5px 5px 12px rgba(0, 0, 0, 0.34),
                       inset -5px -5px 12px rgba(255, 255, 255, 0.07);

  /* --- Typography -------------------------------------------------------- */
  --font-display: 'Sora', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  --fs-xs:   0.78rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-md:   1.0625rem;
  /* Fluid type: scales between the two clamp bounds with the viewport. */
  --fs-lg:   clamp(1.15rem, 0.95rem + 0.6vw, 1.4rem);
  --fs-xl:   clamp(1.4rem, 1.1rem + 1.1vw, 1.9rem);
  --fs-2xl:  clamp(1.75rem, 1.3rem + 1.9vw, 2.6rem);
  --fs-3xl:  clamp(2.2rem, 1.5rem + 3vw, 3.6rem);
  --fs-hero: clamp(2.6rem, 1.4rem + 5.4vw, 5.4rem);

  /* --- Spacing scale (compact rhythm per the brief) ----------------------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.75rem;
  --space-8: 3.5rem;
  /* Vertical section padding is intentionally tight. */
  --section-y: clamp(2.75rem, 1.6rem + 3.4vw, 4.25rem);

  /* --- Geometry ----------------------------------------------------------- */
  --radius-sm:  10px;
  --radius-md:  18px;
  --radius-lg:  28px;
  --radius-xl:  40px;
  --radius-pill: 999px;

  --container: 1180px;
  --container-narrow: 820px;
  --header-h: 132px;

  /* --- Motion -------------------------------------------------------------- */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.5, 1);
  --t-fast: 0.18s;
  --t-med: 0.32s;
  --t-slow: 0.6s;

  --z-header: 100;
  --z-float: 200;
  --z-lightbox: 300;
}


/* ==========================================================================
   02. RESET & BASE
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  /* Native smooth scrolling; the JS enhancement adds header offsetting. */
  scroll-behavior: smooth;
  /* Anchor targets clear the sticky header. */
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Locks background scrolling while the mobile menu or lightbox is open. */
body.is-locked { overflow: hidden; }

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

img { height: auto; }

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

ul, ol { margin: 0; padding: 0; list-style: none; }

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

/* The `hidden` attribute must win over component `display` rules — the
   lightbox arrows are `display: grid` and are hidden via `hidden` when a
   gallery holds a single image. */
[hidden] { display: none !important; }

hr {
  border: 0;
  height: 1px;
  background: var(--color-border);
  margin: var(--space-6) 0;
}

::selection {
  background: var(--color-accent);
  color: var(--color-text-invert);
}

/* A single, consistent focus ring across every interactive element. */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}


/* ==========================================================================
   03. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--color-primary);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.022em;
  margin: 0 0 var(--space-3);
  text-wrap: balance;
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-base); }

p { margin: 0 0 var(--space-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 650; color: var(--color-primary); }

.lead {
  font-size: var(--fs-lg);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 60ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

/* Small crimson dash that precedes every eyebrow label. */
.eyebrow::before {
  content: '';
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

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

/* Gradient-filled headline word used for emphasis in hero titles. */
.text-gradient {
  background: linear-gradient(102deg, var(--color-brand-bg), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}


/* ==========================================================================
   04. LAYOUT HELPERS
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.container--narrow { max-width: var(--container-narrow); }

.section {
  padding-block: var(--section-y);
  position: relative;
}

.section--sunken { background: var(--color-surface-sunken); }

.section-head {
  max-width: 62ch;
  margin-bottom: var(--space-6);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--center .eyebrow { justify-content: center; }

/* Title on one side, supporting copy or a link on the other. */
.section-head--split {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
}

.section-head--split > div { max-width: 56ch; }

.grid { display: grid; gap: var(--space-5); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stack > * + * { margin-top: var(--space-4); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.center { text-align: center; }
.mt-6 { margin-top: var(--space-6); }

/* Visually hidden but exposed to assistive technology. */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Keyboard-only shortcut past the navigation. */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: calc(var(--z-header) + 10);
  padding: var(--space-3) var(--space-5);
  background: var(--color-primary);
  color: var(--color-text-invert);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--t-fast) var(--ease-out);
}

.skip-link:focus { top: var(--space-4); }


/* ==========================================================================
   05. BUTTONS & LINKS
   ========================================================================== */

.btn {
  --btn-bg: var(--color-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.85em 1.7em;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-med) var(--ease-spring),
              box-shadow var(--t-med) var(--ease-out),
              background-color var(--t-med) var(--ease-out),
              color var(--t-med) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Pressing a neomorphic control pushes it *into* the surface. */
.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-inset-sm);
}

.btn svg { width: 1.05em; height: 1.05em; flex: none; }

.btn--primary {
  background: var(--color-brand-bg);
  color: var(--color-text-invert);
  box-shadow: 6px 6px 16px rgba(212, 8, 79, 0.32),
              -5px -5px 14px var(--nm-light);
}

.btn--primary:hover {
  background: var(--color-accent);
  box-shadow: 10px 10px 26px rgba(187, 17, 51, 0.38),
              -6px -6px 18px var(--nm-light);
}

.btn--primary:active {
  box-shadow: inset 4px 4px 10px rgba(0, 0, 0, 0.28),
              inset -3px -3px 8px rgba(255, 255, 255, 0.18);
}

.btn--dark {
  background: var(--color-primary);
  color: var(--color-text-invert);
  box-shadow: 6px 6px 16px rgba(45, 50, 72, 0.3),
              -5px -5px 14px var(--nm-light);
}

.btn--dark:hover { background: #262b3e; }

.btn--ghost {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--color-border);
}

.btn--ghost:hover {
  box-shadow: var(--shadow-sm);
  background: var(--color-surface);
}

.btn--sm { padding: 0.65em 1.25em; font-size: var(--fs-xs); }
.btn--block { width: 100%; }

/* Inline text link with an underline that grows from the left on hover. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--color-accent);
  position: relative;
  transition: gap var(--t-med) var(--ease-out);
}

.link-arrow svg {
  width: 1em;
  height: 1em;
  transition: transform var(--t-med) var(--ease-out);
}

.link-arrow:hover { gap: var(--space-3); }
.link-arrow:hover svg { transform: translateX(3px); }


/* ==========================================================================
   06. NEOMORPHIC PRIMITIVES
   ========================================================================== */

/* Raised panel — the base surface used by most content blocks. */
.nm {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Pressed panel — used for wells, inputs and inactive states. */
.nm-inset {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-inset);
}

/* Circular icon plate. */
.nm-circle {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  color: var(--color-accent);
  flex: none;
}

.nm-circle svg { width: 22px; height: 22px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.4em 0.95em;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
  font-size: var(--fs-xs);
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.chip--accent { color: var(--color-accent); }


/* ==========================================================================
   07. HEADER & NAVIGATION
   Centered logo with the navigation sitting below it.
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(245, 245, 243, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--t-med) var(--ease-out),
              border-color var(--t-med) var(--ease-out),
              padding var(--t-med) var(--ease-out);
  padding-block: var(--space-4) var(--space-3);
}

/* `.is-stuck` is toggled from JS once the page has scrolled. */
.site-header.is-stuck {
  box-shadow: 0 10px 30px -18px rgba(45, 50, 72, 0.42);
  border-bottom-color: var(--color-border);
  padding-block: var(--space-3) var(--space-2);
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  position: relative;
}

/* --- Brand ---------------------------------------------------------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  transition: transform var(--t-med) var(--ease-spring);
}

.brand:hover { transform: translateY(-2px); }

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--color-brand-bg);
  color: var(--color-text-invert);
  box-shadow: 5px 5px 12px rgba(212, 8, 79, 0.3),
              -4px -4px 10px var(--nm-light);
  flex: none;
}

.brand-mark svg { width: 22px; height: 22px; }

.brand-text { display: flex; flex-direction: column; line-height: 1; }

.brand-name {
  font-family: var(--font-display);
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-primary);
}

.brand-tagline {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-top: 5px;
}

/* --- Navigation ----------------------------------------------------------- */

.site-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: 5px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  box-shadow: var(--shadow-inset-sm);
}

.site-nav a {
  display: block;
  padding: 0.55em 1.15em;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color var(--t-fast) var(--ease-out),
              box-shadow var(--t-med) var(--ease-out),
              background-color var(--t-med) var(--ease-out);
}

.site-nav a:hover { color: var(--color-primary); }

/* `aria-current="page"` doubles as the styling hook for the active link. */
.site-nav a[aria-current='page'] {
  color: var(--color-primary);
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
}

/* --- Hamburger ------------------------------------------------------------ */

.nav-toggle {
  display: none;
  position: absolute;
  right: 0;
  top: 0;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  place-items: center;
}

.nav-toggle:active { box-shadow: var(--shadow-inset-sm); }

.nav-toggle-box {
  position: relative;
  width: 20px;
  height: 14px;
}

.nav-toggle-box span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--color-primary);
  transition: transform var(--t-med) var(--ease-out),
              opacity var(--t-fast) var(--ease-out),
              width var(--t-med) var(--ease-out);
}

.nav-toggle-box span:nth-child(1) { top: 0; }
.nav-toggle-box span:nth-child(2) { top: 6px; width: 70%; }
.nav-toggle-box span:nth-child(3) { top: 12px; }

/* Morph the three bars into a cross when the menu is open. */
.nav-toggle[aria-expanded='true'] .nav-toggle-box span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded='true'] .nav-toggle-box span:nth-child(2) {
  opacity: 0;
  transform: translateX(-8px);
}
.nav-toggle[aria-expanded='true'] .nav-toggle-box span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}


/* ==========================================================================
   08. HERO
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--color-primary);
  color: var(--color-text-invert);
  isolation: isolate;
  padding-block: clamp(3.5rem, 2rem + 7vw, 7rem);
}

/* Interactive particle field drawn by js/particles.js. */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
}

/* Depth layer 1: a large brand-coloured glow that drifts on scroll. */
.hero-glow {
  position: absolute;
  z-index: -2;
  width: 62vw;
  max-width: 760px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  pointer-events: none;
  will-change: transform;
}

.hero-glow--a {
  top: -18%;
  right: -8%;
  background: radial-gradient(circle, var(--color-brand-bg) 0%, transparent 68%);
}

.hero-glow--b {
  bottom: -28%;
  left: -12%;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
  opacity: 0.4;
}

/* Depth layer 2: a faint grid that reads as "studio floor". */
.hero-grid {
  position: absolute;
  inset: -10% 0 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 74px 74px;
  mask-image: radial-gradient(ellipse 78% 62% at 50% 42%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 78% 62% at 50% 42%, #000 30%, transparent 100%);
  pointer-events: none;
  will-change: transform;
}

.hero-inner {
  position: relative;
  text-align: center;
  max-width: 900px;
  margin-inline: auto;
}

.hero .eyebrow { color: #ff8fae; }

.hero h1 {
  font-size: var(--fs-hero);
  color: var(--color-text-invert);
  letter-spacing: -0.035em;
  margin-bottom: var(--space-4);
}

.hero p {
  font-size: var(--fs-lg);
  color: rgba(253, 253, 252, 0.76);
  max-width: 58ch;
  margin-inline: auto;
}

.hero-actions {
  justify-content: center;
  margin-top: var(--space-6);
}

/* Buttons sitting on the dark hero need dark-surface shadows. */
.hero .btn--ghost {
  color: var(--color-text-invert);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.24);
}

.hero .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.4);
}

/* Marquee-style trust row under the hero copy. */
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3) var(--space-6);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: var(--fs-sm);
  color: rgba(253, 253, 252, 0.6);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.hero-meta b {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: var(--color-text-invert);
  font-weight: 700;
}

/* Animated scroll hint. */
.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(253, 253, 252, 0.5);
}

.scroll-cue i {
  width: 22px;
  height: 34px;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  position: relative;
}

.scroll-cue i::after {
  content: '';
  position: absolute;
  top: 7px;
  left: 50%;
  width: 3px;
  height: 6px;
  border-radius: 2px;
  background: #ff8fae;
  transform: translateX(-50%);
  animation: scroll-dot 1.8s var(--ease-out) infinite;
}

@keyframes scroll-dot {
  0%   { opacity: 0; transform: translate(-50%, -3px); }
  35%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 12px); }
}

/* --- Compact hero used on interior pages ---------------------------------- */

.hero--page { padding-block: clamp(2.75rem, 1.8rem + 4.5vw, 5rem); }
.hero--page h1 { font-size: var(--fs-3xl); }

/* Breadcrumb trail inside the compact hero. */
.breadcrumb {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  color: rgba(253, 253, 252, 0.55);
  margin-bottom: var(--space-4);
}

.breadcrumb a:hover { color: #ff8fae; }
.breadcrumb li + li::before { content: '/'; margin-right: var(--space-2); }
.breadcrumb ol { display: flex; gap: var(--space-2); }


/* ==========================================================================
   09. SECTIONS & SHARED BLOCKS
   ========================================================================== */

/* Two-column media/text block with a parallax image. */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.75rem, 1rem + 3vw, 3.5rem);
  align-items: center;
}

.split--reverse .split-media { order: 2; }

.split-media {
  position: relative;
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
}

.split-media img {
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Small floating stat card overlapping the media frame. */
.float-card {
  position: absolute;
  right: -14px;
  bottom: -22px;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  text-align: center;
  min-width: 132px;
}

.float-card b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  color: var(--color-accent);
  line-height: 1;
}

.float-card span {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

/* --- Full-bleed parallax band --------------------------------------------- */

.band {
  position: relative;
  overflow: hidden;
  background: var(--color-primary);
  color: var(--color-text-invert);
  padding-block: clamp(3rem, 2rem + 4vw, 5rem);
  isolation: isolate;
}

.band-bg {
  position: absolute;
  inset: -18% 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  will-change: transform;
}

.band::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg,
              rgba(45, 50, 72, 0.92) 12%,
              rgba(187, 17, 51, 0.66) 100%);
}

.band h2 { color: var(--color-text-invert); }
.band p { color: rgba(253, 253, 252, 0.78); }

/* --- CTA panel ------------------------------------------------------------ */

.cta-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 1.2rem + 3.4vw, 3.5rem);
  background: linear-gradient(128deg, var(--color-brand-bg), var(--color-accent) 62%, #8d0d2b);
  color: var(--color-text-invert);
  box-shadow: 18px 18px 44px rgba(187, 17, 51, 0.28),
              -12px -12px 30px var(--nm-light);
  text-align: center;
}

/* Decorative concentric rings in the CTA corner. */
.cta-panel::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -12%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 60px solid rgba(255, 255, 255, 0.07);
  pointer-events: none;
}

.cta-panel h2 { color: var(--color-text-invert); }
.cta-panel p { color: rgba(255, 255, 255, 0.85); max-width: 52ch; margin-inline: auto; }

.cta-panel .btn {
  background: var(--color-secondary);
  color: var(--color-accent);
  box-shadow: 6px 6px 18px rgba(0, 0, 0, 0.18),
              -4px -4px 14px rgba(255, 255, 255, 0.14);
}

.cta-panel .btn--ghost {
  background: transparent;
  color: var(--color-text-invert);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45);
}

.cta-panel .btn--ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* --- Logo strip ----------------------------------------------------------- */

.logo-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-4) var(--space-7);
}

.logo-strip li {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 0.8rem + 0.5vw, 1.3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-muted);
  opacity: 0.55;
  transition: opacity var(--t-med) var(--ease-out),
              color var(--t-med) var(--ease-out);
}

.logo-strip li:hover { opacity: 1; color: var(--color-primary); }


/* ==========================================================================
   10. PORTFOLIO GRID
   Uniform grid: every card shares the same media aspect ratio and the card
   bodies align row by row, so the portfolio reads as an ordered catalogue
   rather than a scrapbook.
   ========================================================================== */

.work-grid {
  display: grid;
  /* auto-fill + minmax: the column count adapts to the container without
     any media queries, and cards never stretch past a comfortable width. */
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-5);
  align-items: stretch;
}

/* Denser variant used inside two-column layouts (e.g. the about page). */
.work-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-4);
}

.work-item { display: flex; }

/* Cards fill their grid cell so every row lines up. */
.work-item > .work-card { width: 100%; }

/* Items hidden by the active filter. */
.work-item.is-hidden { display: none; }

/* --- Work card ------------------------------------------------------------ */

.work-card {
  position: relative;
  /* Flex column so the body can grow and keep card bottoms aligned. */
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 0;
  text-align: left;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: transform var(--t-med) var(--ease-spring),
              box-shadow var(--t-med) var(--ease-out);
}

.work-card:hover,
.work-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.work-card-media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--color-surface-sunken);
  /* Fixed ratio is what turns the masonry look into a tidy grid. */
  aspect-ratio: 4 / 3;
}

.work-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease-out);
}

.work-grid--compact .work-card-media { aspect-ratio: 1; }

.work-card:hover .work-card-media img { transform: scale(1.06); }

/* Hover katmanı: karartma + üstte etiket, altta başlık ve tanıtım metni. */
.work-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-4);
  background: linear-gradient(180deg,
              rgba(45, 50, 72, 0.15) 0%,
              rgba(45, 50, 72, 0.10) 40%,
              rgba(30, 30, 28, 0.88) 100%);
  opacity: 0;
  transition: opacity var(--t-med) var(--ease-out);
}

.work-card:hover .work-card-overlay,
.work-card:focus-visible .work-card-overlay { opacity: 1; }

.work-card-chip {
  align-self: flex-start;
  padding: 0.3em 0.8em;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.work-card-overlay-bottom {
  display: block;
  color: var(--color-text-invert);
  /* Metin, karttan hafifçe yükselerek gelir. */
  transform: translateY(10px);
  transition: transform var(--t-med) var(--ease-out);
}

.work-card:hover .work-card-overlay-bottom,
.work-card:focus-visible .work-card-overlay-bottom { transform: translateY(0); }

.work-card-overlay-bottom strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.work-card-teaser {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--fs-sm);
  color: rgba(253, 253, 252, 0.82);
  line-height: 1.45;
}

/* --- Kart altı künye satırı (her zaman görünür) ---------------------------- */

.work-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4) var(--space-4) var(--space-5);
}

.work-card-owner { min-width: 0; }

.work-card-owner b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 650;
  color: var(--color-primary);
  letter-spacing: -0.01em;
  /* Uzun proje adları kartı bozmasın. */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-card-owner > span {
  display: block;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-card-stats {
  display: flex;
  gap: var(--space-3);
  flex: none;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.work-card-stats > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.work-card-stats svg { width: 14px; height: 14px; }

.work-card:hover .work-card-stats { color: var(--color-accent); }

/* --- Filter bar ------------------------------------------------------------ */

.filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  padding: 6px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  box-shadow: var(--shadow-inset-sm);
  margin-bottom: var(--space-6);
}

.filter-btn {
  padding: 0.55em 1.2em;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease-out),
              background-color var(--t-med) var(--ease-out),
              box-shadow var(--t-med) var(--ease-out);
}

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

.filter-btn.is-active {
  color: var(--color-accent);
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
}

/* Empty-state message when a filter matches nothing. */
.filter-empty {
  display: none;
  padding: var(--space-6);
  text-align: center;
  color: var(--color-text-muted);
}

.filter-empty.is-visible { display: block; }


/* ==========================================================================
   10b. PROJECT DETAIL PAGE (Behance-style long-form case study)
   A project is a vertical stack of content modules: images, image grids,
   text, quotes and video embeds. The sticky credits column on the left is
   what makes it read as a case study rather than a gallery.
   ========================================================================== */

.project-page {
  /* Per-project accent, overridden inline from the admin colour picker. */
  --project-accent: var(--color-accent);
}

/* --- Cover ---------------------------------------------------------------- */

.project-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--color-primary);
  color: var(--color-text-invert);
  padding-block: clamp(3rem, 2rem + 5vw, 6rem);
  text-align: center;
}

/* Blurred, darkened cover art as the backdrop. */
.project-hero-bg {
  position: absolute;
  inset: -12%;
  z-index: -2;
  background-size: cover;
  background-position: center;
  filter: blur(26px) saturate(120%);
  opacity: 0.45;
  transform: scale(1.1);
  will-change: transform;
}

.project-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
              rgba(45, 50, 72, 0.72) 0%,
              rgba(45, 50, 72, 0.9) 100%);
}

.project-hero-inner { max-width: 780px; margin-inline: auto; }

.project-hero .eyebrow { color: #ff8fae; justify-content: center; }

.project-hero h1 {
  font-size: var(--fs-3xl);
  color: var(--color-text-invert);
  margin-bottom: var(--space-4);
}

.project-hero > .container > p {
  color: rgba(253, 253, 252, 0.8);
  font-size: var(--fs-lg);
  max-width: 62ch;
  margin-inline: auto;
}

.project-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3) var(--space-6);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: var(--fs-sm);
  color: rgba(253, 253, 252, 0.62);
}

.project-stats > span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.project-stats b { color: var(--color-text-invert); font-weight: 650; }
.project-stats svg { width: 16px; height: 16px; opacity: 0.75; }

/* --- Two-column layout ----------------------------------------------------- */

.project-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(1.75rem, 1rem + 3vw, 3.5rem);
  align-items: start;
}

.project-credits {
  /* Follows the reader down the page, as on Behance. */
  position: sticky;
  top: calc(var(--header-h) + 16px);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
}

.project-credits dl { margin: 0; display: grid; gap: var(--space-4); }

.project-credits dt {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.project-credits dd {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--color-primary);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* --- Appreciate button ----------------------------------------------------- */

.project-like { margin-top: var(--space-5); }

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  justify-content: center;
  padding: 0.8em 1.2em;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--project-accent);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-med) var(--ease-spring),
              box-shadow var(--t-med) var(--ease-out),
              background-color var(--t-med) var(--ease-out),
              color var(--t-med) var(--ease-out);
}

.like-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  background: var(--project-accent);
  color: var(--color-text-invert);
  box-shadow: var(--shadow-md);
}

.like-btn:active:not(:disabled) { transform: translateY(0); box-shadow: var(--shadow-inset-sm); }

/* Already appreciated: pressed in, no longer interactive. */
.like-btn.is-liked {
  cursor: default;
  box-shadow: var(--shadow-inset-sm);
  color: var(--project-accent);
}

.like-btn svg { width: 17px; height: 17px; }

.like-btn em {
  font-style: normal;
  padding-left: var(--space-2);
  margin-left: var(--space-1);
  border-left: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.like-btn:hover:not(:disabled) em { color: rgba(255, 255, 255, 0.75); border-color: rgba(255, 255, 255, 0.3); }

.project-cta-note {
  margin: var(--space-5) 0 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

/* --- Content modules -------------------------------------------------------- */

.project-body { min-width: 0; }

.project-module { margin-bottom: clamp(1.75rem, 1rem + 2.5vw, 3rem); }
.project-module:last-child { margin-bottom: 0; }

.project-module--text { max-width: 68ch; }

.project-module--text h2 {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-4);
}

.project-module--text p { font-size: var(--fs-md); line-height: 1.72; }

/* Pull quote. */
.project-module--quote {
  margin-inline: 0;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-inset);
  border-left: 4px solid var(--project-accent);
}

.project-module--quote p {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: 1.45;
  color: var(--color-primary);
  letter-spacing: -0.015em;
  margin: 0;
}

.project-module--quote cite {
  display: block;
  margin-top: var(--space-4);
  font-style: normal;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

/* Image grids — 1, 2 or 3 across. */
.project-images { display: grid; gap: var(--space-3); }
.project-module--duo  .project-images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project-module--trio .project-images { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Each image is a button so it can open in the shared lightbox. */
.project-figure {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--color-surface-sunken);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-med) var(--ease-spring),
              box-shadow var(--t-med) var(--ease-out);
}

.project-figure:hover,
.project-figure:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.project-figure img { width: 100%; height: auto; display: block; }

.project-module figcaption {
  margin-top: var(--space-3);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  text-align: center;
}

/* Full-bleed images break out of the content column. */
.project-module.is-wide {
  /* Negative margin pulls the block past the grid column on wide screens. */
  margin-inline: calc(-1 * clamp(0rem, -2rem + 6vw, 5rem));
}

/* Video embed keeps a 16:9 box while the iframe fills it. */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.project-module--spacer { height: clamp(1rem, 3vw, 2.5rem); margin-bottom: 0; }

/* --- Next project ----------------------------------------------------------- */

.project-next {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(3rem, 2rem + 4vw, 5rem);
  background: var(--color-primary);
  color: var(--color-text-invert);
  text-align: center;
}

.project-next-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  opacity: 0.3;
  transition: transform var(--t-slow) var(--ease-out), opacity var(--t-med) var(--ease-out);
}

.project-next:hover .project-next-bg { transform: scale(1.05); opacity: 0.42; }

.project-next::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(45, 50, 72, 0.82), rgba(30, 30, 28, 0.92));
}

.project-next-inner { display: block; }
.project-next .eyebrow { color: #ff8fae; justify-content: center; }

.project-next strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-3);
}

.project-next-excerpt {
  display: block;
  max-width: 54ch;
  margin: 0 auto var(--space-5);
  color: rgba(253, 253, 252, 0.72);
  font-size: var(--fs-base);
}

/* The whole block is the link, so the button is decorative. */
.project-next .btn { pointer-events: none; }


/* ==========================================================================
   11. CARDS, STATS, TIMELINE, ACCORDION
   ========================================================================== */

.card {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  transition: transform var(--t-med) var(--ease-spring),
              box-shadow var(--t-med) var(--ease-out);
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* Highlighted pricing card. */
.card--featured {
  box-shadow: var(--shadow-lg);
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.card h3 { margin-top: var(--space-4); font-size: var(--fs-lg); }

/* Package price line. */
.package-price {
  margin-top: var(--space-4);
  margin-bottom: 0;
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.package-price b {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  color: var(--color-accent);
  letter-spacing: -0.03em;
  line-height: 1;
}

.package-price span { font-size: var(--fs-sm); }

.card p {
  font-size: var(--fs-base);
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.card-list {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  display: grid;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.card-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

/* Crimson check bullet. */
.card-list li::before {
  content: '';
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: inset 0 0 0 4px var(--color-surface);
}

/* Numbered process card. */
.step {
  position: relative;
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  height: 100%;
}

.step-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(45, 50, 72, 0.25);
  margin-bottom: var(--space-3);
}

.step h3 { font-size: var(--fs-base); }

.step p {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin: 0;
}

/* --- Stats ---------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-inset);
}

.stat { text-align: center; padding: var(--space-3); }

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat span {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

/* --- Testimonial ---------------------------------------------------------- */

.quote {
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.quote-mark {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 0.6;
  color: var(--color-accent);
  opacity: 0.35;
  margin-bottom: var(--space-4);
}

.quote blockquote {
  margin: 0 0 var(--space-5);
  font-size: var(--fs-md);
  color: var(--color-text);
  flex: 1;
}

.quote-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.quote-author img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-xs);
}

.quote-author b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  color: var(--color-primary);
}

.quote-author span {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

/* --- Team ----------------------------------------------------------------- */

.team-card {
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--t-med) var(--ease-spring),
              box-shadow var(--t-med) var(--ease-out);
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.team-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: filter var(--t-slow) var(--ease-out);
}

.team-card:hover img { filter: grayscale(0); }

.team-card-body { padding: var(--space-4) var(--space-5) var(--space-5); }

.team-card-body h3 { font-size: var(--fs-base); margin-bottom: 2px; }

.team-card-body span {
  display: block;
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.team-card-body p {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin: 0;
}

/* --- Timeline ------------------------------------------------------------- */

.timeline {
  position: relative;
  padding-left: var(--space-6);
}

/* Vertical rail. */
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--color-accent), rgba(187, 17, 51, 0.12));
}

.timeline li { position: relative; padding-bottom: var(--space-5); }
.timeline li:last-child { padding-bottom: 0; }

/* Node dot. */
.timeline li::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-6) + 1px);
  top: 7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: var(--shadow-xs), inset 0 0 0 3px var(--color-accent);
}

.timeline time {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-1);
}

.timeline h3 { font-size: var(--fs-base); margin-bottom: var(--space-1); }

.timeline p {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin: 0;
}

/* --- Accordion (native <details>) ------------------------------------------ */

.accordion { display: grid; gap: var(--space-3); }

.accordion details {
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--t-med) var(--ease-out);
}

.accordion details[open] { box-shadow: var(--shadow-inset); }

.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--color-primary);
  list-style: none;
}

.accordion summary::-webkit-details-marker { display: none; }

/* Plus/minus toggle drawn with pseudo-elements. */
.accordion summary::after {
  content: '';
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    linear-gradient(var(--color-accent), var(--color-accent)) center/10px 2px no-repeat,
    linear-gradient(var(--color-accent), var(--color-accent)) center/2px 10px no-repeat,
    var(--color-surface);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-med) var(--ease-out);
}

.accordion details[open] summary::after {
  transform: rotate(135deg);
  background:
    linear-gradient(var(--color-accent), var(--color-accent)) center/10px 2px no-repeat,
    var(--color-surface);
}

.accordion .accordion-body {
  padding: 0 var(--space-5) var(--space-5);
  font-size: var(--fs-base);
  color: var(--color-text-muted);
}


/* ==========================================================================
   12. FORMS
   ========================================================================== */

.form { display: grid; gap: var(--space-4); }

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.field { display: grid; gap: var(--space-2); }

.field label {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-primary);
}

.field label .req { color: var(--color-accent); }

/* Inputs are pressed into the surface — the neomorphic "well". */
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.85em 1.1em;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-inset-sm);
  font-size: var(--fs-base);
  color: var(--color-text);
  transition: box-shadow var(--t-med) var(--ease-out);
}

.field textarea { resize: vertical; min-height: 148px; }

.field select { appearance: none; cursor: pointer; }

/* Custom dropdown chevron. */
.field.field--select { position: relative; }

.field.field--select::after {
  content: '';
  position: absolute;
  right: 1.1em;
  bottom: 1.35em;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  transform: rotate(45deg);
  pointer-events: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  box-shadow: var(--shadow-inset-sm), 0 0 0 2px var(--color-accent);
}

.field input::placeholder,
.field textarea::placeholder { color: #a3a3a0; }

/* Validation state driven by js/main.js. */
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  box-shadow: var(--shadow-inset-sm), 0 0 0 2px var(--color-accent);
}

.field-error {
  font-size: var(--fs-xs);
  color: var(--color-accent);
  min-height: 1em;
}

/* Consent checkbox. */
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  cursor: pointer;
}

.checkbox input {
  appearance: none;
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 7px;
  background: var(--color-surface);
  box-shadow: var(--shadow-inset-sm);
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out);
}

.checkbox input:checked {
  background: var(--color-accent);
  box-shadow: var(--shadow-xs);
}

/* Checkmark glyph. */
.checkbox input:checked::after {
  content: '';
  display: block;
  width: 5px;
  height: 10px;
  margin: 3px auto 0;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(42deg);
}

.checkbox a { color: var(--color-accent); text-decoration: underline; }

/* The consent checkbox lives in `.checkbox-field`, not `.field`, so it needs
   its own invalid state. */
.checkbox-field.has-error .checkbox input {
  box-shadow: var(--shadow-inset-sm), 0 0 0 2px var(--color-accent);
}

.checkbox-field .field-error { margin-top: var(--space-2); }

/* Success / status message. */
.form-status {
  display: none;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm), inset 4px 0 0 var(--color-accent);
  font-size: var(--fs-sm);
  color: var(--color-primary);
}

.form-status.is-visible { display: flex; }

/* Server-side validation summary. */
.form-status--error {
  box-shadow: var(--shadow-sm), inset 4px 0 0 var(--color-brand-bg);
}

/* Honeypot: off-screen for humans, still fillable by naive bots.
   `display: none` is avoided because many bots skip hidden inputs. */
.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Contact info list ----------------------------------------------------- */

.info-list { display: grid; gap: var(--space-4); }

.info-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-med) var(--ease-spring);
}

.info-item:hover { transform: translateX(4px); }

.info-item h3 { font-size: var(--fs-sm); margin-bottom: 2px; }

.info-item p,
.info-item a {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.info-item a:hover { color: var(--color-accent); }


/* ==========================================================================
   13. FOOTER
   ========================================================================== */

.site-footer {
  background: var(--color-primary);
  color: rgba(253, 253, 252, 0.72);
  padding-block: var(--space-5);
  font-size: var(--fs-sm);
}

/* Copyright and social icons on a single line. */
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-text-invert);
  letter-spacing: -0.02em;
}

.footer-brand svg { width: 18px; height: 18px; color: #ff8fae; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-links a { transition: color var(--t-fast) var(--ease-out); }
.footer-links a:hover { color: #ff8fae; }

.socials { display: flex; gap: var(--space-2); }

.socials a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(253, 253, 252, 0.8);
  box-shadow: var(--shadow-dark);
  transition: transform var(--t-med) var(--ease-spring),
              background-color var(--t-med) var(--ease-out),
              color var(--t-med) var(--ease-out);
}

.socials a:hover {
  transform: translateY(-3px);
  background: var(--color-brand-bg);
  color: var(--color-text-invert);
}

.socials a:active { box-shadow: var(--shadow-dark-inset); }

.socials svg { width: 18px; height: 18px; }


/* ==========================================================================
   14. FLOATING UI
   ========================================================================== */

/* --- WhatsApp button --------------------------------------------------------
   Sits above the back-to-top button in the same corner stack. The label is
   collapsed to a circle by default and expands on hover, so it never blocks
   content but stays discoverable. */

.wa-button {
  position: fixed;
  right: clamp(1rem, 2vw, 1.75rem);
  /* Leaves room for the back-to-top button underneath. */
  bottom: calc(clamp(1rem, 2vw, 1.75rem) + 62px);
  z-index: var(--z-float);

  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  height: 50px;
  padding: 0 6px 0 0;
  border-radius: var(--radius-pill);
  background: #25d366;
  color: #fff;
  box-shadow: 6px 6px 20px rgba(37, 211, 102, 0.34),
              -4px -4px 14px var(--nm-light);
  overflow: hidden;
  /* Collapsed: only the icon plate is visible. */
  max-width: 50px;
  transition: max-width var(--t-slow) var(--ease-out),
              transform var(--t-med) var(--ease-spring),
              box-shadow var(--t-med) var(--ease-out),
              background-color var(--t-med) var(--ease-out);
}

.wa-button:hover,
.wa-button:focus-visible {
  max-width: 340px;
  transform: translateY(-3px);
  background: #1eba59;
  box-shadow: 10px 10px 28px rgba(37, 211, 102, 0.42),
              -5px -5px 18px var(--nm-light);
}

.wa-button:active { transform: translateY(0); }

.wa-button-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: none;
}

.wa-button-icon svg { width: 26px; height: 26px; }

.wa-button-label {
  padding-right: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}

/* Gentle attention pulse — runs a few times, then stops for good. */
.wa-button::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid #25d366;
  animation: wa-pulse 2.4s var(--ease-out) 3;
  pointer-events: none;
}

@keyframes wa-pulse {
  0%   { opacity: 0.7; transform: scale(1); }
  70%  { opacity: 0;   transform: scale(1.35); }
  100% { opacity: 0;   transform: scale(1.35); }
}

/* --- Back to top ----------------------------------------------------------- */

.to-top {
  position: fixed;
  right: clamp(1rem, 2vw, 1.75rem);
  bottom: clamp(1rem, 2vw, 1.75rem);
  z-index: var(--z-float);
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-accent);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  /* Hidden until the user scrolls past the first viewport. */
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.9);
  transition: opacity var(--t-med) var(--ease-out),
              visibility var(--t-med) var(--ease-out),
              transform var(--t-med) var(--ease-spring),
              box-shadow var(--t-med) var(--ease-out);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.to-top:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.to-top:active { box-shadow: var(--shadow-inset-sm); }
.to-top svg { width: 20px; height: 20px; }

/* --- Lightbox -------------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2.5rem);
  background: rgba(30, 30, 28, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-med) var(--ease-out),
              visibility var(--t-med) var(--ease-out);
}

.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox-figure {
  position: relative;
  margin: 0;
  max-width: min(1080px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transform: scale(0.94);
  transition: transform var(--t-med) var(--ease-spring);
}

.lightbox.is-open .lightbox-figure { transform: scale(1); }

.lightbox-figure img {
  max-height: 76vh;
  width: auto;
  margin-inline: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.7);
  background: var(--color-primary);
}

.lightbox-caption {
  text-align: center;
  color: rgba(253, 253, 252, 0.82);
  font-size: var(--fs-sm);
}

.lightbox-caption b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-base);
  color: var(--color-text-invert);
}

/* Shared circular control styling for close / prev / next. */
.lightbox-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background-color var(--t-fast) var(--ease-out),
              transform var(--t-med) var(--ease-spring);
}

.lightbox-btn:hover {
  background: var(--color-brand-bg);
  transform: scale(1.08);
}

.lightbox-btn svg { width: 20px; height: 20px; }

.lightbox-close { top: clamp(0.5rem, 2vw, 1.5rem); right: clamp(0.5rem, 2vw, 1.5rem); position: fixed; }
.lightbox-prev  { left: clamp(0.5rem, 2vw, 1.5rem); top: 50%; transform: translateY(-50%); position: fixed; }
.lightbox-next  { right: clamp(0.5rem, 2vw, 1.5rem); top: 50%; transform: translateY(-50%); position: fixed; }

.lightbox-prev:hover,
.lightbox-next:hover { transform: translateY(-50%) scale(1.08); }

.lightbox-counter {
  position: fixed;
  bottom: clamp(0.75rem, 2vw, 1.5rem);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.35em 0.9em;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--fs-xs);
  font-family: var(--font-display);
  letter-spacing: 0.08em;
}


/* ==========================================================================
   15. SCROLL ANIMATIONS
   Elements start offset and transparent; IntersectionObserver adds
   `.is-visible` when they enter the viewport.
   ========================================================================== */

/* Everything below is scoped to `.js`, a class the inline snippet in each
   <head> adds to <html>. Without it the start state never applies, so if
   scripting is unavailable or main.js fails to load the content renders
   normally instead of staying permanently invisible. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease-out),
              transform 0.7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.js [data-reveal='left']  { transform: translateX(-32px); }
.js [data-reveal='right'] { transform: translateX(32px); }
.js [data-reveal='zoom']  { transform: scale(0.94); }

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Parallax layers are moved by JS via a CSS custom property so that the
   transform stays composited and never fights other transforms. */
[data-parallax] {
  transform: translate3d(0, var(--parallax-y, 0px), 0);
  will-change: transform;
}


/* ==========================================================================
   16. RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  /* Credits move above the content and stop sticking. */
  .project-layout { grid-template-columns: 1fr; }

  .project-credits { position: static; }

  .project-credits dl {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .project-module--trio .project-images { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Full-bleed has nothing to bleed into once the sidebar is gone. */
  .project-module.is-wide { margin-inline: 0; }
}

@media (max-width: 860px) {
  :root { --header-h: 96px; }

  /* --- Mobile navigation drawer ------------------------------------------- */
  .header-inner { align-items: flex-start; }

  .nav-toggle { display: grid; }

  .site-nav {
    position: absolute;
    top: calc(100% + var(--space-4));
    left: 0;
    right: 0;
    /* Collapsed by default; expanded when `.is-open` is applied. */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height var(--t-slow) var(--ease-out),
                opacity var(--t-med) var(--ease-out);
  }

  .site-nav.is-open { max-height: 460px; opacity: 1; }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-lg);
  }

  .site-nav a {
    padding: 0.8em 1.1em;
    border-radius: var(--radius-md);
    font-size: var(--fs-base);
  }

  .site-nav a[aria-current='page'] { box-shadow: var(--shadow-inset-sm); }

  /* --- Layout collapse ----------------------------------------------------- */
  .grid--3,
  .grid--2,
  .split { grid-template-columns: 1fr; }

  .split--reverse .split-media { order: 0; }

  .section-head--split { align-items: flex-start; }
}

@media (max-width: 640px) {
  .grid--4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  /* Single column keeps card text readable on narrow screens. */
  .work-grid { grid-template-columns: 1fr; }
  .work-grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Touch devices have no hover, so show the overlay text permanently. */
  .work-card-overlay { opacity: 1; }
  .work-card-overlay-bottom { transform: none; }

  .project-module--duo .project-images,
  .project-module--trio .project-images { grid-template-columns: 1fr; }

  /* Never expand the WhatsApp label on touch screens — a tap would open
     the link anyway, and an expanding pill would cover content. */
  .wa-button,
  .wa-button:hover,
  .wa-button:focus-visible { max-width: 50px; }

  .hero-meta { gap: var(--space-3); flex-direction: column; }

  .footer-inner { justify-content: center; text-align: center; }

  .float-card { right: 50%; transform: translateX(50%); bottom: -18px; }

  .btn { width: 100%; }
  .hero-actions .btn, .cta-panel .btn { width: auto; }
}

@media (max-width: 420px) {
  .brand-name { font-size: 1.2rem; }
  .brand-mark { width: 38px; height: 38px; }
  .stats { grid-template-columns: 1fr; }
  .lightbox-prev, .lightbox-next { display: none; }
}


/* ==========================================================================
   17. ACCESSIBILITY & PRINT
   ========================================================================== */

/* Honour the OS-level "reduce motion" preference: keep everything visible
   and static rather than animating it into place. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  [data-parallax] { transform: none !important; }
}

@media print {
  .site-header,
  .to-top,
  .wa-button,
  .lightbox,
  .hero-canvas { display: none !important; }

  body { background: #fff; color: #000; }
  .nm, .card, .work-card { box-shadow: none; border: 1px solid #ddd; }
}
