/* Jackdaw Collectables
   Theme: navy-led in every colour scheme (brand decision), one accent (mint).
   Shape rule: buttons 10px, trading-card tiles 12px, panels 22px. */
:root, :root[data-theme="dark"], :root[data-theme="light"] {
  --navy: #081d39;
  --navy-deep: #051429;
  --navy-raised: #0d2547;
  --navy-line: #1f3d66;
  --cream: #fcf5e4;
  --cream-dim: #c5ccd8;
  --slate: #8ea3bd;
  --mint: #66d1c5;
  --mint-hover: #82ddd2;
  --mint-ink: #04292b;
  --r-btn: 10px;
  --r-card: 12px;
  --r-panel: 22px;
  --font: "Outfit", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --z-nav: 20;
  --z-grain: 30;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; }
}

:root { box-sizing: border-box; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 84px); scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: inherit; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--cream);
  font: 300 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Fixed grain layer so flat navy has some depth */
body::after {
  content: ""; position: fixed; inset: 0; z-index: var(--z-grain); pointer-events: none; opacity: .06;
  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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.75rem); }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 40; background: var(--mint); color: var(--mint-ink); padding: .6rem 1rem; border-radius: var(--r-btn); font-weight: 500; text-decoration: none; }
.skip:focus { top: 1rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 50px; padding: 0 1.5rem; border-radius: var(--r-btn);
  font: 500 1rem/1 var(--font); text-decoration: none; white-space: nowrap; border: 0; cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn-sm { height: 40px; padding: 0 1rem; font-size: .93rem; }
.btn-accent { background: var(--mint); color: var(--mint-ink); }
.btn-accent:hover { background: var(--mint-hover); transform: translateY(-1px); }
.btn-line { border: 1px solid var(--slate); color: var(--cream); background: transparent; }
.btn-line:hover { border-color: var(--mint); color: var(--mint); }
.btn-navy { background: var(--navy); color: var(--cream); }
.btn-navy:hover { background: #12345f; transform: translateY(-1px); }
.link-quiet { color: var(--cream-dim); text-decoration: underline; text-decoration-color: var(--navy-line); text-underline-offset: 6px; text-decoration-thickness: 2px; font-weight: 400; transition: color .2s, text-decoration-color .2s; }
.link-quiet:hover { color: var(--cream); text-decoration-color: var(--mint); }

.flag { display: inline-block; margin: 0 0 1rem; font-size: .9rem; font-weight: 500; color: var(--mint-ink); background: var(--mint); padding: .3rem .7rem; border-radius: 4px; }

/* Wordmark echoes the logo lockup */
.wordmark { display: flex; flex-direction: column; font-weight: 600; letter-spacing: .14em; font-size: 1rem; line-height: 1; }
.wordmark small { font-weight: 400; font-size: .56rem; letter-spacing: .42em; color: var(--slate); margin-top: .35rem; }

/* Nav */
.nav { position: sticky; top: 0; z-index: var(--z-nav); background: rgb(8 29 57 / .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgb(31 61 102 / .6); padding-top: env(safe-area-inset-top, 0px); margin-top: calc(-1 * env(safe-area-inset-top, 0px)); }
.nav-bar { display: flex; align-items: center; gap: 2rem; height: 72px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; margin-right: auto; }
.brand img { width: 46px; height: auto; }
.nav-links { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--cream-dim); font-size: .96rem; font-weight: 400; padding: .4rem 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--cream); border-color: var(--mint); }
.menu-toggle { display: none; height: 40px; padding: 0 .9rem; border-radius: var(--r-btn); border: 1px solid var(--navy-line); background: transparent; color: var(--cream); font: 500 .93rem var(--font); cursor: pointer; }

/* Hero */
.hero { padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(1rem, 2vw, 1.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.hero h1 { font-weight: 600; font-size: clamp(2.5rem, 4.8vw, 4.2rem); line-height: 1.03; letter-spacing: -0.03em; margin: 0 0 1.4rem; }
.hero-copy p { color: var(--cream-dim); font-size: clamp(1.05rem, 1.35vw, 1.2rem); max-width: 40ch; margin: 0 0 2.2rem; }
.hero-actions { display: flex; align-items: center; gap: 1.75rem; flex-wrap: wrap; }

/* Display case: raised panel with sleeve-grid texture, bird spills over its edge */
.case { position: relative; aspect-ratio: 681 / 520; margin-top: 2rem; }
.case-glass {
  position: absolute; inset: 16% 0 0 10%; border-radius: var(--r-panel);
  background:
    radial-gradient(120% 90% at 85% 10%, rgb(102 209 197 / .16), transparent 55%),
    repeating-linear-gradient(90deg, rgb(252 245 228 / .035) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(0deg, rgb(252 245 228 / .035) 0 1px, transparent 1px 78px),
    var(--navy-raised);
  border: 1px solid var(--navy-line);
  box-shadow: inset 0 1px 0 rgb(252 245 228 / .06), 0 40px 80px -30px rgb(2 10 24 / .8);
}
.case-bird { position: absolute; width: 102%; max-width: none; left: -6%; bottom: 0; filter: drop-shadow(0 26px 30px rgb(2 10 24 / .55)); }


/* Sections */
section { padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(3.5rem, 6.5vw, 5rem); }
h2 { font-weight: 600; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.06; letter-spacing: -0.025em; margin: 0 0 1rem; }
.intro { color: var(--cream-dim); max-width: 50ch; margin: 0 0 3rem; font-size: 1.1rem; }

/* Shop: trading-card tiles (63 x 88 proportions) */
.shop { padding-top: clamp(2rem, 4vw, 3rem); }
.deck { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); }
.tcg {
  --rx: 0deg; --ry: 0deg;
  display: block; aspect-ratio: 63 / 88; border-radius: var(--r-card); padding: 10px; text-decoration: none;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.deck .tcg:nth-child(2) { margin-top: 3rem; }
.deck .tcg:nth-child(3) { margin-top: 6rem; }
.tcg-live { background: var(--mint); color: var(--mint-ink); box-shadow: 0 30px 60px -30px rgb(2 10 24 / .9); }
.tcg-live:hover { box-shadow: 0 40px 70px -28px rgb(2 10 24 / .95); }
.tcg-soon { background: var(--navy-raised); color: var(--cream); border: 1px solid var(--navy-line); }
.tcg-frame { display: flex; flex-direction: column; height: 100%; border-radius: 7px; padding: clamp(1rem, 2vw, 1.4rem); border: 2px solid currentColor; border-color: rgb(4 41 43 / .35); }
.tcg-soon .tcg-frame { border-color: var(--navy-line); }
.tcg-top { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.tcg-name { font-weight: 600; font-size: clamp(1.25rem, 2.1vw, 1.65rem); line-height: 1.1; letter-spacing: -0.01em; }
.tcg-tag { font-size: .8rem; font-weight: 500; white-space: nowrap; opacity: .8; }
.tcg-art { flex: 1; margin: 1rem 0; border-radius: 6px; padding: 1rem; display: flex; flex-direction: column; justify-content: center; gap: .9rem; }
.tcg-line { display: flex; flex-direction: column; gap: .1rem; padding-bottom: .9rem; border-bottom: 1px solid rgb(4 41 43 / .18); }
.tcg-line:last-child { border-bottom: 0; padding-bottom: 0; }
.tcg-line b { font-weight: 600; font-size: 1.15rem; }
.tcg-line i { font-style: normal; font-size: .92rem; opacity: .8; line-height: 1.35; }
.tcg-soon .tcg-line { border-color: var(--navy-line); }
.tcg-soon .tcg-line i { color: var(--cream-dim); }
.tcg-art-a { background: radial-gradient(120% 70% at 20% 0%, rgb(255 255 255 / .32), transparent 60%), rgb(4 41 43 / .07); }
.tcg-art-b { background: radial-gradient(120% 70% at 80% 0%, rgb(255 255 255 / .3), transparent 60%), rgb(4 41 43 / .07); }
.tcg-art-c { background: var(--navy); }
.tcg-text { font-size: .98rem; line-height: 1.45; font-weight: 400; }
.tcg-soon .tcg-text { color: var(--cream-dim); font-weight: 300; }
.tcg-cta { margin-top: 1rem; display: inline-flex; align-self: flex-start; align-items: center; height: 42px; padding: 0 1rem; border-radius: var(--r-btn); background: var(--navy); color: var(--cream); font-weight: 500; font-size: .95rem; transition: background-color .2s; }
.tcg-live:hover .tcg-cta { background: #12345f; }
.tcg-cta-off { background: transparent; border: 1px dashed var(--navy-line); color: var(--slate); }

/* Keepsake limited showcase */
.keepsake { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 18%, var(--navy-deep) 82%, var(--navy) 100%); }
.keepsake-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.keepsake-visual { position: relative; aspect-ratio: 1 / 1; max-width: 520px; width: 100%; margin: 0 auto; }
.kc { position: absolute; left: 50%; top: 50%; width: 52%; aspect-ratio: 63 / 88; border-radius: var(--r-card); transform-origin: 50% 90%; transition: transform .6s var(--ease); }
.kc-back { background: var(--navy-raised); border: 1px solid var(--navy-line); transform: translate(-50%, -50%) rotate(-14deg) translateX(-22%); }
.kc-mid { background: #12345f; border: 1px solid var(--navy-line); transform: translate(-50%, -50%) rotate(-4deg) translateX(-6%); }
.kc-front {
  background: radial-gradient(130% 80% at 30% 0%, rgb(102 209 197 / .35), transparent 60%), var(--navy-raised);
  border: 1px solid rgb(102 209 197 / .5); padding: 9px;
  transform: translate(-50%, -50%) rotate(8deg) translateX(14%);
  box-shadow: 0 40px 70px -30px rgb(0 0 0 / .8), inset 0 0 0 8px var(--navy-raised), inset 0 0 0 9px rgb(252 245 228 / .5);
  display: grid; place-items: center;
}
.kc-front img { width: 82%; height: auto; }
.keepsake-visual:hover .kc-back { transform: translate(-50%, -50%) rotate(-18deg) translateX(-30%); }
.keepsake-visual:hover .kc-front { transform: translate(-50%, -50%) rotate(11deg) translateX(20%) translateY(-3%); }
.keepsake-copy > p:not(.flag) { color: var(--cream-dim); font-size: 1.12rem; max-width: 44ch; margin: 0 0 2rem; }
.keepsake-facts { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 2.5rem; margin: 0 0 2.25rem; }
.keepsake-facts dt { font-size: .9rem; color: var(--slate); }
.keepsake-facts dd { margin: .2rem 0 0; font-weight: 500; font-size: 1.1rem; }

/* Promise: slab */
.promise-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.promise-copy p { color: var(--cream-dim); font-size: 1.12rem; max-width: 38ch; margin: 0; }
.slab {
  margin: 0; border-radius: var(--r-panel); padding: 14px;
  background: linear-gradient(160deg, rgb(252 245 228 / .14), rgb(252 245 228 / .03) 40%, rgb(252 245 228 / .08));
  border: 1px solid rgb(252 245 228 / .22);
  box-shadow: inset 0 1px 0 rgb(252 245 228 / .3), 0 40px 80px -40px rgb(2 10 24 / .9);
}
.slab-label { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--cream); color: var(--navy); border-radius: 12px; padding: 1rem 1.25rem; }
.slab-label > div { display: flex; flex-direction: column; }
.slab-brand { font-weight: 600; letter-spacing: .14em; font-size: .9rem; }
.slab-sub { font-size: .88rem; color: #3a5274; }
.slab-grade { font-weight: 700; font-size: clamp(1.1rem, 2vw, 1.45rem); letter-spacing: -0.01em; text-align: right; }
.slab-window { list-style: none; margin: 14px 0 0; padding: clamp(1.25rem, 3vw, 2rem); border-radius: 12px; background: var(--navy-deep); display: grid; gap: 1.5rem; }
.slab-window li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; align-items: baseline; }
.slab-window strong { font-weight: 600; color: var(--mint); font-size: 1.1rem; }
.slab-window span { color: var(--cream-dim); }

/* Follow */
.follow { background: var(--navy-raised); border-block: 1px solid var(--navy-line); }
.follow-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.follow h2 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
.follow-grid > div p { color: var(--cream-dim); font-size: 1.12rem; max-width: 40ch; margin: 0; }
.channels { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.channels a, .ch-row {
  display: grid; grid-template-columns: 7rem 1fr auto; align-items: center; gap: 1rem;
  padding: 1.35rem 1.5rem; border-radius: var(--r-card); background: var(--navy); border: 1px solid var(--navy-line);
  text-decoration: none; transition: border-color .25s, transform .25s var(--ease);
}
.channels a:hover { border-color: var(--mint); transform: translateX(4px); }
.ch-name { font-weight: 600; font-size: 1.2rem; }
.ch-handle { color: var(--cream-dim); overflow-wrap: anywhere; }
.ch-go { font-weight: 500; color: var(--mint); }
.ch-soon .ch-row { opacity: .6; }
.ch-soon .ch-go { color: var(--slate); }

/* Next (grading teaser) */
.next { padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem); }
.next-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(1rem, 3vw, 2.5rem); align-items: center; padding: clamp(1.5rem, 3vw, 2rem) 0; border-top: 1px solid var(--navy-line); border-bottom: 1px solid var(--navy-line); }
.next-bar .flag { margin: 0; align-self: start; margin-top: .35rem; }
.next h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 .3rem; }
.next-body p { margin: 0; color: var(--cream-dim); max-width: 60ch; }

/* Sell */
.sell { padding-top: clamp(2rem, 4vw, 3rem); }
.sell-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4rem); background: var(--cream); color: var(--navy); border-radius: var(--r-panel); padding: clamp(1.75rem, 5vw, 3.5rem); }
.sell-head p { color: #2f4a6e; font-size: 1.1rem; max-width: 36ch; margin: 0 0 2rem; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 3rem 1fr; column-gap: 1rem; }
.steps li::before { content: counter(s); grid-row: span 2; width: 2.6rem; height: 2.6rem; border-radius: var(--r-btn); background: var(--navy); color: var(--mint); display: grid; place-items: center; font-weight: 600; }
.steps strong { font-weight: 600; font-size: 1.15rem; }
.steps span { color: #2f4a6e; }

/* Footer */
.footer { padding: 3rem 0 2.5rem; border-top: 1px solid var(--navy-line); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem 3rem; align-items: start; }
.footer-brand { display: flex; align-items: center; gap: .9rem; }
.footer-brand img { width: 64px; height: auto; }
.footer-nav, .footer-contact { display: grid; gap: .6rem; }
.footer a { color: var(--cream-dim); text-decoration: none; transition: color .2s; }
.footer a:hover { color: var(--mint); }
.legal { grid-column: 1 / -1; margin: 1rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--navy-line); color: var(--slate); font-size: .88rem; }

/* Motion: hero sequence on load, cards dealt in on scroll */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .9s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .case-glass { animation: fade 1s var(--ease) .05s both; }
  .case-bird { animation: perch 1.1s var(--ease) .2s both; }
  .js .reveal { opacity: 0; translate: 0 40px; transition: opacity .8s var(--ease), translate .8s var(--ease), transform .45s var(--ease), box-shadow .45s var(--ease); }
  .js .reveal.in { opacity: 1; translate: 0 0; }
  .js .deck .reveal:nth-child(2) { transition-delay: .08s, .08s, 0s, 0s; }
  .js .deck .reveal:nth-child(3) { transition-delay: .16s, .16s, 0s, 0s; }
  @keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes perch { from { opacity: 0; transform: translate(24px, -16px) rotate(2deg); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tcg, .kc, .channels a { transition: none; }
}

/* Tablet */
@media (max-width: 1020px) {
  .nav-links { gap: 1.2rem; }
  .nav-cta { display: none; }
}
/* Mobile */
@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; align-items: center; }
  .nav-bar { gap: 1rem; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--navy); border-bottom: 1px solid var(--navy-line); padding: .5rem clamp(1rem, 4vw, 2.75rem) 1rem; }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: .85rem 0; border-bottom: 1px solid var(--navy-line); font-size: 1.05rem; }
  .hero-grid, .keepsake-grid, .promise-grid, .follow-grid, .sell-panel { grid-template-columns: 1fr; }
  .case { order: -1; margin: 0 auto 1rem; width: 100%; max-width: 520px; aspect-ratio: auto; padding: 1.5rem 0 0 1.5rem; }
  .case-glass { inset: 18% 0 0 6%; }
  .case-bird { position: relative; width: 100%; left: 0; top: 0; }
  .deck { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .deck .tcg:nth-child(2), .deck .tcg:nth-child(3) { margin-top: 0; }
  .tcg { aspect-ratio: auto; }
  .keepsake-visual { max-width: 380px; }
  .next-bar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .hero-actions { gap: 1.25rem; }
  .hero-actions .btn { width: 100%; }
  .slab-window li { grid-template-columns: 1fr; gap: .2rem; }
  .slab-label { flex-direction: column; align-items: flex-start; }
  .slab-grade { text-align: left; }
  .channels a, .ch-row { grid-template-columns: 1fr auto; }
  .ch-handle { grid-column: 1; grid-row: 2; }
  .ch-go { grid-row: 1 / span 2; grid-column: 2; }
  .keepsake-facts { gap: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* 404 page */
.notfound { min-height: 100dvh; display: grid; place-items: center; padding: 3rem 0; }
.notfound-inner { text-align: center; display: grid; justify-items: center; gap: 1rem; }
.notfound-inner img { width: min(340px, 70vw); margin-bottom: 1rem; }
.notfound-inner h1 { font-weight: 600; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; margin: 0; }
.notfound-inner p { color: var(--cream-dim); margin: 0 0 1rem; }
