/* Fiabaland official site. Palette from the game's green-and-gold UI (art/inbox/ui/d_kit): forest night, leaf, warm gold, parchment. */
:root {
  --ink: #0c1611;
  --ink-2: #122019;
  --ink-3: #1a2c22;
  --line: rgba(226, 191, 110, 0.22);
  --line-soft: rgba(246, 238, 219, 0.08);
  --gold: #e6c374;
  --gold-2: #b98a3e;
  --gold-3: #fff0c2;
  --leaf: #93cf7f;
  --leaf-2: #5f9c55;
  --cream: #f6eedb;
  --text: #e9e3d2;
  --muted: #a9b3a5;
  --red: #e0795d;
  --radius: 14px;
  --wrap: 1180px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --font-head: "Trirong", "Noto Serif Thai", serif;
  --font-body: "Sarabun", "Noto Sans Thai", system-ui, sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 17px/1.75 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* paper grain over everything, very light */
body::after {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 100;
  opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
img, video { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-3); }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.25; margin: 0; color: var(--cream); }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.ico { width: 1.15em; height: 1.15em; flex: none; }

/* ---------------------------------------------------- buttons */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 26px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; letter-spacing: 0.01em;
  border: 1px solid transparent; cursor: pointer; transition: transform 0.18s, box-shadow 0.25s, background 0.25s, color 0.25s;
}
.btn-lg { --h: 58px; padding: 0 34px; font-size: 1.12rem; }
.btn-sm { --h: 40px; padding: 0 18px; font-size: 0.95rem; }
.btn-start {
  background: linear-gradient(180deg, #f3d891 0%, #d6a74f 55%, #a87a31 100%);
  color: #2a1c07; border-color: #fff1bf55;
  box-shadow: 0 1px 0 #fff6d6 inset, 0 8px 20px -10px rgba(0, 0, 0, 0.7);
}
.btn-start:not([disabled]):hover { transform: translateY(-2px); box-shadow: 0 1px 0 #fff6d6 inset, 0 14px 26px -10px rgba(0, 0, 0, 0.8); }
.btn-start[disabled] {
  cursor: not-allowed;
  background: linear-gradient(180deg, #4b5246 0%, #353b33 100%);
  color: #c9c6b3; border-color: rgba(230, 195, 116, 0.35);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
}
.btn-ghost { background: rgba(12, 22, 17, 0.45); border-color: rgba(246, 238, 219, 0.35); color: var(--cream); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(246, 238, 219, 0.12); border-color: var(--gold); transform: translateY(-2px); }
.btn-ghost .ico { color: var(--gold); }

/* ---------------------------------------------------- nav */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  height: 72px; padding: 0 max(20px, calc((100vw - var(--wrap)) / 2));
  transition: background 0.3s, box-shadow 0.3s, height 0.3s;
}
.nav.solid { background: rgba(10, 19, 14, 0.86); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); height: 64px; }
.nav-logo img { width: 118px; height: auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)); }
.nav-links { display: flex; gap: 6px; margin-inline-start: auto; }
.nav-links a { color: var(--text); font-weight: 500; padding: 8px 12px; border-radius: 8px; font-size: 0.98rem; position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 1px; background: var(--gold); transform: scaleX(0); transition: transform 0.25s; }
.nav-links a:hover, .nav-links a.on { color: var(--gold-3); }
.nav-links a:hover::after, .nav-links a.on::after { transform: scaleX(1); }
.nav-burger { display: none; margin-inline-start: auto; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: transparent; flex-direction: column; justify-content: center; gap: 5px; padding: 0 11px; cursor: pointer; }
.nav-burger span { height: 2px; background: var(--cream); border-radius: 2px; }

/* ---------------------------------------------------- hero */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; isolation: isolate; }
.hero-art { position: absolute; inset: -4% -3% 0; z-index: -1; }
.hero-art .layer { position: absolute; left: 0; width: 100%; object-fit: cover; will-change: transform; }
.l-far { top: 0; height: 100%; }
.l-rays { top: 0; height: 80%; mix-blend-mode: screen; opacity: 0.75; animation: rays 9s ease-in-out infinite alternate; }
.l-mist { bottom: 18%; height: 40%; opacity: 0.85; animation: mist 22s ease-in-out infinite alternate; }
.l-near { bottom: 0; height: auto; }
@keyframes rays { from { opacity: 0.45; } to { opacity: 0.85; } }
@keyframes mist { from { transform: translateX(-2%); } to { transform: translateX(2%); } }
.hero-shade { position: absolute; inset: 0; background:
  radial-gradient(ellipse 70% 55% at 50% 42%, rgba(12, 22, 17, 0) 0%, rgba(12, 22, 17, 0.35) 70%, rgba(12, 22, 17, 0.75) 100%),
  linear-gradient(180deg, rgba(12, 22, 17, 0.55) 0%, rgba(12, 22, 17, 0) 22%, rgba(12, 22, 17, 0) 60%, var(--ink) 100%); }
.hero-motes { position: absolute; inset: 0; pointer-events: none; }
.hero-motes i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: radial-gradient(circle, #fff6d2 0 22%, rgba(255, 226, 140, 0.45) 45%, rgba(255, 226, 140, 0) 70%); opacity: 0; animation: mote linear infinite; }
@keyframes mote { 0% { transform: translateY(0) translateX(0); opacity: 0; } 15% { opacity: 0.9; } 100% { transform: translateY(-46vh) translateX(var(--dx, 20px)); opacity: 0; } }
.hero-in { text-align: center; padding: 120px 20px 110px; max-width: 920px; }
.eyebrow { display: inline-block; font-family: var(--font-head); color: var(--gold-3); letter-spacing: 0.18em; font-size: 0.86rem; padding: 6px 16px; border: 1px solid var(--line); border-radius: 999px; background: rgba(12, 22, 17, 0.4); backdrop-filter: blur(6px); margin-bottom: 18px; }
.hero-logo img { width: min(600px, 86vw); height: auto; margin: 0 auto; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 30px rgba(255, 230, 160, 0.25)); }
.hero-tag { font-family: var(--font-head); font-size: clamp(1.25rem, 2.6vw, 1.75rem); font-weight: 700; color: var(--cream); text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7); margin: 6px 0 30px; }
.hero-tag span { display: block; font-family: var(--font-body); font-weight: 500; font-size: clamp(0.98rem, 1.6vw, 1.12rem); color: #dfe6d6; margin-top: 8px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.start-note { margin-top: 18px; display: inline-flex; align-items: center; gap: 10px; color: #e7e0c8; font-size: 0.95rem; text-shadow: 0 1px 8px #000; }
.start-note .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(230, 195, 116, 0); } }
.hero-scroll { position: absolute; bottom: 26px; left: 50%; translate: -50% 0; width: 26px; height: 42px; border: 1.5px solid rgba(246, 238, 219, 0.6); border-radius: 14px; }
.hero-scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold); animation: scroll 1.8s infinite; }
@keyframes scroll { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------------------------------------------------- ticker */
.ticker { border-block: 1px solid var(--line); background: linear-gradient(90deg, #142218, #1b2d20, #142218); overflow: hidden; }
.ticker-track { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 22px; width: min(var(--wrap), 100% - 40px); margin: 0 auto; padding: 13px 0; font-family: var(--font-head); color: var(--gold-3); font-size: 0.98rem; white-space: nowrap; }
.ticker-track i { width: 6px; height: 6px; transform: rotate(45deg); background: var(--gold-2); display: inline-block; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------------------------------------------------- sections */
.section { padding: clamp(80px, 11vw, 140px) 0; position: relative; }
.sec-head { text-align: center; max-width: 760px; margin: 0 auto clamp(40px, 6vw, 70px); }
.sec-head.left { text-align: left; margin-inline: 0; }
.kicker { font-family: var(--font-head); color: var(--gold); letter-spacing: 0.2em; font-size: 0.86rem; font-weight: 700; margin-bottom: 10px; }
.sec-head h2, .pets-copy h2, .forge-copy h2, .endgame h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 800; letter-spacing: -0.005em; }
.sec-sub { color: var(--muted); margin-top: 16px; font-size: 1.04rem; }
.divider { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; color: var(--gold); }
.divider::before, .divider::after { content: ""; height: 1px; width: 88px; background: linear-gradient(90deg, transparent, var(--gold-2)); }
.divider::after { transform: scaleX(-1); }
.divider svg { width: 20px; height: 20px; }
.divider.left { justify-content: flex-start; }
.divider.left::before { display: none; }

/* ---------------------------------------------------- world */
.world { background: radial-gradient(ellipse 60% 50% at 20% 0%, rgba(147, 207, 127, 0.07), transparent 70%), var(--ink); }
.lore { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.lore-art { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); position: relative; }
.lore-art::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(255, 240, 194, 0.35); border-radius: 8px; pointer-events: none; }
.lore-art img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.lede { font-family: var(--font-head); font-size: 1.28rem; line-height: 1.75; color: var(--cream); }
.lore-text strong { color: var(--gold-3); font-weight: 700; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: clamp(50px, 7vw, 90px); }
.pillar { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 300px; display: flex; align-items: flex-end; border: 1px solid var(--line-soft); }
.pillar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s; }
.pillar:hover img { transform: scale(1.05); }
.pillar::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(8, 15, 11, 0.92) 85%); z-index: 1; }
.pillar-in { position: relative; z-index: 2; padding: 24px; }
.pillar h3 { font-size: 1.4rem; margin-bottom: 6px; }
.pillar p { color: #d5dccd; font-size: 0.97rem; margin: 0; }
.journey { margin-top: clamp(50px, 7vw, 90px); display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; background: linear-gradient(180deg, var(--ink-2), var(--ink-3)); border: 1px solid var(--line); border-radius: 22px; padding: clamp(18px, 3vw, 34px); }
.journey-map img { border-radius: 12px; width: 100%; box-shadow: var(--shadow); }
.journey h3 { font-size: 1.6rem; }
.river { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 2px; counter-reset: r; }
.river li { display: grid; grid-template-columns: 38px 1fr auto auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; position: relative; }
.river li:hover { background: rgba(246, 238, 219, 0.04); }
.river b { font-family: var(--font-head); color: var(--gold-2); font-size: 0.95rem; }
.river span { font-weight: 600; color: var(--cream); }
.river em { font-style: normal; color: var(--muted); font-size: 0.88rem; }
.river small { font-size: 0.78rem; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-soft); color: var(--muted); }
.river li.open small { color: #11220f; background: var(--leaf); border-color: transparent; font-weight: 700; }
.river li.open b { color: var(--leaf); }

/* ---------------------------------------------------- classes */
.classes { background: linear-gradient(180deg, var(--ink) 0%, #0f1d16 50%, var(--ink) 100%); }
.cls-tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 28px; }
.cls-tab { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px 12px; border-radius: 14px; border: 1px solid var(--line-soft); background: rgba(246, 238, 219, 0.025); cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.2s; color: var(--muted); }
.cls-tab svg { width: 30px; height: 30px; color: var(--muted); transition: color 0.2s; }
.cls-tab b { font-family: var(--font-head); font-size: 1.02rem; color: var(--text); }
.cls-tab:hover { transform: translateY(-2px); border-color: var(--line); }
.cls-tab[aria-selected="true"] { border-color: var(--job, var(--gold)); background: linear-gradient(180deg, color-mix(in srgb, var(--job, var(--gold)) 16%, transparent), transparent); }
.cls-tab[aria-selected="true"] svg { color: var(--job, var(--gold)); }
.cls-stage { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(20px, 4vw, 54px); align-items: center; border-radius: 26px; border: 1px solid var(--line); background: radial-gradient(ellipse 60% 70% at 25% 50%, color-mix(in srgb, var(--job, var(--gold)) 14%, transparent), transparent 70%), linear-gradient(180deg, var(--ink-2), #0e1a14); padding: clamp(18px, 3vw, 40px); overflow: hidden; }
.cls-figure { position: relative; }
.cls-glow { position: absolute; inset: 12% 10% 6%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--job, var(--gold)) 45%, transparent), transparent 65%); filter: blur(30px); opacity: 0.7; }
.cls-hero { position: relative; z-index: 1; width: 100%; height: auto; aspect-ratio: 760 / 890; object-fit: contain; transition: opacity 0.35s, transform 0.5s; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.45)); }
.cls-hero.swap { opacity: 0; transform: translateY(8px) scale(0.985); }
.cls-gender { position: relative; z-index: 2; width: fit-content; margin: 6px auto 0; display: flex; padding: 4px; border-radius: 999px; background: rgba(10, 19, 14, 0.75); border: 1px solid var(--line); backdrop-filter: blur(6px); }
.cls-gender button { border: 0; background: transparent; padding: 6px 18px; border-radius: 999px; cursor: pointer; color: var(--muted); font-weight: 600; }
.cls-gender button.on { background: var(--job, var(--gold)); color: #10180f; }
.cls-element { display: inline-flex; gap: 8px; align-items: center; font-family: var(--font-head); color: var(--job, var(--gold)); letter-spacing: 0.12em; font-size: 0.88rem; margin-bottom: 8px; }
.cls-title { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 800; }
.cls-quote { font-family: "Cormorant Garamond", var(--font-head); font-style: italic; color: var(--gold-3); font-size: 1.15rem; margin: 6px 0 14px; }
.cls-quote::before { content: "“"; } .cls-quote::after { content: "”"; }
.cls-desc { color: #d6dccd; }
.cls-block { margin-top: 18px; }
.cls-block h4 { font-size: 0.86rem; letter-spacing: 0.16em; color: var(--gold); margin-bottom: 8px; font-weight: 700; }
.cls-skills { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.cls-skills li { padding: 10px 14px; border-radius: 10px; background: rgba(246, 238, 219, 0.035); border: 1px solid var(--line-soft); font-size: 0.95rem; line-height: 1.6; }
.cls-skills b { color: var(--cream); font-family: var(--font-head); margin-right: 6px; }
.cls-skills span { color: var(--muted); }
.cls-paths { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cls-paths li { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-soft); background: rgba(0, 0, 0, 0.18); }
.cls-paths b { display: block; font-family: var(--font-head); color: var(--job, var(--gold)); font-size: 0.98rem; }
.cls-paths small { color: var(--muted); font-size: 0.8rem; line-height: 1.5; display: block; margin-top: 2px; }
.cls-unique { margin-top: 18px; position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 7; background: #000; }
.cls-uvid { width: 100%; height: 100%; object-fit: cover; }
.cls-ucap { position: absolute; inset: auto 0 0 0; padding: 14px 16px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.85)); }
.cls-ucap span { font-size: 0.74rem; letter-spacing: 0.18em; color: var(--gold); display: block; font-family: var(--font-head); }
.cls-ucap b { font-family: var(--font-head); font-size: 1.25rem; color: #fff; }
.cls-ucap small { display: block; color: #d8dccf; font-size: 0.85rem; line-height: 1.45; }

/* ---------------------------------------------------- unique gallery */
.uniques { background: #0a120e; }
.ugrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ucard { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 10; border: 1px solid var(--line-soft); background: #000; cursor: pointer; }
.ucard img, .ucard video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.4s, transform 0.8s; }
.ucard video { opacity: 0; }
.ucard.playing video { opacity: 1; }
.ucard:hover img { transform: scale(1.04); }
.ucard-cap { position: absolute; inset: auto 0 0 0; padding: 14px 16px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.88)); z-index: 2; }
.ucard-cap small { color: var(--gold); font-family: var(--font-head); letter-spacing: 0.12em; font-size: 0.76rem; }
.ucard-cap b { display: block; font-family: var(--font-head); font-size: 1.18rem; color: #fff; }
.ucard::after { content: ""; position: absolute; inset: 0; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(255, 240, 194, 0); transition: box-shadow 0.3s; z-index: 3; pointer-events: none; }
.ucard:hover::after { box-shadow: inset 0 0 0 1px rgba(255, 240, 194, 0.55); }

/* ---------------------------------------------------- pets */
.pets { background: radial-gradient(ellipse 50% 60% at 85% 40%, rgba(242, 182, 90, 0.1), transparent 70%), var(--ink); }
.pets-in { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.ticks { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; }
.ticks li { padding-left: 30px; position: relative; color: #dfe5d6; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 0.62em; width: 10px; height: 10px; transform: rotate(45deg); border: 1.5px solid var(--gold); }
.soon-chip { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; border: 1px dashed var(--line); color: var(--gold-3); font-size: 0.95rem; }
.pet-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pet { text-align: center; padding: 18px 12px 20px; border-radius: 18px; background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 16%, #142219), #101b15); border: 1px solid color-mix(in srgb, var(--pc) 35%, transparent); transition: transform 0.3s; }
.pet:nth-child(2) { transform: translateY(-22px); }
.pet:hover { transform: translateY(-6px); }
.pet:nth-child(2):hover { transform: translateY(-28px); }
.pet img { width: 100%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.45)); }
.pet h3 { font-size: 1.4rem; margin-top: 8px; }
.pet-sp { color: var(--pc); font-size: 0.9rem; margin: 0; font-weight: 600; }
.pet-skill { font-size: 0.85rem; color: var(--muted); margin: 8px 0 0; }
.pet-skill b { color: var(--cream); }

/* ---------------------------------------------------- systems */
.systems { background: linear-gradient(180deg, var(--ink), #0e1a14); }
.feature { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; margin-bottom: clamp(50px, 7vw, 90px); }
.feature.flip { grid-template-columns: 1fr 1.25fr; }
.feature.flip .feature-media { order: 2; }
.feature-media { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); aspect-ratio: 16 / 9; background: #000; }
.feature-media video { width: 100%; height: 100%; object-fit: cover; }
.num { font-family: var(--font-head); font-size: 3.2rem; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--gold-2); margin-bottom: 8px; }
.feature h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 12px; }
.feature p { color: #d6dccd; }
.facts { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.facts li { padding: 10px 14px; border-left: 1px solid var(--gold-2); background: rgba(246, 238, 219, 0.03); border-radius: 0 10px 10px 0; font-size: 0.9rem; color: var(--muted); }
.facts b { display: block; color: var(--cream); font-family: var(--font-head); font-size: 0.98rem; }
.sys-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sys { border-radius: 16px; overflow: hidden; border: 1px solid var(--line-soft); background: var(--ink-2); transition: border-color 0.3s, transform 0.3s; position: relative; }
.sys:hover { border-color: var(--line); transform: translateY(-4px); }
.sys > img, .sys > video { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.sys > video { position: absolute; top: 0; left: 0; opacity: 0; transition: opacity 0.3s; }
.sys.playing > video { opacity: 1; }
.sys > div { padding: 18px 20px 22px; }
.sys .ico { width: 26px; height: 26px; color: var(--gold); margin-bottom: 8px; }
.sys h3 { font-size: 1.18rem; margin-bottom: 6px; }
.sys p { color: var(--muted); font-size: 0.93rem; margin: 0; }

/* ---------------------------------------------------- homestead */
.homestead { background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(147, 207, 127, 0.1), transparent 70%), #0d1913; }
.home-video { display: block; width: 100%; position: relative; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; padding: 0; cursor: pointer; background: #000; box-shadow: var(--shadow); }
.home-video img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; transition: transform 1s, filter 0.4s; filter: saturate(1.05); }
.home-video:hover img { transform: scale(1.03); }
.play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: rgba(12, 22, 17, 0.55); border: 1.5px solid rgba(255, 240, 194, 0.7); backdrop-filter: blur(4px); transition: transform 0.25s, background 0.25s; }
.play svg { width: 30px; height: 30px; color: var(--gold-3); margin-left: 4px; }
.home-video:hover .play, .vid:hover .play { transform: scale(1.08); background: rgba(230, 195, 116, 0.35); }
.home-video-cap { position: absolute; left: 24px; bottom: 20px; font-family: var(--font-head); color: var(--cream); text-shadow: 0 2px 10px #000; font-size: 1.05rem; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); margin: 34px 0 40px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: rgba(0, 0, 0, 0.2); }
.stats div { padding: 22px 12px; text-align: center; border-left: 1px solid var(--line-soft); }
.stats div:first-child { border-left: 0; }
.stats b { display: block; font-family: var(--font-head); font-size: clamp(2rem, 4vw, 2.8rem); color: var(--gold-3); line-height: 1.1; }
.stats span { display: block; font-weight: 600; color: var(--cream); }
.stats small { color: var(--muted); font-size: 0.82rem; }
.home-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hcard { border-radius: 16px; overflow: hidden; background: var(--ink-2); border: 1px solid var(--line-soft); }
.hcard img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.hcard h3 { font-size: 1.12rem; padding: 16px 18px 4px; }
.hcard p { padding: 0 18px 18px; margin: 0; color: var(--muted); font-size: 0.92rem; }

/* ---------------------------------------------------- forge */
.forge { background: linear-gradient(180deg, #0d1913, var(--ink)); }
.forge-in { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.forge-rules { display: grid; gap: 14px; margin: 0 0 22px; }
.forge-rules div { padding: 14px 18px; border-radius: 12px; border: 1px solid var(--line-soft); background: rgba(246, 238, 219, 0.03); }
.forge-rules dt { font-family: var(--font-head); color: var(--gold-3); font-weight: 700; }
.forge-rules dd { margin: 4px 0 0; color: var(--muted); font-size: 0.95rem; }
.fair { display: inline-flex; gap: 10px; align-items: center; color: var(--leaf); font-weight: 600; }
.item-card { --rare: #7cc0ff; position: relative; padding: 22px; border-radius: 16px; background: linear-gradient(180deg, #1c2b22, #121d17); border: 1px solid #c9a35a66; box-shadow: var(--shadow), 0 0 0 1px #00000088 inset; transform: rotate(-1.5deg); }
.item-card::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(201, 163, 90, 0.25); border-radius: 11px; pointer-events: none; }
.ic-top { display: flex; gap: 14px; align-items: center; }
.ic-icon { width: 68px; height: 68px; border-radius: 12px; display: grid; place-items: center; background: radial-gradient(circle at 40% 35%, #2c4a6a, #142233); border: 1px solid var(--rare); }
.ic-icon svg { width: 40px; height: 40px; color: #dff0ff; }
.ic-name { font-family: var(--font-head); font-size: 1.3rem; color: var(--rare); margin: 0; font-weight: 700; }
.ic-name span { color: var(--gold-3); }
.ic-stars { margin: 4px 0; display: flex; gap: 3px; }
.ic-stars svg { width: 15px; height: 15px; color: #4a564b; fill: currentColor; }
.ic-stars svg.on { color: #f1c75e; }
.ic-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.ic-tags span { font-size: 0.8rem; padding: 1px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); color: var(--muted); }
.ic-tags .rare { color: var(--rare); background: rgba(124, 192, 255, 0.12); }
.ic-stat { display: flex; align-items: baseline; gap: 10px; margin: 16px 0 10px; padding: 10px 14px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); }
.ic-stat span { color: var(--muted); font-size: 0.85rem; }
.ic-stat b { font-family: var(--font-head); font-size: 1.5rem; color: var(--cream); }
.ic-stat em { font-style: normal; color: var(--leaf); font-weight: 600; }
.ic-opts { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ic-opts li { display: flex; gap: 10px; align-items: center; font-size: 0.95rem; }
.ic-opts span { font-family: var(--font-head); font-size: 0.72rem; width: 26px; text-align: center; border-radius: 5px; padding: 1px 0; }
.ic-opts .q2 { color: #a8e09b; } .ic-opts .q2 span { background: rgba(168, 224, 155, 0.15); }
.ic-opts .q4 { color: #c39bff; } .ic-opts .q4 span { background: rgba(195, 155, 255, 0.15); }
.ic-opts .q5 { color: #ffc56b; } .ic-opts .q5 span { background: rgba(255, 197, 107, 0.18); }
.ic-note { margin: 14px 0 0; font-size: 0.8rem; color: #a3ad9f; }

/* ---------------------------------------------------- endgame */
.endgame { overflow: hidden; text-align: center; padding: clamp(100px, 14vw, 180px) 0; isolation: isolate; }
.endgame-bg { position: absolute; inset: 0; z-index: -1; }
.endgame-bg img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.6) brightness(0.45) hue-rotate(200deg); transform: scale(1.1); }
.endgame-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 50% 60% at 50% 50%, rgba(40, 18, 60, 0.35), rgba(8, 10, 14, 0.92)); }
.endgame-in { max-width: 720px; }
.endgame p { color: #d9d3e4; font-size: 1.08rem; margin-top: 16px; }
.tag-soon { display: inline-block; margin-top: 10px; font-family: var(--font-head); padding: 6px 18px; border-radius: 999px; border: 1px solid #b59cff66; color: #d9c8ff; letter-spacing: 0.1em; font-size: 0.85rem; }
.endgame .kicker { color: #c8b2ff; }

/* ---------------------------------------------------- media */
.media { background: var(--ink); }
.vids { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-bottom: 18px; }
.vid { position: relative; padding: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; cursor: pointer; background: #000; }
.vid img { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.8s; }
.vid:hover img { transform: scale(1.04); }
.vid-cap { position: absolute; left: 18px; bottom: 16px; text-align: left; text-shadow: 0 2px 10px #000; }
.vid-cap b { display: block; font-family: var(--font-head); font-size: 1.2rem; color: #fff; }
.vid-cap small { color: #dcdccc; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.g { padding: 0; border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; cursor: zoom-in; background: #000; }
.g img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 0.6s, opacity 0.3s; }
.g:hover img { transform: scale(1.05); }

/* ---------------------------------------------------- news */
.news { background: linear-gradient(180deg, var(--ink), #0e1a14); }
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post { border-radius: 18px; overflow: hidden; background: var(--ink-2); border: 1px solid var(--line-soft); display: flex; flex-direction: column; transition: border-color 0.3s, transform 0.3s; }
.post:hover { border-color: var(--line); transform: translateY(-4px); }
.post img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.post-in { padding: 20px 22px 24px; }
.post time { color: var(--muted); font-size: 0.85rem; }
.post .cat { margin-left: 10px; font-size: 0.74rem; padding: 2px 10px; border-radius: 999px; background: rgba(230, 195, 116, 0.12); color: var(--gold); font-weight: 600; }
.post h3 { font-size: 1.22rem; margin: 10px 0 8px; }
.post p { color: var(--muted); font-size: 0.93rem; margin: 0; }

/* ---------------------------------------------------- roadmap */
.road { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.road::before { content: ""; position: absolute; left: 0; right: 0; top: 19px; height: 2px; background: linear-gradient(90deg, var(--leaf), var(--gold-2) 40%, rgba(181, 156, 255, 0.6)); }
.road li { position: relative; padding: 44px 18px 0; }
.road li::before { content: ""; position: absolute; left: 18px; top: 11px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); border: 2px solid var(--gold-2); }
.road li.now::before { background: var(--leaf); border-color: var(--leaf); box-shadow: 0 0 0 6px rgba(147, 207, 127, 0.18); }
.when { font-family: var(--font-head); color: var(--gold); font-size: 0.85rem; letter-spacing: 0.1em; }
.road li.now .when { color: var(--leaf); }
.road h3 { font-size: 1.25rem; margin: 6px 0 8px; }
.road p { color: var(--muted); font-size: 0.93rem; }

/* ---------------------------------------------------- faq + requirements */
.faq-in { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(30px, 5vw, 60px); align-items: start; }
.qa details { border-bottom: 1px solid var(--line-soft); }
.qa summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; font-family: var(--font-head); font-weight: 700; color: var(--cream); font-size: 1.08rem; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; right: 6px; top: 50%; translate: 0 -50%; font-size: 1.5rem; color: var(--gold); transition: transform 0.25s; font-family: var(--font-body); }
.qa details[open] summary::after { transform: rotate(45deg); }
.qa p { color: var(--muted); padding-bottom: 16px; margin: 0; }
.req { position: sticky; top: 90px; padding: 26px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--ink-2), var(--ink-3)); }
.req h3 { font-size: 1.3rem; margin-bottom: 14px; }
.req dl { margin: 0 0 12px; display: grid; gap: 12px; }
.req dt { font-size: 0.82rem; color: var(--gold); letter-spacing: 0.08em; font-weight: 600; }
.req dd { margin: 0; color: var(--cream); }

/* ---------------------------------------------------- cta + footer */
.cta { position: relative; padding: clamp(100px, 14vw, 170px) 0; text-align: center; overflow: hidden; isolation: isolate; }
.cta-bg { position: absolute; inset: 0; z-index: -1; }
.cta-bg img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.55) saturate(1.05); }
.cta-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--ink) 0%, rgba(12, 22, 17, 0.35) 30%, rgba(12, 22, 17, 0.35) 70%, var(--ink) 100%); }
.cta-logo { width: min(420px, 80vw); height: auto; margin: 0 auto 6px; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.6)); }
.cta p { font-family: var(--font-head); font-size: 1.3rem; color: var(--cream); text-shadow: 0 2px 12px #000; margin-bottom: 24px; }
.cta .start-note { font-family: var(--font-body); font-size: 0.95rem; margin-top: 18px; }
.foot { border-top: 1px solid var(--line); background: #08100c; padding: 56px 0 28px; }
.foot-in { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; }
.foot-brand img { width: 150px; height: auto; }
.foot-brand p { color: var(--muted); margin-top: 10px; }
.foot-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.foot-nav h4 { font-size: 0.86rem; letter-spacing: 0.14em; color: var(--gold); margin-bottom: 12px; }
.foot-nav a, .foot-nav .off { display: block; color: var(--muted); padding: 3px 0; font-size: 0.95rem; }
.foot-nav a:hover { color: var(--cream); }
.off { color: #8f998c; cursor: default; }
.foot-legal { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line-soft); color: #a3ad9f; font-size: 0.86rem; }

/* ---------------------------------------------------- modal */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-back { position: absolute; inset: 0; background: rgba(4, 8, 6, 0.86); backdrop-filter: blur(6px); }
.modal-box { position: relative; width: min(1280px, 100%); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 40px 100px -20px #000; background: #000; }
.modal-body video, .modal-body img { width: 100%; max-height: 82vh; object-fit: contain; display: block; margin: 0 auto; }
.modal-x { position: absolute; top: 10px; right: 12px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.55); color: var(--cream); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.modal-x:hover { background: rgba(230, 195, 116, 0.25); }

/* ---------------------------------------------------- reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s cubic-bezier(.2,.7,.2,1), transform 0.8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.pet.reveal.in:nth-child(2) { transform: translateY(-22px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker-track, .l-rays, .l-mist, .hero-motes i, .start-note .dot, .hero-scroll span { animation: none; }
}

/* ---------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .nav-links { gap: 0; }
  .nav-links a { padding: 8px 8px; font-size: 0.92rem; }
  .home-grid { grid-template-columns: repeat(2, 1fr); }
  .cls-paths { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .nav-links { position: fixed; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 10px 20px 20px; background: rgba(10, 19, 14, 0.97); border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform 0.3s; margin: 0; }
  .nav-links.open { transform: none; }
  .nav-links a { padding: 14px 4px; border-bottom: 1px solid var(--line-soft); font-size: 1.05rem; }
  .nav-burger { display: flex; }
  .nav > .btn-start { display: none; }
  .lore, .journey, .cls-stage, .pets-in, .feature, .feature.flip, .forge-in, .faq-in, .foot-in, .vids { grid-template-columns: 1fr; }
  .feature.flip .feature-media { order: 0; }
  .pillars, .sys-grid, .posts, .ugrid, .gallery { grid-template-columns: repeat(2, 1fr); }
  .cls-tabs { grid-template-columns: repeat(3, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stats div:nth-child(4) { border-left: 0; }
  .stats div:nth-child(n+4) { border-top: 1px solid var(--line-soft); }
  .road { grid-template-columns: 1fr 1fr; row-gap: 30px; }
  .road::before { display: none; }
  .req { position: static; }
  .item-card { transform: none; max-width: 440px; margin: 0 auto; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .pillars, .sys-grid, .posts, .ugrid, .gallery, .home-grid, .pet-cards, .road, .foot-nav { grid-template-columns: 1fr; }
  .pet:nth-child(2), .pet.reveal.in:nth-child(2) { transform: none; }
  .pet-cards { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .pet h3 { font-size: 1.05rem; } .pet-skill { display: none; }
  .cls-tabs { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .cls-tab { padding: 10px 4px; } .cls-tab b { font-size: 0.9rem; }
  .facts { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(odd) { border-left: 0; } .stats div:nth-child(4) { border-left: 1px solid var(--line-soft); }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .river li { grid-template-columns: 30px 1fr auto; } .river small { display: none; }
  .hero-in { padding-top: 100px; }
  .btn-lg { --h: 52px; padding: 0 24px; }
}

/* ---------------------------------------------------- fixes after the first look */
/* Thai has no capitals: wide tracking breaks the vowels and tone marks apart, so the kickers keep a light tracking */
.kicker, .cls-block h4, .foot-nav h4, .eyebrow, .when, .req dt, .cls-ucap span, .ucard-cap small, .cls-element { letter-spacing: 0.04em; }
/* the motto: Trirong upright (no Thai italic exists; a slanted Thai face looks broken) */
.cls-quote { font-family: var(--font-head); font-style: normal; font-weight: 500; }
.pillar img.night { filter: hue-rotate(28deg) saturate(0.85) brightness(0.8); object-position: 60% 50%; }
.cls-stage { align-items: start; }
.cls-figure { position: sticky; top: 90px; }
/* the Endless Tower: a drawn silhouette with glowing windows over a violet night (no character art behind the text) */
.endgame-bg { background: radial-gradient(ellipse 60% 70% at 50% 100%, #3a1d5c 0%, #160d24 45%, #07070b 80%); }
.endgame-bg img { display: none; }
.endgame-bg::after { background: linear-gradient(180deg, var(--ink) 0%, rgba(7, 7, 11, 0) 22%, rgba(7, 7, 11, 0) 70%, rgba(140, 80, 220, 0.18) 88%, var(--ink) 100%); }
.tower { position: absolute; left: 50%; bottom: 0; translate: -50% 0; height: 96%; width: auto; opacity: 1; filter: drop-shadow(0 0 40px rgba(150, 90, 255, 0.35)); }
.tower circle { animation: flicker 3.2s ease-in-out infinite alternate; }
.tower circle:nth-child(odd) { animation-delay: -1.4s; }
@keyframes flicker { from { opacity: 0.35; } to { opacity: 1; } }
.stars { position: absolute; inset: 0; background-image:
  radial-gradient(1.2px 1.2px at 12% 18%, #fff8 50%, transparent 51%), radial-gradient(1px 1px at 28% 42%, #fff6 50%, transparent 51%),
  radial-gradient(1.4px 1.4px at 71% 12%, #fff9 50%, transparent 51%), radial-gradient(1px 1px at 84% 36%, #fff6 50%, transparent 51%),
  radial-gradient(1.2px 1.2px at 42% 8%, #fff7 50%, transparent 51%), radial-gradient(1px 1px at 92% 64%, #fff5 50%, transparent 51%),
  radial-gradient(1.3px 1.3px at 6% 58%, #fff6 50%, transparent 51%), radial-gradient(1px 1px at 58% 26%, #fff5 50%, transparent 51%); }
.endgame-in { position: relative; z-index: 1; background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(7, 7, 11, 0.72), transparent 75%); padding: 30px 20px; border-radius: 30px; }
.cta-bg img { object-position: 82% 40%; }
@media (prefers-reduced-motion: reduce) { .tower circle { animation: none; } }
@media (max-width: 900px) { .cls-figure { position: relative; top: auto; } }
@media (max-width: 600px) { .stats div:last-child { grid-column: 1 / -1; border-left: 0; } }

/* ---------------------------------------------------- browser surfaces, from the palette */
::selection { background: rgba(230, 195, 116, 0.35); color: #fff8e2; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
html { scrollbar-color: #3b4a3d #0a120e; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #0a120e; }
::-webkit-scrollbar-thumb { background: #34443a; border-radius: 8px; border: 3px solid #0a120e; }
::-webkit-scrollbar-thumb:hover { background: #4a5c4c; }
a { text-underline-offset: 3px; }
input { caret-color: var(--gold); }
/* craft floor: hairline rules only, no 2px accent bars */
.facts li { border-left-width: 1px; }
.post { color: inherit; }
.post:hover h3 { color: var(--gold-3); }

/* =========================================================================================================
   THE OPENING (one authored moment): the World Tree rises out of the dark, the emblem grows from its trunk,
   the name is written left to right and a sheen runs over the gold letters. Runs once per session (html.intro),
   skippable, never with reduced motion. Animated with the individual scale/translate properties and filter,
   so the parallax (which sets transform) keeps working underneath.
   ========================================================================================================= */
@property --grow { syntax: "<percentage>"; inherits: false; initial-value: 140%; }
@property --write { syntax: "<percentage>"; inherits: false; initial-value: 120%; }
@property --sheen { syntax: "<percentage>"; inherits: false; initial-value: -30%; }

.hero-logo { position: relative; width: min(620px, 86vw); aspect-ratio: 2 / 1; margin: 0 auto; }
.hero-logo span { position: absolute; inset: 0; }
.hero-logo img { width: 100%; height: 100%; filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.55)); }
/* the emblem: everything above the lettering; it grows out of a point on the trunk */
.logo-tree { mask-image: radial-gradient(circle at 50% 74%, #000 calc(var(--grow) - 14%), transparent var(--grow)), linear-gradient(180deg, #000 50%, transparent 56.5%); mask-composite: intersect; }
/* the name: the lower band of the same image, written in from the left */
.logo-word { mask-image: linear-gradient(90deg, #000 calc(var(--write) - 12%), transparent var(--write)), linear-gradient(180deg, transparent 50%, #000 56.5%); mask-composite: intersect; }
/* the sheen only lights the logo's own pixels: the logo is its mask */
.logo-sheen { mask: url(media/img/logo.webp) center / 100% 100% no-repeat; background: linear-gradient(105deg, transparent calc(var(--sheen) - 8%), rgba(255, 246, 214, 0.85) var(--sheen), transparent calc(var(--sheen) + 8%)); mix-blend-mode: screen; pointer-events: none; }
.logo-tree, .logo-word { --grow: 140%; --write: 120%; }

/* the skip button and the end state */
.intro-skip { position: absolute; right: 24px; bottom: 26px; z-index: 3; display: none; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(246, 238, 219, 0.35); background: rgba(8, 14, 10, 0.5); color: var(--cream); cursor: pointer; font-size: 0.9rem; backdrop-filter: blur(4px); }
.intro-skip:hover { border-color: var(--gold); }

.intro .intro-skip { display: block; animation: fade-in 0.6s 0.8s both, fade-out 0.6s 4.2s both; }
.intro .hero-art { background: #000; }
.intro .l-far { animation: far-rise 2.6s cubic-bezier(0.16, 1, 0.3, 1) both; }
.intro .l-rays { animation: rays-in 2.4s 0.7s cubic-bezier(0.16, 1, 0.3, 1) both, rays 9s 3.1s ease-in-out infinite alternate; }
.intro .l-mist { animation: mist-rise 2.6s 0.3s cubic-bezier(0.16, 1, 0.3, 1) both, mist 22s 2.9s ease-in-out infinite alternate; }
.intro .l-near { animation: near-rise 2.2s 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
.intro .hero-motes { animation: fade-in 1.4s 1.2s both; }
.intro .hero-shade { animation: shade-in 2.6s ease-out both; }
.intro .logo-tree { animation: grow 1.5s 1.5s cubic-bezier(0.3, 0.7, 0.2, 1) both; }
.intro .logo-word { animation: write 1.0s 2.55s cubic-bezier(0.45, 0, 0.2, 1) both; }
.intro .logo-sheen { animation: sheen 1.1s 3.45s cubic-bezier(0.4, 0, 0.2, 1) both; }
.intro .hero-tag { animation: rise-in 0.9s 3.55s cubic-bezier(0.16, 1, 0.3, 1) both; }
.intro .hero-cta { animation: rise-in 0.9s 3.75s cubic-bezier(0.16, 1, 0.3, 1) both; }
.intro .start-note, .intro .hero-scroll { animation: fade-in 0.8s 4.05s both; }
.intro .nav { animation: nav-in 0.8s 3.9s cubic-bezier(0.16, 1, 0.3, 1) both; }
.intro .ticker { animation: fade-in 0.8s 4.1s both; }

@keyframes far-rise { from { opacity: 0; scale: 1.16; filter: blur(14px) brightness(0.35); } 60% { opacity: 1; } to { opacity: 1; scale: 1; filter: none; } }
@keyframes rays-in { from { opacity: 0; translate: 0 -4%; } to { opacity: 0.75; translate: 0 0; } }
@keyframes mist-rise { from { opacity: 0; translate: 0 38%; } to { opacity: 0.85; translate: 0 0; } }
@keyframes near-rise { from { opacity: 0; translate: 0 22%; filter: brightness(0.3); } to { opacity: 1; translate: 0 0; filter: none; } }
@keyframes shade-in { from { opacity: 0.2; } to { opacity: 1; } }
@keyframes grow { from { --grow: 0%; opacity: 0.2; filter: brightness(1.8) saturate(0.6); } 40% { opacity: 1; } to { --grow: 140%; opacity: 1; filter: none; } }
@keyframes write { from { --write: -12%; } to { --write: 120%; } }
@keyframes sheen { from { --sheen: -30%; opacity: 1; } 85% { opacity: 1; } to { --sheen: 130%; opacity: 0; } }
@keyframes rise-in { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@keyframes nav-in { from { opacity: 0; translate: 0 -16px; } to { opacity: 1; translate: 0 0; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; visibility: hidden; } }
/* a skipped or repeat visit: a short settle, no sequence */
.intro-quick .hero-art, .intro-quick .hero-in { animation: fade-in 0.6s ease-out both; }
@media (prefers-reduced-motion: reduce) { .logo-sheen { display: none; } }
/* reduced motion: the same opening as light only (fades and the logo's mask reveals), no zoom, no travel, no looping */
@media (prefers-reduced-motion: reduce) {
  .intro .l-far, .intro .l-near { animation: fade-in 1.6s ease-out both; }
  .intro .l-rays, .intro .l-mist { animation: fade-in 1.6s 0.4s ease-out both; }
  .intro .hero-tag, .intro .hero-cta, .intro .nav { animation-name: fade-in; }
  .intro .logo-sheen { display: none; }
}

/* =========================================================================================================
   LESS TEMPLATE: headings lead from the left, one wide painting instead of three cards, a switcher instead
   of six cards, the homestead numbers as a ladder, pets standing on the page instead of in boxes. Text no
   longer fades up section by section; only the big pictures open (a clip-path wipe) as they come in.
   ========================================================================================================= */
.sec-head { text-align: left; margin-left: 0; max-width: 880px; }
.sec-head.center { text-align: center; margin-left: auto; }
.sec-head h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.15; }
.reveal { opacity: 1; transform: none; transition: none; }
.lore-art.reveal, .journey.reveal .journey-map, .panorama.reveal, .home-video.reveal, .feature.reveal .feature-media, .switch.reveal .switch-stage {
  clip-path: inset(7% 7% 7% 7% round 22px); transition: clip-path 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.lore-art.reveal.in, .journey.reveal.in .journey-map, .panorama.reveal.in, .home-video.reveal.in, .feature.reveal.in .feature-media, .switch.reveal.in .switch-stage { clip-path: inset(0 0 0 0 round 14px); }
.panorama.reveal.in { clip-path: inset(0 0 0 0 round 0); }
@media (prefers-reduced-motion: reduce) { .reveal, .reveal * { clip-path: none !important; transition: none !important; } }

/* one wide painting with the three ideas of the world written on it */
.panorama { position: relative; margin: clamp(60px, 8vw, 100px) calc(50% - 50vw) 0; width: 100vw; height: clamp(440px, 52vw, 640px); overflow: hidden; }
.panorama img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.panorama::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--ink) 0%, rgba(12, 22, 17, 0) 18%, rgba(12, 22, 17, 0) 45%, rgba(8, 14, 10, 0.92) 82%, var(--ink) 100%); }
.pano-cols { position: absolute; z-index: 1; left: 50%; bottom: 40px; translate: -50% 0; width: min(var(--wrap), 100% - 40px); display: grid; grid-template-columns: repeat(3, 1fr); }
.pano-cols > div { padding: 0 28px; border-left: 1px solid rgba(255, 240, 194, 0.28); }
.pano-cols > div:first-child { border-left: 0; padding-left: 0; }
.pano-cols h3 { font-size: 1.6rem; margin-bottom: 8px; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7); }
.pano-cols p { color: #dfe5d6; font-size: 0.98rem; margin: 0; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8); max-width: 34ch; }
.pano-cols .gloom h3 { color: #eaa98c; }
.pano-cols .tower-cap h3 { color: #d9d2bd; }

/* the systems switcher */
.switch { display: grid; grid-template-columns: 0.85fr 1.6fr; gap: clamp(20px, 3vw, 40px); align-items: start; }
.switch-list { display: grid; border-top: 1px solid var(--line-soft); }
.switch-list button { display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; text-align: left; padding: 16px 6px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; cursor: pointer; color: var(--muted); transition: color 0.2s; }
.switch-list .ico { grid-row: 1 / 3; width: 24px; height: 24px; margin-top: 3px; color: #5c6a5b; transition: color 0.2s; }
.switch-list b { font-family: var(--font-head); font-size: 1.15rem; color: var(--text); transition: color 0.2s; }
.switch-list span { font-size: 0.9rem; line-height: 1.55; display: none; }
.switch-list button:hover b { color: var(--cream); }
.switch-list button[aria-selected="true"] b { color: var(--gold-3); }
.switch-list button[aria-selected="true"] .ico { color: var(--gold); }
.switch-list button[aria-selected="true"] span { display: block; margin-top: 4px; }
.switch-stage { position: sticky; top: 96px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 9; background: #000; box-shadow: var(--shadow); }
.switch-stage video { width: 100%; height: 100%; object-fit: cover; }

/* homestead: the clip and the ladder of levels */
.home-top { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(20px, 3vw, 44px); align-items: center; margin-bottom: 40px; }
.home-top .home-video img { aspect-ratio: 16 / 10; }
.ladder { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; display: grid; gap: 22px; }
.ladder::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(180deg, var(--leaf), var(--gold) 60%, rgba(230, 195, 116, 0.2)); }
.ladder li { position: relative; }
.ladder li::before { content: ""; position: absolute; left: -26px; top: 0.55em; width: 13px; height: 13px; border-radius: 50%; background: var(--ink); border: 1px solid var(--gold); }
.ladder b { display: block; font-family: var(--font-head); font-size: 1.25rem; color: var(--cream); }
.ladder span { color: var(--muted); font-size: 0.95rem; }
.home-grid .hcard { background: transparent; border: 0; border-radius: 0; }
.home-grid .hcard img { border-radius: 12px; border: 1px solid var(--line-soft); }
.home-grid .hcard h3 { padding: 14px 0 4px; }
.home-grid .hcard p { padding: 0; }

/* pets stand on the page: no boxes, a soft ground under each */
.pet { background: none; border: 0; border-radius: 0; padding: 0 4px; }
.pet img { position: relative; z-index: 1; }
.pet::before { content: ""; display: block; height: 0; }
.pet img + h3 { margin-top: 2px; }
.pet { background: radial-gradient(ellipse 42% 9% at 50% 66%, rgba(0, 0, 0, 0.45), transparent 70%); }

@media (max-width: 900px) {
  .pano-cols { grid-template-columns: 1fr; gap: 14px; bottom: 26px; }
  .pano-cols > div { border-left: 0; padding: 0; }
  .panorama { height: 680px; }
  .panorama img { height: 58%; object-position: 50% 20%; }
  .panorama::after { background: linear-gradient(180deg, var(--ink) 0%, rgba(12, 22, 17, 0) 14%, rgba(12, 22, 17, 0) 34%, var(--ink) 58%); }
  .switch, .home-top { grid-template-columns: 1fr; }
  .switch-stage { position: relative; top: auto; order: -1; }
}

/* the class hero stands on the stage: a cut-out render (scripts/site-hero-showcase.mjs) over a soft pool of the job's light, the body/gender switch under it */
.cls-glow { inset: 8% 14% 14%; opacity: 0.45; filter: blur(40px); }
