/* Tideglass landing page. Palette sampled from the game's own captures:
   sky #9fdcf2, sea #5fd3d6, sand #f3d7a4, brass-orange #f7a233, coral #e9735d,
   violet #8e6bd1, ink #134a5a. */
@font-face {
	font-family: "Fredoka";
	src: url("/assets/fredoka.ttf") format("truetype");
	font-weight: 300 700;
	font-display: swap;
}

:root {
	--sky: #9fdcf2;
	--sky-2: #d6f1f9;
	--sea: #5fd3d6;
	--sea-deep: #2a8fa6;
	--sand: #f3d7a4;
	--orange: #f7a233;
	--orange-deep: #c0670f;
	--coral: #e9735d;
	--violet: #8e6bd1;
	--ink: #134a5a;
	--ink-soft: #3d6c78;
	--glass: rgba(255, 255, 255, .55);
	--glass-line: rgba(255, 255, 255, .75);
	--card: rgba(255, 255, 255, .72);
	--shadow: 0 30px 60px -28px rgba(19, 74, 90, .38), 0 8px 20px -12px rgba(19, 74, 90, .22);
	--ease: cubic-bezier(.32, .72, 0, 1);
	--r: 2rem;
}

@media (prefers-color-scheme: dark) {
	:root {
		--sky: #0f3340;
		--sky-2: #0b2630;
		--sand: #3b3326;
		--ink: #e8f7fb;
		--ink-soft: #a9d3dd;
		--glass: rgba(255, 255, 255, .08);
		--glass-line: rgba(255, 255, 255, .16);
		--card: rgba(14, 44, 54, .78);
		--shadow: 0 30px 60px -28px rgba(0, 0, 0, .6), 0 8px 20px -12px rgba(0, 0, 0, .4);
	}
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
	font-weight: 400;
	font-size: 18px;
	line-height: 1.55;
	color: var(--ink);
	background: var(--sky-2);
	-webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
b, strong { font-weight: 600; }
code { font-size: .82em; word-break: break-all; }

/* Fixed backdrop: sky into sea into sand, with soft sea-glass light orbs. */
.sky {
	position: fixed; inset: 0; z-index: -1; pointer-events: none;
	background:
		radial-gradient(40vmax 40vmax at 82% 8%, rgba(255, 244, 196, .75), transparent 60%),
		radial-gradient(30vmax 30vmax at 8% 30%, rgba(255, 255, 255, .55), transparent 65%),
		radial-gradient(26vmax 26vmax at 70% 70%, rgba(95, 211, 214, .35), transparent 70%),
		linear-gradient(180deg, var(--sky) 0%, var(--sky-2) 45%, #e9f6f1 72%, var(--sand) 100%);
}
@media (prefers-color-scheme: dark) {
	.sky {
		background:
			radial-gradient(40vmax 40vmax at 82% 8%, rgba(95, 211, 214, .18), transparent 60%),
			radial-gradient(26vmax 26vmax at 10% 70%, rgba(142, 107, 209, .16), transparent 70%),
			linear-gradient(180deg, #0f3340 0%, #0b2630 55%, #1d2a2a 100%);
	}
}

/* Floating island nav (absolute, never sticky). */
.nav-wrap { position: absolute; top: 18px; left: 0; right: 0; z-index: 2; display: flex; justify-content: center; padding: 0 16px; }
.nav {
	display: flex; align-items: center; gap: 4px; padding: 6px;
	border-radius: 999px; background: var(--glass);
	box-shadow: inset 0 0 0 1px var(--glass-line), 0 10px 30px -18px rgba(19, 74, 90, .5);
	-webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.nav a {
	text-decoration: none; font-weight: 500; font-size: 15px;
	padding: 8px 14px; border-radius: 999px;
	transition: background-color .5s var(--ease), transform .5s var(--ease);
}
.nav a:hover { background: rgba(255, 255, 255, .55); }
.nav .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; padding-left: 8px; }
.nav .brand img { border-radius: 8px; }

.eyebrow {
	display: inline-block; padding: 5px 12px; border-radius: 999px;
	font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
	color: var(--sea-deep); background: rgba(255, 255, 255, .6);
	box-shadow: inset 0 0 0 1px var(--glass-line);
}
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--sea); background: rgba(255, 255, 255, .06); } }

h1, h2 { margin: 0; font-weight: 700; line-height: 1.02; letter-spacing: -.01em; }
h2 { font-size: clamp(34px, 5vw, 56px); }

/* Double-bezel: a glass plate in a frosted tray. */
.bezel {
	padding: 8px; border-radius: var(--r);
	background: rgba(255, 255, 255, .35);
	box-shadow: inset 0 0 0 1px var(--glass-line), var(--shadow);
}
.bezel-core {
	position: relative; overflow: hidden; border-radius: calc(var(--r) - 8px);
	background: var(--card);
	box-shadow: inset 0 1px 1px rgba(255, 255, 255, .5);
}

/* Pill CTA with button-in-button trailing icon. */
.cta {
	display: inline-flex; align-items: center; gap: 12px;
	padding: 8px 8px 8px 26px; border-radius: 999px;
	font-weight: 600; font-size: 18px; text-decoration: none; color: #fff;
	background: linear-gradient(180deg, #ffb444, #f28c1c);
	box-shadow: 0 4px 0 var(--orange-deep), 0 18px 34px -14px rgba(192, 103, 15, .7), inset 0 2px 0 rgba(255, 255, 255, .45);
	text-shadow: 0 1px 0 rgba(160, 80, 0, .45);
	transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.cta-dot {
	display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px;
	background: rgba(255, 255, 255, .25); font-size: 18px; text-shadow: none;
	transition: transform .6s var(--ease);
}
.cta:hover { transform: translateY(-2px); }
.cta:hover .cta-dot { transform: translate(3px, -1px) scale(1.06); }
.cta:active { transform: translateY(3px) scale(.98); box-shadow: 0 1px 0 var(--orange-deep), 0 8px 20px -12px rgba(192, 103, 15, .7); }
.ghost {
	display: inline-flex; align-items: center; padding: 14px 20px; border-radius: 999px;
	font-weight: 500; text-decoration: none;
	background: rgba(255, 255, 255, .4); box-shadow: inset 0 0 0 1px var(--glass-line);
	transition: background-color .6s var(--ease);
}
.ghost:hover { background: rgba(255, 255, 255, .7); }
@media (prefers-color-scheme: dark) { .ghost { background: rgba(255, 255, 255, .06); } .ghost:hover { background: rgba(255, 255, 255, .12); } }
.fine { font-size: 14px; color: var(--ink-soft); margin: 0; }

/* Hero: copy on the left, the playable game is the focal point. */
.hero {
	min-height: 100dvh;
	display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
	gap: clamp(32px, 6vw, 96px);
	max-width: 1220px; margin: 0 auto;
	padding: 110px clamp(20px, 5vw, 56px) 64px;
}
.hero-copy { display: grid; gap: 22px; justify-items: start; max-width: 34rem; }
.hero h1 {
	font-size: clamp(64px, 10vw, 132px);
	color: #fff;
	text-shadow: 0 5px 0 var(--sea-deep), 0 24px 50px rgba(19, 74, 90, .28);
}
@media (prefers-color-scheme: dark) { .hero h1 { text-shadow: 0 5px 0 #0a5d70, 0 24px 50px rgba(0, 0, 0, .5); } }
.pitch { margin: 0; font-size: clamp(20px, 2.1vw, 25px); line-height: 1.45; color: var(--ink); max-width: 30ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.hero-stage { display: grid; gap: 12px; justify-items: center; }
.hero-stage .bezel { padding: 10px; border-radius: 2.4rem; }
#stage {
	border-radius: calc(2.4rem - 10px);
	width: min(430px, calc((100dvh - 190px) * .45));
	min-width: 300px;
	aspect-ratio: 1080 / 2400;
	background: #9fdcf2;
}
#stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
/* Fullscreen: the stage fills the screen and the player inside letterboxes. */
#stage:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; background: linear-gradient(180deg, #9fdcf2, #5fd3d6 70%, #f3d7a4); }
#stage:-webkit-full-screen { width: 100vw; height: 100vh; border-radius: 0; }
#stage.pseudo-fs {
	position: fixed; inset: 0; z-index: 10; width: 100vw; height: 100dvh; min-width: 0;
	aspect-ratio: auto; border-radius: 0; background: linear-gradient(180deg, #9fdcf2, #5fd3d6 70%, #f3d7a4);
}
body.pseudo-fs-on { overflow: hidden; }
.exit-fs {
	position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 11;
	appearance: none; border: 0; font: inherit; font-weight: 600; font-size: 15px;
	padding: 10px 16px; border-radius: 999px; color: var(--ink);
	background: rgba(255, 255, 255, .9); box-shadow: 0 8px 20px -10px rgba(19, 74, 90, .6);
}
.stage-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; width: 100%; padding: 0 6px; }
.stage-hint { font-size: 14px; color: var(--ink-soft); }
.fs-btn {
	appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 15px;
	color: var(--ink); padding: 10px 18px; border-radius: 999px; white-space: nowrap;
	background: rgba(255, 255, 255, .6); box-shadow: inset 0 0 0 1px var(--glass-line), 0 8px 20px -14px rgba(19, 74, 90, .6);
	transition: transform .5s var(--ease), background-color .5s var(--ease);
}
.fs-btn:hover { background: rgba(255, 255, 255, .85); }
.fs-btn:active { transform: scale(.97); }
@media (prefers-color-scheme: dark) { .fs-btn { background: rgba(255, 255, 255, .1); } .fs-btn:hover { background: rgba(255, 255, 255, .18); } }

/* How to play: a real capture beside three steps. */
.how {
	max-width: 1120px; margin: 0 auto;
	padding: clamp(80px, 12vw, 150px) clamp(20px, 5vw, 56px);
	display: grid; grid-template-columns: minmax(240px, 380px) minmax(0, 1fr);
	gap: clamp(40px, 7vw, 110px); align-items: center;
}
.how-shot { margin: 0; }
.tilt-l { transform: rotate(-3deg); }
.how-copy { display: grid; gap: 22px; justify-items: start; }
.steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.steps li {
	counter-increment: step; position: relative;
	padding: 20px 24px 20px 78px; border-radius: 1.5rem;
	background: var(--card); box-shadow: inset 0 0 0 1px var(--glass-line), 0 18px 40px -30px rgba(19, 74, 90, .5);
	color: var(--ink-soft);
}
.steps li b { display: block; color: var(--ink); font-size: 21px; margin-bottom: 2px; }
.steps li::before {
	content: counter(step); position: absolute; left: 20px; top: 20px;
	width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
	font-weight: 700; color: #fff; font-size: 20px;
	box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 3px 0 rgba(0, 0, 0, .15);
}
.steps li:nth-child(1)::before { background: var(--sea-deep); }
.steps li:nth-child(2)::before { background: var(--coral); }
.steps li:nth-child(3)::before { background: var(--violet); }

/* Features strip: uneven glass chips, not a card grid. */
.features { max-width: 1120px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px); }
.chips {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 14px;
}
.chip {
	display: grid; align-content: end; gap: 2px; min-height: 140px;
	padding: 22px 24px; border-radius: 1.6rem;
	background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line), 0 18px 40px -30px rgba(19, 74, 90, .5);
}
.chip strong { font-size: 26px; line-height: 1.1; }
.chip span { color: var(--ink-soft); font-size: 15px; }
.chip.big { grid-row: span 2; background: linear-gradient(160deg, rgba(95, 211, 214, .55), rgba(255, 255, 255, .45)); }
.chip.big strong { font-size: clamp(88px, 11vw, 140px); line-height: .9; color: #fff; text-shadow: 0 4px 0 var(--sea-deep); }
.chip.big span { font-size: 20px; color: var(--ink); font-weight: 500; }
.chip.wide { grid-column: span 3; background: linear-gradient(100deg, rgba(247, 162, 51, .28), rgba(255, 255, 255, .45)); }

/* Screenshots rail. */
.screens { padding: clamp(80px, 12vw, 150px) 0 clamp(40px, 6vw, 80px); }
.screens-head { max-width: 1120px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px); display: grid; gap: 16px; justify-items: start; }
.screens-head p { margin: 0; color: var(--ink-soft); max-width: 52ch; }
.rail {
	display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 24vw, 280px); gap: 26px;
	overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: clamp(20px, 5vw, 56px);
	padding: 44px clamp(20px, 5vw, 56px) 30px;
	scrollbar-width: thin;
}
.rail:focus-visible { outline: 3px solid var(--sea-deep); outline-offset: -3px; }
.shot { margin: 0; scroll-snap-align: start; }
.shot .bezel { border-radius: 1.8rem; transition: transform .8s var(--ease); }
.shot .bezel-core { border-radius: calc(1.8rem - 8px); }
.shot:nth-child(odd) .bezel { transform: rotate(-1.5deg); }
.shot:nth-child(even) .bezel { transform: rotate(1.5deg) translateY(18px); }
.shot:hover .bezel { transform: rotate(0) translateY(-6px); }
.shot figcaption { margin-top: 30px; font-size: 15px; font-weight: 500; color: var(--ink-soft); text-align: center; }

/* Android test build. */
.android { max-width: 1120px; margin: 0 auto; padding: clamp(60px, 9vw, 120px) clamp(20px, 5vw, 56px); }
.android .bezel { border-radius: 2.4rem; }
.android-core {
	border-radius: calc(2.4rem - 8px);
	display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: center;
	padding: clamp(28px, 5vw, 56px);
	background: linear-gradient(135deg, var(--card), rgba(142, 107, 209, .14));
}
.android-core h2 { margin: 16px 0 14px; font-size: clamp(30px, 4vw, 46px); }
.android-core p { margin: 0; color: var(--ink-soft); }
.apk { display: grid; gap: 14px; justify-items: start; }

.foot { padding: 40px clamp(20px, 5vw, 56px) calc(48px + env(safe-area-inset-bottom)); text-align: center; }
.foot p { margin: 0; font-size: 15px; color: var(--ink-soft); }

/* Scroll reveal (only when JS is on; content is visible without it). */
.js .reveal { opacity: 0; transform: translateY(40px); filter: blur(6px); transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; filter: none; }
.js .shot.reveal.in .bezel { transition-delay: 0s; }

@media (max-width: 900px) {
	.hero { grid-template-columns: 1fr; justify-items: center; text-align: center; padding-top: 92px; gap: 28px; min-height: 0; }
	.hero-copy { justify-items: center; }
	.cta-row { justify-content: center; }
	#stage { width: min(92vw, calc((100dvh - 140px) * .45)); min-width: 0; }
	.hero-stage { width: 100%; }
	.stage-bar { max-width: min(92vw, calc((100dvh - 140px) * .45 + 20px)); }
	.how { grid-template-columns: 1fr; }
	.how-shot { max-width: 300px; margin: 0 auto; }
	.tilt-l { transform: none; }
	.chips { grid-template-columns: 1fr 1fr; }
	.chip.big { grid-row: auto; grid-column: span 2; min-height: 0; }
	.chip.wide { grid-column: span 2; }
	.android-core { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
	body { font-size: 17px; }
	.nav a:not(.brand) { padding: 8px 10px; font-size: 14px; }
	.nav .brand { font-size: 0; gap: 0; padding: 4px; }
	.nav-wrap { top: 12px; }
	.hero { padding-top: 76px; gap: 20px; }
	.hero-copy { gap: 12px; }
	.hero-copy .eyebrow, .hero-copy .fine, .hero-copy .ghost { display: none; }
	.hero h1 { font-size: clamp(52px, 15vw, 72px); }
	.pitch { font-size: 18px; }
	.cta { font-size: 16px; padding: 6px 6px 6px 20px; }
	.cta-dot { width: 32px; height: 32px; }
	.stage-hint { display: none; }
	.stage-bar { justify-content: center; }
	.shot .bezel, .shot:nth-child(even) .bezel { transform: none; }
	.chip { min-height: 110px; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.js .reveal { opacity: 1; transform: none; filter: none; transition: none; }
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
