/* =========================================================
   The Shop on the Hill — global styles
   Warm, rustic, log cabin. One stylesheet, no frameworks.
   ========================================================= */

:root {
  /* Color — all warm, low chroma */
  --bg:           oklch(0.965 0.012 80);   /* parchment */
  --bg-deep:      oklch(0.93  0.018 75);   /* deeper card */
  --paper:        oklch(0.985 0.008 85);   /* near-white warm */
  --ink:          oklch(0.22  0.025 50);   /* espresso */
  --ink-soft:     oklch(0.36  0.025 50);   /* secondary text */
  --ink-muted:    oklch(0.52  0.020 60);   /* muted */
  --rule:         oklch(0.82  0.020 70);   /* hairlines */
  --rule-deep:    oklch(0.68  0.025 60);

  --walnut:       oklch(0.35  0.055 55);   /* primary accent */
  --walnut-deep:  oklch(0.26  0.050 50);
  --moss:         oklch(0.42  0.045 130);  /* secondary accent */
  --brass:        oklch(0.72  0.105 80);   /* highlight */
  --brass-ink:    oklch(0.50  0.090 75);

  /* Type */
  --f-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --f-body:    "Lora", "Iowan Old Style", Georgia, serif;
  --f-mark:    "Cormorant Garamond", Georgia, serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, Menlo, monospace;

  /* Spacing rhythm */
  --pad: clamp(20px, 4vw, 64px);
  --maxw: 1240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle paper grain on the whole canvas */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, oklch(0.85 0.03 60 / 0.18), transparent 40%),
    radial-gradient(circle at 80% 70%, oklch(0.90 0.03 80 / 0.14), transparent 45%);
  z-index: 0;
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(40px, 6vw, 76px); font-weight: 500; }
h2 { font-size: clamp(30px, 4vw, 50px); }
h3 { font-size: clamp(22px, 2.4vw, 30px); }
h4 { font-size: 20px; }

p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--walnut-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }

.eyebrow {
  font-family: var(--f-mark);
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brass-ink);
  font-weight: 600;
}

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

.shell {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
  z-index: 1;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--f-mark);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--walnut-deep);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn .arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}
.btn:hover .arrow { transform: translateX(4px); }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(0.965 0.012 80 / 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
}
.brand .logo-mark { height: 88px; width: auto; display: block; }
.footer-brand .logo-mark { display: block; }
/* Footer variant — the badge now contains the wordmark, so size it as a badge.
   On narrow viewports, max-width takes over and the height becomes
   `auto` so the image preserves its aspect ratio instead of stretching
   vertically against a too-narrow grid cell. */
.footer-brand .logo-mark--footer {
  height: 140px;
  width: auto;
  max-width: 100%;
}
@media (max-width: 600px) {
  .footer-brand .logo-mark--footer {
    height: auto;
    width: auto;
    max-width: 200px;
  }
}

/* Logo color variants.
   - dark: full-color badge on parchment (default)
   - light: full-color (the badge reads on dark too — trees & blade are warm tones)
   - footer: full-color, rendered as-is on the dark footer */
.logo-mark--light {
  /* full color */
}
.logo-mark--footer {
  /* full color — the new badge is the wordmark; let it carry on dark */
}

@media (max-width: 640px) {
  .brand .logo-mark { height: 64px; }
}
.brand .name {
  font-family: var(--f-display);
  font-size: 22px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand .sub {
  display: block;
  font-family: var(--f-mark);
  font-size: 10px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 4px;
  white-space: nowrap;
}
@media (max-width: 1080px) {
  .brand .sub { display: none; }
}
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
@media (max-width: 1080px) {
  .nav { gap: 20px; }
}
.nav a {
  font-family: var(--f-mark);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  padding: 6px 0;
}
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); }
.nav a.active::after {
  content: "";
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--brass);
}
.nav .commission {
  margin-left: 8px;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 2px;
  transition: background 0.3s ease, border-radius 0.3s ease, color 0.3s ease;
}
/* Animate to a radius just past pill threshold for this button
   height (~20px). Going further (e.g. 999px) looks identical at
   rest but makes ~95% of the animation invisible, so the eye
   reads it as a snap. Keeping the target near the threshold
   means the entire 0.3s transition is visible. */
.nav .commission:hover {
  background: var(--walnut-deep);
  color: var(--paper);
  border-radius: 22px;
}
.nav .commission::after { display: none; }

.menu-btn {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 960px) {
  .nav { display: none; }
  .menu-btn { display: block; }
  .nav.open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 16px var(--pad);
  }
  .nav.open a { padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .nav.open a:last-child { border-bottom: 0; }
  .nav.open .commission {
    background: var(--ink);
    color: var(--paper);
    margin-top: 12px;
    padding: 14px 26px;          /* overrides the 14px 0 from .nav.open a above */
    align-self: center;           /* horizontally centered at natural width */
  }
}

/* ============ Footer ============ */
.site-footer {
  margin-top: 120px;
  background: var(--ink);
  color: oklch(0.90 0.015 80);
  padding: 80px 0 36px;
  position: relative;
  z-index: 1;
}
.site-footer h4 {
  color: var(--paper);
  font-family: var(--f-mark);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 18px;
  font-weight: 600;
}
.site-footer .cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid oklch(0.30 0.02 60);
}
@media (max-width: 900px) {
  .site-footer .cols { grid-template-columns: 1fr 1fr; gap: 40px; }
}
/* Phone: collapse to a single column so the brand block isn't
   sharing a narrow row with another section (which forces the
   logo to "squish" — its height stays fixed while width gets
   pinched by the grid cell). */
@media (max-width: 600px) {
  .site-footer { padding: 56px 0 28px; margin-top: 80px; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 32px; padding-bottom: 40px; }
}
.site-footer a {
  color: oklch(0.80 0.015 80);
  text-decoration: none;
  display: block;
  padding: 4px 0;
}
.site-footer a:hover { color: var(--brass); }
/* Footer social link — icon + label, inline-aligned. The SVG
   inherits color via `currentColor` so the brass hover state
   carries through. */
.site-footer a.social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
}
.site-footer a.social .social-icon {
  flex: 0 0 auto;
  transition: transform 0.15s ease;
}
.site-footer a.social:hover .social-icon { transform: translateY(-1px); }
.site-footer .colophon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 13px;
  color: oklch(0.70 0.015 80);
  gap: 16px;
}
@media (max-width: 600px) {
  .site-footer .colophon {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 20px;
  }
}
.footer-brand {
  margin-bottom: 24px;
  display: inline-block;
  background: var(--bg);
  padding: 16px 20px;
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04), 0 8px 24px rgba(0,0,0,0.25);
}
@media (max-width: 600px) {
  .footer-brand { padding: 12px 14px; margin-bottom: 16px; }
}
.footer-brand .logo-mark { display: block; }
.footer-tag {
  font-size: 15px;
  line-height: 1.6;
  color: oklch(0.85 0.015 80);
  max-width: 320px;
}
