/* Wordie — site styles. Tek dosya, build adımı yok.

   Palet uygulamadan geliyor: app ikonunun mürekkep siyahı ve kağıt kremi
   taşıyıcı, turuncu tek vurgu rengi (uygulamada en sık kullanılan named renk,
   Color(red: 0.95, green: 0.50, blue: 0.00) ≈ #f28000). */

:root {
	--bg: #faf7f0;
	--bg-raised: #ffffff;
	--bg-sunken: #f3eee4;
	--text: #14120f;
	--text-2: #4a443b;
	--text-muted: #7d7568;
	--border: #e6dfd1;
	--border-strong: #d5cbb8;
	--accent: #d96b00;
	--accent-ink: #c25f00;
	--accent-soft: #fbeddb;
	--shadow-sm: 0 1px 2px rgba(20, 18, 15, 0.05);
	--shadow-md: 0 4px 16px -6px rgba(20, 18, 15, 0.14);
	--shadow-lg: 0 28px 60px -28px rgba(20, 18, 15, 0.4);
	/* Wordmark PNG'si düz beyaz + alfa. Açık temada invert ile mürekkep
	   siyahına dönüyor, koyu temada olduğu gibi kalıyor. */
	--mark-filter: invert(1);
	--screen: #ffffff;
	--radius: 16px;
	--radius-lg: 22px;
	--maxw: 1120px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0d0c0a;
		--bg-raised: #17150f;
		--bg-sunken: #060505;
		--text: #f7f4ec;
		--text-2: #c9c1b1;
		--text-muted: #948b7c;
		--border: #292520;
		--border-strong: #3a342b;
		--accent: #f9a13c;
		--accent-ink: #fbbe6b;
		--accent-soft: #2b2114;
		--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
		--shadow-md: 0 4px 18px -6px rgba(0, 0, 0, 0.7);
		--shadow-lg: 0 30px 70px -30px rgba(0, 0, 0, 0.9);
		--mark-filter: none;
		--screen: #1d1a14;
	}
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
		Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 17px;
	line-height: 1.65;
	letter-spacing: -0.006em;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

a {
	color: var(--accent-ink);
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

img,
svg {
	max-width: 100%;
}

.wrap {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 28px;
}

@media (max-width: 560px) {
	.wrap {
		padding: 0 20px;
	}
}

/* İkonlar inline SVG, hepsi currentColor ile boyanıyor. */
.i {
	width: 20px;
	height: 20px;
	flex: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
	fill: none;
}

/* ---------- header ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: color-mix(in srgb, var(--bg) 82%, transparent);
	backdrop-filter: saturate(180%) blur(14px);
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s ease;
}

.site-header.scrolled {
	border-bottom-color: var(--border);
}

.site-header .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	height: 64px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	font-size: 17px;
	color: var(--text);
	text-decoration: none;
	letter-spacing: -0.02em;
}

.brand .mark {
	height: 21px;
	width: auto;
	filter: var(--mark-filter);
}

.nav {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
}

.nav a {
	color: var(--text-muted);
	text-decoration: none;
	padding: 7px 12px;
	border-radius: 9px;
	transition: color 0.15s ease, background 0.15s ease;
}

.nav a:hover {
	color: var(--text);
	background: var(--bg-sunken);
}

.nav a.active {
	color: var(--text);
	font-weight: 550;
}

.nav .btn {
	padding: 8px 16px;
	font-size: 14.5px;
}

@media (max-width: 720px) {
	.nav a.hide-sm {
		display: none;
	}
}

/* ---------- buttons ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 13px 24px;
	border-radius: 12px;
	border: 1px solid transparent;
	font-size: 16px;
	font-weight: 550;
	letter-spacing: -0.01em;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.12s ease, background 0.15s ease,
		border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
	transform: translateY(1px);
}

.btn-primary {
	background: var(--text);
	color: var(--bg);
	box-shadow: var(--shadow-md);
}

.btn-primary:hover {
	background: color-mix(in srgb, var(--text) 86%, var(--accent));
}

.btn-primary .i {
	stroke-width: 1.4;
}

.btn-ghost {
	background: transparent;
	color: var(--text);
	border-color: var(--border-strong);
}

.btn-ghost:hover {
	background: var(--bg-raised);
	box-shadow: var(--shadow-sm);
}

/* ---------- hero ---------- */

/* Üst kenara oturan yumuşak sıcak ışık — düz zemini kırıyor.
   Bitiş durağı `transparent` DEĞİL: srgb'de transparent siyaha çözülüyor ve
   gradient'in kenarında gri bir sınır bırakıyor. Aynı rengin alfa-sıfır hâli
   temiz sönüyor. Gradient hero'nun kendi kutusunda, ayrı bir katman değil —
   böylece dar ekranlarda viewport'u taşıp kesik bir dikdörtgen bırakmıyor. */
.hero {
	position: relative;
	padding: 76px 0 96px;
	background: radial-gradient(
		74% 380px at 50% -40px,
		color-mix(in srgb, var(--accent) 15%, transparent),
		color-mix(in srgb, var(--accent) 0%, transparent)
	);
}

.hero .wrap {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
	gap: 64px;
	align-items: center;
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 13px 6px 9px;
	margin-bottom: 26px;
	border: 1px solid var(--border);
	background: var(--bg-raised);
	border-radius: 999px;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--text-2);
	box-shadow: var(--shadow-sm);
}

.eyebrow .dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--accent);
}

h1 {
	margin: 0 0 22px;
	font-size: clamp(40px, 5.6vw, 62px);
	line-height: 1.03;
	letter-spacing: -0.035em;
	font-weight: 620;
}

h1 .quiet {
	color: var(--text-muted);
}

.lede {
	margin: 0 0 34px;
	max-width: 30em;
	font-size: clamp(17px, 1.4vw, 19px);
	line-height: 1.6;
	color: var(--text-2);
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.hero-note {
	margin: 20px 0 0;
	font-size: 14px;
	color: var(--text-muted);
}

@media (max-width: 940px) {
	.hero {
		padding: 56px 0 72px;
	}

	.hero .wrap {
		grid-template-columns: minmax(0, 1fr);
		gap: 52px;
		text-align: center;
		justify-items: center;
	}

	.lede {
		margin-left: auto;
		margin-right: auto;
	}

	.hero-actions {
		justify-content: center;
	}
}

/* ---------- hero: telefon içindeki canlı demo ---------- */

.demo {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
}

/* Sayfanın dil seçici. Native <select>: mobilde iOS'un kendi seçicisini
   açıyor, klavyeyle gezilebiliyor ve hiç JS menüsü gerektirmiyor. Ok işareti
   inline SVG olarak gömülü — CSP dışarıdan istek yaptırmıyor. */
.lang-select {
	appearance: none;
	font: inherit;
	font-size: 14.5px;
	color: var(--text-muted);
	background-color: transparent;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%237d7568' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 10px;
	border: 1px solid var(--border);
	border-radius: 9px;
	padding: 7px 28px 7px 12px;
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.lang-select:hover {
	color: var(--text);
	border-color: var(--border-strong);
}

/* Açılan liste sistem çizimi: seçeneklerin okunur kalması için renkleri
   temadan veriyoruz, aksi halde koyu temada beyaz üstüne beyaz çıkıyor. */
.lang-select option {
	background: var(--bg-raised);
	color: var(--text);
}

@media (max-width: 560px) {
	.lang-select {
		font-size: 13.5px;
		padding: 6px 24px 6px 9px;
		background-position: right 8px center;
	}
}

.demo-note {
	margin: 0;
	font-size: 13.5px;
	color: var(--text-muted);
}

.phone {
	position: relative;
	width: 100%;
	max-width: 326px;
	aspect-ratio: 326 / 616;
	margin: 0 auto;
	padding: 11px;
	border-radius: 46px;
	background: linear-gradient(150deg, #2c2822, #0c0b09 55%);
	box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.phone-screen {
	position: relative;
	height: 100%;
	border-radius: 36px;
	/* Kasıtlı olarak --bg-raised değil: koyu temada ekran, çerçevenin siyahından
	   ayrılmazsa telefon düz bir leke gibi duruyor. */
	background: var(--screen);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	text-align: left;
}

.phone-notch {
	position: absolute;
	top: 9px;
	left: 50%;
	transform: translateX(-50%);
	width: 88px;
	height: 22px;
	border-radius: 999px;
	background: #0c0b09;
	z-index: 3;
}

.reader-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 42px 20px 12px;
	font-size: 12.5px;
	color: var(--text-muted);
	border-bottom: 1px solid var(--border);
}

.reader-bar strong {
	color: var(--text);
	font-weight: 550;
	font-size: 13px;
}

.reader-body {
	flex: 1;
	padding: 20px 20px 0;
	font-size: 16.5px;
	line-height: 1.85;
	color: var(--text);
	overflow: hidden;
}

.reader-body p {
	margin: 0 0 14px;
}

/* Japonca furigana. Satır yüksekliği zaten geniş, rt kendi yerini buluyor. */
.reader-body ruby rt {
	font-size: 0.5em;
	color: var(--text-muted);
	font-weight: 400;
}

.reader-body p[lang="ja"],
.reader-body p[lang="ko"] {
	line-height: 2.1;
}

/* Metindeki dokunulabilir kelimeler. */
.w {
	cursor: pointer;
	border-radius: 4px;
	padding: 1px 1px;
	transition: background 0.15s ease, color 0.15s ease;
	-webkit-tap-highlight-color: transparent;
}

.w:hover {
	background: var(--accent-soft);
}

.w.is-active {
	background: var(--accent);
	color: #fff;
}

@media (prefers-color-scheme: dark) {
	.w.is-active {
		color: #17150f;
	}
}

.reader-hint {
	margin-top: 18px;
	font-size: 12.5px;
	color: var(--text-muted);
	display: flex;
	align-items: center;
	gap: 7px;
}

.reader-hint .i {
	width: 15px;
	height: 15px;
}

/* Alttan çıkan sözlük kartı. */
.lookup {
	border-top: 1px solid var(--border);
	background: var(--bg-sunken);
	padding: 16px 20px 22px;
	transform: translateY(0);
	transition: opacity 0.22s ease, transform 0.22s ease;
}

.lookup[hidden] {
	display: block;
	opacity: 0;
	transform: translateY(14px);
	pointer-events: none;
	visibility: hidden;
}

.lookup-head {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-wrap: wrap;
}

.lookup-word {
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.lookup-ipa {
	font-size: 13.5px;
	color: var(--text-muted);
}

.lookup-pos {
	font-size: 11.5px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--accent-ink);
	background: var(--accent-soft);
	padding: 2px 7px;
	border-radius: 5px;
}

.lookup-gloss {
	margin: 7px 0 14px;
	font-size: 15px;
	color: var(--text-2);
}

.lookup-actions {
	display: flex;
	gap: 8px;
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 12px;
	border-radius: 9px;
	border: 1px solid var(--border-strong);
	background: var(--bg-raised);
	font-size: 13px;
	color: var(--text-2);
}

.chip .i {
	width: 15px;
	height: 15px;
}

.chip.solid {
	background: var(--text);
	border-color: var(--text);
	color: var(--bg);
}

/* ---------- sections ---------- */

section {
	padding: 96px 0;
}

.section-head {
	max-width: 40rem;
	margin: 0 0 44px;
}

.section-head.center {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

.kicker {
	margin: 0 0 12px;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--accent-ink);
}

.section-head h2 {
	margin: 0 0 14px;
	font-size: clamp(30px, 3.8vw, 42px);
	line-height: 1.1;
	letter-spacing: -0.03em;
	font-weight: 620;
}

.section-head p {
	margin: 0;
	font-size: 18px;
	color: var(--text-2);
}

/* ---------- bento ---------- */

.bento {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 16px;
}

.tile {
	grid-column: span 2;
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--bg-raised);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 26px;
	box-shadow: var(--shadow-sm);
	transition: border-color 0.18s ease, transform 0.18s ease,
		box-shadow 0.18s ease;
}

.tile:hover {
	transform: translateY(-2px);
	border-color: var(--border-strong);
	box-shadow: var(--shadow-md);
}

.tile.wide {
	grid-column: span 3;
}

.tile.feature {
	grid-column: span 4;
}

.tile-icon {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	margin-bottom: 18px;
	border-radius: 11px;
	background: var(--accent-soft);
	color: var(--accent-ink);
}

.tile h3 {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.tile p {
	margin: 0;
	font-size: 15.5px;
	line-height: 1.6;
	color: var(--text-2);
}

/* Öne çıkan kutunun içindeki örnek gösterimler. */
.tile-demo {
	margin-top: 22px;
	border-top: 1px solid var(--border);
	padding-top: 18px;
}

.stack {
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.row {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 11px 14px;
	border: 1px solid var(--border);
	border-radius: 11px;
	background: var(--bg);
	font-size: 14.5px;
}

.row .i {
	width: 17px;
	height: 17px;
	color: var(--text-muted);
}

.row .meta {
	margin-left: auto;
	font-size: 12.5px;
	color: var(--text-muted);
}

.row.correct {
	border-color: color-mix(in srgb, #2f9e44 40%, var(--border));
}

.row.correct .i {
	color: #2f9e44;
}

.row.wrong {
	border-color: color-mix(in srgb, #e03131 38%, var(--border));
}

.row.wrong .i {
	color: #e03131;
}

.script-row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

/* Kare kutuya harf + romanizasyon birlikte sığmıyordu: `place-items: center`
   ikisini tek hücreye ortalayınca romanizasyon alt kenara yapışıyordu. Kutu
   biraz dikdörtgen ve iki satır kendi payıyla yerleşiyor. */
.glyph {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	width: 48px;
	height: 56px;
	padding: 7px 0 6px;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: var(--bg);
	font-size: 20px;
	line-height: 1;
}

.glyph small {
	font-size: 9.5px;
	line-height: 1;
	color: var(--text-muted);
	letter-spacing: 0.04em;
}

@media (max-width: 900px) {
	.bento {
		grid-template-columns: repeat(2, 1fr);
	}

	.tile,
	.tile.wide,
	.tile.feature {
		grid-column: span 1;
	}
}

@media (max-width: 600px) {
	.bento {
		grid-template-columns: 1fr;
	}

	section {
		padding: 68px 0;
	}
}

/* ---------- üç adımlı akış ---------- */

.steps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 40px;
	counter-reset: step;
}

.step {
	position: relative;
	padding-top: 22px;
	border-top: 2px solid var(--border);
}

.step::before {
	counter-increment: step;
	content: counter(step, decimal-leading-zero);
	position: absolute;
	top: -2px;
	left: 0;
	padding-top: 22px;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.08em;
	color: var(--accent-ink);
}

.step h3 {
	margin: 30px 0 8px;
	font-size: 19px;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.step p {
	margin: 0;
	color: var(--text-2);
	font-size: 15.5px;
}

@media (max-width: 800px) {
	.steps {
		grid-template-columns: 1fr;
		gap: 28px;
	}
}

/* ---------- kapanış ---------- */

.closer {
	position: relative;
	border-top: 1px solid var(--border);
	background: var(--bg-sunken);
	text-align: center;
}

.closer h2 {
	margin: 0 0 14px;
	font-size: clamp(30px, 4vw, 44px);
	line-height: 1.08;
	letter-spacing: -0.03em;
	font-weight: 620;
}

.closer p {
	margin: 0 auto 32px;
	max-width: 30em;
	font-size: 18px;
	color: var(--text-2);
}

.closer .wordmark {
	display: block;
	height: 54px;
	width: auto;
	margin: 0 auto 26px;
	opacity: 0.9;
	filter: var(--mark-filter);
}

/* ---------- footer ---------- */

.site-footer {
	border-top: 1px solid var(--border);
	padding: 30px 0;
	font-size: 14.5px;
	color: var(--text-muted);
}

.site-footer .wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.site-footer nav {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.site-footer a {
	color: var(--text-muted);
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--text);
}

/* ---------- doküman sayfaları (privacy / support) ---------- */

.doc {
	max-width: 700px;
	margin: 0 auto;
	padding: 64px 28px 96px;
}

.doc h1 {
	font-size: clamp(32px, 5vw, 44px);
	margin: 0 0 10px;
}

.doc .updated {
	margin: 0 0 44px;
	font-size: 15px;
	color: var(--text-muted);
}

.doc h2 {
	margin: 48px 0 14px;
	font-size: 23px;
	letter-spacing: -0.02em;
	font-weight: 600;
}

.doc h3 {
	margin: 30px 0 8px;
	font-size: 17.5px;
	font-weight: 600;
}

.doc p,
.doc li {
	color: var(--text-2);
}

.doc ul {
	padding-left: 20px;
}

.doc li {
	margin-bottom: 9px;
}

.doc li::marker {
	color: var(--accent);
}

.doc strong {
	color: var(--text);
	font-weight: 600;
}

.callout {
	background: var(--bg-raised);
	border: 1px solid var(--border);
	border-left: 3px solid var(--accent);
	border-radius: 12px;
	padding: 18px 20px;
	margin: 26px 0;
	box-shadow: var(--shadow-sm);
}

.callout p:first-child {
	margin-top: 0;
}

.callout p:last-child {
	margin-bottom: 0;
}

.doc table {
	width: 100%;
	border-collapse: collapse;
	margin: 22px 0;
	font-size: 15px;
	display: block;
	overflow-x: auto;
}

.doc th,
.doc td {
	border-bottom: 1px solid var(--border);
	padding: 11px 12px;
	text-align: left;
	vertical-align: top;
}

.doc th {
	font-weight: 600;
	white-space: nowrap;
	color: var(--text);
}

/* ---------- sss ---------- */

details {
	border: 1px solid var(--border);
	border-radius: 13px;
	background: var(--bg-raised);
	padding: 15px 19px;
	margin-bottom: 10px;
	box-shadow: var(--shadow-sm);
}

details[open] {
	border-color: var(--border-strong);
}

summary {
	cursor: pointer;
	font-weight: 550;
	color: var(--text);
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

summary::-webkit-details-marker {
	display: none;
}

summary::after {
	content: "";
	width: 9px;
	height: 9px;
	flex: none;
	border-right: 1.6px solid var(--accent);
	border-bottom: 1.6px solid var(--accent);
	transform: rotate(45deg) translate(-2px, -2px);
	transition: transform 0.18s ease;
}

details[open] summary::after {
	transform: rotate(-135deg) translate(-2px, -2px);
}

details p {
	margin: 12px 0 2px;
	color: var(--text-2);
	font-size: 15.5px;
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
		scroll-behavior: auto !important;
	}
}
