/* =====================================================================
   Landing page. Builds on the tokens and shared pieces in style.css.
   ===================================================================== */

.landing { overflow-x: hidden; }

.topnav-cta {
  flex: none;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--blood);
  color: var(--parchment);
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.1;
  text-decoration: none;
  box-shadow: 0 2px 0 var(--blood-deep);
  transition: background .15s, transform .1s;
}
.topnav-cta:hover { background: #9a342a; }
.topnav-cta:active { transform: translateY(1px); }
@media (max-width: 520px) {
  .landing .brand span { display: none; }
}

/* ---------- Buttons ---------- */

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: auto;
  padding: 16px 30px;
  font-size: 27px;
  text-decoration: none;
  overflow: hidden;
  animation: none;
}
.btn-cta svg { width: 24px; height: 24px; flex: none; transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.btn-cta:hover svg { transform: translateX(5px); }
.btn-cta::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 240, 225, .28), transparent);
  transform: skewX(-18deg);
  animation: shimmer 4.5s ease-in-out 1.5s infinite;
}
@keyframes shimmer {
  0%, 70% { left: -60%; }
  100% { left: 130%; }
}
.btn-cta.big { font-size: 31px; padding: 18px 36px; }

.text-link {
  font-style: italic;
  font-size: 18px;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: rgba(122, 74, 58, .45);
  text-underline-offset: 4px;
}
.text-link:hover { color: var(--blood); text-decoration-color: currentColor; }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 16px 10px;
}
@media (min-width: 980px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    gap: 48px;
    padding: 56px 24px 20px;
    min-height: min(720px, calc(100vh - 170px));
  }
}

.hero-copy { text-align: center; }
@media (min-width: 980px) { .hero-copy { text-align: left; } }

.hero .runes-top { margin-bottom: 10px; }

.kicker {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--frame);
}

.hero-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(46px, 7.2vw, 84px);
  line-height: .98;
  letter-spacing: .005em;
  color: var(--ink);
}
.hero-title span { display: block; margin-top: .08em; color: var(--blood); }

.hero-lede {
  max-width: 560px;
  margin: 22px auto 0;
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.hero-lede strong { font-weight: 600; color: var(--ink); }
@media (min-width: 980px) { .hero-lede { margin-left: 0; } }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 26px;
  margin-top: 30px;
}
@media (min-width: 980px) { .hero-actions { justify-content: flex-start; } }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
  font-style: italic;
  color: var(--ink-soft);
}
@media (min-width: 980px) { .hero-facts { justify-content: flex-start; } }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts b {
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--blood);
  color: var(--parchment);
  font-family: var(--runic);
  font-weight: 400;
  font-style: normal;
  font-size: 12px;
}

/* The stack of sample certificates */
.hero-art { perspective: 1400px; }
.stack {
  --tx: 0deg; --ty: 0deg;
  position: relative;
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  aspect-ratio: 1.24 / 1;
  transform: rotateX(var(--tx)) rotateY(var(--ty));
  transform-style: preserve-3d;
  transition: transform .4s cubic-bezier(.2, .8, .3, 1);
}
.sample {
  position: absolute;
  width: 86%;
  box-shadow: 0 26px 50px -24px rgba(60, 30, 20, .6), 0 3px 10px rgba(60, 30, 20, .14);
}
.sample img { display: block; width: 100%; height: auto; }
img.sample { height: auto; }
.sample.back {
  right: 0; top: 0;
  transform: rotate(5deg);
  opacity: .96;
  animation: deal-back .9s .1s cubic-bezier(.2, .8, .3, 1) both;
}
.sample.front {
  left: 0; bottom: 3%;
  transform: rotate(-3.5deg);
  animation: deal-front .9s .3s cubic-bezier(.2, .8, .3, 1) both;
}
.sample.front.thump { animation: card-thump .45s cubic-bezier(.2, .8, .3, 1); }
@keyframes deal-back { from { opacity: 0; transform: translate(40px, -30px) rotate(14deg); } }
@keyframes deal-front { from { opacity: 0; transform: translate(-40px, 50px) rotate(-12deg); } }
@keyframes card-thump {
  0% { transform: rotate(-3.5deg); }
  30% { transform: rotate(-3.5deg) scale(.985) translateY(4px); }
  100% { transform: rotate(-3.5deg); }
}

/* Seal position on the sample image (measured from the certificate layout) */
.hero-seal {
  position: absolute;
  left: var(--seal-x, 50%);
  top: var(--seal-y, 83.75%);
  width: var(--seal-w, 13.36%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(-8deg);
  opacity: 0;
}
.hero-seal.stamped { opacity: 1; animation: hero-stamp .62s cubic-bezier(.5, 0, .5, 1) both; }
@keyframes hero-stamp {
  0% { opacity: 0; transform: translate(-50%, -80%) scale(3) rotate(-40deg); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06) rotate(-10deg); }
  60% { transform: translate(-50%, -50%) scale(.95) rotate(-8deg); }
  78% { transform: translate(-50%, -50%) scale(1.02) rotate(-8deg); }
  100% { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg); }
}

.hero-quill {
  position: absolute;
  right: 2%;
  bottom: 30%;
  width: 17%;
  filter: drop-shadow(4px 10px 8px rgba(60, 30, 20, .3));
  transform-origin: 10% 90%;
  animation: quill-write 3.2s ease-in-out 1.4s infinite;
}
@keyframes quill-write {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  20% { transform: translate(-6px, 3px) rotate(-4deg); }
  40% { transform: translate(-12px, 0) rotate(2deg); }
  60% { transform: translate(-18px, 4px) rotate(-3deg); }
  80% { transform: translate(-8px, -3px) rotate(3deg); }
}

.wax-bit.hero-bit { z-index: 3; }

/* ---------- The sea with a sailing longship ---------- */

.sea-band {
  position: relative;
  height: 96px;
  margin-top: 10px;
  overflow: hidden;
  pointer-events: none;
}
.waves {
  position: absolute;
  left: 0; right: 0; bottom: 18px;
  height: 22px;
  background:
    radial-gradient(circle at 12px -4px, transparent 12px, rgba(122, 74, 58, .38) 13px, transparent 14.5px) 0 4px / 24px 12px repeat-x,
    radial-gradient(circle at 12px -4px, transparent 12px, rgba(45, 58, 107, .28) 13px, transparent 14.5px) 12px 12px / 24px 12px repeat-x;
  animation: waves 6s linear infinite;
}
@keyframes waves { to { background-position: 24px 4px, -12px 12px; } }
.longship {
  position: absolute;
  bottom: 22px;
  left: 0;
  width: 78px;
  animation: sail 46s linear -15s infinite;
}
.longship svg { display: block; width: 100%; animation: bob 2.6s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes sail {
  from { transform: translateX(-100px); }
  to { transform: translateX(calc(100vw + 20px)); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(3px) rotate(2deg); }
}

/* ---------- Sections ---------- */

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 70px 16px;
  text-align: center;
}
@media (min-width: 980px) { .section { padding: 96px 24px; } }

.eyebrow {
  margin: 0 0 10px;
  font-family: var(--runic);
  font-size: 14px;
  letter-spacing: .4em;
  color: var(--blood);
}
.section-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, 5.2vw, 58px);
  line-height: 1.05;
  color: var(--ink);
}
.section-lede {
  max-width: 640px;
  margin: 14px auto 0;
  font-size: 20px;
  font-style: italic;
  color: var(--ink-soft);
}

/* How it works: a trail of runestones */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 44px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 620px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 50px 36px; } }
@media (min-width: 980px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; }
  .steps::before {
    content: "";
    position: absolute;
    top: 52px;
    left: 12.5%;
    right: 12.5%;
    border-top: 2px dashed rgba(122, 74, 58, .45);
  }
}
.trial { position: relative; }
.trial h3 {
  margin: 4px 0 10px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.1;
  color: var(--blood);
}
.trial p { margin: 0 auto; max-width: 300px; font-size: 18px; color: var(--ink-soft); }
.trial p.numeral {
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--frame);
}

.stone {
  position: relative;
  display: grid;
  place-items: center;
  width: 86px;
  height: 106px;
  margin: 0 auto;
  border-radius: 48% 48% 40% 40% / 62% 62% 30% 30%;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, .22), transparent 55%),
    linear-gradient(165deg, #a39c90 0%, #7d766b 55%, #5f594f 100%);
  box-shadow:
    inset -6px -8px 14px rgba(0, 0, 0, .25),
    inset 4px 4px 8px rgba(255, 255, 255, .15),
    0 14px 20px -12px rgba(40, 25, 15, .6);
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1);
}
.stone::after {
  content: "";
  position: absolute;
  left: -12px; right: -12px; bottom: -8px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(60, 40, 25, .35), transparent 70%);
  z-index: -1;
}
.stone span {
  font-family: var(--runic);
  font-size: 46px;
  line-height: 1;
  color: #8b2e24;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, .28), -1px -1px 0 rgba(0, 0, 0, .45);
}
.trial:hover .stone { transform: translateY(-6px) rotate(-3deg); }

.center-cta { margin-top: 56px; }

/* ---------- Night section with aurora ---------- */

.night {
  position: relative;
  max-width: none;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #121a33 0%, #1c2649 60%, #25325a 100%);
  color: var(--parchment);
  isolation: isolate;
}
.night-inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 90px 16px 150px;
}
@media (min-width: 980px) { .night-inner { padding: 110px 24px 180px; } }
.night::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 110px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 110' preserveAspectRatio='none'%3E%3Cpath d='M0 110V62l70-30 60 22 90-44 80 38 60-18 110 52 70-26 80 20 100-54 90 44 70-22 110 40 70-30 60 20 80-16v122Z' fill='%23d9c9ab'/%3E%3Cpath d='M0 110V84l110-26 90 22 120-30 110 34 90-14 130 24 100-30 120 26 90-18 110 20 130-22v40Z' fill='%23e8dac0'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
  z-index: 1;
}
.night .eyebrow { color: #e7a598; }
.night .section-title { color: var(--parchment); }
.night .section-lede { color: #cfc2ab; }

.aurora {
  position: absolute;
  inset: -20% -10% 30%;
  z-index: -1;
  background:
    radial-gradient(ellipse 40% 30% at 25% 40%, rgba(84, 222, 170, .38), transparent 70%),
    radial-gradient(ellipse 35% 25% at 60% 30%, rgba(96, 160, 255, .28), transparent 70%),
    radial-gradient(ellipse 30% 30% at 82% 45%, rgba(176, 102, 214, .24), transparent 70%);
  filter: blur(30px);
  animation: aurora 16s ease-in-out infinite alternate;
}
@keyframes aurora {
  0% { transform: translateX(-4%) skewX(-6deg); opacity: .8; }
  50% { opacity: 1; }
  100% { transform: translateX(5%) skewX(6deg); opacity: .75; }
}
.stars {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(1.4px 1.4px at 20px 30px, rgba(255, 255, 255, .9), transparent),
    radial-gradient(1px 1px at 120px 80px, rgba(255, 255, 255, .7), transparent),
    radial-gradient(1.6px 1.6px at 200px 20px, rgba(255, 245, 220, .9), transparent),
    radial-gradient(1px 1px at 260px 140px, rgba(255, 255, 255, .6), transparent),
    radial-gradient(1.2px 1.2px at 60px 170px, rgba(255, 255, 255, .7), transparent),
    radial-gradient(1px 1px at 170px 210px, rgba(255, 255, 255, .5), transparent);
  background-size: 300px 240px;
  animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .55; } to { opacity: 1; } }

.worthy {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  margin-top: 50px;
  text-align: left;
}
@media (min-width: 820px) { .worthy { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.worthy-card {
  padding: 28px 24px 26px;
  border: 1px solid rgba(241, 231, 211, .22);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(241, 231, 211, .09), rgba(241, 231, 211, .03));
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .6);
  transition: transform .25s, border-color .25s;
}
.worthy-card:hover { transform: translateY(-4px); border-color: rgba(231, 165, 152, .6); }
.worthy-rune {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--blood);
  color: var(--parchment);
  font-family: var(--runic);
  font-size: 24px;
  box-shadow: 0 0 0 3px #1c2649, 0 0 0 4px rgba(231, 165, 152, .7);
}
.worthy-card h3 {
  margin: 16px 0 8px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.1;
  color: var(--parchment);
}
.worthy-card p { margin: 0; font-size: 18px; color: #d8ccb5; }
.worthy-card em { color: #f1d9c9; }

/* ---------- Privileges ---------- */

.privileges { text-align: left; }
.priv-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
@media (min-width: 900px) { .priv-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 60px; } }
.left { text-align: left; margin-left: 0 !important; }
@media (max-width: 899px) {
  .privileges .left { text-align: center; margin-left: auto !important; }
}

.priv-list { list-style: none; margin: 26px 0 0; padding: 0; }
.priv-list li {
  position: relative;
  padding: 12px 0 12px 40px;
  border-bottom: 1px solid rgba(122, 74, 58, .22);
  font-size: 19px;
}
.priv-list li:last-child { border-bottom: 0; }
.priv-list li::before {
  content: "ᛉ";
  position: absolute;
  left: 4px; top: 12px;
  font-family: var(--runic);
  font-size: 20px;
  color: var(--blood);
}

.seal-figure { margin: 0; text-align: center; }
.big-seal {
  appearance: none;
  display: block;
  width: min(320px, 78vw);
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
  transition: transform .2s;
}
.big-seal:hover { transform: translateY(-4px) rotate(-2deg); }
.big-seal:focus-visible { outline: 2px solid var(--rune-blue); outline-offset: 6px; }
.big-seal canvas { display: block; width: 100%; height: 100%; transform: rotate(-8deg); opacity: 0; }
.big-seal.stamped canvas { opacity: 1; }
.big-seal.stamping canvas { animation: big-stamp .62s cubic-bezier(.5, 0, .5, 1) both; }
@keyframes big-stamp {
  0% { opacity: 0; transform: translateY(-80px) scale(2) rotate(-40deg); }
  50% { opacity: 1; transform: scale(1.05) rotate(-10deg); }
  60% { transform: scale(.95) rotate(-8deg); }
  78% { transform: scale(1.02) rotate(-8deg); }
  100% { opacity: 1; transform: rotate(-8deg); }
}
.seal-figure figcaption { margin-top: 18px; font-size: 17px; font-style: italic; color: var(--ink-soft); }
.seal-figure figcaption span { font-size: 15px; opacity: .85; }
.seal-figure { position: relative; }

/* ---------- Council quotes ---------- */

.quotes {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  margin-top: 48px;
}
@media (min-width: 820px) { .quotes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.quote {
  position: relative;
  margin: 0;
  padding: 34px 26px 24px;
  background: var(--parchment);
  border: 1.5px solid rgba(122, 74, 58, .5);
  box-shadow: inset 0 0 0 5px var(--parchment), inset 0 0 0 6px rgba(122, 74, 58, .3), 0 18px 34px -22px rgba(60, 30, 20, .5);
  text-align: left;
  transform: rotate(var(--r, 0deg));
  transition: transform .25s;
}
.quote:nth-child(1) { --r: -1.2deg; }
.quote:nth-child(2) { --r: .8deg; }
.quote:nth-child(3) { --r: -.5deg; }
.quote:hover { transform: rotate(0) translateY(-4px); }
.quote::before {
  content: "\201C";
  position: absolute;
  top: -6px; left: 18px;
  font-family: var(--display);
  font-size: 84px;
  line-height: 1;
  color: var(--blood);
}
.quote blockquote { margin: 0; font-size: 20px; font-style: italic; line-height: 1.45; }
.quote figcaption { margin-top: 16px; font-size: 15px; font-style: italic; color: var(--ink-soft); }
.quote figcaption b { display: block; font-family: var(--display); font-weight: 400; font-style: normal; font-size: 21px; color: var(--ink); }
.council-note { margin: 30px 0 0; font-size: 15px; font-style: italic; color: var(--ink-soft); }

/* ---------- FAQ ---------- */

.faq-list { max-width: 760px; margin: 40px auto 0; text-align: left; }
.faq-list details { border-bottom: 1px solid rgba(122, 74, 58, .3); }
.faq-list details:first-child { border-top: 1px solid rgba(122, 74, 58, .3); }
.faq-list summary {
  position: relative;
  padding: 18px 44px 18px 0;
  list-style: none;
  font-family: var(--display);
  font-size: 25px;
  line-height: 1.2;
  color: var(--ink);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "ᚷ";
  position: absolute;
  right: 6px; top: 50%;
  font-family: var(--runic);
  font-size: 20px;
  color: var(--blood);
  transform: translateY(-50%) rotate(45deg);
  transition: transform .25s;
}
.faq-list details[open] summary::after { transform: translateY(-50%); }
.faq-list summary:hover { color: var(--blood); }
.faq-list details p { margin: 0 0 20px; font-size: 19px; color: var(--ink-soft); animation: rise .3s both; }
@keyframes rise { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Final call ---------- */

.final { padding: 20px 16px 80px; }
.final-card {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: 52px 28px 44px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 251, 240, .8), transparent 65%),
    var(--parchment);
  border: 3px solid var(--frame);
  box-shadow:
    inset 0 0 0 6px var(--parchment),
    inset 0 0 0 7px var(--frame),
    inset 0 0 0 13px var(--parchment),
    inset 0 0 0 14px rgba(122, 74, 58, .4),
    0 30px 60px -30px rgba(60, 30, 20, .6);
}
.final-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.05;
}
.final-card > p:not(.runes-top):not(.final-small) { max-width: 560px; margin: 16px auto 30px; font-size: 20px; color: var(--ink-soft); }
.final-small { margin: 18px 0 0; font-size: 15px; font-style: italic; color: var(--ink-soft); }

@media (max-width: 420px) {
  .btn-cta { font-size: 24px; padding: 15px 24px; }
  .btn-cta.big { font-size: 26px; padding: 16px 26px; }
  .hero-lede, .section-lede { font-size: 18px; }
}

/* ---------- Scroll reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease-out, transform .6s cubic-bezier(.2, .8, .3, 1);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .quote.reveal.in { transform: rotate(var(--r, 0deg)); }
.js .quote.reveal.in:hover { transform: rotate(0) translateY(-4px); }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  .hero-seal, .big-seal canvas { opacity: 1; }
  .longship { left: 12%; }
}
