/* ============================================================
   ContourFoil — contourfoil.com
   Single shared stylesheet. No external requests.
   Palette: warm charcoal + brushed aluminum + one copper accent.
   ============================================================ */

:root {
  /* Dark (charcoal) surfaces */
  --ink:        #17140F;
  --ink-2:      #201B15;
  --ink-3:      #2A241C;
  --line-dark:  rgba(255, 255, 255, 0.11);
  --line-dark-2:rgba(255, 255, 255, 0.06);

  /* Light (paper) surfaces */
  --paper:      #F6F3EE;
  --paper-2:    #FFFFFF;
  --paper-3:    #EDE7DE;
  --line:       #E2DBD0;
  --line-2:     #D3CABC;

  /* Text */
  --text:            #1B1712;   /* on light */
  --text-muted:      #6E655A;
  --text-dark:       #ECE7DF;   /* on dark */
  --text-dark-muted: #A79E90;

  /* Copper / rose-gold accent */
  --copper:       #BE7A54;   /* accent, borders, highlights */
  --copper-cta:   #A9623B;   /* button bg (AA white text) */
  --copper-hover: #8E5230;
  --copper-soft:  #DBAF8D;   /* light tints */
  --copper-link:  #A9623B;   /* links on light */
  --copper-link-d:#D6996E;   /* links on dark */

  /* Metallic */
  --silver-1: #F1F0F2;
  --silver-2: #CDCFD4;
  --silver-3: #A7A9AF;
  --silver-4: #E3E4E7;

  --maxw: 1180px;
  --pad: clamp(1.25rem, 5vw, 3rem);
  --radius: 4px;

  --grotesk: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 78px; }
body {
  font-family: var(--grotesk);
  color: var(--text);
  background: var(--paper);
  line-height: 1.6;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.06; letter-spacing: -0.018em; font-weight: 800; text-wrap: balance; }
p { text-wrap: pretty; }

a { color: var(--copper-link); text-decoration: none; }
a:hover { color: var(--copper-hover); }

/* ---------- Accessibility ---------- */
.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-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--text-dark);
  padding: 10px 16px; border-radius: var(--radius);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; color: var(--text-dark); }

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

.section { padding-block: clamp(3.5rem, 8vw, 7rem); position: relative; }
.section--dark  { background: var(--ink);    color: var(--text-dark); }
.section--paper { background: var(--paper);   color: var(--text); }
.section--white { background: var(--paper-2); color: var(--text); border-top: 1px solid var(--line); }
.section--silver {
  color: var(--text);
  background:
    linear-gradient(120deg, rgba(255,255,255,0.5), rgba(255,255,255,0) 40%),
    repeating-linear-gradient(115deg, rgba(0,0,0,0.02) 0 2px, rgba(255,255,255,0.03) 2px 4px),
    linear-gradient(150deg, var(--silver-1) 0%, var(--silver-2) 42%, var(--silver-3) 56%, var(--silver-4) 100%);
}
.section--dark + .section--dark { border-top: 1px solid var(--line-dark); }

/* ---------- Eyebrow / kicker ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--copper);
  display: inline-flex; align-items: center; gap: 0.6em;
  margin-bottom: 1.15rem;
}
.section--dark .eyebrow { color: var(--copper-soft); }
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: currentColor; opacity: 0.6;
}

/* ---------- Type scale ---------- */
.display {
  font-size: clamp(2.6rem, 7.2vw, 5.1rem);
  line-height: 1.0;
  letter-spacing: -0.028em;
}
.h2 { font-size: clamp(1.95rem, 4.3vw, 3.15rem); letter-spacing: -0.022em; }
.h3 { font-size: clamp(1.2rem, 2.2vw, 1.55rem); font-weight: 700; letter-spacing: -0.01em; }
.lead {
  font-size: clamp(1.1rem, 1.7vw, 1.4rem);
  line-height: 1.5; font-weight: 400; color: var(--text-muted);
  max-width: 42ch;
}
.section--dark .lead { color: var(--text-dark-muted); }
.measure { max-width: 62ch; }
.muted { color: var(--text-muted); }
.section--dark .muted { color: var(--text-dark-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  padding: 0.95em 1.5em;
  font-weight: 700; font-size: 0.98rem; letter-spacing: 0.005em;
  border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; transition: background 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, transform 0.18s ease;
  text-align: center; line-height: 1.1;
}
.btn:active { transform: translateY(1px); }
.btn--copper { background: var(--copper-cta); color: #fff; border-color: var(--copper-cta); }
.btn--copper:hover { background: var(--copper-hover); border-color: var(--copper-hover); color: #fff; }
.btn--ghost { background: transparent; color: var(--text-dark); border-color: var(--line-dark); }
.btn--ghost:hover { border-color: var(--copper-soft); color: #fff; }
.btn--dark { background: var(--ink); color: var(--text-dark); border-color: var(--ink); }
.btn--dark:hover { background: var(--ink-2); color: #fff; }
.btn--outline-dark { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn--outline-dark:hover { border-color: var(--copper); color: var(--copper-hover); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.arrow { transition: transform 0.18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Top navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
  border-bottom: 1px solid transparent;
}
.nav__inner {
  max-width: var(--maxw); margin-inline: auto; padding: 0.9rem var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav.is-scrolled {
  background: rgba(23, 20, 15, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom-color: var(--line-dark);
}
/* On light subpages the nav starts solid */
.nav--solid {
  background: rgba(23, 20, 15, 0.94);
  border-bottom-color: var(--line-dark);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text-dark); }
.brand:hover { color: var(--text-dark); }
.brand__mark { width: 26px; height: 26px; flex: none; }
.brand__name { font-weight: 800; letter-spacing: -0.02em; font-size: 1.15rem; }
.brand__name b { color: var(--copper-soft); font-weight: 800; }

.nav__links { display: none; align-items: center; gap: 1.75rem; }
.nav__links a {
  color: var(--text-dark-muted); font-size: 0.92rem; font-weight: 500;
  letter-spacing: 0.01em; transition: color 0.15s ease;
}
.nav__links a:hover { color: var(--text-dark); }
.nav__cta { display: none; white-space: nowrap; flex: none; }

.nav__toggle {
  display: inline-flex; flex-direction: column; gap: 5px;
  background: transparent; border: 0; padding: 8px; cursor: pointer;
}
.nav__toggle span { width: 24px; height: 2px; background: var(--text-dark); transition: 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); }

.nav__mobile {
  display: none;
  background: rgba(23, 20, 15, 0.98);
  border-top: 1px solid var(--line-dark);
  padding: 0.5rem var(--pad) 1.5rem;
}
.nav__mobile.is-open { display: block; }
.nav__mobile a {
  display: block; color: var(--text-dark); padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-dark-2); font-size: 1.05rem; font-weight: 500;
}
.nav__mobile .btn { width: 100%; margin-top: 1.1rem; }

@media (min-width: 900px) {
  .nav__links, .nav__cta { display: flex; }
  .nav__toggle { display: none; }
  .nav__mobile { display: none !important; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 130% at 78% 8%, #241E17 0%, var(--ink) 55%);
  color: var(--text-dark);
  padding-block: clamp(8rem, 16vh, 11rem) clamp(4.5rem, 10vw, 8rem);
}
.hero__bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.9;
}
.hero .wrap { position: relative; z-index: 1; }
.hero__grid { display: grid; gap: 2.5rem; align-items: center; }
.hero h1 { max-width: 15ch; }
.hero .lead { max-width: 46ch; margin-top: 1.5rem; color: var(--text-dark-muted); }
.hero .btn-row { margin-top: 2.4rem; }
.hero__note {
  margin-top: 2.4rem; font-family: var(--mono); font-size: 0.74rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dark-muted);
  display: flex; align-items: center; gap: 0.7rem;
}
.hero__note::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--copper); }

@media (min-width: 940px) {
  .hero__grid { grid-template-columns: 1.15fr 0.85fr; gap: 3.5rem; }
}

/* ---------- Section header ---------- */
.sec-head { max-width: 60ch; margin-bottom: clamp(2.2rem, 5vw, 3.4rem); }
.sec-head .lead { margin-top: 1.1rem; max-width: 54ch; }
.sec-head--center { margin-inline: auto; text-align: center; }
.sec-head--center .eyebrow { justify-content: center; }
.sec-head--center .lead { margin-inline: auto; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr; }
@media (min-width: 760px)  { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-2 { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.1rem);
  display: flex; flex-direction: column; gap: 0.75rem; height: 100%;
}
.card--dark { background: var(--ink-2); border-color: var(--line-dark); }
.card__num {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.16em;
  color: var(--copper); margin-bottom: 0.4rem;
}
.card .h3 { margin-bottom: 0.15rem; }
.card p { color: var(--text-muted); font-size: 1rem; }
.card--dark p { color: var(--text-dark-muted); }

.icon {
  width: 46px; height: 46px; margin-bottom: 0.9rem;
  color: var(--copper);
}

/* ---------- Benefit list ---------- */
.benefits { list-style: none; padding: 0; display: grid; gap: 1.3rem; }
.benefits li { display: grid; grid-template-columns: 26px 1fr; gap: 1rem; align-items: start; }
.benefits svg { width: 26px; height: 26px; color: var(--copper); margin-top: 2px; }
.benefits strong { display: block; font-size: 1.08rem; letter-spacing: -0.01em; }
.benefits span { color: var(--text-muted); font-size: 0.98rem; }
.section--dark .benefits span { color: var(--text-dark-muted); }

/* ---------- Diagram (foil comparison) ---------- */
.diagram-grid { display: grid; gap: 1.5rem; align-items: stretch; }
@media (min-width: 860px) { .diagram-grid { grid-template-columns: 1fr 1fr; } }
.diagram-card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem 1.4rem 1.2rem;
}
.diagram-card--accent { border-color: var(--copper); box-shadow: 0 0 0 1px var(--copper); }
.diagram-card figcaption { margin-top: 0.9rem; }
.diagram-tag {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-muted); display: block; margin-bottom: 0.25rem;
}
.diagram-card--accent .diagram-tag { color: var(--copper-hover); }
.diagram-card figcaption b { font-size: 1.05rem; letter-spacing: -0.01em; }
.diagram-card svg { width: 100%; height: auto; }

/* ---------- Split layout ---------- */
.split { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split--wide-left { grid-template-columns: 1.1fr 0.9fr; } }

/* ---------- Two-column value band ---------- */
.duo { display: grid; gap: 2.5rem; }
@media (min-width: 820px) { .duo { grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); } }
.duo__col h3 { margin-bottom: 1.1rem; }
.duo__col ul { list-style: none; padding: 0; display: grid; gap: 0.85rem; }
.duo__col li { display: grid; grid-template-columns: 18px 1fr; gap: 0.75rem; color: var(--text-muted); }
.duo__col li::before {
  content: ""; width: 8px; height: 8px; margin-top: 8px; border-radius: 1px;
  background: var(--copper); transform: rotate(45deg);
}
.duo__divider { display: none; }
@media (min-width: 820px) {
  .duo { position: relative; }
  .duo__divider { display: block; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line); }
}

/* ---------- Stat callout ---------- */
.stat {
  margin-top: 1.75rem; padding: 1.4rem 1.5rem;
  background: var(--paper-3); border-left: 3px solid var(--copper);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.stat b { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.02em; display: block; }
.stat span { font-size: 0.85rem; color: var(--text-muted); display: block; margin-top: 0.35rem; }
.stat cite { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; font-style: normal; color: var(--text-muted); }

/* ---------- Video slot ---------- */
.video-frame {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  border: 1px solid var(--line-dark); border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(190,122,84,0.10), rgba(0,0,0,0) 45%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.018) 0 12px, transparent 12px 24px),
    var(--ink-2);
  overflow: hidden; display: grid; place-items: center;
}
.video-frame__inner { text-align: center; padding: 1.5rem; }
.play-btn {
  width: clamp(64px, 9vw, 84px); height: clamp(64px, 9vw, 84px);
  border-radius: 50%; margin: 0 auto 1.2rem;
  display: grid; place-items: center;
  background: var(--copper-cta); color: #fff;
  box-shadow: 0 12px 40px rgba(169,98,59,0.4);
}
.play-btn svg { width: 34%; height: 34%; margin-left: 8%; }
.video-frame__title { font-weight: 700; font-size: 1.15rem; color: var(--text-dark); }
.video-frame__sub {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-dark-muted); margin-top: 0.5rem;
}

/* ---------- Protection band ---------- */
.protect {
  text-align: center;
  background:
    radial-gradient(90% 120% at 50% 0%, #241E17 0%, var(--ink) 60%);
}
.protect .shield { width: 52px; height: 52px; color: var(--copper-soft); margin: 0 auto 1.6rem; }
.protect h2 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -0.03em; }
.protect p {
  margin-top: 1.2rem; font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--text-dark-muted); max-width: 34ch; margin-inline: auto;
}

/* ---------- CTA panels ---------- */
.cta-panel { text-align: center; max-width: 58ch; margin-inline: auto; }
.cta-panel .btn-row { justify-content: center; margin-top: 2rem; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.15rem; max-width: 560px; }
.form--inline { grid-template-columns: 1fr auto; gap: 0.75rem; align-items: end; max-width: 520px; }
@media (max-width: 520px) { .form--inline { grid-template-columns: 1fr; } }
.field { display: grid; gap: 0.45rem; }
.field label { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em; }
.field label .opt { color: var(--text-muted); font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%; padding: 0.85em 1em;
  background: var(--paper-2); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--copper); box-shadow: 0 0 0 3px rgba(190,122,84,0.16);
}
.section--dark .field input, .section--dark .field textarea, .section--dark .field select {
  background: var(--ink-2); border-color: var(--line-dark); color: var(--text-dark);
}
.form__note { font-size: 0.85rem; color: var(--text-muted); }
.form__row-2 { display: grid; gap: 1.15rem; }
@media (min-width: 620px) { .form__row-2 { grid-template-columns: 1fr 1fr; } }
.form-status {
  display: none; margin-top: 0.5rem; padding: 0.85rem 1rem;
  background: var(--paper-3); border-left: 3px solid var(--copper);
  border-radius: 0 var(--radius) var(--radius) 0; font-size: 0.92rem;
}
.form-status.is-visible { display: block; }
.form-status a { font-weight: 600; }

/* ---------- About teaser ---------- */
.portrait {
  aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(135deg, var(--paper-3) 0 14px, var(--paper) 14px 28px);
  display: grid; place-items: center; position: relative;
}
.portrait span {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted);
  background: var(--paper-2); padding: 0.5em 0.9em; border: 1px solid var(--line);
  border-radius: 2px;
}

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--text-dark-muted); padding-block: 3.5rem 2.5rem; }
.footer__top { display: grid; gap: 2rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line-dark); }
@media (min-width: 780px) { .footer__top { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer .brand { margin-bottom: 1rem; }
.footer__col h4 { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dark); font-family: var(--mono); font-weight: 500; margin-bottom: 1rem; }
.footer__col ul { list-style: none; padding: 0; display: grid; gap: 0.7rem; }
.footer__col a { color: var(--text-dark-muted); font-size: 0.95rem; }
.footer__col a:hover { color: var(--copper-link-d); }
.footer__blurb { font-size: 0.95rem; max-width: 34ch; line-height: 1.6; }
.footer__bottom {
  padding-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  align-items: center; justify-content: space-between;
  font-size: 0.82rem; color: var(--text-dark-muted);
}
.footer__legal { font-family: var(--mono); letter-spacing: 0.04em; }

/* ---------- Page hero (subpages) ---------- */
.page-hero {
  background: radial-gradient(120% 130% at 82% 0%, #241E17 0%, var(--ink) 58%);
  color: var(--text-dark);
  padding-block: clamp(7rem, 14vh, 9.5rem) clamp(3rem, 7vw, 5rem);
}
.page-hero h1 { font-size: clamp(2.3rem, 5.5vw, 3.9rem); max-width: 18ch; letter-spacing: -0.025em; }
.page-hero .lead { color: var(--text-dark-muted); margin-top: 1.3rem; max-width: 52ch; }

/* ---------- Prose ---------- */
.prose p { margin-bottom: 1.2rem; color: var(--text); max-width: 64ch; }
.prose p.muted { color: var(--text-muted); }
.editme {
  display: inline-block; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--copper-hover); background: rgba(190,122,84,0.1);
  border: 1px dashed var(--copper); padding: 0.15em 0.5em; border-radius: 2px; margin-bottom: 0.6rem;
}

/* ---------- Offer list (licensing) ---------- */
.offer { list-style: none; padding: 0; display: grid; gap: 1.25rem; }
@media (min-width: 720px) { .offer { grid-template-columns: 1fr 1fr; } }
.offer li {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; display: grid; gap: 0.4rem;
}
.offer li b { font-size: 1.05rem; letter-spacing: -0.01em; }
.offer li span { color: var(--text-muted); font-size: 0.97rem; }
.offer li .mono-num { font-family: var(--mono); font-size: 0.75rem; color: var(--copper); letter-spacing: 0.14em; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
