/* ==========================================================================
   Anasayfa v3 — td.css belirteçlerini kullanır.
   Konsept: koyu, dokulu bir sahnede dönen logo halkası; ihtiyaca göre
   yön veren etkileşimli seçici; bento ızgara; kaydırmayla çizilen beşgen.
   ========================================================================== */

:root {
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  --glass: rgba(255, 255, 255, .06);
  --glass-line: rgba(255, 255, 255, .14);
}

/* --- Hero ----------------------------------------------------------------- */
.h-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: #0b0822; color: #fff;
  padding-top: calc(var(--header-h) + clamp(40px, 6vw, 88px));
  padding-bottom: clamp(48px, 6vw, 80px);
}
.h-hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.h-hero__bg::after { content: ""; position: absolute; inset: 0; background-image: var(--grain); opacity: .09; mix-blend-mode: overlay; }
.h-blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; animation: h-drift 18s ease-in-out infinite alternate; }
.h-blob--1 { width: 560px; height: 560px; left: -180px; top: -200px; background: #7a2cff; }
.h-blob--2 { width: 460px; height: 460px; right: 18%; bottom: -260px; background: #2250ff; animation-delay: -6s; }
.h-blob--3 { width: 380px; height: 380px; right: -120px; top: 10%; background: #d61ff2; opacity: .4; animation-delay: -12s; }
.h-ring {
  position: absolute; width: min(980px, 120vw); right: -26%; top: 50%; translate: 0 -50%;
  opacity: .5; filter: saturate(1.15) drop-shadow(0 0 120px rgba(122, 44, 255, .5));
  animation: h-spin 80s linear infinite;
}
@keyframes h-spin { to { rotate: 360deg; } }
@keyframes h-drift { to { transform: translate(60px, 40px) scale(1.12); } }

.h-hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.h-hero__content { display: grid; gap: 28px; justify-items: start; }
.h-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: var(--fs-xs); font-weight: 500; color: #e9e5ff;
}
.h-pill i { width: 8px; height: 8px; border-radius: 50%; background: #3ee6a0; box-shadow: 0 0 0 4px rgba(62, 230, 160, .18); animation: h-pulse 2.4s ease-in-out infinite; }
@keyframes h-pulse { 50% { box-shadow: 0 0 0 8px rgba(62, 230, 160, 0); } }
.h-hero h1 { font-size: clamp(2.6rem, 1.4rem + 5vw, 5.75rem); line-height: .98; letter-spacing: -.045em; font-weight: 700; }
.h-rotator { display: inline-block; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; transition: opacity .35s ease, transform .35s ease; }
.h-rotator.is-out { opacity: 0; transform: translateY(.25em); }
.h-hero__lead { font-size: var(--fs-lg); line-height: 1.6; color: #c6c1e6; max-width: 54ch; }
.h-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.h-btn-light { background: #fff; color: var(--ink) !important; }
.h-btn-light:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(255, 255, 255, .5); }
.h-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-family: var(--font-mono); font-size: var(--fs-xs); color: #a9a3d1; }
.h-meta span { display: inline-flex; align-items: center; gap: 8px; }
.h-meta span::before { content: ""; width: 5px; height: 5px; border-radius: 1px; background: var(--gradient); rotate: 45deg; }

/* İhtiyaç seçici */
.h-need {
  position: relative; display: grid; gap: 18px; padding: 26px; border-radius: 26px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03));
  border: 1px solid var(--glass-line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6);
}
.h-need__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.h-need__head strong { font-family: var(--font-display); font-size: var(--fs-xl); }
.h-need__head small { font-family: var(--font-mono); font-size: var(--fs-xs); color: #a9a3d1; }
.h-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.h-chip {
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--glass-line); background: transparent;
  color: #e9e5ff; font: 500 var(--fs-sm)/1.2 var(--font-body); cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.h-chip:hover { border-color: rgba(255, 255, 255, .4); }
.h-chip[aria-selected="true"] { background: #fff; color: var(--ink); border-color: #fff; }
.h-panel { display: grid; gap: 14px; padding-top: 18px; border-top: 1px solid var(--glass-line); }
.h-panel p { color: #c6c1e6; font-size: var(--fs-sm); }
.h-panel ul { display: grid; gap: 2px; }
.h-panel li a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; margin-inline: -12px; border-radius: 10px; text-decoration: none; font-weight: 500; font-size: var(--fs-sm); }
.h-panel li a:hover { background: var(--glass); }
.h-panel li svg { width: 16px; height: 16px; color: #a9a3d1; }
.h-panel__first { font-family: var(--font-mono); font-size: var(--fs-xs); color: #d9ccff; }
.h-panel .btn { justify-self: start; }

/* --- Kayan şerit --------------------------------------------------------- */
.h-marquee { overflow: hidden; background: var(--ink); color: #fff; border-block: 1px solid rgba(255, 255, 255, .08); }
.h-marquee__track { display: flex; width: max-content; animation: h-marquee 40s linear infinite; }
.h-marquee__track span { display: inline-flex; align-items: center; gap: 28px; padding: 20px 14px; font-family: var(--font-display); font-size: clamp(1.1rem, .9rem + .8vw, 1.6rem); font-weight: 600; white-space: nowrap; color: #d9d4f7; }
.h-marquee__track span::after { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--gradient); rotate: 45deg; margin-left: 14px; }
@keyframes h-marquee { to { transform: translateX(-50%); } }

/* --- Bölüm başlığı ------------------------------------------------------- */
.h-section { padding-block: clamp(72px, 9vw, 136px); }
.h-title { display: grid; gap: 16px; max-width: 820px; margin-bottom: clamp(36px, 5vw, 60px); }
.h-title h2 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.5rem); line-height: 1.02; letter-spacing: -.035em; }
.h-title p { color: var(--muted); font-size: var(--fs-lg); max-width: 60ch; }
.h-title--row { max-width: none; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: end; gap: 20px 64px; }
.h-title--row > div { display: grid; gap: 16px; }

/* --- Bento --------------------------------------------------------------- */
.h-bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.h-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 16px; padding: clamp(24px, 2.6vw, 34px); border-radius: 26px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.h-tile h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); letter-spacing: -.03em; }
.h-tile > p { color: var(--muted); max-width: 46ch; }
.h-tile__kicker { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.h-tile--software { grid-column: span 7; grid-row: span 2; background: var(--ink); color: #fff; border-color: transparent; }
.h-tile--software > p { color: #c6c1e6; }
.h-tile--software .h-tile__kicker { color: #d9ccff; }
.h-tile--software::before { content: ""; position: absolute; width: 520px; height: 520px; right: -200px; bottom: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(122, 44, 255, .55), transparent 65%); pointer-events: none; }
.h-tile--consulting { grid-column: span 5; }
.h-tile--solutions { grid-column: span 5; background: var(--gradient); color: #fff; border-color: transparent; }
.h-tile--solutions > p, .h-tile--solutions .h-tile__kicker { color: rgba(255, 255, 255, .85); }
.h-tile--demo { grid-column: span 5; background: #0f0b2a; color: #e9e5ff; border-color: transparent; }
.h-tile--own { grid-column: span 3; background: #efeafe; border-color: transparent; justify-content: space-between; }
.h-tile--tools { grid-column: span 4; }
.h-links { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.h-links a { padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); font-size: var(--fs-sm); font-weight: 500; text-decoration: none; background: var(--surface); transition: border-color .2s ease, background-color .2s ease, color .2s ease; }
.h-links a:hover { border-color: var(--accent); color: var(--accent); }
.h-tile--software .h-links a { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: #fff; }
.h-tile--software .h-links a:hover { background: #fff; color: var(--ink); }
.h-tile--solutions .h-links a { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); color: #fff; }
.h-tile--solutions .h-links a:hover { background: #fff; color: var(--ink); }
.h-code { position: relative; font-family: var(--font-mono); font-size: 13px; line-height: 1.7; color: #b8b2e0; padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); overflow-x: auto; }
.h-code b { color: #f0a5ff; font-weight: 500; }
.h-code em { color: #8fb0ff; font-style: normal; }

/* Canlı JSON demosu */
.h-demo__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.h-demo__bar span { font-family: var(--font-mono); font-size: var(--fs-xs); color: #a9a3d1; }
.h-demo__bar button { padding: 8px 14px; border-radius: 999px; border: 0; background: var(--gradient); color: #fff; font: 600 var(--fs-xs)/1 var(--font-body); cursor: pointer; }
.h-demo label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.h-demo textarea, .h-demo pre {
  width: 100%; margin: 0; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .04); color: #e9e5ff; font: 13px/1.6 var(--font-mono); resize: none; overflow: auto;
}
.h-demo textarea { height: 64px; }
.h-demo pre { min-height: 120px; max-height: 180px; white-space: pre; }
.h-demo pre.is-error { color: #ff9db0; white-space: pre-wrap; }
.h-demo textarea:focus { outline: none; border-color: #d9ccff; }
.h-demo { display: grid; gap: 10px; }
.h-own__big { font-family: var(--font-display); font-size: clamp(2.4rem, 1.8rem + 2vw, 3.4rem); line-height: .95; letter-spacing: -.04em; font-weight: 700; }
.h-own__big span { display: block; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h-tile--own p { color: #4a4670; font-size: var(--fs-sm); }
.h-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; font-family: var(--font-mono); font-size: 12.5px; }
.h-tools a { text-decoration: none; color: var(--ink); display: flex; gap: 6px; padding: 3px 0; }
.h-tools a::before { content: ">"; color: var(--magenta); }
.h-tools a:hover { color: var(--accent); }

/* --- Kaydırmalı süreç ---------------------------------------------------- */
.h-process { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.h-process__sticky { position: sticky; top: calc(var(--header-h) + 32px); display: grid; gap: 24px; }
.h-meter { position: relative; width: min(380px, 100%); aspect-ratio: 1; }
.h-meter svg { width: 100%; height: 100%; overflow: visible; }
.h-meter__track { fill: none; stroke: var(--line); stroke-width: 16; stroke-linejoin: round; }
.h-meter__fill { fill: none; stroke: url(#td-grad); stroke-width: 16; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 80; transition: stroke-dashoffset .6s cubic-bezier(.2, .8, .2, 1); }
.h-meter__label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 4px; }
.h-meter__label strong { font-family: var(--font-display); font-size: clamp(3.2rem, 2.4rem + 3vw, 5rem); line-height: 1; letter-spacing: -.05em; }
.h-meter__label small { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.h-steps { display: grid; gap: 14px; counter-reset: s; }
.h-step { display: grid; gap: 10px; padding: clamp(24px, 3vw, 36px); border-radius: 22px; border: 1px solid var(--line); background: var(--surface); transition: border-color .3s ease, box-shadow .3s ease, opacity .3s ease; opacity: .55; }
.h-step.is-active, .h-steps:not(.is-live) .h-step { opacity: 1; }
.h-step.is-active { border-color: transparent; box-shadow: 0 0 0 1.5px var(--violet), 0 30px 60px -30px rgba(91, 43, 255, .35); }
.h-step small { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--accent); letter-spacing: .06em; }
.h-step h3 { font-size: var(--fs-xl); letter-spacing: -.025em; }
.h-step p { color: var(--muted); }

/* --- Karşılaştırma ------------------------------------------------------- */
.h-diff { border-radius: 28px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .1); }
.h-diff__row { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1fr) minmax(0, 1fr); }
.h-diff__row > * { padding: 22px clamp(18px, 2.4vw, 32px); }
.h-diff__row + .h-diff__row { border-top: 1px solid rgba(255, 255, 255, .08); }
.h-diff__row--head { background: rgba(255, 255, 255, .04); font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: #a9a3d1; }
.h-diff__row--head > :last-child { color: #fff; }
.h-diff__topic { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-lg); }
.h-diff__old { color: #8e88b8; text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .25); }
.h-diff__new { position: relative; color: #fff; font-weight: 500; background: linear-gradient(90deg, rgba(122, 44, 255, .18), transparent); }
.h-diff__new::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 3px; background: var(--gradient); }

/* --- Kapanış ------------------------------------------------------------- */
.h-final { position: relative; overflow: hidden; isolation: isolate; background: #0b0822; color: #fff; padding-block: clamp(80px, 10vw, 150px); }
.h-final::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--grain); opacity: .08; mix-blend-mode: overlay; }
.h-final .h-ring { right: auto; left: 50%; top: 105%; translate: -50% -50%; width: min(1100px, 150vw); opacity: .55; }
.h-final__inner { display: grid; gap: 28px; justify-items: center; text-align: center; }
.h-final h2 { font-size: clamp(2.6rem, 1.4rem + 5.4vw, 6.25rem); line-height: .95; letter-spacing: -.05em; max-width: 14ch; }
.h-final p { color: #c6c1e6; font-size: var(--fs-lg); max-width: 52ch; }
.h-final .h-actions { justify-content: center; }
.h-contacts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.h-contacts a, .h-contacts span { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); text-decoration: none; font-size: var(--fs-sm); color: #fff; }
.h-contacts small { font-family: var(--font-mono); font-size: 11px; color: #a9a3d1; text-transform: uppercase; letter-spacing: .06em; }

/* --- Duyarlı ------------------------------------------------------------- */
@media (max-width: 1080px) {
  .h-tile--software, .h-tile--consulting, .h-tile--solutions { grid-column: span 12; grid-row: auto; }
  .h-tile--demo { grid-column: span 12; }
  .h-tile--own, .h-tile--tools { grid-column: span 6; }
}
@media (max-width: 900px) {
  .h-hero__grid, .h-title--row, .h-process { grid-template-columns: minmax(0, 1fr); }
  .h-ring { width: 640px; right: -60%; top: 30%; opacity: .35; }
  .h-process__sticky { position: static; grid-template-columns: 120px minmax(0, 1fr); align-items: center; }
  .h-meter { width: 120px; }
  .h-meter__label strong { font-size: 2rem; }
  .h-meter__label small { display: none; }
  .h-diff__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .h-diff__topic { grid-column: 1 / -1; padding-bottom: 0 !important; }
  .h-diff__row--head > :first-child { display: none; }
}
@media (max-width: 640px) {
  .h-tile--own, .h-tile--tools { grid-column: span 12; }
  .h-diff__row { grid-template-columns: minmax(0, 1fr); }
  .h-diff__row--head { display: none; }
  .h-diff__old::before { content: "Alışılmış: "; text-decoration: none; display: inline; }
  .h-actions .btn { width: 100%; }
  .h-need { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .h-marquee__track { animation: none; }
}
.h-final .h-ring { z-index: -1; }
.h-hero .btn--ghost, .h-final .btn--ghost { background: transparent; border-color: rgba(255, 255, 255, .28); color: #fff; }
.h-hero .btn--ghost:hover, .h-final .btn--ghost:hover { border-color: #fff; }
.td .h-hero a.btn--ghost, .td .h-final a.btn--ghost { color: #fff; }
