/* Hattama landing: the deck's title frame as a web page. Onest, the blue-hour city, the indigo-blue-cyan bar of the S0 lock-up.
   Gold appears once: the plate, a flat echo of the plaque on the deck's rack. */
@font-face { font-family: 'Onest'; src: url('Onest-sub.woff') format('woff'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #151b2f;
  --title: #f4f3ef;
  --text: #eef0f6;
  --sub: #b9bfd2;
  --line: rgba(160, 170, 220, .24);
  --a: #6c5cff; --b: #3e86ff; --c: #1fc3f2;
  --gold-hi: #f7e6ab; --gold: #e3bd5e; --gold-lo: #c4952f; --gold-ink: #2b2208;
  --pad: 24px;
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  position: relative; overflow-x: hidden;
}

/* ---------- the scene (the deck's world, no text) ---------- */
.scene { position: absolute; inset: 0 0 auto 0; height: 470px; overflow: hidden; pointer-events: none; }
.scene img { position: absolute; right: -6px; top: -120px; width: auto; height: 760px; max-width: none; display: block; }
.scene::after { content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(21, 27, 47, .35) 0%, rgba(21, 27, 47, 0) 18%, rgba(21, 27, 47, .15) 45%, rgba(21, 27, 47, .85) 80%, var(--bg) 100%); }

/* ---------- layout (phone first) ---------- */
.page {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  padding: 24px var(--pad) 28px;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-right: max(var(--pad), env(safe-area-inset-right));
  padding-bottom: max(28px, calc(env(safe-area-inset-bottom) + 16px));
  padding-left: max(var(--pad), env(safe-area-inset-left));
  max-width: 720px;
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the plate */
.plate {
  position: relative; margin: 0 0 18px; padding: 12px 18px 11px; border-radius: 10px;
  color: var(--gold-ink);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, .34) 48%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(150deg, var(--gold-hi) 0%, var(--gold) 46%, var(--gold-lo) 100%);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .38), inset 0 0 0 1px rgba(255, 244, 205, .7), inset 0 0 0 4px rgba(150, 105, 20, .0), inset 0 -2px 0 rgba(120, 82, 12, .35);
  font-size: 15px; line-height: 1.3; font-weight: 600; letter-spacing: -0.005em;
}
.plate::before { content: ''; position: absolute; inset: 5px; border-radius: 6px; border: 1px solid rgba(120, 82, 12, .38); pointer-events: none; }
.plate .place { display: block; font-size: 27px; line-height: 1.1; font-weight: 740; letter-spacing: -0.03em; margin-bottom: 4px; }
.plate .dot { display: none; }
.plate .event, .plate .track { white-space: nowrap; }
.plate .event::after { content: ' · '; }
.plate .of { display: block; margin-top: 9px; padding-top: 8px; border-top: 1px solid rgba(120, 82, 12, .35); font-weight: 520; font-size: 14px; color: rgba(43, 34, 8, .82); }

/* the lock-up: bar + name + team + description */
.lock { display: flex; gap: 18px; align-items: stretch; margin: 0 0 22px; }
.bar { flex: none; width: 5px; border-radius: 3px; background: linear-gradient(180deg, var(--a), var(--b) 55%, var(--c)); transform-origin: 50% 0; }
.lock-text { min-width: 0; }
h1 { margin: 0; font-weight: 400; display: flex; flex-direction: column; }
.name { font-size: clamp(56px, calc((100vw - 71px) / 4.05), 104px); line-height: 1; font-weight: 720; letter-spacing: -0.045em; color: var(--title); padding-top: .02em; margin-left: -.03em; }
.team { margin-top: 10px; font-size: 20px; line-height: 1; font-weight: 520; letter-spacing: .06em; color: var(--sub); }
.lede { margin: 14px 0 0; max-width: 21em; font-size: 17px; line-height: 1.42; font-weight: 440; color: var(--text); text-wrap: pretty; }

/* the main button */
.play {
  display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; min-height: 60px; padding: 14px 22px;
  border-radius: 14px; background: var(--title); color: var(--gold-ink); color: #1d2240; text-decoration: none;
  font-size: 18px; font-weight: 620; letter-spacing: -0.01em;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  transition: transform .18s ease, box-shadow .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.play-ico { width: 32px; height: 32px; flex: none; }
.play:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(31, 195, 242, .22), 0 10px 30px rgba(0, 0, 0, .35); }
.play:active { transform: translateY(0); }

/* contacts */
.contact { width: 100%; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.contact h2 { margin: 0 0 4px; font-size: 14px; line-height: 1.3; font-weight: 500; color: var(--sub); }
.contact ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.contact a { display: flex; align-items: center; gap: 12px; min-height: 48px; color: var(--text); text-decoration: none; font-size: 16px; -webkit-tap-highlight-color: transparent; }
.contact svg { width: 22px; height: 22px; flex: none; color: var(--sub); transition: color .18s ease; }
.contact b { font-weight: 560; color: var(--sub); margin-right: .1em; }
.contact a span { text-decoration: underline; text-decoration-color: rgba(185, 191, 210, .35); text-underline-offset: .28em; text-decoration-thickness: 1px; transition: text-decoration-color .18s ease; overflow-wrap: anywhere; }
.contact a:hover svg { color: var(--c); }
.contact a:hover span { text-decoration-color: var(--c); }

:focus-visible { outline: 3px solid var(--c); outline-offset: 3px; border-radius: 6px; }
.play:focus-visible { border-radius: 14px; }

/* the RU/EN switch (both pages): a small pill in the top corner */
.lang { position: absolute; z-index: 2; top: max(14px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); display: flex; padding: 3px; border-radius: 999px;
  background: rgba(21, 27, 47, .62); box-shadow: inset 0 0 0 1px var(--line); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lang a { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 36px; padding: 0 12px; border-radius: 999px; color: var(--sub); text-decoration: none;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; -webkit-tap-highlight-color: transparent; transition: color .18s ease; }
.lang a:hover { color: var(--title); }
.lang a[aria-current] { background: var(--title); color: #1d2240; }
@media (min-width: 760px) { .lang { top: 28px; right: clamp(24px, 4vw, 64px); } }

/* ---------- one load sequence: the bar is drawn, the lock-up settles, the plate lights ---------- */
@keyframes draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes settle { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .scene img { animation: fade 1.1s ease-out both; }
  .bar { animation: draw .8s cubic-bezier(.2, .7, .2, 1) .15s both; }
  .name { animation: settle .7s cubic-bezier(.2, .7, .2, 1) .3s both; }
  .team, .lede { animation: settle .7s cubic-bezier(.2, .7, .2, 1) .5s both; }
  .plate { animation: settle .7s cubic-bezier(.2, .7, .2, 1) .8s both; }
  .play, .contact { animation: fade .6s ease-out 1s both; }
}

/* ---------- wide screens: the deck's S0 frame, the lock-up on the left, the rack at lower right ---------- */
@media (min-width: 760px) {
  :root { --pad: clamp(48px, 6.7vw, 96px); }
  .scene { height: 100vh; height: 100svh; }
  .scene img { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
  .scene::after { background:
    linear-gradient(100deg, rgba(21, 27, 47, .9) 0%, rgba(21, 27, 47, .7) 34%, rgba(21, 27, 47, 0) 66%),
    radial-gradient(ellipse 60% 40% at 18% 100%, rgba(21, 27, 47, .75), rgba(21, 27, 47, 0)),
    linear-gradient(180deg, rgba(21, 27, 47, .35) 0%, rgba(21, 27, 47, 0) 30%, rgba(21, 27, 47, 0) 70%, rgba(21, 27, 47, .5) 100%); }
  .page { justify-content: center; padding-top: 48px; padding-bottom: 48px; max-width: none; }
  .plate { margin-bottom: 34px; padding: 18px 30px 16px; font-size: 20px; border-radius: 12px; }
  .plate::before { inset: 6px; border-radius: 7px; }
  .plate .place { font-size: 38px; margin-bottom: 5px; }
  .plate .of { margin-top: 11px; padding-top: 10px; font-size: 16px; }
  .lock { gap: 30px; margin-bottom: 36px; }
  .bar { width: 8px; border-radius: 4px; }
  .name { font-size: clamp(96px, min(10.2vw, 15.5vh), 168px); }
  .team { margin-top: 20px; font-size: clamp(26px, 2.6vw, 44px); }
  .lede { margin-top: 28px; max-width: 24em; font-size: clamp(20px, 1.9vw, 28px); line-height: 1.4; }
  .play { width: auto; min-width: 320px; min-height: 64px; padding: 14px 32px 14px 24px; font-size: 20px; }
  .contact { width: auto; margin-top: 34px; padding-top: 0; border-top: 0; }
  .contact h2 { margin-bottom: 6px; }
  .contact ul { flex-direction: row; gap: 36px; }
  .contact a { min-height: 44px; font-size: 17px; }
}

/* a low landscape phone: keep everything on one screen */
@media (max-height: 520px) and (min-width: 560px) {
  .page { padding-top: 12px; padding-bottom: 12px; }
  .plate { margin-bottom: 10px; padding: 7px 16px 7px; font-size: 14px; }
  .plate .place { font-size: 15px; margin-bottom: 2px; }
  .plate .of { margin-top: 4px; padding-top: 4px; font-size: 12px; }
  .lock { margin-bottom: 10px; gap: 16px; }
  .bar { width: 5px; }
  .name { font-size: 56px; }
  .team { margin-top: 4px; font-size: 16px; }
  .lede { margin-top: 8px; font-size: 14px; max-width: 32em; line-height: 1.35; }
  .play { min-height: 44px; padding-top: 6px; padding-bottom: 6px; min-width: 260px; font-size: 16px; }
  .contact { margin-top: 8px; }
  .contact h2 { display: none; }
  .contact a { min-height: 44px; font-size: 15px; }
}
