/*
 * Pebble marketing site — single shared stylesheet.
 * Palette is transcribed 1:1 from the app's brand source of truth:
 *   mobile: src/constants/brand.ts  +  docs/14-branding-mark-concept.html
 * Dusk-navy theme, lime-green glow accent, Fredoka display font.
 */

:root {
	/* Brand palette (src/constants/brand.ts) */
	--dusk-950: #0a0d18;
	--dusk-800: #171b2c;
	--dusk-600: #2a3050;
	--surface: #12162a;
	--surface-2: #171b2c;

	--glow-core: #fff7d6;
	--glow-mid: #d7e85b; /* the pebble's light — signature accent */
	--glow-edge: #f3a94e;

	--peng-dark: #333d63;
	--peng-darker: #191f3a;
	--peng-belly: #fdf6ec;
	--peng-beak: #f7d488;
	--ink: #2b2438;
	--blush: #ff9e90;
	--heart: #ff6b6b;

	--text: #f1f0e9;
	--muted: #9096b5;
	--border: #2a3050;

	/* Fredoka for display/wordmark only; system stack for body + legal prose. */
	--font-display: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
	--font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

	--maxw: 960px;
	color-scheme: dark;
}

/* ---- Language toggle: the whole mechanism (EN default, hard-coded on <html>) ---- */
html[data-lang="en"] [lang="vi"] { display: none; }
html[data-lang="vi"] [lang="en"] { display: none; }

* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--dusk-950);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--glow-edge); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.eyebrow {
	font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--muted); font-weight: 600; margin: 0 0 10px;
}
.mark { display: block; overflow: visible; }

/* ---- Header ---- */
.site-header {
	position: sticky; top: 0; z-index: 20;
	background: rgba(10, 13, 24, 0.82);
	backdrop-filter: saturate(140%) blur(12px);
	-webkit-backdrop-filter: saturate(140%) blur(12px);
	border-bottom: 1px solid var(--border);
}
.site-header .wrap {
	display: flex; align-items: center; gap: 16px;
	height: 60px;
}
.brand-lockup { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 700; }
.brand-lockup .mark { width: 30px; height: 30px; }
.brand-lockup .name {
	font-family: var(--font-display); font-size: 21px; letter-spacing: -0.01em;
	text-shadow: 0 0 18px rgba(215, 232, 91, 0.35);
}
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.site-nav a { text-decoration: none; color: var(--muted); font-size: 14.5px; font-weight: 500; }
.site-nav a:hover { color: var(--text); }
@media (max-width: 640px) { .site-nav .nav-link { display: none; } }

/* Language pill */
.lang-toggle {
	display: inline-flex; border: 1px solid var(--border); border-radius: 999px;
	overflow: hidden; background: var(--surface);
}
.lang-toggle button {
	appearance: none; border: 0; background: transparent; color: var(--muted);
	font: inherit; font-size: 13px; font-weight: 600; padding: 5px 12px; cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] { background: var(--glow-mid); color: var(--dusk-950); }

/* ---- Hero ---- */
.hero {
	position: relative; text-align: center; overflow: hidden;
	padding: 76px 24px 72px;
	background: radial-gradient(120% 130% at 50% 6%, #151a30 0%, var(--dusk-950) 60%, #060811 100%);
}
.stars { position: absolute; inset: 0; pointer-events: none; }
.star { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #f1f0e9; }
.hero-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.hero .mark { width: 168px; height: 168px; margin: 0 auto; }
.wordmark {
	font-family: var(--font-display); font-weight: 700; font-size: 60px;
	letter-spacing: -0.01em; margin: 18px 0 6px;
	text-shadow: 0 0 34px rgba(215, 232, 91, 0.4), 0 0 8px rgba(255, 247, 214, 0.45);
}
.hero h1 {
	font-family: var(--font-display); font-weight: 600; font-size: 34px;
	line-height: 1.18; letter-spacing: -0.01em; margin: 8px auto 14px; max-width: 16ch;
	text-wrap: balance;
}
.hero-sub { font-size: 17px; color: #c3c7e0; max-width: 46ch; margin: 0 auto 26px; text-wrap: balance; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; }
.store-badge {
	display: inline-flex; align-items: center; gap: 9px;
	padding: 11px 18px; border-radius: 13px; text-decoration: none;
	background: #101426; border: 1px solid var(--border); color: var(--text);
	font-weight: 600; font-size: 14px; opacity: 0.62; cursor: default;
}
.store-badge svg { width: 20px; height: 20px; }
.store-badge small { display: block; font-size: 10px; font-weight: 500; color: var(--muted); letter-spacing: 0.02em; }
.cta-note { width: 100%; font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---- Generic section ---- */
section { padding: 64px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head h2 {
	font-family: var(--font-display); font-weight: 700; font-size: 28px;
	letter-spacing: -0.01em; margin: 8px 0 8px;
}
.section-head p { color: var(--muted); margin: 0; font-size: 16px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.step {
	background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
	padding: 24px 22px;
}
.step .num {
	display: inline-flex; align-items: center; justify-content: center;
	width: 34px; height: 34px; border-radius: 10px; margin-bottom: 14px;
	background: rgba(215, 232, 91, 0.12); color: var(--glow-mid);
	font-family: var(--font-display); font-weight: 700; font-size: 16px;
}
.step h3 { font-family: var(--font-display); font-weight: 600; font-size: 18px; margin: 0 0 6px; }
.step p { color: var(--muted); margin: 0; font-size: 14.5px; }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature {
	background: linear-gradient(180deg, var(--surface) 0%, #0e1222 100%);
	border: 1px solid var(--border); border-radius: 18px; padding: 24px 22px;
}
.feature .glyph { font-size: 24px; margin-bottom: 12px; }
.feature h3 { font-family: var(--font-display); font-weight: 600; font-size: 17px; margin: 0 0 6px; }
.feature p { color: var(--muted); margin: 0; font-size: 14.5px; }

/* Comparison table */
.compare-band { background: var(--dusk-800); }
.compare { width: 100%; border-collapse: separate; border-spacing: 0; max-width: 780px; margin: 0 auto; }
.compare th, .compare td { padding: 15px 18px; text-align: left; vertical-align: top; font-size: 15px; }
.compare thead th {
	font-family: var(--font-display); font-size: 15px; border-bottom: 1px solid var(--border);
}
.compare thead th:nth-child(3) { color: var(--glow-mid); }
.compare tbody tr td { border-bottom: 1px solid var(--border); }
.compare td:first-child { color: var(--text); font-weight: 600; width: 26%; }
.compare .them { color: var(--muted); }
.compare .us { color: var(--text); }
.compare .us::before { content: "✓ "; color: var(--glow-mid); font-weight: 700; }
@media (max-width: 640px) {
	.compare, .compare thead, .compare tbody, .compare tr, .compare th, .compare td { display: block; }
	.compare thead { display: none; }
	.compare tbody tr { border: 1px solid var(--border); border-radius: 14px; padding: 6px 4px; margin-bottom: 14px; background: var(--surface); }
	.compare tbody td { border: 0 !important; padding: 8px 16px; }
	.compare td:first-child { width: auto; font-size: 16px; padding-top: 14px; }
	.compare .them::before { content: "Swipe apps: "; color: var(--muted); font-weight: 600; }
	.compare .us::before { content: "✓ Pebble: "; color: var(--glow-mid); font-weight: 700; }
}

/* Screenshot strip */
.shots { display: flex; gap: 18px; overflow-x: auto; padding: 6px 24px 20px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.shots::-webkit-scrollbar { height: 6px; }
.shots::-webkit-scrollbar-thumb { background: var(--dusk-600); border-radius: 999px; }
.shot { flex: 0 0 auto; width: 240px; scroll-snap-align: center; text-align: center; }
.shot img { width: 240px; height: auto; border-radius: 22px; border: 1px solid var(--border); box-shadow: 0 18px 50px rgba(0,0,0,0.5); }
.shot figcaption { color: var(--muted); font-size: 13px; margin-top: 12px; }

/* Story / mascot */
.story-band { background: var(--dusk-800); }
.story-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.story-wrap blockquote {
	font-family: var(--font-display); font-style: normal; font-size: 22px; line-height: 1.5;
	border-left: 3px solid var(--glow-edge); padding-left: 22px; margin: 0; text-wrap: balance;
}
.story-wrap cite { display: block; font-family: var(--font-body); font-style: normal; font-size: 13px; color: var(--muted); margin-top: 14px; }
.story-wrap .story-img { text-align: center; }
@media (max-width: 640px) { .story-wrap { grid-template-columns: 1fr; } }

/* Download band */
.download-band { text-align: center; background: radial-gradient(120% 140% at 50% 0%, #151a30 0%, var(--dusk-950) 70%); }
.download-band h2 { font-family: var(--font-display); font-weight: 700; font-size: 30px; margin: 0 0 10px; }
.download-band p { color: var(--muted); margin: 0 auto 24px; max-width: 40ch; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 56px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.site-footer .foot-brand { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.site-footer .foot-brand .mark { width: 26px; height: 26px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.site-footer nav a:hover { color: var(--text); }
.site-footer .copy { width: 100%; color: var(--muted); font-size: 13px; }

/* ---- Legal pages ---- */
.legal { max-width: 760px; margin: 0 auto; padding: 40px 24px 80px; }
.legal h1 { font-family: var(--font-display); font-weight: 700; font-size: 32px; margin: 0 0 6px; }
.legal .updated { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.legal .lead { color: var(--muted); font-size: 14.5px; margin: 0 0 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.legal h2 { font-family: var(--font-display); font-weight: 600; font-size: 21px; margin: 34px 0 10px; }
.legal h3 { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin: 22px 0 8px; }
.legal p, .legal li { color: #d5d7e6; font-size: 15px; line-height: 1.7; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--glow-mid); text-decoration: none; }
.legal a:hover { text-decoration: underline; }
.legal .todo { color: var(--glow-edge); font-style: italic; }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.legal th { font-family: var(--font-display); color: var(--text); }
.legal td { color: var(--muted); }
.legal .back-home { display: inline-block; margin-bottom: 24px; color: var(--muted); text-decoration: none; font-size: 14px; }

/* ---- Motion (respect reduced-motion) ---- */
@media (prefers-reduced-motion: no-preference) {
	.mark--breathing .bob { animation: bob 3.2s ease-in-out infinite; }
	.mark--breathing .glow-belly { animation: glowpulse 3.2s ease-in-out infinite; }
	.star { animation: twinkle 4.5s ease-in-out infinite; }
}
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-3px) rotate(-1.5deg); } }
@keyframes glowpulse { 0%, 100% { opacity: 0.85; } 50% { opacity: 1; } }
@keyframes twinkle { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.85; } }

@media (max-width: 560px) {
	.wordmark { font-size: 46px; }
	.hero h1 { font-size: 28px; }
	.hero { padding: 56px 20px 56px; }
	section { padding: 48px 0; }
}
