/* CC's Market, Design DNA "The Provision Room"
   DNA Hash: d7b3e9a1c4f8
   Dark warm-graphite editorial. Fraunces + Hanken Grotesk. Single honey-amber accent.
   Hand-authored design system; Tailwind (CDN) supplies utility classes on top. */

:root {
  /* Color */
  --ink: #20241F;
  --ink-800: #272C26;
  --ink-700: #2F352D;
  --line: #404A40;
  --line-soft: rgba(244, 240, 230, 0.10);
  --cream: #F4F0E6;
  --cream-dim: #BEC6BA;
  --amber: #E6AE42;
  --amber-600: #CB9430;
  --ember: #C24E24;

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, sans-serif;

  /* Spacing rhythm (generous editorial) */
  --container: 1200px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --section-y: clamp(4.5rem, 9vw, 9rem);

  /* Motion, strong easing floor */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --speed: 240ms;

  /* Z scale */
  --z-nav: 100;
  --z-menu: 300;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--cream);
  font-optical-sizing: auto;
}

p { margin: 0 0 1.1em; }

::selection { background: var(--amber); color: var(--ink); }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-wide { max-width: 1440px; }
.section { padding-block: var(--section-y); position: relative; }
.measure { max-width: 62ch; }
.measure-sm { max-width: 46ch; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  display: inline-block;
  margin: 0 0 1.1rem;
}

.lede { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.55; color: var(--cream); }
.muted { color: var(--cream-dim); }

/* Fluid display sizes */
.display-xl { font-size: clamp(3rem, 8.5vw, 8rem); }
.display-lg { font-size: clamp(2.5rem, 6vw, 5rem); }
.display-md { font-size: clamp(2rem, 4vw, 3.25rem); }
.display-sm { font-size: clamp(1.6rem, 2.6vw, 2.25rem); }

/* ---------- Grain overlay (mutation: film-grain-overlay) ---------- */
.grain::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: 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%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */
.btn {
  --btn-pad-y: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  padding: var(--btn-pad-y) 1.7rem;
  min-height: 52px;
  border-radius: 2px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color var(--speed) var(--ease-out), color var(--speed) var(--ease-out), border-color var(--speed) var(--ease-out);
  will-change: transform;
}
.btn:active { transform: scale(0.97); }
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-outline { background: transparent; color: var(--cream); border-color: var(--line); }
.btn-ink { background: var(--ink); color: var(--cream); }
.btn-lg { min-height: 58px; padding: 1.1rem 2.1rem; font-size: 1.05rem; }
.btn svg { width: 1.05em; height: 1.05em; transition: transform var(--speed) var(--ease-out); }

@media (hover: hover) and (pointer: fine) {
  .btn-amber:hover { background: var(--amber-600); }
  .btn-outline:hover { border-color: var(--amber); color: var(--amber); }
  .btn-ink:hover { background: #12160f; }
  .btn:hover svg { transform: translateX(3px); }
  .link-arrow:hover svg { transform: translateX(4px); }
}

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 700; color: var(--amber);
  padding: 0.35rem 0; min-height: 44px;
}
.link-arrow svg { width: 1.05em; height: 1.05em; transition: transform var(--speed) var(--ease-out); }

/* ---------- Cards ---------- */
.card {
  background: var(--ink-700);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.card-media { overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .card:hover .card-media img { transform: scale(1.05); }
}

/* ---------- Chips / tags ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.4rem 0.75rem; border-radius: 2px;
  border: 1px solid var(--line);
  color: var(--cream-dim);
}
.chip-fresh { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 45%, transparent); }
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Navigation ---------- */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-nav);
  background: color-mix(in srgb, var(--ink) 90%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--line-soft);
  transition: background-color var(--speed) var(--ease-out), box-shadow var(--speed) var(--ease-out);
}
.site-nav.scrolled {
  background: color-mix(in srgb, var(--ink) 95%, transparent);
  box-shadow: 0 10px 30px -20px rgba(0,0,0,0.9);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 82px; }
.nav-logo { display: inline-flex; align-items: center; font-family: var(--font-display); font-weight: 900; font-size: 1.4rem; letter-spacing: -0.02em; color: var(--cream); }
.nav-logo img { height: 52px; width: auto; display: block; filter: brightness(0) invert(1); opacity: 0.95; }
.nav-logo .apos { color: var(--amber); }
/* Real logo lockup, cream-filtered, for the footer */
.footer-logo { display: inline-block; }
.footer-logo img { height: 76px; width: auto; filter: brightness(0) invert(1); opacity: 0.9; }
.nav-links { display: none; align-items: center; gap: 2rem; }
.nav-link {
  font-weight: 600; font-size: 0.96rem; color: var(--cream);
  position: relative; padding: 0.35rem 0; opacity: 0.85;
  transition: opacity var(--speed) var(--ease-out);
}
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%;
  background: var(--amber); transform: scaleX(0); transform-origin: left;
  transition: transform var(--speed) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .nav-link:hover { opacity: 1; } .nav-link:hover::after { transform: scaleX(1); } }
.nav-link.active { opacity: 1; }
.nav-link.active::after { transform: scaleX(1); }
.nav-cta { display: none; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; background: transparent; border: 1px solid var(--line);
  border-radius: 2px; color: var(--cream); cursor: pointer;
}
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
}

/* ---------- Mobile menu (full-viewport overlay, HARD RULE) ---------- */
.mobile-menu {
  position: fixed; top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: var(--z-menu);
  display: none;
  flex-direction: column;
  overflow-y: auto;
  background: var(--ink-800);
  padding: 24px;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
.mobile-menu.is-open { display: flex; }
.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; }
.mobile-close {
  width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line); border-radius: 2px; color: var(--cream); cursor: pointer;
}
.mobile-links { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 2.5rem; }
.mobile-link {
  font-family: var(--font-display); font-weight: 900; font-size: clamp(2rem, 9vw, 2.75rem);
  letter-spacing: -0.02em; color: var(--cream); padding: 0.55rem 0;
  border-bottom: 1px solid var(--line-soft);
  transition: color var(--speed) var(--ease-out);
}
.mobile-link:active { color: var(--amber); }
.mobile-menu-foot { margin-top: auto; padding-top: 2rem; color: var(--cream-dim); }

/* ---------- Marquee ticker (mutation: signature moment) ---------- */
.ticker {
  border-block: 1px solid var(--line-soft);
  background: var(--ink-800);
  overflow: hidden; position: relative;
  padding-block: 1.1rem;
}
.ticker-track {
  display: flex; align-items: center; gap: 3rem; width: max-content;
  animation: ticker-scroll 90s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  display: inline-flex; align-items: center; gap: 1rem;
  font-family: var(--font-display); font-weight: 600; font-style: italic;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem); color: var(--cream);
  white-space: nowrap;
}
.ticker-item span.star { color: var(--amber); font-family: var(--font-body); font-style: normal; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
[data-reveal-group] > .reveal { transition-delay: calc(var(--i, 0) * 90ms); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 116%; object-fit: cover; will-change: transform; }
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--ink) 55%, transparent) 0%, transparent 26%, transparent 45%, color-mix(in srgb, var(--ink) 88%, transparent) 88%, var(--ink) 100%),
    linear-gradient(90deg, color-mix(in srgb, var(--ink) 72%, transparent) 0%, transparent 62%);
}
.hero-content { position: relative; z-index: 2; width: 100%; padding-bottom: clamp(3rem, 7vw, 6rem); padding-top: 6rem; }

/* Page hero (interior pages) */
.page-hero { position: relative; padding-top: clamp(9rem, 16vw, 13rem); padding-bottom: clamp(3.5rem, 7vw, 6rem); overflow: hidden; }
.page-hero-media { position: absolute; inset: 0; z-index: 0; opacity: 0.34; }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 70%, transparent), var(--ink)); }
.page-hero .container { position: relative; z-index: 2; }

/* ---------- Feature / offset media rows ---------- */
.media-frame { position: relative; border-radius: 3px; overflow: hidden; border: 1px solid var(--line-soft); }
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.badge-float {
  position: absolute; left: 1rem; bottom: 1rem; z-index: 2;
}

/* ---------- Amber inverted block (mutation: inverted-amber-color-block) ---------- */
.amber-block { background: var(--amber); color: var(--ink); position: relative; overflow: hidden; }
.amber-block h2, .amber-block h3 { color: var(--ink); }
.amber-block .eyebrow { color: var(--ink); }
.amber-block .muted { color: color-mix(in srgb, var(--ink) 72%, transparent); }
.price-tag { font-family: var(--font-display); font-weight: 900; letter-spacing: -0.03em; line-height: 0.9; }

/* ---------- Stat / list ---------- */
.stat-num { font-family: var(--font-display); font-weight: 900; font-size: clamp(2.4rem, 5vw, 3.75rem); line-height: 1; color: var(--amber); letter-spacing: -0.03em; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.check-list li { display: flex; gap: 0.8rem; align-items: flex-start; }
.check-list svg { flex: none; width: 1.35rem; height: 1.35rem; color: var(--amber); margin-top: 0.15rem; }

/* ---------- Divider ---------- */
.rule { height: 1px; background: var(--line-soft); border: 0; margin: 0; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 0.5rem; }
.field label { font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em; color: var(--cream); }
.field .req { color: var(--amber); }
.input, .textarea, .select {
  width: 100%; background: var(--ink-700); border: 1px solid var(--line);
  color: var(--cream); font-family: var(--font-body); font-size: 1rem;
  padding: 0.9rem 1rem; border-radius: 2px; min-height: 52px;
  transition: border-color var(--speed) var(--ease-out), box-shadow var(--speed) var(--ease-out);
}
.textarea { min-height: 140px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: color-mix(in srgb, var(--cream-dim) 75%, transparent); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 25%, transparent); }

/* ---------- Focus visibility (a11y) ---------- */
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 2px; }

/* Skip link */
.skip-link {
  position: fixed; left: 1rem; top: 1rem; z-index: 500;
  background: var(--amber); color: var(--ink); font-weight: 700;
  padding: 0.75rem 1.1rem; border-radius: 2px;
  transform: translateY(calc(-100% - 1.5rem));
  transition: transform 180ms var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-800); border-top: 1px solid var(--line-soft); }

/* ---------- Reduced motion guard ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ticker-track { animation: none !important; transform: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-media img, [data-parallax] { transform: none !important; }
}

/* ---------- Print ---------- */
@media print {
  .site-nav, .mobile-menu, .nav-toggle, .ticker, .grain::after, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  h1, h2, h3, h4 { color: #000; }
  a { color: #000; text-decoration: underline; }
  .section { padding-block: 1.5rem; }
}
