/* A Christmas of Ice and Iron. Phone first; wider layouts in the media queries at the end. */

:root {
  --night: #0b1730;
  --night-2: #122447;
  --ink: #eef1f6;
  --muted: #b9c3d6;
  --gold: #d4b26a;
  --gold-hi: #e9cf8f;
  --red: #9e1f1f;
  --red-hi: #b82a26;
  --line: rgba(212, 178, 106, 0.35);

  --body: "IM Fell DW Pica", Georgia, "Times New Roman", serif;
  --display: "IM Fell English SC", "IM Fell DW Pica", Georgia, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 64px; }

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--gold-hi); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--gold-hi);
  line-height: 1.15;
  margin: 0 0 0.6em;
}
h2 { font-size: 1.9rem; text-align: center; }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }

/* Sticky bar: the buy button stays in reach on a phone */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: rgba(11, 23, 48, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.bar__name {
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--gold-hi);
  text-decoration: none;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 26px;
  background: var(--red);
  color: #fff;
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-align: center;
  border: 1px solid var(--gold);
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.btn:hover, .btn:focus-visible { background: var(--red-hi); }
.btn--small { padding: 7px 14px; font-size: 0.95rem; }
.btn--ghost { background: transparent; color: var(--gold-hi); }
.btn--ghost:hover, .btn--ghost:focus-visible { background: rgba(212, 178, 106, 0.12); }

/* Hero. Phones: picture on top, words and buttons below it. Wide screens: words over the art. */
.hero { position: relative; overflow: hidden; }
.hero picture { display: block; position: relative; }
.hero__art { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; object-position: 50% 64%; }
.hero picture::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 35%;
  background: linear-gradient(to bottom, rgba(11,23,48,0), var(--night));
}
.hero__text {
  position: relative; z-index: 1;
  padding: 0 16px 28px;
  margin-top: -28px;
  text-align: center;
}
.hero h1 {
  font-size: 2.3rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
  margin-bottom: 0.3em;
}
.hero h1 span {
  font-family: var(--body);
  font-style: italic;
  font-size: 0.6em;
  color: var(--ink);
}
.deadline { font-family: var(--display); color: var(--gold-hi); font-size: 1.2rem; margin: -0.4em 0 1em; }

.kicker {
  font-family: var(--display);
  letter-spacing: 0.08em;
  color: var(--gold);
  font-size: 0.95rem;
  margin-bottom: 0.4em;
}
.lede { font-size: 1.15rem; max-width: 32em; margin: 0 auto 1.1em; }

/* Year 2 page: one Buy button in the hero */
.hero__buy { max-width: 420px; margin: 0 auto; }
.hero .note { color: var(--muted); }

/* Logo */
.hero h1.logo { margin: 0 auto 0.5em; max-width: 340px; text-shadow: none; }
.hero h1.logo img { width: 100%; filter: drop-shadow(0 2px 10px rgba(0,0,0,0.6)); }
.foot__logo { width: 200px; margin: 0 auto 14px; }
.foot img.foot__logo { opacity: 1; }
.page-logo { width: 260px; margin: 0 auto 24px; }

/* Sections */
.block {
  max-width: 680px;
  margin: 0 auto;
  padding: 56px 16px;
  border-top: 1px solid var(--line);
}
.block--wide { max-width: 1080px; }
.center { text-align: center; }
.seal { margin: 0 auto 18px; width: 96px; opacity: 0.9; }

.dates, .steps { padding-left: 1.3em; }
.dates li, .steps li { margin-bottom: 0.6em; }
.steps b { font-weight: 400; font-family: var(--display); color: var(--gold-hi); }
.dates b { color: var(--gold-hi); font-weight: 400; font-family: var(--display); }

/* Two-path chooser in the hero */
.choose { display: grid; gap: 12px; max-width: 520px; margin: 0 auto; }
.choice {
  display: block;
  padding: 14px 16px;
  min-height: 64px;
  background: var(--red);
  border: 1px solid var(--gold);
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}
.choice:hover, .choice:focus-visible { background: var(--red-hi); }
.choice__who { display: block; font-style: italic; font-size: 1rem; color: #f3e3c0; }
.choice__what { display: block; font-family: var(--display); font-size: 1.4rem; }

/* Year sections */
.year .kicker { margin-bottom: 0.2em; }
.year__main { display: grid; gap: 20px; margin-top: 12px; }
.year__cover { width: 62%; max-width: 260px; margin: 0 auto; box-shadow: 0 6px 20px rgba(0,0,0,0.5); }
.gets { padding-left: 1.2em; margin: 0 0 1.2em; }
.gets li { margin-bottom: 0.4em; }
.gets b { font-weight: 400; color: var(--gold-hi); font-family: var(--display); }
.note { color: var(--muted); font-size: 1rem; margin-top: 10px; }
.year__buy-top { max-width: 420px; margin: 0 auto; }
.btn--big { display: block; width: 100%; font-size: 1.3rem; padding: 18px 16px; }

/* Magic Corn */
#magic-corn { max-width: 900px; }
.corn { display: grid; gap: 22px; }
.corn__img { width: 80%; max-width: 340px; margin: 0 auto; border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,0.5); }
.corn h2, .corn .kicker { text-align: center; }

/* Phone order bar, in thumb reach */
.thumbbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(11, 23, 48, 0.96);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.2s ease;
}
.thumbbar.show { transform: none; }
.thumbbar--one { grid-template-columns: 1fr; }
.thumbbar a {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px;
  background: var(--red);
  border: 1px solid var(--gold);
  border-radius: 6px;
  color: #f3e3c0; text-decoration: none; font-size: 1rem;
}
.thumbbar b { font-family: var(--display); font-weight: 400; color: #fff; font-size: 1.15rem; }
body { padding-bottom: 72px; }

/* FAQ */
details {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
summary {
  cursor: pointer;
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--gold-hi);
}
details p { margin: 10px 0 0; color: var(--muted); }

/* Footer */
.foot {
  text-align: center;
  padding: 36px 16px 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}
.foot img { margin: 0 auto 10px; opacity: 0.7; }

/* Wider screens */
@media (min-width: 720px) {
  .choose { grid-template-columns: 1fr 1fr; }
  .year__main { grid-template-columns: 260px 1fr; gap: 36px; align-items: start; }
  .year__cover { width: 100%; }
  .year__buy-top { display: none; }
  .year { max-width: 920px; }
  .year__main .btn--big { max-width: 420px; }
  .year__main .note.center { text-align: left; }
  .thumbbar { display: none; }
  .corn { grid-template-columns: 320px 1fr; gap: 36px; align-items: center; }
  .corn__img { width: 100%; }
  .corn h2, .corn .kicker { text-align: left; }
  body { padding-bottom: 0; }
}
@media (min-width: 900px) {
  .hero { min-height: calc(100vh - 52px); display: flex; align-items: center; }
  .hero picture { position: absolute; inset: 0; }
  .hero__art { height: 100%; aspect-ratio: auto; object-position: center; }
  .hero picture::after { top: 0; height: auto; background: linear-gradient(to right, rgba(11,23,48,0.92) 0%, rgba(11,23,48,0.6) 40%, rgba(11,23,48,0) 64%); }
  .hero__text { max-width: 600px; margin: 0 0 0 5vw; padding: 0; text-align: left; }
  .hero h1.logo { max-width: 480px; margin-left: 0; }
  .hero h1 span { display: inline; }
  .deadline { text-align: left; }
  .hero__buy { margin-left: 0; }
  .lede { margin-left: 0; text-shadow: 0 1px 6px rgba(0,0,0,0.8); }
  .choose { margin-left: 0; }
}

/* Checkout sheet: full screen on phones, a centred panel on wide screens */
.sheet {
  position: fixed; inset: 0; z-index: 50;
  background: #fff; color: #1a1a1a;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.sheet[hidden] { display: none; }
.sheet__top {
  position: sticky; top: 0; z-index: 1;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  background: var(--night); color: var(--gold-hi);
  font-family: var(--display); font-size: 1.2rem;
}
.sheet__top button {
  min-height: 44px; padding: 0 16px;
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 4px;
  font: inherit; font-size: 1rem; cursor: pointer;
}
.sheet__msg { padding: 32px 16px; text-align: center; font-size: 1.15rem; }
#checkout-mount { padding: 8px 0 32px; }
body.sheet-open { overflow: hidden; }
@media (min-width: 720px) {
  .sheet { inset: 4vh auto 4vh 50%; width: min(720px, 94vw); transform: translateX(-50%); border-radius: 8px; box-shadow: 0 0 0 100vmax rgba(0,0,0,0.6); }
}
