/* Cove Courier: a cozy mail route on the coast of Maine */
:root {
  --paper: #fbf6ea;
  --paper-deep: #f3e6c8;
  --kraft: #d9c9a6;
  --ink: #22324a;
  --ink-soft: #4d5a6e;
  --red: #c4412d;
  --blue: #2f5d9a;
  --gold: #e3a83a;
  --display: 'Grandstander', 'Trebuchet MS', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hand: 'Caveat', 'Segoe Print', cursive;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(34, 50, 74, .18);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 18px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* the airmail stripe that runs along the top of the page and between sections */
.airmail { height: 10px; background: repeating-linear-gradient(135deg, var(--red) 0 16px, var(--paper) 16px 26px, var(--blue) 26px 42px, var(--paper) 42px 52px); }

/* ---------- header ---------- */
.top { position: relative; z-index: 5; background: var(--ink); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--paper); text-decoration: none; font: 800 20px var(--display); text-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.brand svg { width: 34px; height: 34px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .3)); }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--paper); text-decoration: none; font-weight: 700; font-size: 16px; text-shadow: 0 2px 8px rgba(0, 0, 0, .45); }
.nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(92vh, 860px); display: grid; align-items: end; color: var(--paper); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(34, 50, 74, .45) 0%, rgba(34, 50, 74, 0) 30%, rgba(34, 50, 74, .1) 55%, rgba(26, 30, 40, .78) 100%); }
.hero-copy { position: relative; z-index: 2; padding: 0 0 72px; max-width: 640px; }
.badge { display: inline-block; background: var(--red); color: var(--paper); font: 700 13px var(--body); letter-spacing: .14em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; box-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.hero h1 { font-size: clamp(54px, 10vw, 112px); font-weight: 800; margin: 18px 0 6px; letter-spacing: -.01em; text-shadow: 0 4px 0 rgba(34, 50, 74, .55), 0 10px 30px rgba(0, 0, 0, .35); }
.hero h1 span { color: #ffd66b; }
.tagline { font: 700 clamp(26px, 3.6vw, 36px)/1.2 var(--hand); margin: 0 0 12px; text-shadow: 0 2px 10px rgba(0, 0, 0, .55), 0 1px 2px rgba(0, 0, 0, .4); }
.hero p.lede { font-size: 19px; margin: 0 0 26px; max-width: 34em; text-shadow: 0 1px 6px rgba(0, 0, 0, .45); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 14px; font: 800 18px var(--display); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--red); color: var(--paper); box-shadow: 0 5px 0 #8d2c1e, 0 10px 24px rgba(0, 0, 0, .25); }
.btn-ghost { background: rgba(251, 246, 234, .94); color: var(--ink); box-shadow: 0 5px 0 var(--kraft), 0 10px 24px rgba(0, 0, 0, .2); }
.btn small { font: 700 12px var(--body); opacity: .85; letter-spacing: .04em; }
.platforms { margin-top: 18px; font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }

/* the hero: the game's title screen, uncovered, with the pitch and buttons in a band beneath it */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
section.hero-shot { padding: 0; background: var(--ink); line-height: 0; }
.hero-shot img { width: 100%; height: auto; max-height: 84vh; object-fit: cover; object-position: left center; }
section.hero-bar { padding: 34px 0 42px; background: var(--ink); color: var(--paper); text-align: center; }
.hero-bar .lede { font-size: 20px; max-width: 34em; margin: 0 auto 24px; }
.hero-bar .ctas { justify-content: center; }
.hero-bar .platforms { margin-top: 20px; color: #c9d3e0; }

/* ---------- sections ---------- */
section { padding: 96px 0; }
.eyebrow { font: 700 14px var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--red); margin: 0 0 10px; }
.section-head { max-width: 700px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(36px, 5vw, 54px); }
.section-head p { color: var(--ink-soft); margin: 14px 0 0; }

/* the pitch, written like a note pinned to the corkboard */
.intro { background: var(--paper-deep); }
.note { position: relative; max-width: 760px; margin: 0 auto; background: var(--paper); border-radius: 6px; padding: 44px 48px; box-shadow: var(--shadow); transform: rotate(-.6deg); }
.note::before { content: ''; position: absolute; top: -12px; left: 50%; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f07a63, var(--red) 60%, #8d2c1e); box-shadow: 0 4px 6px rgba(0, 0, 0, .25); }
.note .from { font: 700 13px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--blue); margin: 0 0 6px; }
.note h2 { font-size: clamp(30px, 4vw, 40px); margin-bottom: 16px; }
.note p { margin: 0 0 14px; }
.note .sign { font: 700 30px var(--hand); color: var(--blue); margin: 10px 0 0; }

/* feature rows: a photo pinned at an angle beside the words */
.feature { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; margin-bottom: 110px; }
.feature:last-child { margin-bottom: 0; }
.feature:nth-child(odd) .shot { order: 2; }
.shot { background: #fff; padding: 12px 12px 14px; border-radius: 6px; box-shadow: var(--shadow); transform: rotate(-1.4deg); }
.feature:nth-child(odd) .shot { transform: rotate(1.4deg); }
.shot img { border-radius: 3px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.shot figcaption { font: 700 22px var(--hand); color: var(--ink-soft); text-align: center; margin-top: 8px; }
.feature h3 { font-size: clamp(30px, 3.6vw, 40px); margin-bottom: 14px; }
.feature p { color: var(--ink-soft); margin: 0 0 12px; }
.feature ul { margin: 12px 0 0; padding: 0; list-style: none; }
.feature li { padding-left: 30px; position: relative; margin: 6px 0; }
.feature li::before { content: ''; position: absolute; left: 0; top: .38em; width: 20px; height: 15px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 15'%3E%3Crect x='1' y='1' width='18' height='13' rx='2' fill='%23fbf6ea' stroke='%2322324a' stroke-width='2'/%3E%3Cpath d='M2 2.5 L10 8.5 L18 2.5' fill='none' stroke='%2322324a' stroke-width='1.8' stroke-linejoin='round'/%3E%3Crect x='13' y='3.5' width='3.5' height='3.5' fill='%23c4412d'/%3E%3C/svg%3E") no-repeat center / contain; }

/* the gallery */
.gallery { background: var(--ink); color: var(--paper); }
.gallery .section-head p { color: #c9d3e0; }
.gallery .eyebrow { color: #ffd66b; }
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.grid button { padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; background: #1a2638; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); grid-column: span 2; transition: transform .2s ease; }
.grid button:hover, .grid button:focus-visible { transform: translateY(-4px); }
.grid button:focus-visible { outline: 3px solid #ffd66b; outline-offset: 3px; }
.grid button.wide { grid-column: span 3; }
.grid button.full6 { grid-column: span 6; }
.grid button.full6 img { aspect-ratio: 16 / 9; object-position: 50% 60%; }
.grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
dialog.lightbox { padding: 0; border: 0; background: transparent; max-width: min(1400px, 94vw); }
dialog.lightbox::backdrop { background: rgba(14, 20, 30, .88); }
dialog.lightbox img { border-radius: 10px; max-height: 86vh; width: auto; }
dialog.lightbox button { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--paper); color: var(--ink); font: 800 22px var(--display); cursor: pointer; }

/* everything in the box */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.fact { background: #fff; border-radius: var(--radius); padding: 26px 24px; box-shadow: 0 4px 0 var(--kraft); }
.fact .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; margin-bottom: 12px; background: var(--paper-deep); }
.fact h3 { font-size: 22px; margin-bottom: 6px; }
.fact p { margin: 0; color: var(--ink-soft); font-size: 16px; }

/* sign up for news */
.news { background: var(--paper-deep); text-align: center; }
.envelope { max-width: 680px; margin: 0 auto; background: var(--paper); border-radius: 10px; padding: 48px 40px; box-shadow: var(--shadow); position: relative; border: 10px solid transparent; border-image: repeating-linear-gradient(135deg, var(--red) 0 14px, var(--paper) 14px 22px, var(--blue) 22px 36px, var(--paper) 36px 44px) 10; }
.envelope h2 { font-size: clamp(32px, 4.4vw, 44px); margin-bottom: 12px; }
.envelope p { color: var(--ink-soft); margin: 0 auto 24px; max-width: 30em; }
.stamp { position: absolute; top: 18px; right: 22px; width: 64px; height: 76px; background: var(--red); border: 5px solid #fff; outline: 2px dashed var(--kraft); display: grid; place-items: center; color: var(--paper); font-size: 28px; transform: rotate(6deg); }

/* the sign-up form */
.signup { display: flex; gap: 10px; max-width: 480px; margin: 0 auto 14px; }
.signup[hidden] { display: none; }
.signup input[type=email] { flex: 1; min-width: 0; padding: 14px 16px; border: 2px solid var(--kraft); border-radius: 14px; background: #fff; color: var(--ink); font: 400 17px var(--body); }
.signup input[type=email]:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 93, 154, .2); }
.signup .btn { border: 0; cursor: pointer; white-space: nowrap; }
.signup .btn:disabled { opacity: .7; cursor: default; transform: none; }
.signup-done { font: 700 26px var(--hand); color: var(--blue); margin: 4px 0 14px; }
.envelope .fine { font-size: 14px; margin: 0 auto; }

/* footer */
footer { background: var(--ink); color: #c9d3e0; padding: 48px 0 40px; font-size: 15px; }
footer .wrap { display: grid; gap: 20px; }
footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
footer a { color: #ffd66b; }
footer details summary { cursor: pointer; font-weight: 700; color: var(--paper); }
footer details ul { margin: 10px 0 0; padding-left: 20px; line-height: 1.7; }

/* ---------- smaller screens ---------- */
@media (max-width: 860px) {
  section { padding: 72px 0; }
  .nav { display: none; }
  .feature { grid-template-columns: 1fr; gap: 32px; margin-bottom: 80px; }
  .feature:nth-child(odd) .shot { order: 0; }
  .facts { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: 1fr 1fr; }
  .grid button, .grid button.wide { grid-column: span 1; }
  .grid button.full6 { grid-column: span 2; }
  .grid button.full { grid-column: span 2; }
  .note { padding: 36px 26px; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .hero { min-height: 88vh; }
  .hero::after { background: linear-gradient(180deg, rgba(34, 50, 74, .5) 0%, rgba(34, 50, 74, .38) 35%, rgba(26, 30, 40, .88) 100%); }
  .hero-copy { padding-bottom: 48px; }
  .facts { grid-template-columns: 1fr; }
  .envelope { padding: 40px 22px 32px; }
  .signup { flex-direction: column; }
  .stamp { width: 48px; height: 58px; font-size: 20px; top: 10px; right: 12px; }
  .btn { width: 100%; justify-content: center; }
  .hero-bar .lede { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, .grid button { transition: none; } }
