/**
 * base.css — design token'lari, reset, tipografi.
 *
 * RENK SISTEMI
 * Iki durum var:
 *   :root               "gunduz" — dogal isikta ahsap, kagit tonlu zemin
 *   [data-light="on"]   "aksam"  — oda isigi kapali, urunun LED'i yanik
 *
 * Aksam durumu sitenin imza etkilesimidir: WoodDecoria'nin urunleri cocuk
 * odasi gece lambalari; onlarin anlam kazandigi an isiklar kapaninca gelir.
 * Bu yuzden tum renkler token uzerinden tanimlanir, hicbir yerde sabit
 * renk yazilmaz — anahtar cevrildiginde butun site birlikte doner.
 */

/* =============================================================================
   FONTLAR — self-hosted, yalnizca kullanilan altkumeler
   Fraunces ve Inter, SIL Open Font License 1.1 ile lisanslidir; local
   hosting lisans tarafindan acikca izinlidir.
   ========================================================================== */

/* --- Fraunces (variable: opsz 9–144, wght 400–700) --- */
@font-face {
	font-family: "Fraunces";
	src: url("../fonts/fraunces-latin-ext.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
	/* Turkce ğ Ğ ş Ş İ bu altkumede */
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Fraunces";
	src: url("../fonts/fraunces-latin.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
	/* Turkce ı, â, ö, ü, ç bu altkumede */
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Inter (variable: wght 400–600) --- */
@font-face {
	font-family: "Inter";
	src: url("../fonts/inter-latin-ext.woff2") format("woff2");
	font-weight: 400 600;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Inter";
	src: url("../fonts/inter-latin.woff2") format("woff2");
	font-weight: 400 600;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* =============================================================================
   TOKEN'LAR
   ========================================================================== */

:root {
	/* --- Renk: gunduz --- */
	--wd-bg: #f8f5ef;
	--wd-bg-deep: #f1ece3;
	--wd-surface: #fffdf9;
	--wd-surface-2: #f5f0e7;

	--wd-wood: #b9865f;
	--wd-wood-dark: #77563f;
	--wd-wood-soft: #e3cdb8;

	--wd-sage: #aebeb0;
	--wd-blue: #b9cbd0;
	--wd-blush: #dab9b7;

	--wd-text: #292724;
	--wd-text-on-wood: #fffdf9;
	--wd-muted: #716b64;

	--wd-light: #ffd28a;

	/* Cizgiler ve golgeler — notr gri degil, sicak kahve tonlu */
	--wd-line: rgba(41, 39, 36, 0.10);
	--wd-line-strong: rgba(41, 39, 36, 0.20);
	--wd-shadow-sm: 0 1px 2px rgba(77, 56, 40, 0.05), 0 2px 6px rgba(77, 56, 40, 0.04);
	--wd-shadow-md: 0 2px 4px rgba(77, 56, 40, 0.05), 0 10px 26px rgba(77, 56, 40, 0.07);
	--wd-shadow-lg: 0 4px 8px rgba(77, 56, 40, 0.06), 0 26px 60px rgba(77, 56, 40, 0.11);

	/* LED parlamasinin gucu — aksam durumunda 1'e cikar */
	--wd-glow: 0;

	/* Header zemini */
	--wd-header-bg: rgba(248, 245, 239, 0.82);

	/* --- Tipografi --- */
	--wd-font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
	--wd-font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	/* Akiskan olcek — 360px ile 1440px arasi */
	--wd-t-xs: clamp(0.75rem, 0.735rem + 0.07vw, 0.8125rem);
	--wd-t-sm: clamp(0.8125rem, 0.79rem + 0.11vw, 0.9375rem);
	--wd-t-base: clamp(1rem, 0.98rem + 0.1vw, 1.0625rem);
	--wd-t-md: clamp(1.0625rem, 1.02rem + 0.22vw, 1.25rem);
	--wd-t-lg: clamp(1.25rem, 1.15rem + 0.45vw, 1.625rem);
	--wd-t-xl: clamp(1.5rem, 1.3rem + 0.9vw, 2.25rem);
	--wd-t-2xl: clamp(1.875rem, 1.5rem + 1.7vw, 3.25rem);
	--wd-t-3xl: clamp(2.25rem, 1.6rem + 2.9vw, 4.5rem);
	--wd-t-hero: clamp(2.5rem, 1.5rem + 4.6vw, 5.75rem);

	--wd-lh-tight: 1.04;
	--wd-lh-snug: 1.18;
	--wd-lh-base: 1.62;

	/* --- Boşluk --- */
	--wd-s-1: 0.25rem;
	--wd-s-2: 0.5rem;
	--wd-s-3: 0.75rem;
	--wd-s-4: 1rem;
	--wd-s-5: 1.5rem;
	--wd-s-6: 2rem;
	--wd-s-7: 2.5rem;
	--wd-s-8: 3rem;
	--wd-s-9: 4rem;
	--wd-s-10: 5rem;
	--wd-s-11: 6.5rem;
	--wd-s-12: 8rem;

	/* Bolum ic bosluklari — akiskan */
	--wd-section-y: clamp(3.5rem, 2rem + 6vw, 8rem);
	--wd-section-y-sm: clamp(2.5rem, 1.5rem + 4vw, 5rem);

	/* --- Yerlesim --- */
	--wd-wrap: 1240px;
	--wd-wrap-wide: 1480px;
	--wd-wrap-narrow: 760px;
	--wd-gutter: clamp(1.125rem, 0.6rem + 2.4vw, 2.75rem);
	--wd-header-h: 74px;

	/* --- Yaricap --- */
	--wd-r-xs: 3px;
	--wd-r-sm: 6px;
	--wd-r-md: 12px;
	--wd-r-lg: 20px;
	--wd-r-xl: 32px;
	--wd-r-pill: 999px;

	/* --- Hareket --- */
	--wd-dur-fast: 160ms;
	--wd-dur: 300ms;
	--wd-dur-slow: 620ms;
	--wd-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--wd-ease-out: cubic-bezier(0.16, 1, 0.3, 1);

	/* --- Katmanlar --- */
	--wd-z-header: 100;
	--wd-z-drawer: 200;
	--wd-z-modal: 300;

	/*
	 * Ahsap damari dokusu.
	 * feTurbulence'in baseFrequency'si iki eksende BILEREK cok farkli:
	 * X cok dusuk (0.012) -> yatayda uzayan damarlar
	 * Y yuksek (0.44)     -> dikeyde ince degisim
	 * Sonuc: gurultu degil, ahsap damarina benzeyen yonlu doku.
	 */
	--wd-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.44' numOctaves='4' seed='11'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='320' height='320' filter='url(%23g)'/%3E%3C/svg%3E");

	/* Kagit dokusu — cok ince, izotropik */
	--wd-paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' seed='5'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23p)'/%3E%3C/svg%3E");
}

/* --- Renk: aksam (isik acik) ------------------------------------------------ */

[data-light="on"] {
	--wd-bg: #17120f;
	--wd-bg-deep: #100c0a;
	--wd-surface: #211a15;
	--wd-surface-2: #2a211a;

	--wd-wood: #cd9d74;
	/* Aksamda "koyu ahsap" rolu tersine doner: zemin koyu oldugu icin
	   vurgu rengi ACILIR, boylece kontrast korunur. */
	--wd-wood-dark: #e6c3a0;
	--wd-wood-soft: #47372c;

	--wd-sage: #8fa392;
	--wd-blue: #93a9b0;
	--wd-blush: #c19d9b;

	--wd-text: #f5ece0;
	--wd-text-on-wood: #17120f;
	--wd-muted: #a89a8c;

	--wd-light: #ffcf86;

	--wd-line: rgba(245, 236, 224, 0.13);
	--wd-line-strong: rgba(245, 236, 224, 0.26);
	--wd-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
	--wd-shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
	--wd-shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.55);

	/* LED parlamasi devreye girer */
	--wd-glow: 1;

	--wd-header-bg: rgba(23, 18, 15, 0.8);
}

/* =============================================================================
   RESET
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	/* Sabit header'in altina cipa atlamasin */
	scroll-padding-top: calc(var(--wd-header-h) + 1rem);
}

body {
	margin: 0;
	background-color: var(--wd-bg);
	color: var(--wd-text);
	font-family: var(--wd-font-body);
	font-size: var(--wd-t-base);
	line-height: var(--wd-lh-base);
	font-weight: 400;
	/* Turkce metinde tirnak ve kesme isaretleri icin */
	font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
	transition: background-color var(--wd-dur-slow) var(--wd-ease),
		color var(--wd-dur-slow) var(--wd-ease);
}

/* Cok ince kagit dokusu — zeminin "basili" hissetmesi icin */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	background-image: var(--wd-paper);
	background-size: 180px 180px;
	opacity: 0.028;
	mix-blend-mode: multiply;
	pointer-events: none;
	z-index: 1;
}

[data-light="on"] body::before {
	mix-blend-mode: screen;
	opacity: 0.045;
}

img,
picture,
svg,
video,
canvas {
	display: block;
	max-width: 100%;
	height: auto;
}

svg {
	flex: none;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
	margin: 0;
}

button {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

ul,
ol {
	margin: 0;
	padding: 0;
}

li {
	list-style: none;
}

figure,
blockquote,
dl,
dd {
	margin: 0;
}

table {
	border-collapse: collapse;
	width: 100%;
}

hr {
	border: 0;
	border-top: 1px solid var(--wd-line);
	margin: var(--wd-s-6) 0;
}

/* =============================================================================
   TIPOGRAFI
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	font-family: var(--wd-font-display);
	font-weight: 500;
	line-height: var(--wd-lh-snug);
	letter-spacing: -0.015em;
	text-wrap: balance;
	/*
	 * Fraunces'in optik boyut ekseni. Buyuk puntolarda yuksek opsz daha
	 * rafine, kucuk puntolarda dusuk opsz daha okunur govdeler verir.
	 * font-optical-sizing bunu punto ile otomatik eslestirir.
	 */
	font-optical-sizing: auto;
}

h1 {
	font-size: var(--wd-t-3xl);
	line-height: var(--wd-lh-tight);
	letter-spacing: -0.03em;
}

h2 {
	font-size: var(--wd-t-2xl);
	letter-spacing: -0.025em;
}

h3 {
	font-size: var(--wd-t-lg);
}

h4 {
	font-size: var(--wd-t-md);
}

p {
	margin: 0 0 var(--wd-s-4);
	text-wrap: pretty;
}

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

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
	text-decoration-color: var(--wd-line-strong);
	transition: color var(--wd-dur-fast) var(--wd-ease),
		text-decoration-color var(--wd-dur-fast) var(--wd-ease);
}

a:hover {
	color: var(--wd-wood-dark);
	text-decoration-color: currentColor;
}

strong,
b {
	font-weight: 600;
}

small {
	font-size: var(--wd-t-sm);
}

code,
kbd,
pre {
	font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
	font-size: 0.92em;
}

blockquote {
	margin: var(--wd-s-6) 0;
	padding-left: var(--wd-s-5);
	border-left: 2px solid var(--wd-wood);
	font-family: var(--wd-font-display);
	font-size: var(--wd-t-md);
	font-style: italic;
	color: var(--wd-muted);
}

/* --- Kucuk ust etiket (eyebrow) ------------------------------------------- */

.wd-eyebrow {
	display: block;
	margin-bottom: var(--wd-s-3);
	font-family: var(--wd-font-body);
	font-size: var(--wd-t-xs);
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wd-wood-dark);
}

/* =============================================================================
   ERISILEBILIRLIK
   ========================================================================== */

/* Odak halkasi — her zaman gorunur, asla kaldirilmaz */
:focus-visible {
	outline: 2px solid var(--wd-wood-dark);
	outline-offset: 3px;
	border-radius: var(--wd-r-xs);
}

/* Fare ile tiklamada odak halkasi gosterme (klavyede gosterilir) */
:focus:not(:focus-visible) {
	outline: none;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	display: block;
	top: 1rem;
	left: 1rem;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 0.75rem 1.25rem;
	clip: auto;
	background: var(--wd-surface);
	color: var(--wd-text);
	border-radius: var(--wd-r-sm);
	box-shadow: var(--wd-shadow-md);
	font-size: var(--wd-t-sm);
	text-decoration: none;
}

/* İçeriğe atla */
.wd-skip-link:focus {
	outline: 2px solid var(--wd-wood-dark);
	outline-offset: 2px;
}
