/* ==================================================================
   December Apparels — Core design system (shared by every page)
   Layout concept: the garment-tag & stitch line — sections are joined
   by a dashed thread rule, labels read like woven care tags.
   ================================================================== */

:root {
  /* Colour */
  --ink:      #0e1b28;   /* indigo ink — dark bands, text */
  --ink-2:    #16293b;   /* raised ink surface */
  --steel:    #4e8bb1;   /* brand steel blue */
  --steel-2:  #3a6f93;   /* deeper steel for text on light */
  --frost:    #eef3f7;   /* December frost — page ground */
  --paper:    #ffffff;
  --thread:   #d9a441;   /* marigold thread — stitches, highlights */
  --thread-2: #b9852a;
  --line:     #d3dee7;
  --muted:    #556676;
  --on-ink:   #e8eff5;
  --on-ink-muted: #9fb2c3;

  /* Type */
  --f-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-body:    "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Type scale (fluid) */
  --t-hero: clamp(2.9rem, 1.6rem + 5.4vw, 6.4rem);
  --t-h1:   clamp(2.3rem, 1.5rem + 2.6vw, 3.8rem);
  --t-h2:   clamp(1.9rem, 1.35rem + 1.8vw, 2.9rem);
  --t-h3:   clamp(1.3rem, 1.15rem + .6vw, 1.6rem);
  --t-lead: clamp(1.08rem, 1rem + .35vw, 1.28rem);
  --t-body: 1rem;
  --t-small:.875rem;
  --t-label:.72rem;

  /* Space & shape */
  --gutter: max(20px, 4vw);
  --maxw: 1320px;
  --section: clamp(4.5rem, 3rem + 6vw, 9rem);
  --radius: 4px;
  --radius-lg: 14px;
  --ease: cubic-bezier(.22,.8,.24,1);
  --shadow: 0 1px 2px rgba(14,27,40,.06), 0 18px 40px -18px rgba(14,27,40,.28);

  --header-h: 92px;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--frost);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--t-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variation-settings: "SOFT" 40;   /* Fraunces: softened terminals — friendly, still crisp */
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--thread); color: var(--ink); }
:focus-visible { outline: 2px solid var(--thread); outline-offset: 3px; border-radius: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--on-ink); padding: .6rem 1rem; border-radius: var(--radius); }
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 400; text-wrap: balance; }
.display, .h1, .h2 {
  font-family: var(--f-display);
  font-optical-sizing: auto;
  letter-spacing: -.015em;
  line-height: 1.02;
}
.h1 { font-size: var(--t-h1); }
.h2 { font-size: var(--t-h2); line-height: 1.06; }
.h3 { font-family: var(--f-display); font-size: var(--t-h3); line-height: 1.15; }
.display em, .h1 em, .h2 em, .h3 em { font-style: italic; color: var(--steel-2); }
.on-ink .display em, .on-ink .h2 em, .on-ink .h1 em { color: var(--thread); }
p { margin: 0; }
.lead { font-size: var(--t-lead); line-height: 1.6; color: var(--muted); max-width: 58ch; }
.on-ink .lead { color: var(--on-ink-muted); }

.label {
  font-family: var(--f-mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin: 0;
}

/* Woven care-tag eyebrow */
.tag {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--f-mono); font-size: var(--t-label); font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--steel-2);
}
.tag::before {
  content: ""; width: 26px; height: 0;
  border-top: 1.5px dashed var(--thread);
}
.on-ink .tag { color: var(--on-ink-muted); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--ink); --btn-fg: var(--paper); --btn-bd: var(--ink);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  height: 46px; padding: 0 1.4rem;
  font-family: var(--f-body); font-size: .875rem; font-weight: 600; letter-spacing: .03em; line-height: 1;
  text-decoration: none; white-space: nowrap;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1.5px solid var(--btn-bd); border-radius: 999px;
  cursor: pointer; overflow: hidden; isolation: isolate;
  transition: color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
}
.btn::after {           /* thread fill sweeps in on hover */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--thread);
  transform: translateY(101%); transition: transform .45s var(--ease);
}
.btn:hover::after { transform: translateY(0); }
.btn:hover { color: var(--ink); border-color: var(--thread); }
.btn .arrow { width: 16px; height: 16px; margin-right: -.15rem; transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-primary { --btn-bg: var(--ink); --btn-fg: var(--paper); --btn-bd: var(--ink); }
.btn-ghost   { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: rgba(14,27,40,.28); }
.btn-thread  { --btn-bg: var(--thread); --btn-fg: var(--ink); --btn-bd: var(--thread); }
.btn-thread::after { background: var(--paper); }
.btn-thread:hover { border-color: var(--paper); }
.on-ink .btn-ghost { --btn-fg: var(--on-ink); --btn-bd: rgba(232,239,245,.32); }
.btn-sm { height: 38px; padding: 0 1.05rem; font-size: .8rem; letter-spacing: .04em; }
.btn-sm .arrow { width: 14px; height: 14px; }
.btn.is-current { --btn-bg: var(--thread); --btn-fg: var(--ink); --btn-bd: var(--thread); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 600; text-decoration: none; color: var(--ink);
  background-image: linear-gradient(var(--thread), var(--thread));
  background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%;
  padding-bottom: 3px;
  transition: background-size .45s var(--ease);
}
.link-arrow:hover { background-size: 100% 2px; }
.link-arrow svg { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }
.on-ink .link-arrow { color: var(--on-ink); }

/* ---------- Stitch rule ---------- */
.stitch {
  height: 0; border: 0; margin: 0;
  border-top: 1.5px dashed var(--thread);
  opacity: .9;
}

/* ---------- Header ---------- */
body::before {   /* paints the safe-area band above the sticky header */
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 60; background: var(--frost);
}
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(238,243,247,.82);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: rgba(238,243,247,.94); }
.site-header { transition: border-color .3s, background .3s, transform .45s var(--ease); }
.site-header.is-tucked { transform: translateY(calc(-100% - env(safe-area-inset-top, 0px))); }
.header-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  min-height: var(--header-h);
  transition: min-height .35s var(--ease);
}
.site-header.is-scrolled .header-row { min-height: 72px; }

.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.logo { display: block; height: 60px; width: auto; max-width: 260px; object-fit: contain; transition: height .35s var(--ease); }
.site-header.is-scrolled .logo { height: 50px; }
.logo-light { filter: brightness(0) invert(1); height: 54px; }      /* original logo rendered in white on dark */
.logo-fallback { font-family: var(--f-display); font-size: 1.45rem; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; }
.logo-fallback i { font-family: var(--f-mono); font-style: normal; font-size: .6rem; letter-spacing: .38em; text-transform: uppercase; margin-left: .3rem; color: var(--steel-2); }
.site-footer .logo-fallback { color: var(--on-ink); }
.site-footer .logo-fallback i { color: var(--on-ink-muted); }

.nav-list { display: flex; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.nav-link {
  position: relative; display: inline-block; padding: .55rem 1rem;
  font-size: .95rem; font-weight: 500; text-decoration: none; color: var(--ink);
}
.nav-link::after {
  content: ""; position: absolute; left: 1rem; right: 1rem; bottom: .25rem;
  border-top: 1.5px dashed var(--thread);
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--steel-2); }

.header-cta { display: flex; align-items: center; gap: .75rem; }
.nav-toggle {
  display: none; width: 46px; height: 46px; border-radius: 50%;
  border: 1.5px solid rgba(14,27,40,.2); background: transparent; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle .bars { display: grid; gap: 6px; width: 18px; }
.nav-toggle i { display: block; height: 1.6px; background: var(--ink); transition: transform .35s var(--ease); }
.nav-toggle[aria-expanded="true"] i:first-child { transform: translateY(3.8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] i:last-child  { transform: translateY(-3.8px) rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: 0; top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); z-index: 40;
  background: var(--frost);
  padding-block: 2rem calc(2rem + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
}
.mobile-nav ul { list-style: none; margin: 0 0 2rem; padding: 0; }
.mobile-nav li { border-bottom: 1px dashed var(--line); animation: navIn .5s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.mobile-nav li a { display: block; padding: 1.1rem 0; font-family: var(--f-display); font-size: 2.1rem; text-decoration: none; }
.mobile-nav li a[aria-current] { color: var(--steel-2); font-style: italic; }
.mobile-nav-note { margin-top: 2rem; font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
@keyframes navIn { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Sections ---------- */
.section { padding-block: var(--section); position: relative; }
.on-ink { background: var(--ink); color: var(--on-ink); }
.section-head { display: grid; gap: 1.2rem; max-width: 760px; }
.section-head.split {
  max-width: none; grid-template-columns: 1fr; align-items: end;
}
@media (min-width: 900px) {
  .section-head.split { grid-template-columns: 1.2fr .8fr; gap: 3rem; }
}

/* Twill-weave fabric texture, applied over any background colour */
.twill { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 2px, transparent 2px 7px); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink); color: var(--on-ink);
  border-top: 1px solid rgba(159,178,195,.14);
  padding-block: clamp(4rem, 3rem + 4vw, 6.5rem) 0;
  overflow: hidden;
}
.footer-top { display: grid; gap: 3rem; }
@media (min-width: 960px) { .footer-top { grid-template-columns: 1fr 1.4fr; gap: 5rem; } }
.footer-brand { display: grid; gap: 1.5rem; justify-items: start; }
.footer-line { color: var(--on-ink-muted); max-width: 40ch; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 2.5rem; }
.footer-col .label { color: var(--thread); margin-bottom: 1.1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.footer-col a { text-decoration: none; color: var(--on-ink); opacity: .86; transition: opacity .2s, color .2s; }
.footer-col a:hover { opacity: 1; color: var(--thread); }
.footer-plain li { color: var(--on-ink-muted); }
/* Base strip — same ink as the footer, separated by a stitched rule.
   The Ascent logo ships on a white plate: invert turns the plate black and the grey artwork light,
   hue-rotate keeps any tint true, and screen blending drops the black plate into the ink.
   No ancestor may set opacity/transform/filter, or the blend would be isolated. */
.footer-base { margin-top: clamp(3rem, 2rem + 3vw, 4.5rem); background: var(--ink); color: var(--on-ink-muted); border-top: 1px dashed rgba(159,178,195,.28); }
.footer-base-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 2rem;
  padding-block: 1.3rem calc(1.3rem + env(safe-area-inset-bottom, 0px));
  font-size: var(--t-small);
}
@media (max-width: 1480px) { .footer-base-row { padding-right: max(84px, env(safe-area-inset-right, 0px)); } }
.powered { display: inline-flex; align-items: center; text-decoration: none; color: var(--on-ink-muted); }
.powered img { display: block; height: 32px; width: auto; filter: invert(1) hue-rotate(180deg); mix-blend-mode: screen; }
.site-footer { padding-bottom: 0 !important; }

.to-top {
  position: fixed; z-index: 30;
  right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--ink); color: var(--paper); border: 1.5px solid var(--thread);
  display: grid; place-items: center; cursor: pointer;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
}
.to-top svg { width: 20px; height: 20px; }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- Reveal on scroll (only below-the-fold elements are hidden, by JS) ---------- */
.reveal-pending { opacity: 0; transform: translateY(24px); }
.reveal-in { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }

/* ---------- Responsive header ---------- */
@media (max-width: 960px) {
  :root { --header-h: 78px; }
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 520px) {
  .header-cta .btn { display: none; }
  .logo { height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal-pending { opacity: 1; transform: none; }
}

/* ==================================================================
   Shared components used across pages
   ================================================================== */

/* Breadcrumb trail (inner pages) */
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; font-family: var(--f-mono); font-size: var(--t-label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--thread); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.on-ink .crumbs { color: var(--on-ink-muted); }
.on-ink .crumbs a:hover { color: var(--on-ink); }

/* Fabric tones for illustration plates */
.tone-steel  { background-color: var(--steel); }
.tone-frost  { background-color: #dbe6ee; }
.tone-ink    { background-color: var(--ink-2); }
.tone-thread { background-color: var(--thread); }
.plate { position: relative; display: grid; place-items: center; overflow: hidden; }
.plate svg { filter: drop-shadow(0 14px 16px rgba(14,27,40,.2)); }

/* Spec chips — read like woven size labels */
.spec { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.spec li {
  font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .32rem .6rem; border: 1px dashed rgba(14,27,40,.28); border-radius: 3px; color: var(--ink);
}
.on-ink .spec li { border-color: rgba(232,239,245,.3); color: var(--on-ink); }

/* Closing call-to-action band (every page) */
.cta-band { background: var(--ink); color: var(--on-ink); position: relative; overflow: hidden; }
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 85% 10%, rgba(78,139,177,.32), transparent 55%),
              repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 2px, transparent 2px 8px);
  pointer-events: none;
}
.cta-inner { position: relative; display: grid; gap: 2rem; padding-block: clamp(4rem, 3rem + 4vw, 7rem); align-items: end; }
@media (min-width: 900px) { .cta-inner { grid-template-columns: 1.4fr .6fr; gap: 4rem; } }
.cta-inner .h2 em { color: var(--thread); }
.cta-side { display: grid; gap: 1.2rem; justify-items: start; }
.cta-side p { color: var(--on-ink-muted); max-width: 34ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .7rem; }

/* Form fields (dark surfaces) */
.field { display: grid; gap: .45rem; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field > label, .field .field-label { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-ink-muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--on-ink);
  background: transparent; border: 0; border-bottom: 1.5px solid rgba(159,178,195,.35);
  padding: .6rem 0; border-radius: 0; outline: none; transition: border-color .3s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--thread) 50%), linear-gradient(135deg, var(--thread) 50%, transparent 50%); background-position: calc(100% - 12px) 55%, calc(100% - 7px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { color: var(--ink); background: var(--paper); }
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(159,178,195,.6); }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--thread); border-bottom-style: dashed; }
.field input[type="date"] { color-scheme: dark; }
.field.has-error input, .field.has-error select, .field.has-error .chips { border-bottom-color: #f08f7f; }
.field-error { font-size: .78rem; color: #f6b0a4; }
.form-status { font-size: .92rem; color: var(--on-ink-muted); }
.form-status.is-ok { color: var(--thread); }
.form-status.is-error { color: #f6b0a4; }

/* Reading progress thread (long pages) */
.progress-thread { position: fixed; left: 0; right: 0; top: env(safe-area-inset-top, 0px); height: 3px; z-index: 70; pointer-events: none; }
.progress-thread span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: repeating-linear-gradient(90deg, var(--thread) 0 10px, transparent 10px 15px); }
