/* Hand-written rules for behavior the compiled Tailwind bundle can't express
   on its own (JS-driven header/menu states, form field styling, etc). Loaded
   after site.css. */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body { background: var(--color-surface); color: var(--color-ink); font-family: var(--font-sans, "Manrope"), system-ui, sans-serif; }

/* ---------- scroll-reveal (mirrors the React Reveal component) ---------- */
.js-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.js-reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- header: transparent (over dark hero) vs solid ---------- */
.site-header.is-transparent { border-bottom: 1px solid transparent; background: transparent; }
.site-header.is-solid { border-bottom: 1px solid rgba(228, 222, 214, 0.7); background: rgba(250, 248, 245, 0.95); backdrop-filter: blur(8px); }

.site-header .header-link { color: rgba(255, 255, 255, 0.8); }
.site-header .header-link:hover { color: #fff; }
.site-header.is-solid .header-link { color: var(--color-ink-soft); }
.site-header.is-solid .header-link:hover { color: var(--color-ink); }

.site-header .header-cta { background: #fff; color: var(--color-ink); }
.site-header .header-cta:hover { background: var(--color-copper-soft); }
.site-header.is-solid .header-cta { background: var(--color-ink); color: #fff; }
.site-header.is-solid .header-cta:hover { background: var(--color-charcoal); }

.site-header .mobile-nav-toggle { border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.site-header.is-solid .mobile-nav-toggle { border-color: var(--color-line); color: var(--color-ink); }

.site-header .lang-switcher { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.1); }
.site-header .lang-btn { color: rgba(255, 255, 255, 0.7); }
.site-header .lang-btn:hover { color: #fff; }
.site-header .lang-btn.is-active { background: #fff; color: var(--color-ink); }
.site-header.is-solid .lang-switcher { border-color: var(--color-line); background: #fff; }
.site-header.is-solid .lang-btn { color: var(--color-ink-soft); }
.site-header.is-solid .lang-btn:hover { color: var(--color-ink); }
.site-header.is-solid .lang-btn.is-active { background: var(--color-ink); color: #fff; }

.header-logo-mark { color: var(--color-copper-soft); }
.site-header.is-solid .header-logo-mark { color: var(--color-copper); }
.header-logo-ink { color: #fff; }
.site-header.is-solid .header-logo-ink { color: var(--color-ink); }

/* ---------- form fields ---------- */
.input {
  width: 100%; border-radius: 0.5rem; border: 1px solid var(--color-line); background: #fff;
  padding: 0.625rem 0.875rem; font-size: 0.875rem; color: var(--color-ink); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--color-copper); box-shadow: 0 0 0 3px rgba(170, 116, 68, 0.2); }

/* ---------- mobile nav ---------- */
body.mobile-nav-open { overflow: hidden; }
#mobile-nav-overlay.is-open { display: block; }

/* ---------- hero slider ---------- */
.hero-slide.is-active { z-index: 10; opacity: 1; }
.hero-slide:not(.is-active) { z-index: 0; opacity: 0; }
.hero-slide-content h1, .hero-slide-content p, .hero-slide-content a { animation: slideUp 0.7s ease-out both; }
.hero-slide-content p { animation-delay: 0.1s; }
.hero-slide-content a { animation-delay: 0.2s; }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- prose (rich text pages) ---------- */
.prose-content h2 { font-size: 1.375rem; font-weight: 700; margin-top: 2rem; margin-bottom: 0.75rem; color: var(--color-ink); }
.prose-content h3 { font-size: 1.125rem; font-weight: 700; margin-top: 1.5rem; margin-bottom: 0.5rem; color: var(--color-ink); }
.prose-content p { margin-bottom: 1rem; line-height: 1.75; color: var(--color-ink-soft); max-width: 68ch; }
.prose-content ul { margin: 0 0 1rem 1.25rem; list-style: disc; color: var(--color-ink-soft); }
.prose-content li { margin-bottom: 0.5rem; line-height: 1.7; }
.prose-content strong { color: var(--color-ink); }
.prose-content blockquote { border-left: 3px solid var(--color-copper); padding-left: 1rem; color: var(--color-ink); font-style: italic; margin: 1.5rem 0; }

.eyebrow { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; }
.text-balance { text-wrap: balance; }

/* ---------- blog index grid ---------- */
/* Hand-written because the compiled Tailwind bundle has no rule for the
   one-sided pb-16/sm:pb-24 utilities (py-* shorthand made it into the build,
   standalone pb-* apparently didn't) — without this the last row of cards
   sits flush against the footer. */
.blog-index-grid { padding-bottom: 4rem; }
@media (min-width: 640px) {
  .blog-index-grid { padding-bottom: 6rem; }
}

/* ---------- inner-page photo hero: a short band, not a second homepage ---------- */
.page-hero {
  /* Its own bounded box — NOT full-viewport, NOT fixed, NOT a wrapper around
     the rest of the page. isolation:isolate pins it to its own stacking
     context so its background/overlay layers can never be mistaken for (or
     bleed into) a sibling section's own background. */
  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* Positive, not negative: unlike the homepage's hero-slider (which sits
     BEHIND a transparent header), every inner page has a solid/opaque
     fixed header, so this band must clear it and start right below the
     nav — otherwise its own top portion (breadcrumb/eyebrow/heading) ends
     up hidden behind the header instead of "navigasyonun altında". */
  margin-top: 5rem;
  /* min-height (not a fixed height) so a long H1 or longer English copy can
     push the banner taller instead of being clipped or overlapping — it
     only ever grows to fit its own three lines of text, nothing else lives
     in here. */
  min-height: 200px; /* mobile target: ~200px */
  width: 100%;
  background-color: var(--color-charcoal);
  background-image: var(--hero-bg, none);
  background-position: var(--hero-pos, 50% 50%);
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
}
@media (max-width: 639px) {
  .page-hero { background-image: var(--hero-bg-mobile, var(--hero-bg, none)); }
}
.page-hero.is-compact { min-height: 180px; }
@media (min-width: 640px) {
  .page-hero { min-height: 260px; } /* desktop target: ~260px */
  .page-hero.is-compact { min-height: 220px; }
}
.page-hero-overlay {
  position: absolute; inset: 0;
  /* left-to-right anthracite fade — readable text on the left, photo visible on the right */
  background: linear-gradient(90deg, rgba(27,30,34,var(--hero-overlay,0.62)) 0%, rgba(27,30,34,calc(var(--hero-overlay,0.62) * 0.72)) 45%, rgba(27,30,34,calc(var(--hero-overlay,0.62) * 0.25)) 75%, rgba(27,30,34,0.08) 100%);
}
.page-hero-inner { position: relative; z-index: 2; width: 100%; padding: 0 1.25rem 1.75rem; }
@media (min-width: 640px) { .page-hero-inner { padding: 0 2rem 2rem; } }
.page-hero-inner .mx-auto { max-width: 72rem; }
.page-hero-breadcrumb { font-size: 0.75rem; color: rgba(255,255,255,0.6); margin-bottom: 0.85rem; }
.page-hero-breadcrumb a { color: rgba(255,255,255,0.75); text-decoration: none; }
.page-hero-breadcrumb a:hover { color: #fff; text-decoration: underline; }
.page-hero-eyebrow {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--color-copper-soft); display: flex; align-items: center; gap: 0.55rem;
}
.page-hero-eyebrow::before { content: ""; display: inline-block; width: 22px; height: 2px; background: var(--color-copper); border-radius: 2px; }
.page-hero-heading {
  /* Scaled for a short ~200-260px band, not the old ~300-420px one — a
     64px H1 would dwarf a strip this short. */
  margin-top: 0.5rem; color: #fff; font-weight: 800; letter-spacing: -0.01em; line-height: 1.1;
  font-size: clamp(1.75rem, 3vw + 0.75rem, 2.75rem);
  max-width: 42rem;
}
.page-hero-desc { margin-top: 0.6rem; color: rgba(255,255,255,0.85); font-size: 0.9375rem; line-height: 1.55; max-width: 38rem; }
@media (min-width: 640px) { .page-hero-desc { font-size: 1.0625rem; } }

/* ---------- blog post: author/date/read-time row + share buttons ---------- */
.post-meta-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  margin-top: 1.5rem;
}
@media (min-width: 640px) {
  .post-meta-row { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
}
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; font-size: 0.875rem; color: var(--color-ink-soft); margin: 0; }
.post-share-footer { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--color-line); }

.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.625rem; }
.share-bar-label { font-size: 0.8125rem; font-weight: 600; color: var(--color-ink-soft); white-space: nowrap; }
.share-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }

.share-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-width: 44px; min-height: 44px; padding: 0 0.9rem;
  border: 1px solid var(--color-line); border-radius: 999px;
  background: #fff; color: var(--color-ink-soft);
  font-size: 0.8125rem; font-weight: 600; line-height: 1; text-decoration: none;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
  cursor: pointer; box-sizing: border-box;
}
.share-btn:hover { border-color: var(--color-copper); color: var(--color-copper-dark); }
.share-btn:focus-visible { outline: 2px solid var(--color-copper); outline-offset: 2px; }
.share-btn-icon { width: 44px; padding: 0; }
.share-btn-linkedin { background: #0a66c2; border-color: #0a66c2; color: #fff; }
.share-btn-linkedin:hover { background: #084d92; border-color: #084d92; color: #fff; }
.share-btn[hidden] { display: none; }

/* Generic toast used for the "link copied" confirmation (created on demand by site.js). */
.app-toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 100;
  transform: translate(-50%, 10px);
  background: var(--color-ink); color: #fff;
  font-size: 0.8125rem; font-weight: 600;
  padding: 0.65rem 1.15rem; border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.app-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* The element right after a photo hero owns the "gap to first content" on
   its own (overriding that block's usual py-20/py-28), so the hero's
   bottom edge and the first line of content are never doubled up. Matches
   the requested ~28-36px mobile / ~48-64px desktop gap. Higher specificity
   (class + element) than the plain utility classes it's overriding, so no
   !important needed; only padding-top is touched, padding-bottom is left
   to the block's own class. */
.page-hero + section,
.page-hero + div {
  padding-top: 2rem; /* 32px */
}
@media (min-width: 1024px) {
  .page-hero + section,
  .page-hero + div {
    padding-top: 3.5rem; /* 56px */
  }
}
