:root {
  color-scheme: dark;
  --accent: #c79338;
  --accent-deep: #9a6a15;
  --bone: #f4ead6;
  --bone-bright: #fff7e6;
  --ink: #14110e;
  --madder: #8f3531;
  --muted: #b7a98f;
  --woad: #2c6378;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #0d0b09;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--bone-bright);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  /* Deep, warm, atmospheric backdrop. */
  background:
    radial-gradient(
      120% 90% at 50% 30%,
      rgb(58 50 41 / 0.95) 0%,
      rgb(34 29 24 / 0.96) 34%,
      rgb(20 16 13 / 1) 66%,
      #0c0a08 100%
    );

  opacity: 0;
  transition: opacity 1200ms ease;
}

body.is-ready {
  opacity: 1;
}

/* Film-grain / parchment texture overlay. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  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='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Vignette to draw the eye inward. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    115% 95% at 50% 42%,
    transparent 52%,
    rgb(6 5 4 / 0.55) 100%
  );
}

#embers {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.page-shell {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 56px 24px 72px;
}

.hero {
  position: relative;
  display: grid;
  width: 100%;
  max-width: 720px;
  justify-items: center;
  text-align: center;
  gap: 30px;
}

/* Emblem with an ambient warm halo. */
.emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: min(340px, 64vw);
  aspect-ratio: 1;
  animation: float 11s ease-in-out infinite;
}

.emblem::before {
  content: "";
  position: absolute;
  inset: -34%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 48%,
    rgb(199 147 56 / 0.42) 0%,
    rgb(143 53 49 / 0.18) 36%,
    transparent 68%
  );
  filter: blur(14px);
  animation: glow 7s ease-in-out infinite;
}

.emblem img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 40px rgb(0 0 0 / 0.55));
}

.brand-word {
  margin: 0;
  color: var(--bone-bright);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(68px, 12vw, 132px);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 0.9;
  text-shadow: 0 18px 42px rgb(0 0 0 / 0.42);
}

.definition {
  display: grid;
  width: min(620px, 100%);
  justify-items: center;
  gap: 8px;
  margin-top: -6px;
  color: var(--bone);
  text-wrap: balance;
}

.definition::before {
  content: "";
  width: min(180px, 42vw);
  height: 1px;
  margin-bottom: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgb(199 147 56 / 0.64),
    transparent
  );
}

.definition p {
  margin: 0;
}

.definition-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  column-gap: 12px;
  row-gap: 2px;
  font-family: Spectral, Georgia, serif;
}

.definition-term {
  color: var(--bone-bright);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.definition-pronunciation {
  color: rgb(244 234 214 / 0.72);
  font-size: clamp(15px, 2vw, 18px);
  font-style: italic;
  font-weight: 500;
}

.definition-body,
.definition-origin {
  max-width: 54ch;
  color: rgb(244 234 214 / 0.8);
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.5;
}

.definition-body span {
  color: var(--accent);
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.01em;
}

.definition-origin {
  max-width: 48ch;
  color: rgb(183 169 143 / 0.82);
  font-size: clamp(13px, 1.8vw, 15px);
}

.eyebrow {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-deep));
}

.eyebrow::after {
  background: linear-gradient(90deg, var(--accent-deep), transparent);
}

.message {
  position: relative;
  display: grid;
  gap: 18px;
  justify-items: center;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.desktop-downloads {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 8px;
}

.desktop-downloads-label {
  margin: 0;
  color: rgb(244 234 214 / 0.62);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.desktop-downloads-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.download-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgb(231 217 187 / 0.24);
  border-radius: 999px;
  padding: 0 19px;
  color: var(--bone-bright);
  background:
    linear-gradient(180deg, rgb(255 247 230 / 0.14), rgb(255 247 230 / 0.06)),
    rgb(20 17 14 / 0.52);
  box-shadow:
    0 12px 30px rgb(0 0 0 / 0.28),
    inset 0 1px 0 rgb(255 255 255 / 0.12);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.download-link:hover,
.download-link:focus-visible {
  border-color: rgb(199 147 56 / 0.68);
  box-shadow:
    0 17px 34px rgb(0 0 0 / 0.34),
    0 0 0 4px rgb(199 147 56 / 0.12),
    inset 0 1px 0 rgb(255 255 255 / 0.18);
  transform: translateY(-1px);
}

.download-link:focus-visible {
  outline: 2px solid rgb(199 147 56 / 0.6);
  outline-offset: 5px;
}

.download-icon {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bone-bright), var(--bone));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.42);
}

.download-icon svg {
  width: 16px;
  height: 16px;
}

.download-icon path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.download-link-windows .download-icon path {
  fill: currentColor;
  stroke: none;
}

.app-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(231 217 187 / 0.42);
  border-radius: 999px;
  padding: 0 26px;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bone-bright), var(--bone));
  box-shadow:
    0 14px 32px rgb(0 0 0 / 0.26),
    inset 0 0 0 1px rgb(255 255 255 / 0.46);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.app-link:hover,
.app-link:focus-visible {
  border-color: rgb(199 147 56 / 0.72);
  box-shadow:
    0 18px 38px rgb(0 0 0 / 0.32),
    0 0 0 4px rgb(199 147 56 / 0.14),
    inset 0 0 0 1px rgb(255 255 255 / 0.6);
  transform: translateY(-1px);
}

.app-link:focus-visible {
  outline: 2px solid rgb(199 147 56 / 0.68);
  outline-offset: 5px;
}

h1 {
  margin: 0;
  max-width: 18ch;
  color: var(--bone-bright);
  font-family: Spectral, Georgia, serif;
  font-weight: 600;
  font-size: clamp(38px, 7vw, 64px);
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

h1 em {
  font-style: italic;
  color: var(--accent);
}

.subline {
  margin: 0;
  max-width: 38ch;
  color: var(--muted);
  font-size: clamp(15px, 2.2vw, 18px);
  line-height: 1.55;
  text-wrap: balance;
}

.charis-link {
  margin-top: 6px;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  color: var(--bone);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-bottom: 1px solid rgb(199 147 56 / 0.4);
  padding-bottom: 2px;
  transition: color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.charis-link::after {
  content: "";
  width: 7px;
  height: 7px;
  border-top: 1.6px solid currentColor;
  border-right: 1.6px solid currentColor;
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.charis-link:hover,
.charis-link:focus-visible {
  color: var(--bone-bright);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.charis-link:hover::after,
.charis-link:focus-visible::after {
  transform: rotate(45deg) translate(2px, -2px);
}

.charis-link:focus-visible {
  outline: 2px solid rgb(199 147 56 / 0.5);
  outline-offset: 8px;
  border-radius: 2px;
}

.footer-mark {
  position: fixed;
  bottom: 22px;
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  color: rgb(183 169 143 / 0.55);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* Staggered entrance for hero contents. */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 1100ms cubic-bezier(0.16, 0.8, 0.3, 1) forwards;
}

.reveal.d1 { animation-delay: 220ms; }
.reveal.d2 { animation-delay: 420ms; }
.reveal.d3 { animation-delay: 600ms; }
.reveal.d4 { animation-delay: 780ms; }
.reveal.d5 { animation-delay: 960ms; }
.reveal.d6 { animation-delay: 1120ms; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes glow {
  0%, 100% { opacity: 0.78; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@media (max-width: 600px) {
  .page-shell { padding: 40px 22px 64px; }
  .hero { gap: 24px; }
  .definition {
    gap: 7px;
    margin-top: -2px;
  }
  .definition-body,
  .definition-origin {
    max-width: 32ch;
  }
  .actions { gap: 12px; }
  .desktop-downloads-actions { width: 100%; }
  .download-link { width: 100%; }
  .app-link, .charis-link { width: 100%; justify-content: center; }
  .eyebrow { font-size: 11px; letter-spacing: 0.2em; }
  .eyebrow::before, .eyebrow::after { width: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  body { transition: none; opacity: 1; }
  .emblem, .emblem::before { animation: none; }
  .reveal { opacity: 1; transform: none; animation: none; }
  #embers { display: none; }
}
