/* ============================================================================
   CASKWORK MARKETING SITE
   Static, self-contained. Token values copied from the Caskwork design system
   (colors_and_type.css) — do NOT import from the app; keep this file standalone.
   ============================================================================ */

/* ---- Self-hosted fonts (latin subsets, OFL-licensed) ---------------------- */
@font-face {
  font-family: 'Zilla Slab';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/zilla-slab-600-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;
}
@font-face {
  font-family: 'Zilla Slab';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/zilla-slab-700-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;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 700; /* variable font — one file covers the range */
  font-display: swap;
  src: url('../assets/fonts/source-sans-3-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;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-mono-400-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;
}

/* ---- Design tokens (values copied from the Caskwork design system) -------- */
:root {
  --parchment:      #FAF6EF;
  --parchment-deep: #F3EBDD;
  --surface:        #FFFDF9;

  --amber:          #C8772E;
  --amber-deep:     #A85F20;
  --honey:          #D9A441;

  --copper:         #B87333;
  --copper-deep:    #9A5E27;

  --oak-900:        #1F1A17;
  --oak-800:        #3E2723;
  --oak-700:        #5D4037;
  --oak-500:        #8A6E5E;
  --oak-300:        #B8A593;

  --line:           #E0D3BF;
  --line-strong:    #D2C0A6;

  /* Neutral data accent — the non-production banner's ground (js/site.js). */
  --slate:          #4E626B;
  --slate-soft:     #DCE4E6;

  /* Height of that banner, read by .env-notice and by the nav's sticky offset. */
  --env-notice-h:   30px;

  --fg:             var(--oak-900);
  --fg-muted:       var(--oak-500);
  --fg-faint:       var(--oak-300);
  --fg-on-dark:     #F4EADB;
  --fg-on-amber:    #FFF7EC;
  --focus-ring:     var(--honey);

  --font-display: 'Zilla Slab', 'Roboto Slab', Georgia, serif;
  --font-sans:    'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', 'SFMono-Regular', Menlo, monospace;

  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-xs: 0 1px 2px rgba(62, 39, 35, 0.08);
  --shadow-sm: 0 1px 3px rgba(62, 39, 35, 0.10), 0 1px 2px rgba(62, 39, 35, 0.06);
  --shadow-md: 0 4px 12px rgba(62, 39, 35, 0.10), 0 2px 4px rgba(62, 39, 35, 0.06);
  --shadow-lg: 0 10px 28px rgba(62, 39, 35, 0.14), 0 4px 8px rgba(62, 39, 35, 0.07);

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");

  --dark-gradient: linear-gradient(180deg, #2C1F1A 0%, #3E2723 100%);
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

/* ---- Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--parchment);
}

body {
  font-family: var(--font-sans);
  color: var(--fg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

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

img { max-width: 100%; }

@keyframes cwFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--surface);
  color: var(--oak-800);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---- Shared building blocks ------------------------------------------------ */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: clamp(20px, 4vw, 40px);
  padding-right: clamp(20px, 4vw, 40px);
}

.cw-grain { position: relative; }
.cw-grain::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  background-repeat: repeat;
  pointer-events: none;
  mix-blend-mode: multiply;
  z-index: 0;
}
/* Keep grain purely decorative — content sits above it */
.cw-grain > * { position: relative; z-index: 1; }

.cw-eyebrow {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--copper);
}

.cw-eyebrow--dark { color: var(--honey); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--amber);
  color: var(--fg-on-amber);
  font-weight: 600;
  font-size: 17px;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all 140ms var(--ease);
}
.btn-primary:hover {
  background: var(--amber-deep);
  color: var(--fg-on-amber);
  text-decoration: none;
  box-shadow: var(--shadow-md);
}
.btn-primary:active { transform: translateY(1px); }

.btn-primary--on-dark { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); }
.btn-primary--on-dark:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); }

/* ---- Nav ------------------------------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 239, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-nav .container {
  padding-top: 14px;
  padding-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; display: block; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.01em;
  color: var(--oak-800);
  line-height: 1;
}
.brand-word .accent { color: var(--amber); }

.btn-login {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  color: var(--oak-800);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 8px 18px;
  text-decoration: none;
  transition: all 140ms var(--ease);
}
.btn-login:hover {
  border-color: var(--amber);
  color: var(--amber-deep);
  text-decoration: none;
  background: var(--surface);
}

/* ---- Hero (variant A: "Never dread" — light, split) ------------------------ */
.hero { border-bottom: 1px solid var(--line); }
.hero .container {
  padding-top: clamp(56px, 9vw, 104px);
  padding-bottom: clamp(48px, 7vw, 88px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero-copy { animation: cwFadeUp 400ms var(--ease) both; }
.hero-copy .cw-eyebrow { margin-bottom: 16px; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5.2vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--oak-800);
  margin: 0 0 20px;
  text-wrap: pretty;
}
.hero-sub {
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.55;
  color: var(--oak-700);
  margin: 0 0 32px;
  max-width: 46ch;
  text-wrap: pretty;
}
.hero-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-cta-alt { font-size: 14px; color: var(--fg-muted); }

.hero-shot { min-width: 0; }
.hero-shot-frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 10px;
}
.hero-shot-frame img {
  display: block;
  width: 100%;
  height: auto; /* beat the height="1000" attribute so aspect-ratio governs the box */
  aspect-ratio: 16 / 10;
  /* The screenshot is exported at exactly 16:10, so `cover` crops nothing — it is here
     so a future retake at a different ratio degrades to a crop rather than a squash. */
  object-fit: cover;
  border-radius: 8px;
  background: var(--parchment-deep); /* painted while the image is still in flight */
}
.hero-shot-caption {
  font-size: 12px;
  color: var(--fg-faint);
  text-align: center;
  margin-top: 10px;
}

/* ---- Section scaffolding ---------------------------------------------------- */
.section { border-bottom: 1px solid var(--line); }
.section .container {
  padding-top: clamp(56px, 8vw, 96px);
  padding-bottom: clamp(56px, 8vw, 96px);
}
.section--sunken { background: var(--parchment-deep); }
.section .cw-eyebrow { display: block; margin-bottom: 14px; }
.section h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.2;
  color: var(--oak-800);
  margin: 0 0 16px;
  text-wrap: pretty;
}

/* ---- Problem ----------------------------------------------------------------- */
.problem h2 { max-width: 24ch; }
.problem-lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--oak-700);
  margin: 0 0 40px;
  max-width: 60ch;
  text-wrap: pretty;
}
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.problem-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
}
.problem-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  color: var(--oak-800);
  margin: 0 0 8px;
}
.problem-card p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--oak-700);
  margin: 0;
}

/* ---- How it works ------------------------------------------------------------ */
.how h2 { max-width: 26ch; margin-bottom: 48px; }
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}
.how-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.how-card .step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--copper);
  letter-spacing: 0.06em;
}
.how-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  color: var(--oak-800);
  margin: 0;
}
.how-card p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--oak-700);
  margin: 0;
}

.pricing-band {
  background: var(--oak-800);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 40px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: center;
}
.pricing-band .cw-eyebrow { margin-bottom: 10px; }
.pricing-band h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.25;
  color: var(--fg-on-dark);
  margin: 0;
  text-wrap: pretty;
}
.pricing-band p {
  font-size: 16px;
  line-height: 1.6;
  color: #C9B8A6;
  margin: 0;
  text-wrap: pretty;
}

/* ---- Credibility --------------------------------------------------------------- */
.cred .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(32px, 5vw, 56px);
}
.cred h2 { font-size: clamp(26px, 3.2vw, 36px); }
.cred p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--oak-700);
  margin: 0;
  text-wrap: pretty;
}
.cred strong { color: var(--oak-800); }

/* ---- FAQ ------------------------------------------------------------------------ */
.faq .container { max-width: 780px; }
.faq h2 { margin-bottom: 36px; }
.faq-list { display: flex; flex-direction: column; }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list summary {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  color: var(--oak-800);
  padding: 18px 0;
  cursor: pointer;
  list-style-position: outside;
}
.faq-list details p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--oak-700);
  margin: 0 0 20px;
  padding-left: 2px;
  text-wrap: pretty;
}
.faq-end { border-top: 1px solid var(--line); }

/* ---- Final CTA -------------------------------------------------------------------- */
.final-cta { background: var(--dark-gradient); }
.final-cta .container {
  max-width: 780px;
  padding-top: clamp(64px, 9vw, 112px);
  padding-bottom: clamp(64px, 9vw, 112px);
  text-align: center;
}
.final-cta h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.15;
  color: var(--fg-on-dark);
  margin: 0 0 16px;
  text-wrap: pretty;
}
.final-cta p {
  font-size: 17px;
  line-height: 1.6;
  color: #C9B8A6;
  margin: 0 auto 32px;
  max-width: 48ch;
  text-wrap: pretty;
}
.final-cta .btn-primary { padding: 14px 28px; }
.final-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.link-founder {
  font-weight: 600;
  font-size: 16px;
  color: var(--honey);
  text-decoration: none;
  border-bottom: 1px solid rgba(217, 164, 65, 0.4);
  padding-bottom: 2px;
}
.link-founder:hover {
  color: var(--honey);
  text-decoration: none;
  border-bottom-color: var(--honey);
}

/* ---- 404 (dist/404.html) ---------------------------------------------------------- */
/* CloudFront's error page for the whole marketing distribution (marketing.tf). Light
   ground rather than the dark final-CTA treatment: a miss is a wrong turn, not a warning,
   and the parchment keeps it recognisably the same site. Vertically centred against the
   nav + footer so a short page does not leave the footer floating mid-viewport. */
.notfound {
  /* Grid so the block can sit vertically centred in the space the nav and footer leave. */
  display: grid;
  align-content: center;
  min-height: calc(100vh - 200px);
  background: var(--parchment);
  border-bottom: 1px solid var(--line);
}
/* The standard 1120px container, NOT a narrower one — the copy has to start on the same
   left edge as the brand mark above it and the footer below, or a page whose whole job is
   to look like the site still looks like a different site. Line length is held by max-width
   on the paragraphs instead.

   `width: 100%` is load-bearing. .container centres itself with `margin: 0 auto`, and auto
   margins on a grid (or flex) item beat stretch: the item falls back to its CONTENT width
   and centres that, which drops the shared 1120px grid and floats the copy off the site's
   left edge. A definite width restores the alignment; max-width still caps it. */
.notfound .container {
  width: 100%;
  padding-top: clamp(56px, 10vw, 112px);
  padding-bottom: clamp(56px, 10vw, 112px);
}
.notfound .cw-eyebrow { display: block; margin-bottom: 14px; }
.notfound h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 5.4vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--oak-900);
  margin: 0 0 18px;
}

/* The path that missed, echoed back — mono, because it is a literal string the reader
   may want to compare against what they clicked. */
.notfound-path {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg-muted);
  background: var(--parchment-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 9px 13px;
  margin: 0 0 20px;
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.notfound-path[hidden] { display: none; }

.notfound-sub {
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.6;
  color: var(--oak-700);
  max-width: 54ch;
  margin: 0 0 32px;
}
.notfound-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
/* The nav's login button, reused as the secondary action — sized up to sit level with
   .btn-primary instead of looking like a stray nav control. */
.notfound-cta .btn-login {
  font-size: 16px;
  padding: 12px 22px;
}
.notfound-help {
  font-size: 14px;
  color: var(--fg-muted);
  margin: 32px 0 0;
}

/* ---- Footer ------------------------------------------------------------------------ */
.site-footer {
  background: #241B16;
  border-top: 1px solid #3E2723;
}
.site-footer .container {
  padding-top: 28px;
  padding-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 22px; height: 22px; display: block; opacity: 0.9; }
.footer-brand span { font-size: 13px; color: #8A6E5E; }
.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links a { font-size: 13px; color: #B8A593; }
.footer-links a:hover { color: var(--honey); text-decoration: none; }

/* ---- Non-production banner (js/site.js, SITE_ENV) ------------------------- */
/* In the markup of every page that is not production (index.html, 404.html); js/site.js
   REMOVES it when SITE_ENV is "prod", so a page whose JavaScript failed shows the test
   notice rather than passing for the live site.

   It does NOT replace the edge HTTP Basic Auth gate — that gate is still on this
   distribution (infra/terraform/marketing.tf), and only the app's came down with
   #217/#218. The banner is the innermost of three layers, for whoever is past the gate:
   gate, then X-Robots-Tag noindex, then this.

   Sticky above the nav rather than scrolling away — somebody who lands halfway down from
   a shared link should still be told. Slate, not amber: this is a fact about the
   environment, not a warning about the content. */
.env-notice {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--env-notice-h);
  padding: 0 20px;
  background: var(--slate);
  color: var(--fg-on-dark);
  font-size: 12.5px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
}
.env-notice-tag {
  flex-shrink: 0;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.env-notice-body {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--slate-soft);
}
/* Two sentences, one shown. Emitted together by js/site.js so a rotation swaps them
   with no resize listener; the wide one is the default and the narrow one only exists
   below the breakpoint, where the long sentence would ellipsis away mid-word. */
.env-notice-body--narrow { display: none; }
/* The nav is sticky at top: 0; with a banner above it, it has to stick below it
   instead, or the two overlap the moment the page scrolls. Scoped to the class
   js/site.js adds, so production geometry is untouched. */
.has-env-notice .site-nav {
  top: var(--env-notice-h);
}
@media (max-width: 640px) {
  :root {
    --env-notice-h: 26px;
  }
  .env-notice {
    gap: 8px;
    padding: 0 14px;
    font-size: 11px;
  }
  .env-notice-body--wide { display: none; }
  .env-notice-body--narrow { display: inline; }
}
