/* ---------- tokens ---------- */
:root {
  --bark:        #1f1712;
  --bark-soft:   #2a2019;
  --bark-line:   rgba(244, 238, 220, 0.14);
  --citron:      #e8b428;
  --citron-deep: #b8830e;
  --citron-bright: #f4c94e;
  --amber-ink:   #8a5a08; /* citron-deep is too light on --pith for text; this passes AA */
  --pith:        #f3efe0;
  --pith-dim:    #e7e0c9;
  --palm:        #5b6b3a;
  --walnut:      #3a2a1c;
  --ink:         #241a10;

  --font-display: "Frank Ruhl Libre", Georgia, serif;
  --font-body:    "Karla", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;

  --measure: 62ch;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bark);
  color: var(--pith);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 0.5em;
  color: inherit;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--citron);
  margin: 0 0 0.9em;
}

.band-pith .eyebrow { color: var(--amber-ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 3px;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible {
  outline: 2px solid var(--citron-bright);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--citron);
  color: var(--ink);
}
.btn-primary:hover { background: var(--citron-bright); }

.btn-dark {
  background: var(--ink);
  color: var(--citron-bright);
}
.btn-dark:hover { background: var(--bark-soft); }

/* ---------- topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.topbar-cta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--citron);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.topbar-cta:hover {
  color: var(--citron-bright);
  border-color: currentColor;
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(280px, 480px) minmax(320px, 560px);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(1rem, 5vw, 3rem) clamp(1.25rem, 4vw, 3rem) clamp(4rem, 8vw, 6rem);
  max-width: 1280px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 900;
  max-width: 13ch;
}

.hero-sub {
  font-size: 1.08rem;
  max-width: 42ch;
  color: var(--pith-dim);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin-top: 1.6rem;
}

.hero-hint {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--pith-dim);
  opacity: 0.75;
}

.hero-art {
  justify-self: center;
  text-align: center;
}

.case-toggle {
  position: relative;
  display: inline-block;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.case-frame {
  position: relative;
  display: block;
  width: min(78vw, 380px);
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bark-soft);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55);
}

.case-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.case-closed { opacity: 1; transform: scale(1); }
.case-open   { opacity: 0; transform: scale(1.03); }

.case-toggle:focus-visible .case-closed,
.case-toggle.is-open .case-closed {
  opacity: 0;
}
.case-toggle:focus-visible .case-open,
.case-toggle.is-open .case-open {
  opacity: 1;
  transform: scale(1);
}

@media (hover: hover) and (pointer: fine) {
  .case-toggle:hover:not(.suppress-hover) .case-closed { opacity: 0; }
  .case-toggle:hover:not(.suppress-hover) .case-open { opacity: 1; transform: scale(1); }
}

.case-toggle:focus-visible .case-frame {
  outline: 2px solid var(--citron-bright);
  outline-offset: 4px;
}

.case-toggle-label {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--citron);
  padding: 0.35em 0.8em;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
  pointer-events: none;
}
.case-toggle:focus-visible .case-toggle-label,
.case-toggle.is-open .case-toggle-label {
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  .case-toggle:hover:not(.suppress-hover) .case-toggle-label { opacity: 1; }
}

.state-open { display: none; }
.case-toggle.is-open .state-closed { display: none; }
.case-toggle.is-open .state-open { display: inline; }

.case-caption {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--pith-dim);
  opacity: 0.75;
}

/* ---------- bands / generic section shell ---------- */
.band {
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1.25rem, 4vw, 3rem);
}

.band-dark { background: var(--bark); }
.band-pith { background: var(--pith); color: var(--ink); }
.band-pith h2 { color: var(--ink); }
.band-pith p { color: var(--walnut); }

/* ---------- problem ---------- */
.problem {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 420px);
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
}

.problem-copy h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  max-width: 14ch;
}
.problem-copy p {
  max-width: var(--measure);
  color: var(--pith-dim);
}

.problem-art img {
  border-radius: 10px;
  box-shadow: 0 30px 60px -25px rgba(0,0,0,0.6);
}

/* ---------- spec ---------- */
.spec {
  max-width: 1280px;
  margin: 0 auto;
}

.spec-head { max-width: 44ch; margin-bottom: 2.5rem; }
.spec-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }

.spec-body {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 420px);
  gap: clamp(2rem, 6vw, 4rem);
  align-items: start;
}

.spec-list {
  margin: 0;
  border-top: 1px solid var(--walnut);
}

.spec-row {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1.5rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid rgba(58, 42, 28, 0.25);
}

.spec-row dt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber-ink);
  padding-top: 0.15em;
}

.spec-row dd {
  margin: 0;
  color: var(--walnut);
}

.spec-art img {
  border-radius: 10px;
}

/* ---------- personalize ---------- */
.personalize {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(280px, 1fr);
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
}

.personalize-art img {
  border-radius: 10px;
  box-shadow: 0 30px 60px -25px rgba(0,0,0,0.6);
}

.personalize-copy h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  max-width: 15ch;
}
.personalize-copy p {
  max-width: var(--measure);
  color: var(--pith-dim);
}

/* ---------- gift ---------- */
.gift {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.gift-quote {
  margin: 0 0 3rem;
}
.gift-quote p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  line-height: 1.35;
  color: var(--ink);
  max-width: 26ch;
  margin: 0 auto;
}
.gift-quote em {
  font-style: italic;
  color: var(--amber-ink);
}

.gift-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.gift-art { width: min(100%, 420px); }
.gift-art img { border-radius: 10px; }

.gift-text {
  max-width: 40ch;
  color: var(--walnut);
  font-size: 1.05rem;
}

/* ---------- final cta ---------- */
.cta {
  background: var(--citron);
  color: var(--ink);
  text-align: center;
  padding: clamp(4rem, 9vw, 6.5rem) clamp(1.25rem, 4vw, 3rem);
}
.cta h2 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  color: var(--ink);
}
.cta p {
  max-width: 40ch;
  margin-left: auto;
  margin-right: auto;
  color: var(--walnut);
  margin-bottom: 1.8rem;
}

.cta .cta-shipping {
  margin: 1.8rem auto 0;
  max-width: 46ch;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--walnut);
}

/* ---------- footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem clamp(1.25rem, 4vw, 3rem);
  border-top: 1px solid var(--bark-line);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--pith-dim);
}
.site-footer a { text-decoration: none; color: var(--citron); }
.site-footer a:hover { color: var(--citron-bright); }
.wordmark.small { font-family: var(--font-display); font-size: 1rem; opacity: 0.9; }
.footer-line { opacity: 0.6; }

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .hero-art { justify-self: stretch; }
  .case-frame { width: min(86vw, 380px); }

  .problem,
  .spec-body,
  .personalize {
    grid-template-columns: 1fr;
  }
  .personalize-art { order: -1; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn,
  .case-img,
  .case-toggle-label,
  .reveal {
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
