/* ============================================================
   Yağız İplik — Base: reset, typography, layout utilities
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

::selection { background: var(--gold-300); color: var(--ink-900); }

:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-sm); }

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

a { color: var(--primary-ink); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--primary-hover); }
[data-theme="dark"] a:hover { color: var(--brand-200); }

ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }
address { font-style: normal; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-8) 0; }
small { font-size: var(--text-sm); }
strong, b { font-weight: 600; color: var(--fg-strong); }
code, kbd { font-family: var(--font-mono); font-size: 0.9em; background: var(--bg-alt); padding: 0.1em 0.4em; border-radius: var(--r-sm); border: 1px solid var(--border); }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}
button { background: none; border: 0; padding: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

/* Icons — her zaman sınırlı boyut */
.icon {
  width: 1.25em;
  height: 1.25em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.icon-sm { width: 1em; height: 1em; }
.icon-lg { width: 1.75em; height: 1.75em; }
.icon-xl { width: 2.25em; height: 2.25em; }
.icon-fill { fill: currentColor; stroke: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--leading-tight);
  color: var(--fg-strong);
  margin: 0 0 var(--s-4);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1, .h1 { font-size: var(--text-5xl); font-weight: 700; }
h2, .h2 { font-size: var(--text-4xl); }
h3, .h3 { font-size: var(--text-2xl); }
h4, .h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

.display { font-size: var(--text-6xl); font-weight: 700; letter-spacing: -0.03em; }
.lead { font-size: var(--text-lg); line-height: var(--leading-relaxed); color: var(--fg-muted); max-width: 68ch; }
.muted { color: var(--fg-muted); }
.subtle { color: var(--fg-subtle); }
.small { font-size: var(--text-sm); }
.xs { font-size: var(--text-xs); }
.mono { font-family: var(--font-mono); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-ink); }
.text-accent { color: var(--accent-ink); }
.uppercase { text-transform: uppercase; letter-spacing: 0.08em; }
.nowrap { white-space: nowrap; }
.prose p { color: var(--fg-muted); }
.prose p + h2, .prose p + h3, .prose ul + h2, .prose ul + h3 { margin-top: var(--s-8); }
.prose ul { list-style: disc; padding-left: 1.25rem; color: var(--fg-muted); margin-bottom: var(--s-4); }
.prose ol { list-style: decimal; padding-left: 1.25rem; color: var(--fg-muted); margin-bottom: var(--s-4); }
.prose li { margin-bottom: var(--s-2); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-ink);
  margin-bottom: var(--s-3);
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.eyebrow.center { justify-content: center; }
.eyebrow.center::before { display: none; }
.eyebrow.light { color: var(--gold-300); }

.highlight { color: var(--primary-ink); }
.on-dark .highlight, .hero .highlight { color: var(--gold-300); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container > *,
.grid > *,
.split > *,
.hero .container > * { min-width: 0; max-width: 100%; }
.container-narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); position: relative; }
.section-alt { background: var(--bg-alt); }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--bg-inverse); color: var(--fg-inverse); }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: var(--fg-inverse); }
.section-dark p, .section-dark .lead, .section-dark .muted { color: rgba(251, 249, 246, 0.78); }
[data-theme="dark"] .section-dark { background: #0E0E11; color: var(--fg); }
[data-theme="dark"] .section-dark h1, [data-theme="dark"] .section-dark h2, [data-theme="dark"] .section-dark h3, [data-theme="dark"] .section-dark h4 { color: var(--fg-strong); }
[data-theme="dark"] .section-dark p, [data-theme="dark"] .section-dark .lead { color: var(--fg-muted); }
.section-brand { background: var(--hero-grad); color: var(--cream-50); }
.section-brand h2, .section-brand h3 { color: var(--white); }
.section-brand p { color: rgba(255, 255, 255, 0.82); }

.section-head { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-bottom: var(--s-4); }
.section-head .lead { margin-inline: inherit; }
.section-head.center .lead { margin-inline: auto; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-6); flex-wrap: wrap; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head-row .section-head { margin-bottom: 0; }

.grid { display: grid; gap: var(--s-6); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.gap-2 { gap: var(--s-2); } .gap-3 { gap: var(--s-3); } .gap-4 { gap: var(--s-4); } .gap-8 { gap: var(--s-8); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split-reverse > :first-child { order: 2; }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.col { flex-direction: column; }
.stack > * + * { margin-top: var(--stack-gap, var(--s-4)); }
.stack-sm > * + * { margin-top: var(--s-2); }
.stack-lg > * + * { margin-top: var(--s-8); }

.mt-0 { margin-top: 0; } .mt-2 { margin-top: var(--s-2); } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); } .mt-12 { margin-top: var(--s-12); }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: var(--s-2); } .mb-4 { margin-bottom: var(--s-4); } .mb-6 { margin-bottom: var(--s-6); } .mb-8 { margin-bottom: var(--s-8); }
.pt-0 { padding-top: 0 !important; } .pb-0 { padding-bottom: 0 !important; }
.hidden { display: none !important; }
.live { display: inline-flex; align-items: center; gap: 0.4em; color: #3FA66B; font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
.section-brand .live, .energy-counter .live, .hero-panel-head .live { color: #7EE2A8; }

.visually-hidden, .sr-only {
  position: absolute !important;
  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(--s-4);
  z-index: 1000;
  padding: var(--s-3) var(--s-4);
  background: var(--primary);
  color: var(--primary-fg);
  border-radius: var(--r-md);
  font-weight: 600;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: var(--s-4); color: var(--primary-fg); }

/* ---------- Reveal animations ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal="left"] { transform: translateX(-24px); }
[data-reveal="right"] { transform: translateX(24px); }
[data-reveal="scale"] { transform: scale(0.96); }
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split-reverse > :first-child { order: 0; }
  .section-head-row { align-items: flex-start; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .lead { font-size: var(--text-base); }
  input, select, textarea { font-size: 16px; }
  .page-hero { padding: var(--s-8) 0; }
  .page-hero h1 { max-width: none; }
}
