html { font-size: 16px; }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  color: var(--navy-900);
}

h1 { font-size: var(--fs-5xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { color: var(--color-text-muted); }

.lead {
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  color: var(--color-text-muted);
  text-wrap: pretty;
}

strong { font-weight: 600; color: var(--navy-900); }

a.link { color: var(--color-primary); font-weight: 600; }
a.link:hover { color: var(--color-accent); }

::selection { background: var(--teal-500); color: var(--white); }

/* Layout helpers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section { padding-block: var(--space-11); }
.section[id] { scroll-margin-top: calc(var(--header-height) + 20px); }
.section--tight { padding-block: var(--space-8); }
.section--alt {
  position: relative;
  background: var(--color-bg-alt);
  background-image: radial-gradient(ellipse 60% 100% at 100% 0%, rgba(31,92,139,0.10), transparent 60%),
    radial-gradient(ellipse 60% 100% at 0% 100%, rgba(47,127,176,0.10), transparent 60%);
}

.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Visually hidden but readable by screen readers/crawlers — used to keep heading hierarchy (h1→h2→h3) unbroken without adding a visible line of text */
.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;
}

/* Centers a trailing incomplete row instead of leaving it flush-left */
.grid--center-last {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.grid--center-last > * { flex: 0 1 calc((100% - 2 * var(--space-6)) / 3); }

.text-center { text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--brand-gradient);
  border-radius: var(--radius-full);
}

.section-head { max-width: 800px; margin-bottom: var(--space-9); }
.section-head.text-center { margin-inline: auto; }

/* Buttons — same pill/chip treatment for every button, regardless of role.
   Solid tinted pill on light backgrounds; overridden to a glass pill on dark
   surfaces (hero, page-hero, cta-band) further down in components.css. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--fs-sm);
  border: 1px solid transparent;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary,
.btn-secondary {
  background: var(--brand-gradient-soft);
  color: var(--navy-900);
  border-color: rgba(31, 92, 139, 0.18);
}
.btn-primary:hover,
.btn-secondary:hover {
  background: rgba(31, 92, 139, 0.22);
  border-color: rgba(31, 92, 139, 0.34);
  color: var(--navy-900);
  transform: translateY(-2px);
}

.btn-ghost { color: var(--navy-900); padding-inline: 0.5rem; }
.btn-ghost:hover { color: var(--color-primary); }

.btn-block { width: 100%; }
.btn-lg { padding: 1rem 2rem; font-size: var(--fs-base); }
.btn-sm { padding: 0.6rem 1.2rem; font-size: var(--fs-xs); }

/* Skip link for a11y */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy-900);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 999;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 2px; }

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal-group] > * { transition-delay: calc(var(--reveal-index, 0) * 80ms); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid--center-last > * { flex-basis: calc((100% - var(--space-6)) / 2); }
}
@media (max-width: 640px) {
  html { font-size: 15px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid--center-last > * { flex-basis: 100%; }
  h1 { font-size: var(--fs-4xl); }
  h2 { font-size: var(--fs-2xl); }
}

/* Guards the longer Turkish CTA labels ("Ücretsiz Demo Talep Et" etc.) against
   overflowing on the narrowest real-world phones (iPhone SE, older Android, 320px). */
@media (max-width: 380px) {
  .btn { white-space: normal; text-align: center; }
  .btn-lg { padding: 0.9rem 1.4rem; }
}
