/* Ad Ulteriora website. Colours and lettering follow the app (Design/Theme.swift). */
@font-face {
  font-family: "AdHeading";
  src: url("/fonts/AdHeading-Variable.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --night: #0a0c12;
  --night-2: #10142a;
  --ink: #161b33;
  --ivory: #f3f5f9;
  --ivory-dim: #a3abbd;
  --accent: #7cc4ff;
  --accent-deep: #4d8cfa;
  --gold: #f2c879;
  --amber: #f0a24a;
  --violet: #b48cff;
  --line: rgba(255, 255, 255, 0.12);
  --glass: rgba(20, 26, 52, 0.55);
  --display: "AdHeading", "Cinzel", Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --radius: 22px;
  --wrap: 1160px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--ivory);
  font: 17px/1.6 var(--body);
  overflow-x: hidden;
}

/* A quiet field of stars behind every page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1px 1px at 12% 18%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 12%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 40% 68%, #fff5 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 52%, #fff7 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 84%, #fff5 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 58% 34%, #fff4 50%, transparent 51%),
    radial-gradient(900px 600px at 80% -10%, #2a2f6a55, transparent 70%),
    radial-gradient(800px 600px at -10% 40%, #3a225f44, transparent 70%),
    var(--night);
  background-size: 420px 420px, 380px 380px, 520px 520px, 460px 460px, 300px 300px, 610px 610px, auto, auto, auto;
}

img { max-width: 100%; display: block; }
figure { margin: 0; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #b7deff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ivory); color: var(--night); padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 12px; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; margin: 0; letter-spacing: 0.01em; }
h1 { font-size: clamp(42px, 8vw, 92px); font-weight: 800; }
h2 { font-size: clamp(30px, 4.6vw, 52px); }
h3 { font-size: 22px; }
p { margin: 0; }
.kicker { font: 700 13px/1 var(--body); letter-spacing: 0.32em; text-transform: uppercase; color: var(--accent); }
.lede { color: var(--ivory-dim); font-size: clamp(17px, 2vw, 20px); max-width: 60ch; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: linear-gradient(to bottom, #0a0c12cc, #0a0c1299);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ivory); text-decoration: none; font: 700 19px var(--display); letter-spacing: 0.04em; white-space: nowrap; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 18px #f2c87955; }
.nav ul { display: flex; gap: clamp(12px, 3vw, 28px); list-style: none; margin: 0; padding: 0; }
.nav a.link { color: var(--ivory-dim); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a.link:hover, .nav a.link[aria-current="page"] { color: var(--ivory); }
@media (max-width: 560px) { .nav .hide-sm { display: none; } .brand span { font-size: 17px; } }

/* Buttons and badges */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; border: 0;
  font: 700 16px var(--body); text-decoration: none; cursor: pointer;
  color: var(--night);
  background: linear-gradient(135deg, #9fd9ff, var(--accent) 45%, var(--accent-deep));
  box-shadow: 0 8px 30px #4d8cfa55, inset 0 1px 0 #ffffff88;
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { color: var(--night); transform: translateY(-1px); box-shadow: 0 12px 38px #4d8cfa77, inset 0 1px 0 #ffffff88; }
.btn.ghost { background: var(--glass); color: var(--ivory); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { color: var(--ivory); background: #ffffff14; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.badge { display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px 10px 14px; border-radius: 14px; background: #000; border: 1px solid #ffffff40; color: #fff; text-decoration: none; }
.badge svg { width: 26px; height: 26px; }
.badge small { display: block; font-size: 11px; opacity: .8; line-height: 1.1; }
.badge b { display: block; font-size: 19px; line-height: 1.15; font-weight: 600; }

/* Hero: the title screen sunset, Mira beside the words. */
.hero { position: relative; min-height: min(92vh, 900px); display: grid; align-items: center; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #0a0c12f2 0%, #0a0c12b0 42%, #0a0c1230 75%), linear-gradient(to top, var(--night) 2%, transparent 35%); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; align-items: end; gap: 24px; padding-block: 64px 0; }
.hero-copy { display: grid; gap: 22px; padding-bottom: 12vh; }
.hero h1 { text-shadow: 0 4px 40px #f2c87944; background: linear-gradient(180deg, #fff 30%, #f8e3b8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .tag { font: 600 clamp(20px, 2.6vw, 28px)/1.3 var(--display); color: var(--gold); }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 6px; }
.hero-art { align-self: end; justify-self: center; position: relative; }
.hero-art img { height: min(78vh, 720px); width: auto; filter: drop-shadow(0 0 40px #7cc4ff44); }
.hero-art::before { content: ""; position: absolute; left: 50%; bottom: 0; width: 140%; height: 70px; transform: translateX(-50%); background: radial-gradient(closest-side, #7cc4ff55, transparent); }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; padding-top: 40px; }
  .hero-copy { padding-bottom: 0; justify-items: center; }
  .hero .ctas { justify-content: center; }
  .hero-art img { height: 52vh; }
  .hero::after { background: linear-gradient(to bottom, #0a0c12d9 0%, #0a0c1266 45%, var(--night) 98%); }
}

/* Sections */
section { padding-block: clamp(72px, 10vw, 130px); }
.section-head { display: grid; gap: 14px; margin-bottom: 44px; max-width: 760px; }
.center { text-align: center; margin-inline: auto; justify-items: center; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 80px); align-items: center; }
.split.flip > :first-child { order: 2; }
@media (max-width: 820px) { .split, .split.flip { grid-template-columns: 1fr; } .split.flip > :first-child { order: 0; } }
.split .copy { display: grid; gap: 18px; }
.ticks { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 10px; color: var(--ivory-dim); }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before { content: "✦"; position: absolute; left: 4px; color: var(--gold); }

/* Phone frames for screenshots */
.phone { width: min(330px, 80vw); margin-inline: auto; border-radius: 46px; padding: 10px; background: linear-gradient(160deg, #2b3256, #0d1020); box-shadow: 0 30px 80px #000a, 0 0 0 1px #ffffff1f, 0 0 60px var(--glow, #7cc4ff33); }
.phone img { border-radius: 37px; width: 100%; height: auto; aspect-ratio: 600 / 1304; }
.phone-row { display: flex; justify-content: center; gap: clamp(12px, 3vw, 28px); }
.phone-row .phone { width: auto; flex: 0 1 250px; min-width: 0; padding: 8px; border-radius: 40px; }
.phone-row .phone img { border-radius: 32px; }
.phone-row .phone:nth-child(2) { transform: translateY(-28px); }

/* Paths */
.paths { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 8px; }
.path { padding: 16px 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); text-align: center; }
.path b { display: block; font-family: var(--display); font-size: 18px; }
.path span { font-size: 13px; color: var(--ivory-dim); }
@media (max-width: 520px) { .paths { grid-template-columns: repeat(2, 1fr); } }

/* Outfit cards with rarity glow */
.cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
@media (max-width: 980px) { .cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .cards { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.card { --c: #a3abbd; position: relative; border-radius: var(--radius); padding: 14px 10px 16px; background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--c) 28%, transparent), transparent 70%), linear-gradient(180deg, #1a2040, #0d1022); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 0 30px color-mix(in srgb, var(--c) 22%, transparent); display: grid; justify-items: center; gap: 8px; transition: transform .3s, box-shadow .3s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 0 46px color-mix(in srgb, var(--c) 40%, transparent); }
.card img { height: 240px; width: 100%; object-fit: contain; filter: drop-shadow(0 6px 14px #0008); }
.card .stars { color: var(--c); letter-spacing: 2px; font-size: 14px; }
.card b { font-family: var(--display); font-size: 16px; text-align: center; }
.r1 { --c: #c7ccd8; } .r2 { --c: #5fe0a6; } .r3 { --c: #6aa8ff; } .r4 { --c: #b48cff; } .r5 { --c: #f2c879; }

/* Day and night scenes */
.scenes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.scene { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 700 / 1100; border: 1px solid var(--line); background: var(--ink); }
.scene img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; transition: opacity 1.2s ease; }
.scene .night { opacity: 0; }
.is-night .scene .night { opacity: 1; }
.scene figcaption { position: absolute; left: 12px; bottom: 10px; font: 700 15px var(--display); text-shadow: 0 2px 10px #000; }
@media (max-width: 820px) { .scenes { grid-template-columns: repeat(2, 1fr); } }
.toggle { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); }
.toggle button { border: 0; background: none; color: var(--ivory-dim); font: 700 15px var(--body); padding: 9px 18px; border-radius: 999px; cursor: pointer; }
.toggle button[aria-pressed="true"] { background: var(--ivory); color: var(--night); }

/* The Shrine band */
.shrine { position: relative; overflow: hidden; isolation: isolate; }
.shrine-bg { position: absolute; inset: 0; z-index: -2; }
.shrine-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 80%; }
.shrine::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, var(--night), #0a0c1288 30%, #0a0c1299 70%, var(--night)); }
.pillar { position: absolute; left: 50%; top: 0; bottom: 18%; width: 120px; transform: translateX(-50%); z-index: -1; background: linear-gradient(90deg, transparent, #f2c87966, #fff8, #f2c87966, transparent); filter: blur(10px); mask-image: linear-gradient(to bottom, #000 70%, transparent); -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent); animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; width: 90px; } }
@media (prefers-reduced-motion: reduce) { .pillar { animation: none; } }
.rarity-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.rarity-row span { padding: 8px 14px; border-radius: 999px; background: #0a0c12b3; border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); color: var(--c); font-weight: 700; font-size: 14px; }

/* Final call */
.cta-band { text-align: center; display: grid; gap: 22px; justify-items: center; }

/* Footer */
footer { border-top: 1px solid var(--line); padding-block: 40px 56px; color: var(--ivory-dim); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { color: var(--ivory-dim); text-decoration: none; }
footer a:hover { color: var(--ivory); }

/* Inner pages */
.page { padding-block: 56px 90px; }
.page .wrap { max-width: 760px; }
.page h1 { font-size: clamp(36px, 6vw, 58px); margin-bottom: 10px; }
.page h2 { font-size: 24px; margin: 38px 0 10px; color: var(--gold); }
.page p, .page li { color: #c9cfdd; }
.page p + p { margin-top: 12px; }
.muted { color: var(--ivory-dim); font-size: 15px; }

details { background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 4px 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
details p { padding-bottom: 14px; }

/* Support form */
.form { display: grid; gap: 18px; margin-top: 18px; padding: clamp(20px, 4vw, 34px); border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line); }
.field { display: grid; gap: 7px; }
.field label { font-weight: 700; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--ivory-dim); }
input, select, textarea { width: 100%; font: 16px var(--body); color: var(--ivory); background: #0a0c12cc; border: 1px solid #ffffff2e; border-radius: 12px; padding: 12px 14px; }
textarea { min-height: 170px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: #c9cfdd; }
.check input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--accent); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { padding: 14px 16px; border-radius: 12px; font-weight: 600; }
.status.ok { background: #1f6b4a55; border: 1px solid #5fe0a688; }
.status.err { background: #6b1f2a55; border: 1px solid #ff7a8a88; }
.status:empty { display: none; }

/* Gentle reveal on scroll (skipped with Reduce Motion or without scripts) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }
