/* ==========================================================================
   OLINOVA DESIGN — olinova.css
   Canonical, token-driven stylesheet. THIS FILE IS THE SINGLE SOURCE OF TRUTH.
   Change the palette in :root and it propagates to every page.

   Aesthetic: bernardlondon.com restraint — neutral blacks, charcoal, pure
   white base, cream used sparingly as a single alternating accent band.
   Type: Fraunces (display) + Jost (body / tracked caps), self-hosted.
   ========================================================================== */

/* ---- Self-hosted variable fonts (no CDN dependency; works offline + server) */
@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/Fraunces.ttf") format("truetype");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/Fraunces-Italic.ttf") format("truetype");
  font-weight: 300 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("../assets/fonts/Jost.ttf") format("truetype");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}

/* ========================================================================
   :root — DESIGN TOKENS (edit here)
   ======================================================================== */
:root {
  /* Palette — neutralized blacks/charcoal/white, cream as accent only */
  --ink:        #14141a;   /* near-black, primary text + dark sections      */
  --charcoal:   #2b2b31;   /* secondary dark                                */
  --slate:      #6b6b73;   /* muted text                                    */
  --line:       #e4e2dc;   /* hairline rules / borders                      */
  --white:      #ffffff;   /* base page surface                             */
  --cream:      #f4f1ea;   /* sparing accent band (~once per page)          */
  --cream-deep: #ece8de;   /* cream hover / nested                          */

  /* Type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body:    "Jost", "Helvetica Neue", Arial, sans-serif;

  /* Scale */
  --step--1: clamp(0.78rem, 0.74rem + 0.2vw, 0.86rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --step-1:  clamp(1.3rem, 1.2rem + 0.5vw, 1.6rem);
  --step-2:  clamp(1.85rem, 1.6rem + 1.2vw, 2.6rem);
  --step-3:  clamp(2.6rem, 2.1rem + 2.6vw, 4.4rem);
  --step-4:  clamp(3.4rem, 2.6rem + 4vw, 6rem);

  /* Layout */
  --wrap: 1200px;
  --gutter: clamp(1.25rem, 0.8rem + 2.2vw, 3rem);
  --section-y: clamp(4rem, 3rem + 5vw, 8rem);
  --radius: 0;            /* squared corners — luxury restraint            */
  --speed: 0.5s;
}

/* ========================================================================
   RESET / BASE
   ======================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 340;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
p  { margin: 0 0 1.2em; max-width: 64ch; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

.eyebrow {
  font-family: var(--body);
  font-weight: 400;
  font-size: var(--step--1);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 1.4rem;
}
.lead { font-size: var(--step-1); font-weight: 300; line-height: 1.5; color: var(--charcoal); }
.muted { color: var(--slate); }
.center { text-align: center; }
.measure { max-width: 60ch; margin-inline: auto; }

/* ========================================================================
   HEADER / NAV — white header
   ======================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 88px;
}
.brand {
  display: inline-flex; align-items: center;
  color: var(--ink);
}
/* SVG signature wordmark — single source recolored via currentColor.
   Header inherits --ink; footer overrides to white (see below). */
.brand-logo {
  display: block;
  width: 210px;                       /* header size; tune here */
  aspect-ratio: 226.77 / 74.08;       /* from logo.svg viewBox */
  background-color: currentColor;
  -webkit-mask: url("../assets/brand/logo.svg") no-repeat center / contain;
          mask: url("../assets/brand/logo.svg") no-repeat center / contain;
}
.nav {
  display: flex; align-items: center;
  flex: 1 1 auto;
  justify-content: space-between;
  gap: clamp(0.75rem, 1.5vw, 1.5rem);
  margin-left: clamp(2rem, 6vw, 6rem);
}
.nav a {
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--charcoal);
  position: relative;
  padding-block: 0.4rem;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--ink);
  transition: width var(--speed) ease;
}
.nav a:hover::after,
.nav a[aria-current="page"]::after { width: 100%; }
.nav a[aria-current="page"] { color: var(--ink); }

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  font-size: 1.4rem; line-height: 1; color: var(--ink); padding: 0.4rem;
}

/* ========================================================================
   BUTTONS
   ======================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 0.6ch;
  font-family: var(--body); font-size: var(--step--1);
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 0.95rem 1.9rem; border: 1px solid var(--ink);
  background: var(--ink); color: var(--white);
  transition: background var(--speed) ease, color var(--speed) ease;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--white); }
.btn--light { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn--light:hover { background: transparent; color: var(--white); }

/* ========================================================================
   HERO
   ======================================================================== */
.hero {
  position: relative; min-height: 78vh;
  display: grid; align-items: center;
  color: var(--white); overflow: hidden; isolation: isolate;
}
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20,20,26,0.30), rgba(20,20,26,0.62));
}
.hero .wrap { padding-block: clamp(5rem, 12vh, 9rem); }
.hero h1 { max-width: 16ch; }
.hero .eyebrow { color: rgba(255,255,255,0.78); }
.hero p { color: rgba(255,255,255,0.86); }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }

/* Centered hero variant */
.hero--center { text-align: center; }
.hero--center h1,
.hero--center .lead { margin-inline: auto; }
.hero--center .hero__actions { justify-content: center; }

/* Section heading block */
.heading { max-width: 72ch; }
.heading h2 + p { margin-top: 1.4rem; }

/* ========================================================================
   CREAM BAND — the single alternating accent per page
   ======================================================================== */
.band-cream { background: var(--cream); color: var(--ink); }
.band-ink   { background: var(--ink);   color: var(--white); }
.band-ink .eyebrow { color: rgba(255,255,255,0.6); }
.band-ink .muted   { color: rgba(255,255,255,0.7); }
.band-ink a.btn--ghost { color: var(--white); border-color: var(--white); }
.band-ink a.btn--ghost:hover { background: var(--white); color: var(--ink); }

/* ========================================================================
   GRIDS
   ======================================================================== */
.grid { display: grid; gap: clamp(1.5rem, 3vw, 3rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.split--rev > :first-child { order: 2; }

.figure { overflow: hidden; background: var(--cream); }
.figure img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; transition: transform 0.9s cubic-bezier(.2,.7,.2,1); }
.figure:hover img { transform: scale(1.04); }
.figure--tall img { aspect-ratio: 3 / 4; }

/* Full-bleed image band (edge to edge, like the hero) */
.image-band { width: 100%; }
.image-band img { display: block; width: 100%; height: clamp(360px, 58vh, 660px); object-fit: cover; }

/* Feature list */
.feature h3 { font-size: var(--step-1); margin-bottom: 0.5rem; }
.feature .num {
  font-family: var(--display); font-size: var(--step-1);
  color: var(--slate); display: block; margin-bottom: 0.8rem;
}

/* Stacked numbered service list */
.service-list { display: grid; gap: 0; }
.service {
  display: grid; grid-template-columns: 4.5rem 1fr; gap: clamp(1rem, 3vw, 2.5rem);
  align-items: start; padding: clamp(1.6rem, 3vw, 2.4rem) 0; border-top: 1px solid var(--line);
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service .num { font-family: var(--display); font-size: var(--step-2); color: var(--slate); line-height: 1; }
.service h3 { font-size: var(--step-1); margin-bottom: 0.5rem; }
.service p { margin-bottom: 0; }
@media (max-width: 720px) {
  .service { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* ========================================================================
   PORTFOLIO — tile grid, drill-in gallery, lightbox
   ======================================================================== */
.tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem, 2.5vw, 2.4rem); }
.tile {
  display: block; text-align: left; padding: 0; border: 0; background: none;
  font: inherit; color: inherit; cursor: pointer;
}
.tile__img { display: block; overflow: hidden; background: var(--cream); aspect-ratio: 3 / 2; }
.tile__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(.2,.7,.2,1); }
.tile:hover .tile__img img { transform: scale(1.05); }
.tile__img--empty {
  display: flex; align-items: center; justify-content: center;
  color: var(--slate); font-size: var(--step--1); letter-spacing: 0.18em; text-transform: uppercase;
  border: 1px solid var(--line); background: var(--cream);
}
.tile__cap { display: block; margin-top: 1rem; }
.tile__eyebrow { display: block; font-size: var(--step--1); letter-spacing: 0.2em; text-transform: uppercase; color: var(--slate); margin-bottom: 0.3rem; }
.tile__name { display: block; font-family: var(--display); font-size: var(--step-1); }
.tile--pending { cursor: default; }
.tile--pending .tile__name { color: var(--slate); }

.gallery-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: clamp(2rem, 4vw, 3rem); }
.back-link { font-size: var(--step--1); letter-spacing: 0.18em; text-transform: uppercase; color: var(--slate); background: none; border: 0; cursor: pointer; padding: 0.4rem 0; }
.back-link:hover { color: var(--ink); }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 2vw, 1.6rem); }
.gallery-grid .gcell:first-child { grid-column: 1 / -1; }
.gcell { display: block; padding: 0; border: 0; background: var(--cream); cursor: zoom-in; overflow: hidden; aspect-ratio: 3 / 2; }
.gallery-grid .gcell:first-child { aspect-ratio: 16 / 8; }
.gcell img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(.2,.7,.2,1); }
.gcell:hover img { transform: scale(1.04); }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(20,20,26,0.92); display: none; align-items: center; justify-content: center; }
.lightbox[aria-hidden="false"] { display: flex; }
.lb-img { max-width: 92vw; max-height: 86vh; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lb-btn { position: absolute; background: none; border: 0; color: rgba(255,255,255,0.85); cursor: pointer; line-height: 1; }
.lb-btn:hover { color: #fff; }
.lb-close { top: 1.4rem; right: 1.8rem; font-size: 2.4rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 3.4rem; padding: 0 1.4rem; }
.lb-prev { left: 0.5rem; } .lb-next { right: 0.5rem; }


/* ========================================================================
   CONTACT
   ======================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); }
.field { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.4rem; }
.field label { font-size: var(--step--1); letter-spacing: 0.18em; text-transform: uppercase; color: var(--slate); }
.field input, .field textarea, .field select {
  font-family: var(--body); font-size: var(--step-0); color: var(--ink);
  padding: 0.85rem 1rem; border: 1px solid var(--line); background: var(--white);
  border-radius: var(--radius); width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--ink);
}
.detail-row { display: flex; gap: 1ch; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.detail-row dt { width: 9ch; flex: none; color: var(--slate); font-size: var(--step--1); letter-spacing: 0.16em; text-transform: uppercase; }
.detail-row dd { margin: 0; }

/* ========================================================================
   FOOTER
   ======================================================================== */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.72); padding-block: clamp(3.5rem, 6vw, 6rem) 2.5rem; }
.site-footer .brand { color: var(--white); }
.site-footer .brand-logo { width: 232px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(2rem, 4vw, 4rem); }
.footer-grid h4 { font-family: var(--body); font-weight: 500; font-size: var(--step--1); letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.85); margin-bottom: 1.2rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.7rem; }
.footer-grid a:hover { color: var(--white); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 1.8rem;
  border-top: 1px solid rgba(255,255,255,0.14);
  font-size: var(--step--1); letter-spacing: 0.06em; color: rgba(255,255,255,0.5);
}

/* ========================================================================
   RESPONSIVE
   ======================================================================== */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .tile-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .split--rev > :first-child { order: 0; }
}
@media (max-width: 720px) {
  .nav {
    position: fixed; inset: 88px 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    margin-left: 0; justify-content: flex-start;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.5rem;
    transform: translateY(-130%); transition: transform 0.4s ease;
  }
  .nav.open { transform: translateY(0); }
  .nav a { width: 100%; padding-block: 0.9rem; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav-toggle { display: inline-flex; }
  .grid-2, .grid-3, .tile-grid, .contact-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid .gcell:first-child { aspect-ratio: 3 / 2; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: flex-start; }
}

/* ========================================================================
   A11Y — focus + reduced motion
   ======================================================================== */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.band-ink :focus-visible, .hero :focus-visible, .site-footer :focus-visible { outline-color: var(--white); }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
