/* Hoard-Board public landing page. Uses the tokens from theme-pirate.css. */

html:has(body.landing) { height: auto; scroll-behavior: smooth; background: var(--bg); }
body.landing { display: block; height: auto; min-height: 100%; background: transparent; }

/* --------------------------------------------- the worlds backdrop -- */
/* Fixed to the viewport; content scrolls over it. Artwork shows at the
   edges, the centre column stays deep teal for reading. Done with a fixed
   element (not background-attachment) so it also holds still on phones. */
.landing-backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--bg); }
.landing-backdrop::before {
  content: ""; position: absolute; inset: 0;
  background: url("../img/landing-bg.webp") center / cover no-repeat;
  filter: saturate(.82) contrast(.94);
}
.landing-backdrop::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 44% 62% at 50% 50%, rgba(6, 24, 32, .96) 0%, rgba(6, 24, 32, .9) 40%, rgba(6, 24, 32, .55) 72%, rgba(6, 24, 32, .2) 100%),
    linear-gradient(rgba(8, 30, 38, .28), rgba(8, 30, 38, .28));
}
body.landing a { color: inherit; }

/* ---------------------------------------------------------- masthead -- */
.landing-top {
  position: relative; display: flex; flex-direction: column; align-items: center;
  padding: 20px 24px 0;
}
.landing-brand img {
  display: block; width: auto; max-width: min(92vw, 900px); height: clamp(120px, 17vw, 250px);
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, .6));
}
.landing-nav {
  position: absolute; top: 18px; right: 24px;
  display: flex; align-items: center; gap: 22px; font-size: 15px;
}
.landing-nav a { text-decoration: none; color: #c3cfca; transition: color .15s; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.landing-nav a:hover { color: var(--accent-2); }
.landing-nav .nav-open {
  color: var(--accent-2); border: 1px solid var(--gold-line); border-radius: 999px; padding: 7px 16px;
  background: rgba(6, 24, 32, .55); transition: border-color .15s, box-shadow .15s;
}
.landing-nav .nav-open:hover { border-color: var(--gold); box-shadow: 0 0 14px rgba(240, 205, 116, .25); }

/* ------------------------------------------------- account corner -- */
.account-corner { position: absolute; top: 16px; left: 24px; z-index: 5; }
.account-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 13px 4px 5px; border-radius: 999px;
  background: var(--gold-grad); border: 1px solid var(--gold-lo); color: #241805; font-weight: 700; font-size: 13px;
  text-shadow: 0 1px 0 rgba(255, 240, 200, .45);
  box-shadow: inset 0 1px 0 rgba(255, 245, 210, .6), inset 0 -1px 0 rgba(90, 60, 10, .45), 0 2px 8px rgba(0, 0, 0, .45);
}
.account-btn:hover:not(:disabled) { border-color: var(--gold-lo); filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255, 245, 210, .7), 0 0 16px rgba(240, 205, 116, .45); }
.account-btn svg {
  width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: rgba(36, 24, 5, .14);
  fill: none; stroke: #241805; stroke-width: 1.9; stroke-linecap: round;
}
.account-pop {
  position: absolute; top: calc(100% + 8px); left: 0; width: 250px; padding: 12px 14px;
  background: linear-gradient(180deg, #123843, #0d2b35); border: 1px solid var(--gold-line); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .55);
}
.account-pop p { margin: 0 0 10px; font-size: 13px; line-height: 1.5; color: #c9d3cc; }
.account-pop a { font-size: 13px; color: var(--accent-2); text-decoration: none; }
.account-pop a:hover { text-decoration: underline; }

/* -------------------------------------------------------------- hero -- */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 48px 24px 96px;
  background: radial-gradient(700px 300px at 50% 45%, rgba(240, 205, 116, .06), transparent 70%);
}
.hero-inner { position: relative; max-width: 760px; margin: 0 auto; }
.eyebrow { margin: 0 0 18px; font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: var(--accent-2); opacity: .85; }
.hero h1 {
  margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: .01em; line-height: 1.05;
  font-size: clamp(42px, 7vw, 84px);
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .55));
}
.lede { margin: 26px auto 0; max-width: 580px; font-size: clamp(17px, 2.1vw, 20px); line-height: 1.6; color: #c9d3cc; }
.hero-actions { margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 18px; }

.cta {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: .02em;
  padding: 14px 38px; border-radius: 999px;
  background: var(--gold-grad); color: #241805 !important; border: 1px solid var(--gold-lo);
  text-shadow: 0 1px 0 rgba(255, 240, 200, .45);
  box-shadow: inset 0 1px 0 rgba(255, 245, 210, .6), inset 0 -1px 0 rgba(90, 60, 10, .45), 0 6px 20px rgba(0, 0, 0, .4);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.cta:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255, 245, 210, .7), 0 0 26px rgba(240, 205, 116, .45), 0 8px 24px rgba(0, 0, 0, .45); }
.cta:focus-visible, .landing a:focus-visible, .reel-btn:focus-visible, .reel:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.quiet-link { font-size: 15px; color: var(--muted) !important; text-decoration: none; }
.quiet-link:hover { color: var(--accent-2) !important; }

/* ---------------------------------------------------- featured reel -- */
.featured { max-width: 1180px; margin: 0 auto; padding: 24px 28px 64px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-head h2, .closing h2 {
  margin: 0; font-family: var(--display); font-size: 28px; letter-spacing: .02em; color: var(--gold-hi);
}
.reel-controls { display: flex; gap: 8px; }
.reel-btn { width: 38px; height: 38px; padding: 0; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--accent-2); }

.reel {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr);
  gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 18px;
  scrollbar-width: thin;
}
@media (min-width: 1100px) { .reel { grid-auto-columns: calc((100% - 60px) / 4); } }

.story-card {
  scroll-snap-align: start; position: relative; display: flex; flex-direction: column;
  border-radius: 14px; overflow: hidden; text-decoration: none;
  background: var(--grain), linear-gradient(180deg, #123a45, #0c2a33);
  border: 1px solid var(--gold-line);
  box-shadow: inset 0 0 0 3px rgba(3, 14, 18, .35), 0 10px 26px rgba(0, 0, 0, .45);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.story-card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: var(--gold-glow), 0 14px 30px rgba(0, 0, 0, .5); }
.story-cover {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  background:
    radial-gradient(120% 90% at 30% 20%, color-mix(in srgb, var(--story-accent, #d4a646) 55%, transparent), transparent 60%),
    radial-gradient(90% 80% at 85% 90%, rgba(240, 205, 116, .25), transparent 60%),
    linear-gradient(160deg, #18414c, #071a20);
}
.story-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-cover .cover-mark {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--display); font-size: 64px; color: rgba(255, 244, 210, .85);
  text-shadow: 0 2px 12px rgba(0, 0, 0, .5);
}
.story-cover::after { /* gilded lid band */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--gold-grad); opacity: .85;
}
.story-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.story-title { margin: 0; font-family: var(--display); font-size: 19px; color: var(--gold-hi); }
.story-meta { font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.story-blurb { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: #d6dcd4; }
.story-by { margin-top: auto; padding-top: 8px; font-size: 13px; color: var(--accent-2); }

.story-card.yours { border-style: dashed; background: rgba(240, 205, 116, .03); box-shadow: none; }
.story-card.yours .story-cover { background: transparent; display: grid; place-items: center; }
.story-card.yours .story-cover::after { display: none; }
.yours-plus {
  width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center;
  border: 1px dashed var(--gold-line); color: var(--accent-2); font-size: 38px; font-family: var(--display);
  transition: box-shadow .2s, border-color .2s;
}
.story-card.yours:hover .yours-plus { border-color: var(--gold); box-shadow: 0 0 20px rgba(240, 205, 116, .3); }

/* ------------------------------------------------------ how it works -- */
.how { padding: 40px 28px 72px; }
.how-grid { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.how article { text-align: center; padding: 8px 12px; }
.how svg {
  width: 52px; height: 52px; fill: none; stroke: var(--accent-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(240, 205, 116, .25));
}
.how h3 { margin: 12px 0 8px; font-family: var(--display); font-size: 22px; color: var(--gold-hi); letter-spacing: .03em; }
.how p { margin: 0 auto; max-width: 280px; font-size: 15px; line-height: 1.55; color: #c9d3cc; }

/* ----------------------------------------------------------- closing -- */
.closing {
  text-align: center; padding: 64px 24px 88px; display: flex; flex-direction: column; align-items: center; gap: 26px;
  background: radial-gradient(600px 240px at 50% 60%, rgba(240, 205, 116, .06), transparent 70%);
}
.landing-foot {
  position: relative; background: rgba(4, 16, 21, .7); display: flex; justify-content: center; gap: 12px; padding: 22px; font-size: 13px; color: var(--muted);
}
.landing-foot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--rope); opacity: .5; }
.landing-foot .dot { color: var(--gold); font-size: 9px; align-self: center; }
.landing-foot { flex-direction: column; align-items: center; gap: 8px; }
.foot-line { display: flex; justify-content: center; gap: 12px; }
.foot-fine { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 11px; color: #7f948f; letter-spacing: .02em; text-align: center; }

/* ------------------------------------------------------- transitions -- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-inner > * { animation: rise .6s ease both; }
.hero-inner > :nth-child(2) { animation-delay: .06s; }
.hero-inner > :nth-child(3) { animation-delay: .14s; }
.hero-inner > :nth-child(4) { animation-delay: .22s; }
body.landing.leaving main, body.landing.leaving .landing-foot { opacity: 0; transform: translateY(-8px); transition: opacity .22s ease, transform .22s ease; }

@media (prefers-reduced-motion: reduce) {
  html:has(body.landing) { scroll-behavior: auto; }
  .hero-inner > * { animation: none; }
  .story-card, .cta { transition: none; }
  .story-card:hover, .cta:hover { transform: none; }
  body.landing.leaving main, body.landing.leaving .landing-foot { transition: none; }
}

/* ------------------------------------------------------------ phones -- */
@media (max-width: 760px) {
  .landing-top { padding: 56px 0 0; }
  .account-corner { top: 12px; left: 16px; }
  .landing-brand img { height: auto; width: 100%; max-width: 100%; }
  .landing-nav { position: static; order: 2; justify-content: center; gap: 16px; font-size: 14px; flex-wrap: wrap; padding: 6px 16px 0; }
  /* show the left-hand worlds instead of shrinking the whole mural to soup */
  .landing-backdrop::before { background-position: 16% center; }
  .landing-backdrop::after {
    background: linear-gradient(90deg, rgba(6, 24, 32, .62), rgba(6, 24, 32, .86) 30%, rgba(6, 24, 32, .9) 70%, rgba(6, 24, 32, .7));
  }
  .hero { padding: 64px 16px 72px; }
  .featured, .how { padding-left: 16px; padding-right: 16px; }
  .how-grid { grid-template-columns: 1fr; gap: 22px; }
  .reel { grid-auto-columns: 78%; }
}

.foot-links { display: flex; justify-content: center; gap: 18px; margin-top: 10px; font-size: 13px; }
.foot-links a { color: inherit; opacity: .8; }
.foot-links a:hover { opacity: 1; color: var(--accent-2); }
