/* =========================================================================
   JankenDeck — specialty playing cards by Jeff Daymont
   Mobile-first redesign. Warm parchment + playful suit colors.
   Display: Fraunces (characterful old-world serif). UI/body: Jost (geometric).
   ========================================================================= */

:root {
  /* Color — warm parchment base, drawn from the original site */
  --cream:      #FEF6ED;  /* page background                         */
  --cream-deep: #FBE9D4;  /* alt sections, tints                     */
  --paper:      #FFFFFF;  /* cards / surfaces                        */
  --ink:        #241B12;  /* headlines + body (warm near-black)      */
  --ink-soft:   #6A5C4D;  /* secondary text, captions                */
  --line:       #E7D6C2;  /* borders, dividers                       */

  /* Accents — the suit colors */
  --orange:     #F37121;  /* primary accent: CTAs, links             */
  --orange-ink: #C9530F;  /* orange text on cream (AA)               */
  --red:        #E03B3B;  /* rock / warm highlight                   */
  --rock:       #F37121;
  --paper-suit: #2E6BB8;
  --scissors:   #7C3FAE;
  --water:      #1E9EB0;
  --lizard:     #3E9B4F;

  /* Type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;

  --t-display: clamp(2.15rem, 8.7vw, 6rem);
  --t-h2:      clamp(2rem, 6.6vw, 3.4rem);
  --t-h3:      clamp(1.4rem, 4.6vw, 1.9rem);
  --t-lead:    clamp(1.12rem, 3.6vw, 1.4rem);
  --t-body:    clamp(1.02rem, 2.4vw, 1.1rem);
  --t-cap:     0.8rem;

  /* Layout */
  --pad:    clamp(1.15rem, 5vw, 3rem);
  --max:    1180px;
  --sect-y: clamp(3.6rem, 9vw, 7rem);
  --radius: 18px;
  --shadow: 0 1px 2px rgba(36,27,18,.04), 0 12px 30px -16px rgba(36,27,18,.28);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ----------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--orange-ink); text-decoration: none; }
h1, h2, h3, p { margin: 0; text-wrap: pretty; }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.01em;
  font-optical-sizing: auto;
  overflow-wrap: break-word;
}
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------------------- structure */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: var(--sect-y); }
.eyebrow {
  font-family: var(--sans);
  font-size: var(--t-cap);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange-ink);
  margin: 0 0 0.9rem;
}
.lead { font-size: var(--t-lead); font-weight: 400; line-height: 1.45; color: var(--ink-soft); }
.section-head { max-width: 40ch; margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.section-head.center { margin-inline: auto; text-align: center; max-width: 44ch; }
.section-head h2 { font-size: var(--t-h2); margin-bottom: 0.7rem; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  background: var(--orange);
  color: #fff;
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.85em 1.4em;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s;
  box-shadow: 0 10px 22px -10px rgba(243,113,33,.7);
}
.btn:hover { transform: translateY(-2px); background: #ff8438; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  box-shadow: none;
}
.btn--ghost:hover { background: var(--ink); color: var(--cream); }
.btn--sm { font-size: 0.92rem; padding: 0.6em 1.1em; }
.tlink {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-weight: 600; color: var(--ink);
}
.tlink .arrow { transition: transform .25s var(--ease); }
.tlink:hover .arrow { transform: translateX(4px); }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(254,246,237,.86);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -18px rgba(36,27,18,.5); }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 0.6rem; margin-right: auto; }
.brand img { width: 34px; height: 34px; }
.brand b {
  font-family: var(--display); font-weight: 600; font-size: 1.42rem;
  letter-spacing: -0.01em; color: var(--ink);
}
.nav { display: none; align-items: center; gap: 1.7rem; }
.nav a { color: var(--ink); font-weight: 500; font-size: 1rem; }
.nav a:hover { color: var(--orange-ink); }
.header-cta { display: none; }
.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 5px;
  background: none; border: 0; padding: 10px; cursor: pointer; margin-right: -10px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .3s var(--ease); }

/* mobile drawer */
.mobile-nav {
  position: fixed; inset: 68px 0 auto 0; z-index: 49;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  padding: 0.5rem var(--pad) 1.4rem;
  transform: translateY(-120%);
  transition: transform .38s var(--ease);
  box-shadow: var(--shadow);
}
.mobile-nav.open { transform: translateY(0); }
.mobile-nav a { display: block; padding: 0.85rem 0; font-size: 1.18rem; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--line); }
.mobile-nav .btn { width: 100%; justify-content: center; margin-top: 1.1rem; }

@media (min-width: 860px) {
  .nav, .header-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none; }
}

/* ------------------------------------------------------------------ hero */
.hero { padding-block: clamp(2.4rem, 6vw, 4.5rem) clamp(2.6rem, 6vw, 4rem); }
.hero .wrap { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.hero h1 { font-size: var(--t-display); margin: 0.5rem 0 0; }
.hero h1 .ital { font-style: italic; color: var(--orange-ink); }
.hero__lead { margin-top: 1.3rem; max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.9rem; }
.hero__note { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.3rem; font-size: var(--t-cap); color: var(--ink-soft); font-weight: 500; }
.hero__note .tick { color: var(--lizard); font-weight: 700; }
.hero__art {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--cream-deep); box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.hero__art img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.hero__badge {
  position: absolute; left: 16px; bottom: 16px;
  background: var(--paper); color: var(--ink);
  border-radius: 12px; padding: 0.55rem 0.85rem; font-size: 0.82rem; font-weight: 600;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 0.5rem;
}
.hero__badge img { width: 26px; height: 26px; }

@media (min-width: 860px) {
  .hero .wrap { grid-template-columns: 1.05fr 0.95fr; }
}

/* ----------------------------------------------------------- trust strip */
.trust { background: var(--ink); color: var(--cream); }
.trust .wrap { display: flex; flex-wrap: wrap; gap: 0.7rem 2rem; justify-content: center; padding-block: 1.1rem; text-align: center; }
.trust span { font-size: 0.86rem; font-weight: 500; letter-spacing: 0.01em; display: inline-flex; align-items: center; gap: 0.5rem; color: #f3e7d8; }
.trust .dot { color: var(--orange); }

/* ------------------------------------------------------------ deck grid */
.decks-grid { display: grid; gap: clamp(1.1rem, 3vw, 1.7rem); grid-template-columns: 1fr; }
@media (min-width: 560px) { .decks-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .decks-grid { grid-template-columns: repeat(3, 1fr); } }

.deck {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.deck:hover { transform: translateY(-4px); box-shadow: 0 1px 2px rgba(36,27,18,.06), 0 26px 44px -22px rgba(36,27,18,.42); }
.deck__media { position: relative; background: var(--cream-deep); }
.deck__media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.deck__tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--ink); color: var(--cream);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.3rem 0.6rem; border-radius: 999px;
}
.deck__tag.is-new { background: var(--red); }
.deck__body { padding: 1.2rem 1.25rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.deck__row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.deck__body h3 { font-size: 1.42rem; }
.deck__price { font-family: var(--sans); font-weight: 600; font-size: 1.18rem; color: var(--orange-ink); white-space: nowrap; }
.deck__hook { font-style: italic; color: var(--ink); font-weight: 500; margin-top: 0.3rem; font-family: var(--display); font-size: 1.02rem; }
.deck__desc { color: var(--ink-soft); font-size: 0.96rem; margin-top: 0.6rem; }
.deck__meta { margin-top: 0.85rem; font-size: 0.8rem; color: var(--ink-soft); font-weight: 500; letter-spacing: 0.02em; }
.deck__cta { margin-top: auto; padding-top: 1.1rem; }
.deck__cta .btn { width: 100%; justify-content: center; }

/* ------------------------------------------------------------ art / story */
.art { background: var(--ink); color: var(--cream); }
.art h2, .art h3 { color: var(--cream); }
.art .eyebrow { color: var(--tan, #E4B88C); color: #F3A968; }
.art .lead { color: #e7d8c6; }
.art-grid { display: grid; gap: clamp(1.6rem, 4vw, 3rem); align-items: center; }
.art-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.art-cards img { border-radius: 12px; box-shadow: 0 18px 36px -20px rgba(0,0,0,.7); background: #fff; }
.art-cards img:nth-child(2) { transform: translateY(-14px); }
.art-names { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.art-names li {
  font-size: 0.82rem; font-weight: 500; color: #f3e7d8;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.13);
  padding: 0.32rem 0.7rem; border-radius: 999px;
}
@media (min-width: 860px) { .art-grid { grid-template-columns: 0.95fr 1.05fr; } }

/* ----------------------------------------------------------- how it works */
.mech-grid { display: grid; gap: clamp(1.6rem, 4vw, 3rem); align-items: center; }
.mech-art {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.2rem, 4vw, 2.2rem); box-shadow: var(--shadow);
}
.mech-art img { margin-inline: auto; max-width: 420px; }
.suit-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.3rem; }
.suit-chips li { font-weight: 600; font-size: 0.9rem; padding: 0.35rem 0.85rem; border-radius: 999px; color: #fff; }
.suit-chips .rock { background: var(--rock); }
.suit-chips .paper { background: var(--paper-suit); }
.suit-chips .scissors { background: var(--scissors); }
.suit-chips .water { background: var(--water); }
.suit-chips .lizard { background: var(--lizard); }
@media (min-width: 860px) { .mech-grid { grid-template-columns: 1fr 1fr; } }

/* --------------------------------------------------------------- combos */
.combos { background: var(--cream-deep); }
.combo-grid { display: grid; gap: 0.9rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .combo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .combo-grid { grid-template-columns: repeat(3, 1fr); } }
.combo {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 1rem 1.2rem;
}
.combo b { font-family: var(--sans); font-weight: 500; }
.combo .price { font-weight: 600; color: var(--orange-ink); font-size: 1.1rem; }
.combo--best { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange) inset; }

/* ---------------------------------------------------------------- apps */
.apps-grid { display: grid; gap: clamp(1.4rem,4vw,2.6rem); align-items: center; }
@media (min-width: 860px) { .apps-grid { grid-template-columns: 1fr 1fr; } }
.apps .badges { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.4rem; }

/* --------------------------------------------------------------- about */
.about { background: var(--ink); color: var(--cream); }
.about h2 { color: var(--cream); }
.about .lead, .about p { color: #e7d8c6; }
.about-wrap { display: grid; gap: clamp(1.4rem, 4vw, 2.6rem); align-items: center; }
.about blockquote { margin: 0; }
.about .sig { margin-top: 1.4rem; font-family: var(--display); font-style: italic; font-size: 1.3rem; color: var(--cream); }
.about .mark { width: 90px; height: 90px; margin-bottom: 1rem; }
@media (min-width: 860px) { .about-wrap { grid-template-columns: 1fr; max-width: 760px; } }

/* ------------------------------------------------------------- final cta */
.cta { text-align: center; }
.cta h2 { font-size: var(--t-h2); max-width: 18ch; margin-inline: auto; }
.cta .lead { margin: 1rem auto 2rem; max-width: 44ch; }
.cta .btn { font-size: 1.1rem; padding: 1em 1.8em; }

/* --------------------------------------------------------------- footer */
.site-footer { background: #1b140d; color: #cbbba6; padding-block: clamp(2.6rem, 6vw, 4rem); font-size: 0.9rem; }
.site-footer .wrap { display: grid; gap: 1.6rem; }
.site-footer .brand b { color: var(--cream); }
.site-footer a { color: #e7d8c6; }
.site-footer a:hover { color: var(--orange); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.9rem 1.6rem; }
.foot-legal { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.4rem; color: #9d8e7b; font-size: 0.82rem; line-height: 1.6; }
.foot-legal a { color: #9d8e7b; text-decoration: underline; }
@media (min-width: 760px) {
  .site-footer .wrap { grid-template-columns: 1.3fr 1fr; }
  .foot-legal { grid-column: 1 / -1; }
}

/* --------------------------------------------------- sticky mobile shop bar */
.shopbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 48;
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  background: rgba(254,246,237,.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); padding: 0.6rem var(--pad);
  transform: translateY(120%); transition: transform .35s var(--ease);
}
.shopbar.show { transform: translateY(0); }
.shopbar span { font-weight: 500; font-size: 0.92rem; }
.shopbar .btn { padding: 0.6em 1.1em; }
@media (min-width: 860px) { .shopbar { display: none; } }

/* ----------------------------------------------------------- reveal anim */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
