/* ============================================================
   SECOND DRAFT — Editorial & Script Agency
   Modern Studio direction: one grotesque sans, warm stone
   palette, forest accent, generous editorial layout.
   ============================================================ */

/* ---- Tokens ---------------------------------------------- */
:root {
  --paper:    #EFEDE8;   /* main warm stone background      */
  --paper-2:  #E7E4DC;   /* alt section                     */
  --ink:      #16150F;   /* near-black text / dark sections */
  --ink-2:    #201F18;   /* raised on dark                  */
  --paper-on-ink: #EDEBE4;
  --muted:    #6E6A60;   /* muted text on paper             */
  --muted-ink:#9C978A;   /* muted text on dark              */
  --forest:   #26463B;   /* accent                          */
  --forest-2: #2F5749;
  --line:     rgba(22,21,15,.14);
  --line-2:   rgba(22,21,15,.08);
  --line-ink: rgba(237,235,228,.14);

  --maxw: 1240px;
  --gutter: clamp(22px, 5vw, 72px);

  --font: "Switzer", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---- Reset / base ---------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.025em; line-height: 1.02; }
p { margin: 0; }
::selection { background: var(--forest); color: var(--paper); }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ---- Type helpers ---------------------------------------- */
.eyebrow {
  font-size: 12.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--muted);
  display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: .5; }
.display {
  font-size: clamp(2.9rem, 7.4vw, 6.4rem); font-weight: 500;
  line-height: 0.98; letter-spacing: -0.035em;
}
.h-lede { font-size: clamp(1.7rem, 3.4vw, 2.9rem); font-weight: 500; line-height: 1.08; letter-spacing: -0.028em; }
.dim { color: var(--muted); }

/* ---- Nav ------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-2);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { height: 32px; width: auto; display: block; }
.brand__name { font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.brand__accent { color: var(--forest); }
.footer .brand__name { color: var(--paper-on-ink); }
.nav__links { display: flex; gap: 34px; align-items: center; }
.nav__links a { font-size: 15px; font-weight: 500; color: var(--muted); transition: color .18s; position: relative; }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--ink); }
.nav__links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--forest);
}
.nav__cta {
  font-size: 15px; font-weight: 600; color: var(--paper) !important;
  background: var(--forest); padding: 11px 20px; border-radius: 100px;
  transition: background .18s, transform .18s;
}
.nav__cta:hover { background: var(--forest-2); transform: translateY(-1px); }
.nav__toggle { display: none; background: none; border: 1px solid var(--line); color: var(--ink); width: 44px; height: 40px; border-radius: 8px; font-size: 17px; cursor: pointer; }

/* ---- Buttons --------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: inherit; font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; padding: 15px 26px; border-radius: 100px; cursor: pointer; border: 1px solid transparent; transition: transform .18s, background .18s, border-color .18s, color .18s; }
.btn--fill { background: var(--forest); color: var(--paper); }
.btn--fill:hover { background: var(--forest-2); transform: translateY(-2px); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { transform: translateY(-2px); }
.btn--line { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--line:hover { border-color: var(--ink); }
.btn__arrow { transition: transform .2s; }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* text link with animated underline */
.link { font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; background-image: linear-gradient(var(--forest), var(--forest)); background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .28s ease; padding-bottom: 3px; }
.link:hover { background-size: 100% 2px; color: var(--forest); }
.link .btn__arrow { transition: transform .2s; }
.link:hover .btn__arrow { transform: translateX(4px); }

/* ---- Editorial block (label | content) ------------------- */
.section { padding: clamp(72px, 12vh, 168px) 0; }
.section--tight { padding: clamp(56px, 8vh, 110px) 0; }
.section--paper2 { background: var(--paper-2); }
.section--ink { background: var(--ink); color: var(--paper-on-ink); }
.section--ink .eyebrow, .section--ink .dim { color: var(--muted-ink); }

.block { display: grid; grid-template-columns: minmax(0, 210px) minmax(0, 1fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.block__label { position: sticky; top: 104px; }
.block__index { font-size: 14px; font-weight: 600; color: var(--forest); }
.section--ink .block__index { color: var(--paper-on-ink); }
.block__label .eyebrow { margin-top: 10px; }

/* ---- Hero ------------------------------------------------ */
.hero { padding: clamp(48px, 9vh, 104px) 0 clamp(56px, 9vh, 108px); }
.hero__top { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(28px, 5vh, 56px); }
.hero__status { font-size: 14px; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; gap: 9px; }
.hero__status .dotlive { width: 8px; height: 8px; border-radius: 50%; background: var(--forest); box-shadow: 0 0 0 4px color-mix(in srgb, var(--forest) 22%, transparent); }
.hero__title { max-width: 16ch; }
.hero__title em { font-style: normal; color: var(--forest); }
.hero__foot { display: grid; grid-template-columns: 1fr; gap: 34px; margin-top: clamp(34px, 6vh, 60px); }
.hero__intro { max-width: 50ch; font-size: clamp(1.05rem, 1.6vw, 1.28rem); color: var(--muted); }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
@media (min-width: 900px) {
  .hero__foot { grid-template-columns: 1.1fr 1fr; align-items: end; }
  .hero__actions { justify-content: flex-end; }
}

/* ---- Services index (big numbered list) ------------------ */
.index { border-top: 1px solid var(--line); }
.index__row {
  display: grid; grid-template-columns: 60px 1fr auto; gap: clamp(16px, 3vw, 44px);
  align-items: baseline; padding: clamp(22px, 3vw, 34px) 0; border-bottom: 1px solid var(--line);
  transition: padding-left .25s ease, background .25s;
}
.index__row:hover { padding-left: 14px; }
.index__no { font-size: 15px; font-weight: 600; color: var(--muted); }
.index__name { font-size: clamp(1.5rem, 3vw, 2.35rem); font-weight: 500; letter-spacing: -0.03em; }
.index__desc { margin-top: 8px; color: var(--muted); font-size: 1rem; max-width: 60ch; }
.index__tag { font-size: 13px; font-weight: 600; color: var(--forest); white-space: nowrap; }
.section--ink .index { border-color: var(--line-ink); }
.section--ink .index__row { border-color: var(--line-ink); }
.section--ink .index__no, .section--ink .index__desc { color: var(--muted-ink); }
.section--ink .index__tag { color: var(--paper-on-ink); }

/* ---- Two columns (tracks / generic) ---------------------- */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); }
.col h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: 18px; }
.col__list { list-style: none; margin: 16px 0 0; padding: 0; }
.col__list li { padding: 16px 0; border-top: 1px solid var(--line); }
.col__list b { font-weight: 600; }
.col__list span { display: block; color: var(--muted); font-size: .98rem; margin-top: 3px; }

/* ---- Feature rows (process) ------------------------------ */
.rows { display: grid; gap: 0; }
.feat { display: grid; grid-template-columns: 64px 1fr; gap: clamp(18px, 4vw, 48px); padding: clamp(26px, 4vw, 42px) 0; border-top: 1px solid var(--line); }
.feat:last-child { border-bottom: 1px solid var(--line); }
.feat__no { font-size: 15px; font-weight: 600; color: var(--forest); }
.feat__h { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 500; margin-bottom: 12px; }
.feat__p { color: var(--muted); max-width: 62ch; font-size: 1.05rem; }

/* ---- Team ------------------------------------------------ */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); }
.member__photo {
  aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 30% 20%, color-mix(in srgb, var(--forest) 22%, transparent), transparent 60%),
    var(--paper-2);
  border: 1px solid var(--line-2);
  display: grid; place-items: center; margin-bottom: 18px;
}
.member__photo span { font-size: 2.6rem; font-weight: 600; color: var(--forest); letter-spacing: -0.03em; opacity: .85; }
.member__photo img { width: 100%; height: 100%; object-fit: cover; }
.member__name { font-size: 1.4rem; font-weight: 500; }
.member__role { font-size: 13.5px; font-weight: 600; color: var(--forest); margin: 6px 0 10px; }
.member__bio { color: var(--muted); font-size: .98rem; }

/* ---- Work ------------------------------------------------ */
.work { display: grid; gap: clamp(18px, 2.4vw, 26px); }
.work__item {
  display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: end;
  padding: clamp(26px, 3.5vw, 40px); border: 1px solid var(--line); border-radius: 14px;
  background: var(--paper); transition: transform .22s, border-color .22s;
}
.work__item:hover { transform: translateY(-3px); border-color: var(--ink); }
.work__kicker { font-size: 13px; font-weight: 600; color: var(--forest); text-transform: uppercase; letter-spacing: 0.1em; }
.work__title { font-size: clamp(1.5rem, 2.8vw, 2.15rem); font-weight: 500; margin: 12px 0 10px; }
.work__note { color: var(--muted); max-width: 58ch; }
.work__stat { text-align: right; }
.work__stat b { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 500; color: var(--forest); display: block; line-height: 1; letter-spacing: -0.03em; }
.work__stat span { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); }

/* ---- Reviews --------------------------------------------- */
.pull { max-width: 34ch; }
.pull blockquote { font-size: clamp(1.9rem, 4.4vw, 3.4rem); font-weight: 500; line-height: 1.1; letter-spacing: -0.03em; margin: 0; }
.pull cite { display: block; margin-top: 26px; font-size: 14px; font-weight: 600; font-style: normal; color: var(--muted-ink); }
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.4vw, 26px); margin-top: 12px; }
.review { padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.review__stars { color: var(--forest); letter-spacing: 0.14em; font-size: 14px; }
.review__text { margin: 14px 0 18px; font-size: 1.05rem; }
.review__who { font-size: 13px; font-weight: 600; color: var(--muted); }

/* ---- Stat line ------------------------------------------- */
.statline { display: flex; align-items: baseline; gap: clamp(20px, 4vw, 44px); flex-wrap: wrap; }
.statline b { font-size: clamp(3.2rem, 8vw, 6rem); font-weight: 500; letter-spacing: -0.04em; line-height: 0.9; }

/* ---- Portfolio teaser strip ------------------------------ */
.pfstrip { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(10px, 1.5vw, 18px); }
.pfstrip a { display: block; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; border: 1px solid var(--line-ink); background: var(--ink-2); box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .22s ease, box-shadow .22s ease; }
.pfstrip a:hover { transform: translateY(-5px); box-shadow: 0 18px 36px -16px rgba(0,0,0,.6); }
.pfstrip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.section--ink .link { color: var(--paper-on-ink); }
.pfstrip--wide a { aspect-ratio: 4 / 3; border-color: var(--line-2); background: var(--paper-2); }
@media (max-width: 900px) { .pfstrip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .pfstrip { grid-template-columns: repeat(2, 1fr); } }

/* ---- Cover gallery (masonry) ----------------------------- */
.gallery { columns: 3 260px; column-gap: clamp(16px, 2vw, 26px); }
.cover {
  break-inside: avoid; margin-bottom: clamp(16px, 2vw, 26px);
  position: relative; border-radius: 10px; overflow: hidden;
  display: block; width: 100%; cursor: zoom-in;
  padding: 0; background: var(--paper-2); font: inherit; text-align: left;
  border: 1px solid var(--line-2);
  box-shadow: 0 1px 2px rgba(22,21,15,.05);
  transition: transform .25s ease, box-shadow .25s ease;
}
.cover img { width: 100%; height: auto; display: block; }
.cover:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(22,21,15,.45); }
.cover__cap {
  position: absolute; inset: auto 0 0 0; padding: 30px 16px 14px;
  background: linear-gradient(transparent, rgba(10,10,7,.86));
  color: #F3F0E8; opacity: 0; transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}
.cover:hover .cover__cap, .cover:focus-visible .cover__cap { opacity: 1; transform: translateY(0); }
.cover__title { font-size: 1.05rem; font-weight: 600; line-height: 1.15; }
.cover__meta { font-size: 12.5px; font-weight: 500; color: #C9C4B4; margin-top: 3px; }

/* ---- Paperback wraps (wide) ------------------------------ */
.wraps { display: grid; gap: clamp(18px, 2.4vw, 28px); }
.wrapshot { border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: var(--paper-2); }
.wrapshot img { width: 100%; height: auto; display: block; }
.wrapshot__cap { padding: 14px 18px; font-size: 14px; font-weight: 500; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.wrapshot__cap b { color: var(--ink); font-weight: 600; }

/* ---- Lightbox -------------------------------------------- */
.lightbox { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: clamp(16px, 4vw, 56px); background: rgba(14,13,9,.92); backdrop-filter: blur(4px); cursor: zoom-out; }
.lightbox[data-open="true"] { display: grid; }
.lightbox img { max-width: 100%; max-height: 90vh; width: auto; height: auto; border-radius: 6px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.7); }
.lightbox__close { position: fixed; top: 20px; right: 24px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(237,235,228,.3); background: transparent; color: #EDEBE4; font-size: 20px; cursor: pointer; display: grid; place-items: center; }
.lightbox__close:hover { background: rgba(237,235,228,.12); }
.lightbox__cap { position: fixed; bottom: 22px; left: 0; right: 0; text-align: center; color: #C9C4B4; font-size: 14px; font-weight: 500; }

/* ---- Genre tags ------------------------------------------ */
.taglist { display: flex; flex-wrap: wrap; gap: 10px; }
.taglist span { font-size: 14.5px; font-weight: 500; color: var(--ink); border: 1px solid var(--line); padding: 9px 17px; border-radius: 100px; transition: border-color .18s, color .18s; }
.taglist span:hover { border-color: var(--forest); color: var(--forest); }

/* ---- Contact / form -------------------------------------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(34px, 6vw, 88px); align-items: start; }
.form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.field input, .field textarea, .field select {
  font-family: inherit; font-size: 16px; color: var(--ink);
  background: transparent; border: none; border-bottom: 1.5px solid var(--line);
  padding: 10px 2px; width: 100%; transition: border-color .18s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-bottom-color: var(--forest); }
.field select { appearance: none; }
.form__status { margin: -4px 0 0; font-size: 14px; font-weight: 500; color: var(--muted); }
.form__status--error { color: #A3341F; }
.form__done h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 12px; }
.form__done p { color: var(--muted); max-width: 44ch; font-size: 1.05rem; line-height: 1.55; }
.contact__aside p { color: var(--muted); margin-top: 18px; max-width: 42ch; }
.contact__line { font-size: 16px; font-weight: 500; margin-top: 12px; }
.contact__line a { color: var(--forest); }
.contact__line a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- CTA band -------------------------------------------- */
.band h2 { font-size: clamp(2.4rem, 6vw, 5.2rem); font-weight: 500; line-height: 0.98; letter-spacing: -0.035em; max-width: 16ch; margin-bottom: 34px; }

/* ---- Footer ---------------------------------------------- */
.footer { background: var(--ink); color: var(--paper-on-ink); padding: clamp(60px, 9vh, 110px) 0 44px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer__big { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 500; letter-spacing: -0.03em; max-width: 16ch; line-height: 1.02; }
.footer__col h4 { font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted-ink); margin-bottom: 16px; }
.footer__col a, .footer__col p { display: block; color: var(--paper-on-ink); font-size: 15px; margin-bottom: 10px; opacity: .85; }
.footer__col a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.footer__fine { margin-top: clamp(48px, 7vh, 80px); padding-top: 26px; border-top: 1px solid var(--line-ink); font-size: 13px; color: var(--muted-ink); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---- Focus visibility ------------------------------------ */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; border-radius: 3px; }

/* ---- Responsive ------------------------------------------ */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav[data-open="true"] .nav__links { display: flex; position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 6px var(--gutter) 20px; }
  .nav[data-open="true"] .nav__links a { padding: 15px 0; border-bottom: 1px solid var(--line-2); font-size: 17px; }
  .nav[data-open="true"] .nav__cta { margin-top: 12px; text-align: center; }
  .block { grid-template-columns: 1fr; }
  .block__label { position: static; }
  .cols { grid-template-columns: 1fr; }
  .team { grid-template-columns: 1fr 1fr; }
  .reviews { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__big { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .index__row { grid-template-columns: 34px 1fr; }
  .index__tag { grid-column: 2; }
  .work__item { grid-template-columns: 1fr; }
  .work__stat { text-align: left; }
  .team { grid-template-columns: 1fr; }
  .statline { gap: 16px; }
}

/* ---- Reduced motion -------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
