/* ── 0. Self-hosted fonts ──────────────────────────────────────────── */
/* Latin subset of each face we use. Cormorant Garamond is a variable
   font so two files cover all five weight/style combinations. */

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/cormorant-garamond.woff2') format('woff2');
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-italic.woff2') format('woff2');
}

@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/lato-300.woff2') format('woff2');
}

@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/lato-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/lato-700.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/jetbrains-mono.woff2') format('woff2');
}

/*
 * Clean Kitchen site styles. Layered on top of site-tokens.css (the --ck-*
 * design-token schema with brand-neutral defaults):
 *
 *   1. House palette — Clean Kitchen brand values override the neutral defaults.
 *   2. Base — page reset and typography defaults.
 *   3. Utilities — .label, .btn, .price, .photo-wrap (shared across pages).
 *   4. Chrome — site nav + footer.
 *   5. Shared sections — find-our-pies, quote (rendered on multiple pages).
 *   6. Widget bridge — themes embedded candle widgets from --ck-* tokens.
 */

/* ── 1. House palette ──────────────────────────────────────────────── */
:root {
  --ck-bg: #f4ebd5;
  --ck-paper: #fbf3dc;
  --ck-fg: #1f1812;
  --ck-muted: #6e5f48;
  --ck-line: rgba(31, 24, 18, 0.16);

  --ck-accent: #d36a26;
  --ck-accent-2: #4f6234;
  --ck-on-accent: #ffffff;

  --ck-body: 'Lato', ui-sans-serif, system-ui, sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--ck-bg);
  color: var(--ck-fg);
  font-family: var(--ck-body);
  font-size: var(--ck-font-size);
  line-height: var(--ck-line-height);
  font-weight: 400;
  letter-spacing: 0.003em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--ck-display);
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 0.98;
  margin: 0;
  color: var(--ck-fg);
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.it,
em { font-style: italic; font-weight: 400; }

/* ── 3. Utilities ──────────────────────────────────────────────────── */
.label {
  font-family: var(--ck-body);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: var(--ck-accent);
}

.muted { color: var(--ck-muted); }
.rule { height: 1px; background: var(--ck-line); }

.price {
  font-family: var(--ck-display);
  font-style: italic;
  font-size: 24px;
  color: var(--ck-accent);
  white-space: nowrap;
  line-height: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--ck-radius);
  background: var(--ck-accent);
  color: var(--ck-on-accent);
  font-family: var(--ck-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1.5px solid var(--ck-accent);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn:hover {
  background: var(--ck-fg);
  border-color: var(--ck-fg);
  color: var(--ck-on-accent);
}

.btn-ghost {
  background: transparent;
  color: var(--ck-accent-2);
  border: 1.5px solid var(--ck-accent-2);
}

.btn-ghost:hover {
  background: var(--ck-accent-2);
  color: var(--ck-on-accent);
  border-color: var(--ck-accent-2);
}

/* Image surface. Real photos use <img class="photo">; missing photos
   render an empty placeholder with the same dimensions. */
.photo-wrap {
  position: relative;
  width: 100%;
  background: var(--ck-paper);
  overflow: hidden;
}

.photo-wrap.dark { background: #1f1c18; }

.photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Striped + monospace-captioned placeholder for photos not yet shot. */
.photo-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  background-image:
    repeating-linear-gradient(135deg,
      var(--ck-accent) 0 1px,
      transparent 1px 14px);
  opacity: 0.45;
}

.photo-cap {
  position: absolute;
  bottom: 12px;
  left: 14px;
  font-family: var(--ck-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ck-fg);
  opacity: 0.78;
  padding: 3px 6px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(2px);
  border-radius: 2px;
  pointer-events: none;
}

/* Page-level layout shared by simple content pages (legal, subscribe, 404). */
.ck-page {
  padding: var(--ck-pad-y) var(--ck-pad-x);
}

.ck-page--center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  min-height: 60vh;
}

/* Long-form text: legal pages, anywhere prose-style copy needs to be
   constrained to a comfortable reading measure. */
.ck-prose {
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.7;
  color: var(--ck-fg);
}

.ck-prose h1 {
  color: var(--ck-accent);
  font-size: 48px;
  margin-bottom: 6px;
}

.ck-prose h2 {
  font-family: var(--ck-display);
  font-weight: 500;
  font-size: 26px;
  color: var(--ck-fg);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.ck-prose p { margin-bottom: 1rem; }

.ck-prose ul {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.ck-prose a {
  color: var(--ck-accent);
  border-bottom: 1px solid var(--ck-line);
}

.ck-prose a:hover { border-bottom-color: var(--ck-accent); }

.ck-prose__updated {
  color: var(--ck-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* ── 4. Chrome ─────────────────────────────────────────────────────── */
.ck-nav {
  padding: 18px var(--ck-pad-x);
  border-bottom: 1px solid var(--ck-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--ck-bg);
}

.ck-nav__brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Wordmark — white text on the accent, matches the printed logo. */
.ck-nav__wordmark {
  background: var(--ck-accent);
  color: var(--ck-on-accent);
  padding: 9px 16px 10px;
  font-family: var(--ck-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1;
  text-decoration: none;
}

.ck-nav__locale {
  color: var(--ck-muted);
  font-size: 10px;
}

.ck-nav__links {
  display: flex;
  gap: 28px;
  font-size: 13.5px;
  letter-spacing: 0.04em;
}

.ck-nav__links a[aria-current="page"] {
  color: var(--ck-accent);
  border-bottom: 1.5px solid var(--ck-accent);
  padding-bottom: 2px;
}

.ck-nav__phone-group {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 15px;
  white-space: nowrap;
}

.ck-nav__phone-label {
  color: var(--ck-muted);
  font-size: 10px;
}

.ck-nav__phone {
  font-family: var(--ck-display);
  font-size: 24px;
  color: var(--ck-accent);
  letter-spacing: -0.005em;
  line-height: 1;
}

.ck-footer {
  padding: 80px var(--ck-pad-x) 36px;
}

.ck-footer__wordmark {
  font-family: var(--ck-display);
  font-size: 168px;
  letter-spacing: -0.025em;
  line-height: 0.9;
}

.ck-footer__tagline {
  font-family: var(--ck-display);
  font-style: italic;
  font-size: 32px;
  color: var(--ck-muted);
  margin-top: 14px;
  margin-left: 10px;
  margin-bottom: 56px;
  letter-spacing: -0.005em;
}

.ck-footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--ck-line);
  font-size: 13px;
  color: var(--ck-muted);
}

.ck-footer__grid .label {
  color: var(--ck-fg);
  margin-bottom: 10px;
  display: block;
}

.ck-footer__grid a:hover {
  color: var(--ck-accent);
}

.ck-footer__copy { opacity: 0.6; }

@media (max-width: 600px) {
  .ck-nav__links,
  .ck-nav__locale,
  .ck-nav__phone-label { display: none; }

  .ck-nav__wordmark { padding: 7px 12px 8px; font-size: 20px; }
  .ck-nav__phone { font-size: 20px; }

  .ck-footer { padding-top: 48px; }
  .ck-footer__wordmark { font-size: 64px; }
  .ck-footer__tagline {
    font-size: 22px;
    margin-top: 10px;
    margin-left: 4px;
    margin-bottom: 36px;
  }
  .ck-footer__grid { grid-template-columns: 1fr 1fr; }
}

/* ── 5. Shared sections ────────────────────────────────────────────── */
/* Sections rendered on more than one page. Page-only sections stay in
   the corresponding page CSS (e.g. home.css). */

/* Find Our Pies — retail-locations grid. Data: _data/retail-locations.json. */
.ck-find-pies { padding: var(--ck-pad-y) var(--ck-pad-x); }

.ck-find-pies__intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 56px;
}

.ck-find-pies__title {
  font-size: 88px;
  margin-top: 18px;
  letter-spacing: -0.018em;
  min-width: 535px;
}

.ck-find-pies__sub {
  font-family: var(--ck-display);
  font-style: italic;
  font-size: 22px;
  color: var(--ck-fg);
  opacity: 0.85;
  margin: 0;
  max-width: 480px;
  line-height: 1.4;
}

.ck-find-pies__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.ck-find-pies__card {
  padding: 22px 22px 24px;
  border: 1px solid var(--ck-line);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.15s ease-out;
}

.ck-find-pies__card:hover {
  border-color: var(--ck-accent);
}

.ck-find-pies__town {
  color: var(--ck-accent);
  margin-bottom: 8px;
  display: block;
}

.ck-find-pies__name {
  font-family: var(--ck-display);
  font-size: 28px;
  line-height: 1.05;
}

.ck-find-pies__detail {
  font-family: var(--ck-display);
  font-style: italic;
  font-size: 17px;
  color: var(--ck-muted);
  line-height: 1.35;
}

/* Availability badges — small dot + label, orange for fresh, blue for frozen.
   The blue is scoped to this section; promote to a token if reused elsewhere.
   Stack vertically when both are present; left-align so the dots line up. */
.ck-find-pies__badges {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 6px;
  font-family: var(--ck-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.ck-find-pies__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ck-find-pies__badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.ck-find-pies__badge--fresh { color: var(--ck-accent); }
.ck-find-pies__badge--frozen { color: #3d6e8c; }

/* Address sits left, availability badges right — fills the lower-right nook
   so single-line badges don't add a row to the card. */
.ck-find-pies__foot {
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.ck-find-pies__where {
  font-size: 13px;
  color: var(--ck-muted);
  line-height: 1.45;
}

.ck-find-pies__where small { opacity: 0.75; }

.ck-find-pies__more {
  margin-top: 36px;
  display: flex;
  justify-content: center;
}

/* Customer Quote. */
.ck-quote {
  padding: 104px var(--ck-pad-x);
  text-align: center;
}

.ck-quote__label { color: var(--ck-accent-2); }

.ck-quote__blockquote {
  font-family: var(--ck-display);
  font-style: italic;
  font-size: 52px;
  line-height: 1.18;
  letter-spacing: -0.012em;
  max-width: 1000px;
  margin: 32px auto 40px;
  color: var(--ck-accent-2);
  font-weight: 400;
  position: relative;
}

.ck-quote__mark {
  font-family: var(--ck-display);
  color: var(--ck-accent-2);
  opacity: 0.55;
  font-size: 88px;
  line-height: 0.5;
  vertical-align: -0.18em;
  font-style: normal;
}

.ck-quote__mark--open { margin-right: 6px; }
.ck-quote__mark--close { margin-left: 6px; }

.ck-quote__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ck-body);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ck-accent-2);
  border-bottom: 1.5px solid var(--ck-accent-2);
  padding-bottom: 4px;
}

@media (max-width: 600px) {
  .ck-find-pies__intro { grid-template-columns: 1fr; gap: 18px; margin-bottom: 32px; }
  .ck-find-pies__title { font-size: 48px; min-width: 0; }
  .ck-find-pies__sub { font-size: 18px; }
  .ck-find-pies__grid { grid-template-columns: 1fr; gap: 14px; }
  .ck-find-pies__name { font-size: 26px; }
  .ck-find-pies__detail { font-size: 16px; }
  .ck-find-pies__more { margin-top: 28px; }

  .ck-quote { padding: 64px var(--ck-pad-x); }
  .ck-quote__blockquote { font-size: 32px; margin: 24px auto 28px; }
  .ck-quote__mark { font-size: 56px; }
}

/* ── 6. Widget bridge ──────────────────────────────────────────────── */
/* Embedded candle widgets are themed by mapping --ck-* into --candle-*
   on the custom-element selector. The widget reads the candle tokens
   inside its shadow root; --ck-* doesn't leak in directly. */
ck-subscribe-form {
  --candle-primary: var(--ck-accent);
  --candle-primary-strong: #b8541c;
  --candle-primary-soft: #fbe3d6;
  --candle-on-primary: var(--ck-on-accent);

  --candle-text: var(--ck-fg);
  --candle-text-soft: var(--ck-muted);

  --candle-bg: #ffffff;
  --candle-bg-soft: var(--ck-paper);
  --candle-border: var(--ck-line);

  --candle-danger: #c0392b;
  --candle-danger-soft: #fbe3e0;

  --candle-font: var(--ck-body);
}
