/* ==========================================================================
   base.css — Design tokens, reset, tipografi
   ==========================================================================
   Bu dosya tüm temanın temelidir. Renk, font, spacing, gölge, easing gibi
   her tasarım kararı CSS custom property olarak burada tanımlanır.
   Diğer CSS dosyaları yalnızca bu token'ları kullanır.
   ========================================================================== */

/* ----- Design tokens ----------------------------------------------------- */
:root {
	/* Renk paleti */
	--brand-primary:   #C84B31; /* terracotta — CTA, vurgular */
	--brand-secondary: #ECB159; /* hardal sarısı — rozet, ikincil vurgu */
	--brand-dark:      #2C3E2D; /* derin yeşil — başlıklar, koyu UI */
	--brand-cream:     #E8EDE2; /* açık sage yeşil — sayfa arkaplanı, alternating section */
	--brand-text:      #1A1A1A; /* gövde metni */
	--brand-muted:     #6B6B6B; /* ikincil metin, açıklama */
	--brand-border:    #D4DDC9; /* ince ayraçlar, kart kenarları (sage-uyumlu) */
	--brand-white:     #FFFFFF;

	/* Türev renkler — hover/aktif durumları */
	--brand-primary-hover:   #A93E28;
	--brand-secondary-hover: #D89B47;
	--brand-dark-hover:      #1F2D20;

	/* Tipografi
	   Strateji (2026-05-09 sonrası, "modern butik" pivot):
	   - --font-heading: SANS-SERIF (Inter) — h2/h3 ve TÜM section başlıkları, kart
	     başlıkları, footer başlıkları. Bütün "alışveriş yüzeyleri" sans-serif.
	   - --font-display: SERIF (Playfair) — yalnızca h1 ve büyük marka anları
	     (logo text, footer brand-name, hero başlığı). Az kullanılan, premium aksan.
	   - Caveat el yazısı (--font-accent) kaldırıldı: marka tonunu "eski defter"den
	     "modern butik"e çekmek için. */
	--font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;

	/* Type scale — fluid, mobile→desktop
	   Gövde 16px web standardı (browser default). Header/footer-özel boyutlar
	   absolute değerlerle components.css'te kendi başına büyütüldü. */
	--text-xs:   0.8125rem;  /* 13px */
	--text-sm:   0.875rem;   /* 14px */
	--text-base: 1rem;       /* 16px */
	--text-md:   1.0625rem;  /* 17px */
	--text-lg:   1.25rem;    /* 20px */
	--text-xl:   1.5rem;     /* 24px */
	--text-2xl:  1.75rem;    /* 28px */
	--text-3xl:  clamp(1.75rem, 1.4rem + 1.5vw, 2.25rem);   /* 28→36 */
	--text-4xl:  clamp(2rem,   1.6rem + 2vw,   2.75rem);    /* 32→44 */
	--text-5xl:  clamp(2.5rem, 1.9rem + 3vw,   4rem);       /* 40→64 */

	/* Line-height */
	--lh-tight:   1.2;
	--lh-snug:    1.35;
	--lh-normal:  1.65;
	--lh-relaxed: 1.8;

	/* Letter spacing */
	--tracking-tight:  -0.01em;
	--tracking-normal: 0;
	--tracking-wide:   0.05em;

	/* 8px spacing scale */
	--space-1:  0.25rem;  /*  4px */
	--space-2:  0.5rem;   /*  8px */
	--space-3:  0.75rem;  /* 12px */
	--space-4:  1rem;     /* 16px */
	--space-5:  1.5rem;   /* 24px */
	--space-6:  2rem;     /* 32px */
	--space-7:  3rem;     /* 48px */
	--space-8:  4rem;     /* 64px */
	--space-9:  6rem;     /* 96px */
	--space-10: 8rem;     /* 128px */

	/* Layout */
	--container-max:  90rem;   /* 1440px */
	--content-max:    45rem;   /* 720px  — uzun yazı için */
	--container-pad:  1.5rem;  /* 24px — mobile gutter */

	/* Bölüm padding (mobile / desktop)
	   Desktop 96→72px (4.5rem) — "magazine spread" hissini azaltıp daha
	   "shop-dense" kılıyor. Mobile 64'te kalıyor (zaten yeterince sıkı). */
	--section-py:    var(--space-8);  /* 64px */
	--section-py-lg: 4.5rem;          /* 72px (eski 96px — 25% daha sıkı) */

	/* Border-radius */
	--radius-sm:   4px;
	--radius:      8px;
	--radius-md:  12px;
	--radius-lg:  20px;
	--radius-full: 9999px;

	/* Shadow — çok seyrek kullanılır, sadece hover */
	--shadow-sm: 0 1px 2px rgba(26, 26, 26, 0.04);
	--shadow:    0 4px 12px rgba(26, 26, 26, 0.06);
	--shadow-md: 0 8px 24px rgba(26, 26, 26, 0.08);
	--shadow-lg: 0 16px 40px rgba(26, 26, 26, 0.10);

	/* Motion */
	--ease:        cubic-bezier(0.4, 0, 0.2, 1);
	--ease-out:    cubic-bezier(0.0, 0, 0.2, 1);
	--duration-1:  150ms;
	--duration-2:  200ms;
	--duration-3:  300ms;

	/* Z-index ölçeği */
	--z-sticky:  100;
	--z-overlay: 200;
	--z-modal:   300;
	--z-toast:   400;
}

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

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

body {
	margin: 0;
	min-height: 100vh;
	background-color: var(--brand-cream);
	color: var(--brand-text);
	font-family: var(--font-body);
	font-size: var(--text-base);
	line-height: var(--lh-normal);
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

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

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

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

ul,
ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

p {
	margin: 0 0 var(--space-4);
}

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

a {
	color: var(--brand-primary);
	text-decoration: none;
	transition: color var(--duration-2) var(--ease);
}

a:hover,
a:focus-visible {
	color: var(--brand-primary-hover);
}

hr {
	border: 0;
	height: 1px;
	background-color: var(--brand-border);
	margin: var(--space-7) 0;
}

::selection {
	background-color: var(--brand-secondary);
	color: var(--brand-dark);
}

/* ----- Typography --------------------------------------------------------
   h1: serif (--font-display, Playfair) — büyük marka anlarında editorial dokunuş.
   h2-h6: sans-serif (--font-heading, Inter Bold) — modern shop hissi.
   Bu ayrım kasıtlı: site-içinde 1 tane h1 olur (her sayfada 1), bütün diğer
   başlıklar Inter olur. */
h1, h2, h3, h4, h5, h6 {
	margin: 0 0 var(--space-4);
	font-family: var(--font-heading);
	font-weight: 700;
	line-height: var(--lh-tight);
	letter-spacing: var(--tracking-tight);
	color: var(--brand-dark);
}

h1 {
	font-family: var(--font-display);
	font-size: var(--text-5xl);
}
h2 { font-size: var(--text-4xl); font-weight: 700; }
h3 { font-size: var(--text-3xl); font-weight: 700; }
h4 { font-size: var(--text-xl);  font-weight: 600; }
h5 { font-size: var(--text-lg);  font-weight: 600; }
h6 { font-size: var(--text-base); font-weight: 600; text-transform: uppercase; letter-spacing: var(--tracking-wide); }

.lede {
	font-size: var(--text-lg);
	line-height: var(--lh-snug);
	color: var(--brand-muted);
	max-width: 40rem;
}

.eyebrow {
	display: inline-block;
	font-family: var(--font-body);
	font-size: var(--text-sm);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: var(--tracking-wide);
	color: var(--brand-primary);
	margin-bottom: var(--space-3);
}

/* .handwritten — Caveat kaldırıldıktan sonra "vurgulu italic" rolünü
   --font-display (Playfair) italic ile karşılıyoruz. El yazısı değil ama
   "kişisel not" karakteri verir. Az kullanılır. */
.handwritten {
	font-family: var(--font-display);
	font-style: italic;
	font-weight: 400;
	font-size: var(--text-2xl);
	line-height: var(--lh-snug);
	color: var(--brand-dark);
}

blockquote {
	margin: var(--space-6) 0;
	padding-left: var(--space-5);
	border-left: 3px solid var(--brand-primary);
	font-family: var(--font-display);
	font-size: var(--text-xl);
	font-style: italic;
	line-height: var(--lh-snug);
	color: var(--brand-dark);
}

code, pre {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.95em;
}

code {
	padding: 0.1em 0.35em;
	background-color: var(--brand-border);
	border-radius: var(--radius-sm);
}

pre {
	padding: var(--space-4);
	background-color: var(--brand-dark);
	color: var(--brand-cream);
	border-radius: var(--radius);
	overflow-x: auto;
	line-height: var(--lh-snug);
}

pre code {
	padding: 0;
	background: transparent;
}

/* ----- Erişilebilirlik yardımcıları ------------------------------------- */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: var(--space-4);
	z-index: var(--z-toast);
	padding: var(--space-3) var(--space-5);
	background-color: var(--brand-dark);
	color: var(--brand-cream);
	border-radius: var(--radius);
	font-weight: 600;
	transition: top var(--duration-2) var(--ease);
}

.skip-link:focus {
	top: var(--space-4);
	color: var(--brand-cream);
}

/* Mouse click sonrası focus dotted outline'ı kaldır.
   Parent envo-shop `a:focus { outline: thin dotted }` veriyor — link'lere
   tıklayınca dotted kare çiziliyor. `:focus:not(:focus-visible)` ile sadece
   mouse-click durumunda outline kalkar; klavye navigasyonu (`:focus-visible`)
   için aşağıdaki accessible halka korunur. */
:focus {
	outline: none;
}

:focus:not(:focus-visible) {
	outline: none;
	box-shadow: none;
}

/* Tutarlı, görünür focus halkası — sadece klavye navigasyonunda */
:focus-visible {
	outline: 2px solid var(--brand-primary);
	outline-offset: 2px;
	border-radius: var(--radius-sm);
}

/* Hareket azaltma tercihine saygı */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
