@font-face { font-family: 'Spectral'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/spectral-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Spectral'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/spectral-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Spectral'; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/spectral-latin-400-italic.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/figtree-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/figtree-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/figtree-latin-600-normal.woff2) format('woff2'); }

:root {
  --ink: #1a3e96;
  --ink-soft: #2f4a92;
  --gold: #b8841f;
  --gold-text: #946914;
  --line-gold: rgba(212, 166, 70, .55);
  --star-gold: rgba(206, 158, 60, .8);
  --ivory: #fffaf1;
  --serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --sans: 'Figtree', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --glow: 0 0 22px #fffcf4, 0 0 10px rgba(255, 252, 244, .9), 0 0 2px rgba(255, 252, 244, .9);
}

*, *::before, *::after { box-sizing: border-box; }

html { background: #dda258; overflow-y: scroll; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 100vh; margin: 0;
  overflow-x: hidden; overflow-x: clip;
  background: var(--ivory); color: var(--ink);
  font: 400 19px/1.65 var(--serif);
}

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.star { flex: none; width: 18px; height: 18px; color: var(--star-gold); transition: color .9s ease; }
.star.is-lit { color: #e9b648; }
.star-lg { width: 26px; height: 26px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Sky ---------- */

.sky {
  position: relative; isolation: isolate;
  padding: clamp(40px, 7vw, 72px) 16px clamp(40px, 6vw, 64px);
  text-align: center;
  background:
    radial-gradient(ellipse 60% 50% at 0% 0%, rgba(84, 140, 212, .45), transparent 70%),
    linear-gradient(to bottom, #6ea8de 0%, #92c1eb 22%, #c1ddf2 46%, #e8f1f3 64%, #fff4d8 82%, #fffaf1 100%);
}

.crest { position: relative; width: clamp(104px, 13vw, 140px); margin: 0 auto 30px; }
.logo { display: block; width: 100%; height: auto; }

.sun {
  position: absolute; z-index: -1; left: 50%; top: 50%;
  width: 1300px; height: 900px; margin: -450px 0 0 -650px;
  pointer-events: none;
}
.sun::before, .sun::after { content: ''; position: absolute; inset: 0; }
.sun::before { background: radial-gradient(ellipse closest-side, #fffef6, rgba(255, 248, 224, .75) 35%, transparent); }
.sun::after {
  opacity: .7;
  background: repeating-conic-gradient(from 3deg, transparent 0deg, rgba(255, 255, 255, .55) 2.5deg, transparent 6deg, transparent 14deg);
  -webkit-mask: radial-gradient(ellipse closest-side, #000 8%, rgba(0, 0, 0, .5) 40%, transparent 78%);
  mask: radial-gradient(ellipse closest-side, #000 8%, rgba(0, 0, 0, .5) 40%, transparent 78%);
}

.badge {
  display: inline-block; margin: 0;
  padding: 9px 22px 9px calc(22px + .3em);
  border: 1px solid rgba(176, 124, 30, .5); border-radius: 999px;
  background: linear-gradient(180deg, #fbe39f 0%, #f3c96d 48%, #e8b150 100%);
  box-shadow: 0 0 0 4px rgba(255, 247, 222, .45), 0 8px 22px -8px rgba(160, 110, 20, .45), inset 0 1px 0 rgba(255, 255, 255, .75);
  color: #183a8c;
  font: 600 13px/1.2 var(--sans); letter-spacing: .3em; text-transform: uppercase;
}

/* ---------- Middle ---------- */

.pools {
  flex: 1;
  padding: clamp(12px, 3vw, 28px) 16px clamp(48px, 7vw, 72px);
  background:
    radial-gradient(ellipse 48% 45% at 0% 35%, rgba(255, 230, 182, .5), transparent 70%),
    radial-gradient(ellipse 48% 45% at 100% 62%, rgba(210, 230, 248, .55), transparent 70%);
}

.apps {
  display: grid; gap: clamp(20px, 3vw, 32px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  max-width: 900px; margin: 0 auto;
}

.app {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: clamp(26px, 4vw, 38px);
  border: 1px solid rgba(212, 166, 70, .3); border-radius: 24px;
  background: rgba(255, 255, 255, .62);
  box-shadow: 0 26px 60px -40px rgba(150, 105, 30, .45), inset 0 0 0 6px rgba(255, 255, 255, .35);
  transition: transform .5s ease, box-shadow .5s ease;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .app { background: rgba(255, 255, 255, .6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
.app::before {
  content: ''; position: absolute; left: 50%; top: -60%;
  width: 130%; height: 110%; margin-left: -65%;
  background: radial-gradient(ellipse closest-side, rgba(255, 238, 196, .8), rgba(255, 244, 218, .4) 45%, transparent);
  pointer-events: none;
}
.app > * { position: relative; }
.app:hover { transform: translateY(-2px); box-shadow: 0 32px 66px -38px rgba(150, 105, 30, .55), inset 0 0 0 6px rgba(255, 255, 255, .35); }

.app-label {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 10px;
  color: var(--gold-text);
  font: 500 12px/1.2 var(--sans); letter-spacing: .3em; text-transform: uppercase;
}

.app h2 { margin: 0 0 10px; font: 500 clamp(28px, 3vw, 36px)/1.15 var(--serif); }

.app-line { margin: 0 0 26px; color: var(--ink-soft); font-size: 18px; line-height: 1.55; }

.app-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px;
  align-self: stretch; margin-top: auto;
}

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 26px 12px calc(26px + .16em);
  border-radius: 999px;
  font: 500 13.5px/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  text-align: center; text-decoration: none;
  transition: transform .35s ease, box-shadow .35s ease, background-color .35s ease;
}
.btn-gold {
  border: 1px solid rgba(176, 124, 30, .5);
  background: linear-gradient(180deg, #fbe39f 0%, #f3c96d 48%, #e8b150 100%);
  box-shadow: 0 0 0 4px rgba(255, 247, 222, .45), 0 10px 26px -8px rgba(160, 110, 20, .45), inset 0 1px 0 rgba(255, 255, 255, .75);
  color: #183a8c;
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 0 0 5px rgba(255, 247, 222, .6), 0 14px 30px -8px rgba(160, 110, 20, .55), inset 0 1px 0 rgba(255, 255, 255, .75); }
.btn-light {
  border: 1px solid rgba(184, 132, 31, .38);
  background: rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 0 26px rgba(255, 255, 255, .75), 0 6px 20px rgba(170, 125, 40, .12);
  color: var(--ink);
}
.btn-light:hover { transform: translateY(-1px); background-color: rgba(255, 255, 255, .72); box-shadow: 0 0 30px rgba(255, 255, 255, .9), 0 10px 24px rgba(170, 125, 40, .2); }

.link {
  color: var(--ink);
  font: 500 15px/1.4 var(--sans);
  text-decoration: none;
  border-bottom: 1px solid var(--line-gold);
  transition: border-color .35s ease;
}
.link:hover { border-bottom-color: var(--gold); }

/* ---------- Golden field ---------- */

.field {
  padding: clamp(36px, 6vw, 56px) 16px clamp(44px, 7vw, 64px);
  text-align: center;
  background:
    radial-gradient(ellipse 70% 70% at 18% 120%, rgba(232, 178, 82, .35), transparent 70%),
    radial-gradient(ellipse 60% 60% at 88% 125%, rgba(226, 168, 70, .3), transparent 70%),
    linear-gradient(to bottom, rgba(255, 250, 241, 0) 0%, #fdf0d6 32%, #f9e2b2 72%, #f3d08d 100%);
}

.divider { display: flex; align-items: center; gap: 14px; max-width: 420px; margin: 0 auto 18px; }
.divider span { flex: 1; border-top: 1px solid; }
.divider span:first-child { border-image: linear-gradient(90deg, transparent, var(--line-gold)) 1; }
.divider span:last-child { border-image: linear-gradient(90deg, var(--line-gold), transparent) 1; }

.small { margin: 0; color: var(--ink-soft); font: 400 14.5px/1.5 var(--sans); }

/* ---------- Motion ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
.rise { animation: rise 1s cubic-bezier(.2, .7, .2, 1) backwards; }
.d1 { animation-delay: .12s; }
.d2 { animation-delay: .3s; }
.d3 { animation-delay: .45s; }

.sparkles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 5; }
.sparkle { position: absolute; animation: sparkle 2s ease-out forwards; }
@keyframes sparkle {
  0% { opacity: 0; transform: scale(.15); }
  25% { opacity: 1; }
  55% { opacity: .95; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .rise, .sparkle { animation: none; }
  .app, .btn, .link, .star { transition: none; }
  .app:hover, .btn:hover { transform: none; }
}

/* ---------- Phones ---------- */

@media (max-width: 480px) {
  .app-actions { flex-direction: column; align-items: stretch; text-align: center; }
  .app-actions .link { align-self: center; }
}

/* ---------- Scroll bar ---------- */

::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: #fbf3e3; }
::-webkit-scrollbar-thumb { border: 3px solid #fbf3e3; border-radius: 999px; background: linear-gradient(180deg, #f3d48e, #e2b85f 50%, #d3a447); }
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-color: #e2b85f #fbf3e3; scrollbar-width: thin; }
}
