/* ==========================================================================
   MATIVIA — Base Styles
   Matches the live mativia.at brand system: dark bg, sage-green accent,
   Montserrat, pill buttons, rounded cards. See README.md for structure.
   ========================================================================== */

/* Montserrat, self-hosted (variable font, one file covers 400–700) so no
   visitor IP is sent to Google Fonts — GDPR. */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/montserrat-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #07080a;
  --surface: #0f1210;
  --surface-alt: #121614;
  --text: #f3f4f0;
  --text-muted: #9a9d97;
  --accent: #3f7857;
  --accent-strong: #6bab84;
  --border: rgba(255, 255, 255, 0.1);
  --radius: 16px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --max-width: 1180px;
  --font-display: "Montserrat", system-ui, -apple-system, sans-serif;
  --font-body: "Montserrat", system-ui, -apple-system, sans-serif;
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p {
  margin: 0 0 1em;
  color: var(--text-muted);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 0.75em;
  display: block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  min-height: 48px;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn-primary:hover {
  opacity: 0.88;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--accent-strong);
  color: var(--accent-strong);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.45s var(--ease-smooth), padding-top 0.45s var(--ease-smooth);
}

/* Blur lives on a pseudo-element, not .site-header itself — a
   backdrop-filter on an element becomes the containing block for its
   position:fixed descendants, which breaks the mobile nav-links panel's
   top/bottom sizing. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(7, 8, 10, 0.85);
  backdrop-filter: blur(10px);
}

.nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Same 24px side gutter as .container, so the logo lines up with the
     page content and never touches the screen edge. */
  padding: 18px 24px;
  min-height: 44px;
  transition: width 0.45s var(--ease-smooth), max-width 0.45s var(--ease-smooth),
    margin 0.45s var(--ease-smooth), padding 0.45s var(--ease-smooth);
}

.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  border-radius: var(--radius-pill);
  background: rgba(15, 18, 16, 0.92);
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  transition: opacity 0.45s var(--ease-smooth);
}

/* Shrinks the nav into a floating pill once the page is scrolled. The
   width formula (100% minus a fixed inset, capped by max-width) gives
   an even side margin on narrow screens and a centered pill on wide
   ones, from the same rule. The top gap is padding on .site-header, not
   margin on .nav — a margin there collapses through .site-header (which
   has no border/padding of its own to contain it), so the pill would
   still sit flush against the very top with no visible page behind it.
   js/script.js keeps --header-h in sync so the mobile nav-links panel
   (position:fixed) still lines up with the header's actual height,
   pill or not. */
.site-header.scrolled::before {
  opacity: 0;
}
.site-header.scrolled {
  border-bottom-color: transparent;
  padding-top: 14px;
}
.site-header.scrolled .nav {
  width: calc(100% - 32px);
  max-width: 760px;
  margin: 0 auto;
  padding: 10px 24px;
  min-height: 40px;
}
.site-header.scrolled .nav::before {
  opacity: 1;
  backdrop-filter: blur(14px);
}

/* With the mobile menu open the pill morphs back into the flat,
   full-width bar, so the open menu looks the same wherever the page is
   scrolled to (no page content peeking out around a floating pill). */
.site-header.menu-open {
  border-bottom-color: var(--border);
  padding-top: 0;
  background: var(--bg); /* solid under the border line too */
}
.site-header.menu-open::before {
  opacity: 1;
  background: var(--bg);
}
.site-header.menu-open .nav {
  width: 100%;
  max-width: var(--max-width);
  padding: 18px 24px;
  min-height: 44px;
}
.site-header.menu-open .nav::before {
  opacity: 0;
}

.logo {
  display: inline-flex;
  align-items: center;
}

.logo img {
  height: 18px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-strong);
}

.nav-cta {
  display: none;
}

.nav-cta-mobile {
  display: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.35s var(--ease-smooth), opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 760px) {
  .nav-cta { display: inline-flex; }
}

@media (max-width: 759px) {
  .nav {
    position: relative;
    justify-content: flex-end;
  }
  .nav .logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
  .nav-links {
    position: fixed;
    inset: var(--header-h, 61px) 0 0 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 12px 24px 24px;
    /* Below the logo and toggle (z-index within .nav), fades in rather
       than sliding down so no page content flashes through. */
    z-index: -1;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s var(--ease-smooth), transform 0.4s var(--ease-smooth),
      visibility 0s linear 0.4s;
    pointer-events: none;
    overflow-y: auto;
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
    pointer-events: auto;
  }
  .nav-links a {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-toggle {
    display: flex;
  }

  .nav-links a.nav-cta-mobile {
    display: inline-flex;
    width: 100%;
    margin-top: 24px;
    padding: 14px 24px;
    color: var(--bg);
    border-bottom: 1px solid var(--text);
  }
}

/* ---------- Hero ---------- */
.hero,
.hero-sub {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

/* Desktop gets a tall hero section; on mobile Safari's dynamic address
   bar makes a viewport-height min-height read as leftover empty space
   below the content, so mobile just sizes to its content instead. */
@media (min-width: 760px) {
  .hero,
  .hero-sub {
    min-height: 85vh;
    min-height: 85dvh;
  }
}

.hero {
  padding: 96px 0 48px;
}

.hero-sub {
  padding: 96px 0 48px;
}
@media (max-width: 759px) {
  /* Subpages: tighter hero so the page's content starts on screen one. */
  .hero-sub {
    padding: 56px 0 40px;
  }
  .hero-sub h1 {
    margin-bottom: 0.5em;
  }
}

.hero::before,
.hero-sub::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(60% 55% at 20% 20%, rgba(107, 171, 132, 0.48), transparent 62%),
    radial-gradient(55% 65% at 80% 25%, rgba(63, 120, 87, 0.4), transparent 68%),
    radial-gradient(75% 60% at 50% 90%, rgba(20, 40, 30, 0.7), transparent 72%),
    linear-gradient(160deg, #0d1a13 0%, #060807 55%, #050605 100%);
  filter: saturate(1.15);
}

@media (prefers-reduced-motion: no-preference) {
  .hero::before,
  .hero-sub::before {
    animation: hero-drift 22s ease-in-out infinite alternate;
  }
}
@keyframes hero-drift {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.06) translate(-1%, 1%); }
}

.hero .hero-inner,
.hero-sub .container {
  position: relative;
  z-index: 1;
  width: 100%;
}

@media (min-width: 760px) {
  .hero .hero-inner,
  .hero-sub .container {
    /* Nudges the content group up from dead-center, so the hero reads
       as intentionally placed rather than mathematically centered.
       Mobile has no min-height to center within, so this doesn't apply
       there — its spacing comes from ordinary padding instead. */
    margin-top: clamp(-60px, -6vh, -20px);
  }
}

.hero-inner {
  max-width: 760px;
}

.hero .eyebrow,
.hero-sub .eyebrow {
  margin-bottom: 1.25em;
}

.hero h1,
.hero-sub h1 {
  margin-bottom: 0.7em;
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 0;
}

/* Home hero has a shorter lead for mobile and a slightly fuller one for
   desktop — only one of the two is ever shown. */
.lead-desktop {
  display: none;
}
@media (min-width: 760px) {
  .lead-mobile { display: none; }
  .lead-desktop { display: block; }
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.hero .hero-inner {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.hero p.lead {
  margin-left: auto;
  margin-right: auto;
}
.hero-actions {
  justify-content: center;
}

/* Desktop home hero: copy left-aligned, featured work as a card on the
   right (variant C). The card is hidden on phones, where the same photo
   is the full-bleed background instead. */
.hero-card { display: none; }

@media (min-width: 760px) {
  .hero .hero-inner {
    max-width: var(--max-width);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: clamp(32px, 5vw, 80px);
    align-items: center;
    text-align: left;
  }
  .hero .hero-text { grid-column: 1; grid-row: 1; max-width: 600px; }
  .hero .hero-actions {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    justify-content: flex-start;
  }
  .hero p.lead {
    margin-left: 0;
    max-width: 480px;
  }
  .hero-card {
    grid-column: 2;
    grid-row: 1 / span 2;
    position: relative;
    display: block;
    height: min(64vh, 620px);
    aspect-ratio: 4 / 5;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
  }
  .hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
    transition: transform 0.8s var(--ease-smooth);
  }
  .hero-card:hover img { transform: scale(1.03); }
  .hero-card-label {
    position: absolute;
    left: 20px;
    bottom: 18px;
    padding: 7px 12px;
    border-radius: var(--radius-pill);
    background: rgba(7, 8, 10, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text);
  }
  .hero .hero-actions .btn-outline::after {
    content: "→";
    transition: transform 0.2s var(--ease-smooth);
  }
  .hero .hero-actions .btn-outline:hover::after { transform: translateX(3px); }
}

/* Tablet widths: smaller card so the headline keeps room. */
@media (min-width: 760px) and (max-width: 1023px) {
  .hero-card { height: min(46vh, 420px); }
  .hero h1 { font-size: clamp(2.4rem, 5.4vw, 3.4rem); }
}

/* Mobile home hero: editorial layout — full-bleed clothing photo with
   the copy set bottom-left over a dark fade. Desktop keeps the centred
   gradient hero above. */
.desktop-only { display: none; }
@media (min-width: 760px) {
  .desktop-only { display: inline; }
}

@media (max-width: 759px) {
  .hero {
    min-height: 88vh;
    min-height: 88svh; /* small viewport: stable under Safari's toolbar */
    padding: 0;
    align-items: flex-end;
  }
  .hero::before {
    background:
      linear-gradient(180deg, rgba(7, 8, 10, 0.05) 0%, rgba(7, 8, 10, 0.3) 30%,
        rgba(7, 8, 10, 0.88) 52%, var(--bg) 78%),
      url("../assets/work/clothing-drop.jpg") center 15% / cover no-repeat;
    filter: none;
    animation: none;
  }
  .hero .hero-inner {
    margin: 0;
    padding-bottom: 40px;
    text-align: left;
  }
  /* Eyebrow sits in a small frosted label so it stays legible over any
     part of the photo. */
  .hero .eyebrow {
    display: inline-block;
    padding: 7px 12px;
    border-radius: var(--radius-pill);
    background: rgba(7, 8, 10, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    white-space: nowrap;
    margin-bottom: 1.1em;
  }
  .hero h1 {
    /* Scales with screen height too, so short phones (iPhone SE) keep
       the photo's subject visible above the copy. */
    font-size: min(2.8rem, 6.4svh);
    margin-bottom: 0.4em;
  }
  .hero p.lead {
    margin-left: 0;
    font-size: 1rem;
    color: #c9ccc5;
    max-width: 32ch;
  }
  .hero-actions {
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
  }
  .hero .hero-actions .btn {
    width: auto;
    min-width: 0;
  }
  /* Secondary action: frosted pill matching the eyebrow label — same
     height as the main button, clearly quieter. */
  .hero .hero-actions .btn-outline {
    background: rgba(7, 8, 10, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--text);
    gap: 6px;
  }
  .hero-actions .btn-outline::after {
    content: "→";
    transition: transform 0.2s var(--ease-smooth);
  }
  .hero-actions .btn-outline:hover::after,
  .hero-actions .btn-outline:active::after {
    transform: translateX(3px);
  }
}
/* Very narrow phones (iPhone SE 1st gen): two pills don't fit side by
   side, so stack them at full width instead of wrapping unevenly. */
@media (max-width: 359px) {
  .hero .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero .hero-actions .btn {
    width: 100%;
  }
  .hero p.lead {
    font-size: 0.95rem;
  }
}

/* ---------- Sections ---------- */
section {
  padding: 72px 0;
}

@media (max-width: 759px) {
  section { padding: 48px 0; }
}

.section-border {
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.section-cta {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

/* ---------- Cards / Grids ---------- */
/* Fixed 3-column grid for exactly-3-item sets: jumps straight from 1
   to 3 columns instead of an auto-fit 2-column stage, which would
   otherwise strand the 3rd item alone in its own row on tablets. */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card h3 {
  font-size: clamp(1.5rem, 2.4vw, 1.85rem);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.card p {
  font-size: 0.95rem;
  font-weight: 400;
}

.card .price {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-top: auto;
}

.service-block {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: start;
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}
.service-block:last-child { border-bottom: none; }

@media (max-width: 800px) {
  .service-block {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.package-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.package-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.package-list .name {
  font-weight: 600;
}
.package-list .desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: block;
  margin-top: 4px;
}
.package-list .amount {
  font-family: var(--font-display);
  color: var(--accent-strong);
  white-space: nowrap;
}

.tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent-strong);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

/* Additional / secondary services — intentionally smaller weight */
.secondary-services {
  margin-top: 24px;
}
.secondary-services h4 {
  font-family: var(--font-body);
  text-transform: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}
.secondary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.secondary-grid .mini-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.secondary-grid .mini-card h5 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 600;
}
.secondary-grid .mini-card p {
  font-size: 0.85rem;
  margin: 0;
}

/* ---------- Work / Portfolio ---------- */
.filter-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.filter-tabs button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 10px 20px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-tabs button.active,
.filter-tabs button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* Home page's featured-work preview is always exactly 3 items — same
   1-to-3 jump as .grid-3, so it doesn't strand a lone 3rd card. */
.work-grid-3 {
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .work-grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Work / Portfolio — project sections ---------- */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.project {
  padding-bottom: 64px;
  border-bottom: 1px solid var(--border);
}
.project:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.project-header {
  max-width: 640px;
  margin-bottom: 28px;
}
.project-header h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  margin-bottom: 0.4em;
}
.project-header p {
  font-size: 0.95rem;
  margin: 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
/* A project with a single image shouldn't stretch full-bleed width on
   wide screens — cap it so it still reads as "one piece". */
.project-grid:has(.work-item:only-child) {
  grid-template-columns: minmax(280px, 420px);
}

.work-item {
  aspect-ratio: 4/5;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  transition: opacity 0.3s var(--ease-smooth), transform 0.3s var(--ease-smooth), border-color 0.3s ease;
}
.work-item.is-fading {
  opacity: 0;
  transform: scale(0.97);
}

.project {
  transition: opacity 0.3s var(--ease-smooth);
}
.project.is-fading {
  opacity: 0;
}

.work-item img,
.work-item video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Wide logo marks don't survive being cropped to the 4:5 photo grid —
   letterbox them instead so the full mark stays visible. */
.work-item.contain img {
  object-fit: contain;
  padding: 0;
}
.work-item.contain-padded img {
  object-fit: contain;
  padding: 56px;
}

.work-item .placeholder-note {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.8rem;
  border: 1px dashed var(--border);
  margin: 8px;
  border-radius: 4px;
}

.work-item .label {
  position: relative;
  z-index: 2;
  padding: 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  width: 100%;
  font-size: 0.85rem;
  color: var(--text);
}

/* ---------- Trust bar (logo marquee) ---------- */
.marquee {
  overflow: hidden;
  margin-top: 36px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 100px;
  align-items: center;
  animation: marquee-scroll 56s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.trust-item {
  flex-shrink: 0;
  white-space: nowrap;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  opacity: 0.85;
  display: inline-flex;
  align-items: center;
}

/* Client marks vary a lot in shape (tall/narrow vs. square) — pinning
   a single height and letting width follow each logo's own proportions
   reads far more consistent than forcing every mark into an identical
   square box, which shrinks narrow marks down to a sliver. */
.trust-item img {
  height: 60px;
  width: auto;
  max-width: 110px;
  display: block;
}

@keyframes marquee-scroll {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee {
    -webkit-mask-image: none;
    mask-image: none;
  }
  .marquee-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
  }
  .marquee-track .trust-item[aria-hidden="true"] {
    display: none;
  }
}

/* ---------- Workflow ---------- */
.workflow-list {
  counter-reset: step;
  display: grid;
  gap: 20px;
}
.workflow-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 20px;
  align-items: start;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.workflow-step:last-child { border-bottom: none; }
.workflow-step .num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--accent-strong);
}
.workflow-step h4 {
  margin: 0 0 4px;
  font-family: var(--font-body);
  text-transform: none;
  font-size: 1.05rem;
  font-weight: 600;
}
.workflow-step p { margin: 0; font-size: 0.92rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
}
@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.form-field {
  margin-bottom: 20px;
}
.form-field label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
}
.form-field textarea {
  min-height: 140px;
  resize: vertical;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--accent-strong);
  outline-offset: 1px;
}

.contact-alt {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.contact-alt h3 { margin-bottom: 8px; }

.project-list-section {
  padding-bottom: 24px;
}
@media (max-width: 759px) {
  .project-list-section {
    padding-bottom: 8px;
  }
}

/* ---------- CTA banner ---------- */
.cta-banner {
  text-align: center;
  padding: 96px 0;
}
.cta-banner h2 {
  margin-bottom: 32px;
}
.cta-banner p.lead {
  max-width: 480px;
  margin: 0 auto 32px;
}

/* ---------- Legal ---------- */
.legal {
  max-width: 720px;
}
.legal-note {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 44px;
  color: var(--text);
  font-size: 0.9rem;
}
.legal-note a { color: var(--accent-strong); }
.legal h2 {
  font-size: 1.15rem;
  font-weight: 600;
  text-transform: none;
  margin: 40px 0 12px;
}
.legal h2:first-of-type { margin-top: 0; }
.legal p { font-size: 0.95rem; }
.legal a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border); }
.legal a:hover { color: var(--accent-strong); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}
.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-links a:hover { color: var(--accent-strong); }
.footer-note {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 24px;
}

/* ---------- Mobile refinements ---------- */
@media (max-width: 759px) {
  .btn { width: 100%; }
  .hero-actions .btn,
  .cta-banner .btn { width: auto; min-width: 220px; }

  .package-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .filter-tabs button {
    min-height: 44px;
    padding: 10px 18px;
  }

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

/* ---------- Scroll reveal ---------- */
/* .reveal/.in-view are toggled by js/script.js via IntersectionObserver.
   transition-delay is set inline per element for the stagger effect. */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease-smooth), transform 0.8s var(--ease-smooth);
  will-change: opacity, transform;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Hover lift (pointer devices only) ---------- */
@media (hover: hover) and (pointer: fine) {
  .card,
  .package-list li,
  .secondary-grid .mini-card {
    transition: transform 0.4s var(--ease-smooth), border-color 0.3s ease, box-shadow 0.4s var(--ease-smooth);
  }
  .work-item {
    transition: opacity 0.3s var(--ease-smooth), transform 0.4s var(--ease-smooth), border-color 0.3s ease, box-shadow 0.4s var(--ease-smooth);
  }
  .card:hover,
  .work-item:hover,
  .package-list li:hover,
  .secondary-grid .mini-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-strong);
    box-shadow: 0 16px 32px -20px rgba(0, 0, 0, 0.6);
  }
}

/* ---------- Headline reveal ---------- */
/* js/script.js wraps every word of each h1/h2 in a .word-reveal span.
   Each word fades in, unblurs and settles up from a small offset below —
   staggered per word via inline transition-delay. Hero headlines play on
   load; everything else plays once scrolled into view. */
.word-reveal {
  display: inline-block;
  opacity: 0;
  transform: translateY(14px);
  filter: blur(8px);
  transition: opacity 1.1s var(--ease-smooth), transform 1.1s var(--ease-smooth), filter 1.1s var(--ease-smooth);
}
.headline-reveal.in-view .word-reveal {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
@media (prefers-reduced-motion: reduce) {
  .word-reveal {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

/* Printing doesn't scroll the page, so nothing below the fold would ever
   trigger the scroll-based reveals — force everything visible instead. */
@media print {
  .reveal,
  .word-reveal {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

.form-note {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.form-note a { color: var(--text-muted); text-decoration: underline; }
.form-note a:hover { color: var(--accent-strong); }

.concept-note {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.8;
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: rgba(63, 120, 87, 0.12);
  color: var(--text);
  font-size: 0.9rem;
}
.form-status.is-error {
  border-color: #b5544a;
  background: rgba(181, 84, 74, 0.12);
}
