/* =========================================================
   Kamusis AI — yapay zekâ destekli EBYS tanıtım sitesi
   Tasarım dili: 2027 takvimi — karanlık zemin, ışıyan ağlar,
   Chakra Petch tipografi, konuşma balonu kartları
   ========================================================= */

:root {
  /* Zemin */
  --bg: #05080f;
  --bg-2: #080d19;
  --bg-3: #0c1324;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);

  /* Metin */
  --text: #e9eef8;
  --muted: #9ba6bc;
  --dim: #66718a;

  /* Marka */
  --brand-blue: #284790;
  --brand-blue-l: #6f8fe0;
  --brand-red: #ef4136;
  --is-purple: #7f2d68;

  /* Görsellerdeki ışıma + Tusi moru */
  --glow: #4fe0e8;
  --glow-2: #3aa8ff;
  --violet: #b9a2f5;
  --violet-d: #6b46d6;

  /* Takvimdeki konuşma balonu */
  --bubble: rgba(52, 54, 58, 0.82);

  /* Tipografi */
  --f-display: "Chakra Petch", system-ui, sans-serif;
  --f-body: "Chakra Petch", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* Ölçüler */
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  /* Kesik köşe — logodaki AI kutusunun eğimi (yatay:dikey ≈ 1.8:1) */
  --cut-s: 8px;
  --cut-m: 14px;
  --cut-l: 24px;
  --cut-ratio: 0.556;
  --header-h: 72px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

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

::selection {
  background: rgba(79, 224, 232, 0.3);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Kesik köşe sistemi ----------
   Sağ üst ve sol alt köşe kesik (logodaki AI kutusu gibi).
   --cut: yatay kesik; dikey kesik oranla hesaplanır.
   Çerçeveli öğelerde çapraz kenar çizgisi arka plan gradyanıyla çizilir;
   bu yüzden bu öğelerde zemin rengi yalnızca background-color ile verilir. */

.cut,
.badge,
.badge__ai,
.menu-toggle,
.aidemo__win,
.doc__draft,
.res-card,
.chip,
.aidemo__act,
.layer,
.layer__mods a,
.guard__zone,
.gnode,
.law,
.law__stamp,
.cert,
.ask,
.tusi__text .tusi__note,
.form,
.field input,
.field textarea,
.field select,
.form__ok,
.legal__draft {
  --cut: var(--cut-m);
  --cut-y: calc(var(--cut) * var(--cut-ratio));
  --cut-line: var(--line);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut-y), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut-y)));
  background-image:
    linear-gradient(to top right, transparent calc(50% - 0.75px), var(--cut-line) 50%, transparent calc(50% + 0.75px)),
    linear-gradient(to top right, transparent calc(50% - 0.75px), var(--cut-line) 50%, transparent calc(50% + 0.75px));
  background-position: top right, bottom left;
  background-size: var(--cut) var(--cut-y);
  background-repeat: no-repeat;
}

.badge__ai,
.field input,
.field textarea,
.field select {
  --cut: var(--cut-s);
}

.guard__zone,
.layer,
.form {
  --cut: var(--cut-l);
}

.badge__ai {
  background-image: none;
}

/* ---------- Tipografi ---------- */

h1,
h2,
h3,
h4 {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0;
}

p {
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--glow);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.eyebrow--violet {
  color: var(--violet);
}

.section-head {
  max-width: 860px;
  margin-bottom: clamp(40px, 6vw, 64px);
}

.section-head h2 {
  font-size: clamp(34px, 4.8vw, 58px);
  margin-top: 18px;
}

.section-head p {
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(17px, 1.4vw, 19px);
  max-width: 640px;
}

.grad {
  background: linear-gradient(100deg, #fff 0%, var(--glow) 55%, var(--glow-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.grad--violet {
  background-image: linear-gradient(100deg, #fff 0%, var(--violet) 50%, #8f6cff 100%);
}

/* ---------- Butonlar ----------
   Taslak: docs/button.svg
   .btn            Temel: kesik köşeli dolgu. Menüde yalnızca bu kullanılır.
   .btn--frame     Seçenek 1: dolgunun çevresinde kesik köşeli çerçeve.
   .btn--bracket   Seçenek 2: sol-alt ve sağ-üst köşe braketleri; üzerine gelince açılır.
   .btn--ghost     Şeffaf: dolgu yok, iç kontur. Diğerleriyle birleşebilir.
   .btn--sm        Küçük boy.
   Çizgiler main.js → decorateButtons() ile eklenen SVG'dedir; JS yoksa dolgu yine görünür. */

.btn {
  --g: 0px;                                   /* dolgu ile dış çizgi arası boşluk */
  --cut: 10px;
  --cut-y: calc(var(--cut) * var(--cut-ratio));
  --fill: var(--brand-red);
  --fill-hover: #ff5044;
  --line-c: #4f70d8;                          /* taslaktaki lacivert, koyu zemin için açıldı */
  --line-hover: #8fa8ff;
  --trace: var(--glow);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 52px;
  padding: 0 calc(26px + var(--g));
  border: 0;
  background: none;
  color: #fff;
  font-family: var(--f-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Dolgu */
.btn::before {
  content: "";
  position: absolute;
  inset: var(--g);
  z-index: -2;
  background-color: var(--fill);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut-y), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut-y)));
  transition: background-color 0.25s, inset 0.35s var(--ease);
}

/* Tarama ışığı */
.btn::after {
  content: "";
  position: absolute;
  inset: var(--g);
  z-index: -1;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut-y), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut-y)));
  background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, 0.32) 50%, transparent 65%) no-repeat;
  background-size: 250% 100%;
  background-position: 160% 0;
  pointer-events: none;
}

.btn:hover::before,
.btn:focus-visible::before {
  background-color: var(--fill-hover);
}

.btn:hover::after,
.btn:focus-visible::after {
  transition: background-position 0.8s var(--ease);
  background-position: -60% 0;
}

.btn:active::before {
  inset: calc(var(--g) + 1px);
}

.btn:focus-visible {
  outline: none;
}

.btn > svg:not(.btn__fx) {
  width: 16px;
  height: 16px;
  transition: transform 0.3s var(--ease);
}

.btn:hover > svg:not(.btn__fx),
.btn:focus-visible > svg:not(.btn__fx) {
  transform: translateX(4px);
}

/* Çizgi katmanı (JS) */
.btn__fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: -1;
}

.btn__fx path {
  fill: none;
  stroke: var(--line-c);
  stroke-width: 1;
  transition: transform 0.4s var(--ease), stroke 0.25s;
}

.btn__fx .t {
  stroke: var(--trace);
  stroke-width: 1.6;
  stroke-linecap: square;
  stroke-dasharray: 14 100;
  stroke-dashoffset: 14;
  opacity: 0;
  filter: drop-shadow(0 0 3px var(--trace));
}

.btn:hover .btn__fx path:not(.t),
.btn:focus-visible .btn__fx path:not(.t) {
  stroke: var(--line-hover);
}

.btn:hover .btn__fx .t,
.btn:focus-visible .btn__fx .t {
  animation: btnTrace 0.9s var(--ease) forwards;
}

@keyframes btnTrace {
  0% {
    stroke-dashoffset: 14;
    opacity: 1;
  }
  75% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: -100;
    opacity: 0;
  }
}

/* Seçenek 1: çerçeve */
.btn--frame {
  --g: 5px;
}

.btn--frame:hover::before,
.btn--frame:focus-visible::before {
  inset: 2px;
}

/* Seçenek 2: braketler */
.btn--bracket {
  --g: 5px;
}

.btn--bracket:hover .btn__fx .bl,
.btn--bracket:focus-visible .btn__fx .bl {
  transform: translate(-3px, 3px);
}

.btn--bracket:hover .btn__fx .tr,
.btn--bracket:focus-visible .btn__fx .tr {
  transform: translate(3px, -3px);
}

/* Şeffaf */
.btn--ghost {
  --fill: transparent;
  --fill-hover: rgba(79, 224, 232, 0.08);
  --line-c: rgba(233, 238, 248, 0.35);
  --line-hover: rgba(79, 224, 232, 0.8);
  color: var(--text);
}

.btn--ghost::after {
  background-image: linear-gradient(100deg, transparent 35%, rgba(79, 224, 232, 0.16) 50%, transparent 65%);
}

/* Küçük boy (menü) */
.btn--sm {
  --cut: 8px;
  height: 40px;
  padding: 0 calc(18px + var(--g));
  font-size: 12.5px;
}

/* =========================================================
   Header
   ========================================================= */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.header.is-scrolled {
  background: rgba(5, 8, 15, 0.74);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}

.header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand img {
  height: 30px;
  width: auto;
}

/* =========================================================
   Logo (satır içi SVG)
   Açılış: harfler sırayla → AI kutusu kesik köşesinden açılır →
   "AI" belirir → kutu ışır → tarama ışığı geçer.
   Üzerine gelince: tarama ışığı tekrar geçer, kutu parlar.
   ========================================================= */

.logo {
  display: block;
  height: 40px;
  width: auto;
  aspect-ratio: 281 / 83;
  overflow: visible;
  transition: height 0.35s var(--ease);
}

.header.is-scrolled .logo {
  height: 34px;
}

.logo__l,
.logo__box,
.logo__ai-text,
.logo__scan {
  transform-box: fill-box;
}

.logo__l {
  animation: logoLetter 0.55s var(--ease) both;
  animation-delay: calc(0.1s + var(--i) * 0.06s);
}

@keyframes logoLetter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.logo__box {
  transform-origin: 0% 100%;
  animation:
    logoBox 0.6s cubic-bezier(0.3, 1.4, 0.5, 1) 0.55s both,
    logoGlow 1.1s ease-out 1.05s; /* son karede kalmaz: hover ışıması çalışsın */
  transition: filter 0.3s;
}

@keyframes logoBox {
  from {
    opacity: 0;
    transform: scale(0.35);
  }
}

@keyframes logoGlow {
  0% {
    filter: drop-shadow(0 0 0 rgba(239, 65, 54, 0));
  }
  35% {
    filter: drop-shadow(0 0 14px rgba(239, 65, 54, 0.95));
  }
  100% {
    filter: drop-shadow(0 0 0 rgba(239, 65, 54, 0));
  }
}

.logo__ai-text {
  animation: logoAiText 0.45s var(--ease) 0.9s both;
}

@keyframes logoAiText {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.logo__scan {
  opacity: 0;
  animation: logoScan 0.75s var(--ease) 1.15s both;
}

.logo__scan--hover {
  animation: none;
}

@keyframes logoScan {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 1;
    transform: translateX(84px);
  }
}

.brand:hover .logo__scan--hover,
.brand:focus-visible .logo__scan--hover {
  animation: logoScan 0.7s var(--ease) both;
}

.brand:hover .logo__box,
.brand:focus-visible .logo__box {
  filter: drop-shadow(0 0 10px rgba(239, 65, 54, 0.75));
}

.nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
}

.nav a {
  padding: 8px 13px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
  background: var(--surface-2);
}

.nav a.is-active {
  box-shadow: inset 0 -2px 0 var(--brand-red);
}

.header__cta {
  display: flex;
  gap: 10px;
  align-items: center;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-2);
  background-color: var(--surface);
  cursor: pointer;
  position: relative;
}

.menu-toggle span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.menu-toggle span:nth-child(1) {
  top: 16px;
}
.menu-toggle span:nth-child(2) {
  top: 21px;
}
.menu-toggle span:nth-child(3) {
  top: 26px;
}

body.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
body.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}
body.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 40px) 0 120px;
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__media img,
.hero__media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 50%;
  transform: scale(1.06);
  animation: heroZoom 18s var(--ease) forwards;
}

.hero__media video {
  object-position: 100% 50%;
  transform-origin: 100% 50%;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s ease, visibility 0s 1.2s;
}

.hero__slide.is-on {
  opacity: 1;
  visibility: visible;
  transition: opacity 1.2s ease, visibility 0s;
}

/* 2. sahnede konu videonun ortasında: video sağa kaydırılır, sol kenarı zemine erir */
.hero__slide--veri {
  left: 42%;
  right: -16%;
  background: var(--bg);
  inset-block: 0;
}

.hero__slide--veri video {
  object-position: 50% 50%;
  animation: none;
  transform: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 26%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 26%);
  transition: opacity 0.35s;
}

.hero__slide--veri video.is-dip {
  opacity: 0.15;
}

/* 3. sahne kadrajın tamamını doldurur; nokta dokusu metnin arkasında söner */
.hero__slide--dalga {
  background: var(--bg);
}

.hero__slide--dalga video {
  object-position: 60% 50%;
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.42) 46%, #000 70%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.42) 46%, #000 70%);
}

@keyframes heroZoom {
  to {
    transform: scale(1);
  }
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 15, 0.92) 0%, rgba(5, 8, 15, 0.72) 40%, rgba(5, 8, 15, 0.05) 72%),
    linear-gradient(0deg, var(--bg) 0%, rgba(5, 8, 15, 0) 30%);
}

.hero__net {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.5;
  pointer-events: none;
}

.hero__content {
  max-width: 860px;
}

/* "Türkiye'nin ilk..." rozeti — AI-EBYS-Badge görselinin web karşılığı */
.badge {
  --cut: 10px;
  --cut-line: rgba(139, 92, 246, 0.7);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 7px 18px 7px 7px;
  font-family: var(--f-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #efe9ff;
  background-color: rgba(14, 10, 32, 0.88);
  border: 1px solid rgba(139, 92, 246, 0.7);
}

.badge__ai {
  display: grid;
  place-items: center;
  width: 30px;
  height: 26px;
  background: var(--brand-red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.hero__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(36px, 4.6vw, 66px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-top: 28px;
}

/* İki metin aynı hücrede: geçişte yükseklik değişmez */
.hero__copies {
  display: grid;
}

.hero__copy {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0s 0.4s;
}

.hero__copy.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.7s var(--ease) 0.35s, transform 0.7s var(--ease) 0.35s, visibility 0s 0.35s;
}

.hero__nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
}

.hero__dot {
  width: 72px;
  height: 44px;
  padding: 0;
  border: 0;
  background: linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22)) center / 100% 3px no-repeat;
  cursor: pointer;
  transition: background-size 0.2s;
}

.hero__dot:hover {
  background-size: 100% 5px;
}

.hero__dot i {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--glow);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.hero__pause {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.hero__pause:hover {
  color: #fff;
}

.hero__pause svg {
  width: 16px;
  height: 16px;
}

.hero__pause .r,
.hero__pause.is-paused .p {
  display: none;
}

.hero__pause.is-paused .r {
  display: block;
}

.hero__lead {
  margin-top: 24px;
  font-size: clamp(18px, 1.6vw, 21px);
  color: #c9d1e0;
  max-width: 580px;
}

.hero__product {
  margin-top: 18px;
  padding-left: 14px;
  border-left: 2px solid var(--brand-red);
  font-size: 15.5px;
  color: var(--muted);
  max-width: 560px;
}

.hero__product b {
  color: var(--text);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}

.hero__caption {
  position: absolute;
  right: var(--gutter);
  bottom: 40px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero__caption::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 32px;
  width: 22px;
  height: 36px;
  margin-left: -11px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px; /* fare simgesi: köşeli tasarımın bilinçli istisnası */
}

.scroll-cue::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--glow);
  animation: cue 1.8s ease-in-out infinite;
}

@keyframes cue {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  70% {
    transform: translateY(12px);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

/* =========================================================
   Rakamlar
   ========================================================= */

.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  padding: 44px 0 34px;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  padding: 4px 24px;
  border-left: 1px solid var(--line);
}

.stat:first-child {
  border-left: 0;
  padding-left: 0;
}

.stat strong {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff, #b8c6e0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span {
  display: block;
  margin-top: 10px;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--glow);
}

.stats__note {
  margin-top: 26px;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--muted);
}

/* =========================================================
   Genel bölüm
   ========================================================= */

.section {
  position: relative;
  padding: clamp(88px, 12vw, 150px) 0;
}

.section--alt {
  background: var(--bg-2);
}

/* =========================================================
   AI modülleri — canlı demo
   Sekmeli uygulama penceresi; solda belge, sağda yapay zekâ çıktısı.
   Senaryolar main.js → AI_DEMO.
   ========================================================= */

.aidemo {
  position: relative;
}

.aidemo__win {
  --cut: var(--cut-l);
  --cut-line: var(--line-2);
  background-color: var(--bg-2);
  border: 1px solid var(--line-2);
}

/* Başlık çubuğu */
.aidemo__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 28px;
  border-bottom: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: var(--muted);
}

.aidemo__dots {
  display: inline-flex;
  gap: 7px;
}

.aidemo__dots i {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.16);
  transform: rotate(45deg) scale(0.8);
}

.aidemo__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aidemo__live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--glow);
  white-space: nowrap;
}

.aidemo__live i {
  width: 7px;
  height: 7px;
  background: var(--brand-red);
  box-shadow: 0 0 10px var(--brand-red);
  animation: livePulse 1.6s ease-in-out infinite;
}

@keyframes livePulse {
  50% {
    opacity: 0.3;
  }
}

/* Sekmeler */
.aidemo__tabs {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  border-bottom: 1px solid var(--line);
}

.aidemo__tab {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px 18px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-family: var(--f-display);
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}

.aidemo__tab:last-child {
  border-right: 0;
}

.aidemo__tab small {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--dim);
  transition: color 0.2s;
}

.aidemo__tab strong {
  font-size: 17.5px;
  font-weight: 600;
  line-height: 1.2;
}

.aidemo__tab:hover {
  color: var(--text);
  background: var(--surface);
}

.aidemo__tab[aria-selected="true"] {
  color: var(--text);
  background: var(--surface-2);
  box-shadow: inset 0 -2px 0 var(--brand-red);
}

.aidemo__tab[aria-selected="true"] small {
  color: var(--brand-red);
}

.aidemo__tab:focus-visible {
  outline-offset: -4px;
}

/* Otomatik geçiş sayacı */
.aidemo__prog {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: var(--glow);
  box-shadow: 0 0 8px var(--glow);
}

/* Gövde */
.aidemo__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 580px;
}

.aidemo__doc {
  position: relative;
  padding: 32px 36px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
  font-size: 16px;
  line-height: 1.7;
  color: #c9d1e0;
  overflow: hidden;
}

/* Tarama ışını */
.aidemo__doc::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -30%;
  height: 30%;
  background: linear-gradient(180deg, transparent, rgba(79, 224, 232, 0.14) 70%, rgba(79, 224, 232, 0.55) 100%);
  border-bottom: 1px solid rgba(79, 224, 232, 0.8);
  opacity: 0;
  pointer-events: none;
}

.aidemo__doc.is-scanning::after {
  animation: docScan 1.3s var(--ease) forwards;
}

@keyframes docScan {
  0% {
    opacity: 1;
    top: -30%;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    top: 100%;
  }
}

.doc__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--dim);
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--line-2);
}

.doc__from {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--text);
  text-align: center;
}

.doc__subj {
  margin: 14px 0 10px;
}

.doc__subj b {
  color: var(--text);
}

.aidemo__doc p + p {
  margin-top: 10px;
}

.doc__att {
  list-style: none;
  margin: 16px 0 0;
  padding: 12px 0 0;
  border-top: 1px dashed var(--line-2);
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--muted);
  display: grid;
  gap: 4px;
}

.doc__label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}

.doc__draft {
  --cut: var(--cut-s);
  --cut-line: var(--line-2);
  border: 1px solid var(--line-2);
  background-color: rgba(255, 255, 255, 0.03);
  transition: border-color 0.35s;
  margin-top: 10px;
  padding: 14px 16px;
  font-size: 15px;
  color: var(--text);
}

/* Vurgular */
.aidemo__doc mark,
.aidemo__doc .s {
  background: transparent;
  color: inherit;
  transition: background-color 0.35s, color 0.35s, box-shadow 0.35s;
}

.aidemo__doc mark.is-hl {
  background: rgba(79, 224, 232, 0.2);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(79, 224, 232, 0.2);
}

.aidemo__doc .s.is-hl {
  background: rgba(239, 65, 54, 0.14);
  color: #fff;
  box-shadow: inset 2px 0 0 var(--brand-red);
}

.doc__draft.is-hl {
  --cut-line: rgba(79, 224, 232, 0.6);
  border-color: rgba(79, 224, 232, 0.6);
}

/* Çıktı */
.aidemo__out {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 32px 36px;
}

.aidemo__desc {
  color: var(--muted);
  font-size: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.aidemo__log {
  display: grid;
  gap: 4px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: var(--glow);
  min-height: 1.6em;
}

.aidemo__log:empty {
  display: none;
}

.aidemo__log p::before {
  content: "> ";
  color: var(--dim);
}

.aidemo__log p.is-done {
  color: var(--dim);
}

.aidemo__log p.is-done::after {
  content: "  ✓";
  color: #7ee2a8;
}

.aidemo__log p.is-typing::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 13px;
  margin-left: 3px;
  vertical-align: -2px;
  background: var(--glow);
  animation: blink 1s steps(2) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.aidemo__result {
  display: grid;
  gap: 10px;
}

.res-in {
  animation: resIn 0.5s var(--ease) both;
}

@keyframes resIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Soru-cevap: yapay zekâ solda, kullanıcı sağda */
.qa {
  display: grid;
  gap: 8px;
}

.qa__q,
.qa__a {
  --cut: 8px;
  width: fit-content;
  max-width: 90%;
  padding: 7px 14px;
  border: 1px solid var(--line-2);
  --cut-line: var(--line-2);
  background-color: var(--surface-2);
  font-size: 15px;
  line-height: 1.45;
  color: #e3e8f2;
}

.qa__a {
  --cut-line: rgba(79, 112, 216, 0.6);
  border-color: rgba(79, 112, 216, 0.6);
  background-color: rgba(79, 112, 216, 0.22);
  justify-self: end;
  color: #fff;
}

.qa__a[hidden] {
  display: none;
}

/* Tusi ile sohbet */
.chat {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 16px;
  align-items: start;
}

.chat__bot {
  position: sticky;
  top: 100px;
  aspect-ratio: 339.77 / 253.03;
}

.chat__bot svg {
  display: block;
  width: 100%;
  height: 100%;
}

.chat__msgs {
  display: grid;
  gap: 8px;
}

.chat__msg {
  --cut: 8px;
  --cut-line: rgba(185, 162, 245, 0.35);
  width: fit-content;
  max-width: 100%;
  min-height: 37px;
  padding: 7px 14px;
  border: 1px solid rgba(185, 162, 245, 0.35);
  background-color: rgba(139, 92, 246, 0.12);
  font-size: 15px;
  line-height: 1.45;
  color: #ece7fa;
}

.chat__msg--user {
  --cut-line: rgba(79, 112, 216, 0.6);
  border-color: rgba(79, 112, 216, 0.6);
  background-color: rgba(79, 112, 216, 0.22);
  justify-self: end;
  color: #fff;
}

.chat__msg.is-thinking {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat__msg.is-thinking i {
  width: 6px;
  height: 6px;
  background: #b9a2f5;
  animation: chatDot 0.9s ease-in-out infinite;
}

.chat__msg.is-thinking i:nth-child(2) {
  animation-delay: 0.15s;
}

.chat__msg.is-thinking i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes chatDot {
  50% {
    opacity: 0.25;
  }
}

.res-card {
  --cut-line: rgba(79, 224, 232, 0.35);
  padding: 14px 16px;
  background-color: rgba(79, 224, 232, 0.06);
  border: 1px solid rgba(79, 224, 232, 0.35);
}

.res-card small,
.res-label {
  display: block;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--glow);
}

.res-card b {
  display: block;
  margin-top: 4px;
  font-family: var(--f-display);
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.res-card p {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.6;
  color: #e3e8f2;
}

.res-card ul {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 15px;
  line-height: 1.6;
  color: #e3e8f2;
}

.res-card li + li {
  margin-top: 4px;
}

.aidemo .meter__bar span {
  width: 0;
  transition: width 0.9s var(--ease);
}

.res-alt {
  display: grid;
  grid-template-columns: 1fr 110px 34px;
  align-items: center;
  gap: 12px;
  padding: 4px 2px;
  font-size: 14px;
  color: var(--muted);
}

.res-alt .meter {
  margin: 0;
}

.res-alt em {
  font-style: normal;
  font-family: var(--f-mono);
  font-size: 11px;
  text-align: right;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.chip {
  --cut: 6px;
  padding: 4px 10px;
  font-size: 12.5px;
  color: #dfe6f3;
  background-color: var(--surface-2);
  border: 1px solid var(--line-2);
  --cut-line: var(--line-2);
}

/* Alt çubuk */
.aidemo__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 28px;
  border-top: 1px solid var(--line);
}

.aidemo__note {
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--dim);
}

.aidemo__acts {
  display: flex;
  gap: 8px;
  min-height: 32px;
}

.aidemo__act {
  --cut: 7px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  height: 32px;
  font-family: var(--f-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  background-color: var(--surface-2);
  border: 1px solid var(--line-2);
  --cut-line: var(--line-2);
}

.aidemo__act--on {
  background-color: var(--brand-red);
  border-color: transparent;
  --cut-line: transparent;
  color: #fff;
}

.aidemo__fallback {
  margin: 0;
  padding: 24px 24px 24px 44px;
  color: var(--muted);
  display: grid;
  gap: 10px;
}

.aidemo__fallback b {
  color: var(--text);
}

/* =========================================================
   Ölçer ve durum etiketi (ortak)
   ========================================================= */

.meter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--muted);
}

.meter__bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.meter__bar span {
  display: block;
  height: 100%;
  width: var(--v, 50%);
  background: linear-gradient(90deg, var(--glow-2), var(--glow));
  box-shadow: 0 0 10px var(--glow);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: #7ee2a8;
  text-align: right;
}

.status::before {
  content: "";
  transform: rotate(45deg) scale(0.85);
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* =========================================================
   Kamusis EBYS özellikleri
   ========================================================= */

.layers {
  display: grid;
}

.layer {
  position: relative;
  border: 1px solid var(--line-2);
  --cut-line: var(--line-2);
}

.layer__name {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 700;
}

.layer--ai {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 24px 40px;
  padding: 22px 32px;
  border-color: rgba(239, 65, 54, 0.7);
  --cut-line: rgba(239, 65, 54, 0.7);
  background-color: rgba(239, 65, 54, 0.07);
}

.layer__mods {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.layer__mods a {
  --cut: 9px;
  --cut-line: rgba(239, 65, 54, 0.45);
  display: grid;
  place-items: center;
  min-height: 52px;
  height: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(239, 65, 54, 0.45);
  background-color: var(--bg);
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.25s, border-color 0.25s;
}

.layer__mods a:hover {
  --cut-line: var(--brand-red);
  border-color: var(--brand-red);
  background-color: rgba(239, 65, 54, 0.2);
}

/* Katmanlar arası bağlantı: veri EBYS'den AI'a, öneri AI'dan EBYS'ye */
.layers__link {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 52px;
  padding: 0 10%;
}

.layers__link i {
  position: relative;
  justify-self: center;
  width: 1px;
  background: linear-gradient(180deg, rgba(239, 65, 54, 0.7), rgba(79, 112, 216, 0.8));
}

.layers__link i::after {
  content: "";
  position: absolute;
  left: -1px;
  bottom: 0;
  width: 3px;
  height: 14px;
  background: var(--glow);
  animation: layerFlow 2.4s linear infinite;
}

.layers__link i:nth-child(2)::after {
  background: var(--brand-red);
  animation-direction: reverse;
  animation-delay: -0.8s;
}

.layers__link i:nth-child(3)::after {
  animation-delay: -1.5s;
}

@keyframes layerFlow {
  0% { transform: translateY(0); opacity: 0; }
  15%,
  60% { opacity: 1; }
  75%,
  100% { transform: translateY(-38px); opacity: 0; }
}

.layer--ebys {
  border-color: rgba(79, 112, 216, 0.6);
  --cut-line: rgba(79, 112, 216, 0.6);
  background-color: rgba(40, 71, 144, 0.16);
}

.layer--ebys .layer__name {
  display: block;
  padding: 22px 32px;
}

.cells {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.cell {
  padding: 26px 24px 28px 32px;
  border-top: 1px solid rgba(79, 112, 216, 0.28);
  border-right: 1px solid rgba(79, 112, 216, 0.28);
  transition: background-color 0.25s;
}

.cell:nth-child(4n) {
  border-right: 0;
}

.cell:hover {
  background-color: rgba(40, 71, 144, 0.22);
}

.cell svg {
  width: 26px;
  height: 26px;
  color: #8fa8ff;
}

.cell h3 {
  margin-top: 14px;
  font-size: 18px;
}

.cell p {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.5;
  color: #b4bed2;
}

/* =========================================================
   Güvenlik — kurum sınırı şeması
   Düğümler HTML, çizgiler ve akan veri SVG (main.js → guard).
   ========================================================= */

.guard {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: 76px;
}

.guard__zone,
.guard__out {
  position: relative;
  display: grid;
  gap: 40px 64px;
  padding: 60px 36px 36px;
}

.guard__zone {
  --cut-line: rgba(79, 224, 232, 0.5);
  grid-template-columns: 1fr 1fr 1.12fr;
  grid-template-rows: 1fr 1fr;
  grid-template-areas: "belge ebys ai" "kullanici ebys kep";
  background-color: rgba(79, 224, 232, 0.025);
  border: 1px solid rgba(79, 224, 232, 0.5);
  min-height: 430px;
}

.guard__out {
  grid-template-rows: 1fr 1fr;
  padding-inline: 0;
}

.guard__label {
  position: absolute;
  left: 36px;
  top: 22px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--glow);
}

.guard__out .guard__label {
  left: 0;
  color: var(--muted);
}

.gnode {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  padding: 18px 20px;
  background-color: var(--bg-2);
  border: 1px solid var(--line-2);
  --cut-line: var(--line-2);
}

.gnode[data-node="belge"] { grid-area: belge; }
.gnode[data-node="kullanici"] { grid-area: kullanici; }
.gnode[data-node="ebys"] { grid-area: ebys; }
.gnode[data-node="ai"] { grid-area: ai; }
.gnode[data-node="kep"] { grid-area: kep; }

.gnode svg {
  width: 26px;
  height: 26px;
  margin-bottom: 4px;
  color: var(--glow);
}

.gnode b {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
}

.gnode span {
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--muted);
}

.gnode em {
  margin-top: 6px;
  font-style: normal;
  text-align: left;
}

.gnode--core {
  --cut-line: #4f70d8;
  border-color: #4f70d8;
  background-color: #0e1a3a;
}

.gnode--core b {
  font-size: 22px;
}

.gnode--core svg {
  width: 36px;
  height: 36px;
  color: #8fa8ff;
}

.gnode--ai {
  --cut-line: rgba(239, 65, 54, 0.75);
  border-color: rgba(239, 65, 54, 0.75);
}

.gnode--ai svg {
  color: var(--brand-red);
}

.gnode--off {
  border-style: dashed;
  background-color: transparent;
}

.gnode--off svg,
.gnode--off b {
  color: var(--muted);
}

.guard__fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  fill: none;
  stroke-width: 1.5;
}

.guard__fx .ln {
  stroke: rgba(255, 255, 255, 0.2);
}

.guard__fx .ln--ai {
  stroke: rgba(239, 65, 54, 0.5);
}

.guard__fx .ln--off {
  stroke: rgba(255, 255, 255, 0.2);
  stroke-dasharray: 3 6;
}

.guard__fx .pk {
  stroke: var(--glow);
  stroke-width: 3;
  stroke-dasharray: 16 100;
  stroke-dashoffset: 16;
  animation: guardFlow 2.6s linear infinite;
  animation-delay: var(--t, 0s);
}

.guard__fx .pk--red {
  stroke: var(--brand-red);
}

.guard:not(.is-live) .guard__fx * {
  animation-play-state: paused;
}

/* Veri paketi ilk yarıda yolu geçer, ikinci yarıda bekler */
@keyframes guardFlow {
  0% { stroke-dashoffset: 16; }
  55%,
  100% { stroke-dashoffset: -100; }
}

/* Sınır işaretleri */
.guard__fx .gate rect {
  fill: var(--bg);
  stroke: var(--glow);
}

.guard__fx .gate path {
  stroke: var(--glow);
}

.guard__fx .gate--stop rect,
.guard__fx .gate--stop path {
  stroke: var(--brand-red);
}

.guard__fx .gate--stop rect {
  animation: guardStop 2.6s linear infinite;
  animation-delay: var(--t, 0s);
}

@keyframes guardStop {
  0%,
  50% { fill: var(--bg); }
  58% { fill: rgb(150, 34, 28); }
  90%,
  100% { fill: var(--bg); }
}

/* =========================================================
   Mevzuat — mühürlü belge kartları ve sertifikalar
   ========================================================= */

.lawgrid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.law {
  position: relative;
  padding: 26px 28px 28px;
  background-color: var(--bg);
  border: 1px solid var(--line-2);
  --cut-line: var(--line-2);
}

.law__type {
  display: block;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.law h3 {
  margin-top: 14px;
  font-size: clamp(28px, 2.7vw, 36px);
  line-height: 1.1;
}

.law__name {
  margin-top: 8px;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
}

.law__text {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.law__stamp {
  --cut: 7px;
  --cut-line: #7ee2a8;
  position: absolute;
  top: 20px;
  right: 24px;
  padding: 4px 11px;
  border: 1.5px solid #7ee2a8;
  background-color: transparent;
  color: #7ee2a8;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: rotate(-6deg);
}

/* Kart görününce mühür basılır */
.law.reveal:not(.is-visible) .law__stamp {
  opacity: 0;
}

.law.is-visible .law__stamp {
  animation: stamp 0.45s var(--ease) calc(var(--d, 0s) + 0.55s) backwards;
}

@keyframes stamp {
  from {
    opacity: 0;
    transform: rotate(-16deg) scale(2);
  }
  60% {
    opacity: 1;
    transform: rotate(-6deg) scale(0.92);
  }
}

.certs {
  margin-top: 64px;
}

.certs h3 {
  font-size: 22px;
}

.certs ul {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.cert {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 18px 18px 20px;
  background-color: rgba(40, 71, 144, 0.22);
  border: 1px solid rgba(79, 112, 216, 0.45);
  --cut-line: rgba(79, 112, 216, 0.45);
}

.cert b {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
}

.cert span {
  font-size: 14px;
  line-height: 1.4;
  color: #b4bed2;
}

/* =========================================================
   Tusi (asistan)
   ========================================================= */

.tusi {
  overflow: hidden;
  background:
    radial-gradient(800px 500px at 20% 50%, rgba(107, 70, 214, 0.28), transparent 60%),
    var(--bg);
}

.tusi__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

/* Masaüstünde Tusi solda, metin sağda; telefonda önce metin */
.tusi__stage {
  order: -1;
  display: grid;
  justify-items: center;
}

.tusi__bot {
  position: relative;
  width: min(380px, 78%);
  aspect-ratio: 339.77 / 253.03;
  margin-top: 34px;
  cursor: pointer;
}

/* Zemindeki gölge */
.tusi__bot::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: -26px;
  height: 18px;
  background: radial-gradient(closest-side, rgba(185, 162, 245, 0.35), transparent);
}

.tusi__bot svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Konuşma balonu: takvimdeki gibi düz dikdörtgen, altta üçgen kuyruk */
.tusi__stage .bubble {
  position: relative;
  width: min(520px, 100%);
  min-height: 148px;
  padding: 24px 28px;
  background-color: rgba(58, 54, 78, 0.82);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.tusi__stage .bubble::after {
  content: "";
  position: absolute;
  left: 34%;
  bottom: -20px;
  border-left: 22px solid rgba(58, 54, 78, 0.82);
  border-bottom: 20px solid transparent;
}

.tusi__stage .bubble.is-hidden {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.tusi__stage .bubble p {
  font-size: 18px;
  line-height: 1.5;
  color: #f1eefb;
}

.bubble__caret {
  display: none;
  width: 8px;
  height: 16px;
  margin-left: 4px;
  vertical-align: -2px;
  background: var(--violet);
}

.tusi__stage .bubble.is-typing .bubble__caret {
  display: inline-block;
}

.bubble__link {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--violet);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.bubble__link[hidden] {
  display: none;
}

.bubble__link:hover {
  color: #fff;
}

.tusi__asks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 60px;
}

.ask {
  --cut: 9px;
  --cut-line: rgba(185, 162, 245, 0.4);
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid rgba(185, 162, 245, 0.4);
  background-color: rgba(139, 92, 246, 0.08);
  color: #e4dcfa;
  font: 600 15px/1.2 var(--f-display);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.ask:hover,
.ask[aria-pressed="true"] {
  --cut-line: var(--violet);
  border-color: var(--violet);
  background-color: rgba(139, 92, 246, 0.26);
  color: #fff;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.tusi__text h2 {
  font-size: clamp(28px, 3vw, 43px);
  margin-top: 18px;
}

.tusi__text > p {
  margin-top: 20px;
  color: var(--muted);
  font-size: 17.5px;
}

.tusi__text .tusi__note {
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid rgba(185, 162, 245, 0.2);
  background-color: rgba(139, 92, 246, 0.07);
  font-size: 15px;
  color: #cfc6ea;
}

.tusi__note b {
  color: #fff;
}

/* =========================================================
   Kimler için
   ========================================================= */

.refs {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line-2);
}

.ref {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 12px 40px;
  align-items: center;
  padding: 24px 0;
  border-top: 1px solid var(--line-2);
}

.ref h3 {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 21px;
  font-weight: 600;
}

.ref h3 svg {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  color: #8fa8ff;
}

.ref ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  font-size: 16.5px;
  color: var(--muted);
  transition: color 0.25s;
}

.ref:hover ul {
  color: var(--text);
}

.refs__note {
  margin-top: 20px;
  font-size: 15px;
  color: var(--muted);
}

.refs__note a {
  display: inline-block;
  padding: 4px 0;
  color: #8fa8ff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.refs__note a:hover {
  color: #fff;
}

/* =========================================================
   CTA + iletişim
   ========================================================= */

.cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(96px, 12vw, 160px) 0;
}

.cta__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.cta__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% 60%;
}

.cta__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 15, 0.92) 0%, rgba(5, 8, 15, 0.6) 50%, rgba(5, 8, 15, 0.3) 100%),
    linear-gradient(180deg, var(--bg) 0%, transparent 14%, transparent 86%, var(--bg) 100%);
}

.cta__grid {
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.cta h2 {
  font-size: clamp(34px, 4.6vw, 58px);
  margin-top: 18px;
}

.cta__grid > div > p {
  margin-top: 22px;
  color: #c9d1e0;
  font-size: 17.5px;
  max-width: 520px;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 34px 0 0;
  display: grid;
  gap: 14px;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #cfd6e4;
}

.contact-list a:hover {
  color: var(--glow);
}

.contact-list svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--glow);
}

.form {
  padding: 30px;
  background-color: rgba(8, 13, 25, 0.8);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(18px);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.8);
}

.form h3 {
  font-size: 23px;
}

.form > p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14.5px;
}

.form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.field {
  display: grid;
  align-content: start;
  gap: 6px;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  background-color: rgba(255, 255, 255, 0.04);
  font-size: 15.5px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.field select {
  appearance: none;
  padding-right: 40px;
  text-overflow: ellipsis;
  background-image:
    linear-gradient(to top right, transparent calc(50% - 0.75px), var(--cut-line) 50%, transparent calc(50% + 0.75px)),
    linear-gradient(to top right, transparent calc(50% - 0.75px), var(--cut-line) 50%, transparent calc(50% + 0.75px)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2398a3ba' stroke-width='1.6'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: top right, bottom left, right 14px center;
  background-size: var(--cut) var(--cut-y), var(--cut) var(--cut-y), auto;
}

.field select option {
  background: var(--bg-3);
}

.field textarea {
  height: 96px;
  padding: 12px 14px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: rgba(79, 224, 232, 0.6);
  --cut-line: rgba(79, 224, 232, 0.6);
  background-color: rgba(255, 255, 255, 0.06);
}

.form .btn {
  width: 100%;
  margin-top: 18px;
}

.check {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 11px 0;
}

.check input {
  width: 22px;
  height: 22px;
  margin: 0;
  appearance: none;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04) center / 14px no-repeat;
  cursor: pointer;
}

.check input:checked {
  border-color: var(--brand-red);
  background-color: var(--brand-red);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='%23fff' stroke-width='2'%3E%3Cpath d='M2 7.5 5.5 11 12 3.5'/%3E%3C/svg%3E");
}

.check input[aria-invalid="true"] {
  border-color: rgba(239, 65, 54, 0.75);
}

.check label {
  flex: 1;
  font-size: 14.5px;
  line-height: 22px;
  color: var(--muted);
}

.check a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
}

.field__err {
  flex-basis: 100%;
  font-size: 13px;
  color: #ff8d85;
}

.field [aria-invalid="true"] {
  border-color: rgba(239, 65, 54, 0.75);
  --cut-line: rgba(239, 65, 54, 0.75);
}

.form__note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.form__ok {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  background-color: rgba(126, 226, 168, 0.1);
  border: 1px solid rgba(126, 226, 168, 0.3);
  color: #b6f0cf;
  font-size: 14.5px;
}

.form.is-sending .form__ok,
.form.is-sent .form__ok,
.form.is-error .form__ok {
  display: block;
}

.form.is-sending .form__ok {
  --cut-line: var(--line-2);
  background-color: var(--surface-2);
  border-color: var(--line-2);
  color: var(--text);
}

.form__ok a {
  text-decoration: underline;
  white-space: nowrap;
}

.form.is-error .form__ok {
  --cut-line: rgba(239, 65, 54, 0.4);
  background-color: rgba(239, 65, 54, 0.1);
  border-color: rgba(239, 65, 54, 0.4);
  color: #ffc2bd;
}

/* =========================================================
   Footer
   ========================================================= */

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 64px 0 32px;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
}

.footer__brand img {
  height: 40px;
  width: auto;
}

.footer__brand p {
  margin-top: 18px;
  color: var(--muted);
  font-size: 15px;
  max-width: 320px;
}

.footer__brand a:hover {
  color: var(--glow);
}

.footer h4 {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
}

.footer ul a {
  color: #c5cde0;
  font-size: 15px;
  transition: color 0.2s;
}

.footer ul a:hover {
  color: var(--glow);
}

.footer__bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--muted);
}

.made-by {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.made-by img {
  height: 26px;
  width: auto;
  opacity: 0.9;
}

/* =========================================================
   Yasal sayfalar (kvkk.html, cerez.html)
   ========================================================= */

.legal {
  padding: calc(var(--header-h) + 64px) 0 96px;
}

.legal .wrap {
  max-width: 860px;
}

.legal h1 {
  margin-top: 18px;
  font-size: clamp(34px, 4.8vw, 54px);
}

.legal h2 {
  margin-top: 44px;
  font-size: 24px;
}

.legal p,
.legal li {
  color: #c5cde0;
  line-height: 1.7;
}

.legal p {
  margin-top: 14px;
}

.legal ul {
  margin: 14px 0 0;
  padding-left: 22px;
  display: grid;
  gap: 8px;
}

.legal a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal .legal__draft {
  --cut-line: rgba(239, 65, 54, 0.5);
  margin-top: 28px;
  padding: 16px 20px;
  border: 1px solid rgba(239, 65, 54, 0.5);
  background-color: rgba(239, 65, 54, 0.08);
}

/* =========================================================
   Kaydırınca görünme
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* =========================================================
   Duyarlı düzen
   ========================================================= */

@media (max-width: 1180px) {
  .nav a {
    padding: 8px 10px;
    font-size: 14.5px;
  }
}

@media (max-width: 1080px) {
  .hero__slide--dalga video {
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.4) 62%, #000 92%);
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.4) 62%, #000 92%);
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    gap: 4px;
    padding: 16px var(--gutter) 24px;
    background: rgba(5, 8, 15, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.3s var(--ease);
  }

  .nav a {
    padding: 14px 16px;
    font-size: 18px;
  }

  body.menu-open .nav {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  body.menu-open .header {
    background: rgba(5, 8, 15, 0.96);
  }

  .menu-toggle {
    display: block;
  }

  .header__cta {
    margin-left: auto;
  }

  .tusi__grid,
  .cta__grid {
    grid-template-columns: 1fr;
  }

  .tusi__stage {
    order: 0;
  }

  /* Şema dikeye döner: içeride 2 sütun, kurum dışı altta */
  .guard {
    grid-template-columns: 1fr;
    gap: 64px;
  }

  .guard__zone {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    grid-template-areas: "belge kullanici" "ebys ebys" "ai kep";
    gap: 48px 24px;
    min-height: 0;
  }

  .guard__out {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    gap: 24px;
    padding: 0 36px 40px;
  }

  .guard__out .guard__label {
    left: 36px;
    top: auto;
    bottom: 0;
  }

  .lawgrid {
    grid-template-columns: repeat(2, 1fr);
  }

  .certs ul {
    grid-template-columns: repeat(3, 1fr);
  }

  .aidemo__body {
    min-height: 630px;
  }

  .aidemo__doc,
  .aidemo__out {
    padding: 24px;
  }

  .aidemo__tab {
    padding: 16px 20px;
  }

  .aidemo__tab strong {
    font-size: 17px;
  }

  .layer--ai {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cells {
    grid-template-columns: repeat(2, 1fr);
  }

  .cell:nth-child(2n) {
    border-right: 0;
  }

  .ref {
    grid-template-columns: 1fr;
  }

  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 28px;
  }

  .stat:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .footer__top {
    grid-template-columns: 1fr 1fr;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 64px;
  }

  body {
    font-size: 16px;
  }

  .brand img {
    height: 24px;
  }

  .logo,
  .header.is-scrolled .logo {
    height: 30px;
  }

  .header__cta .btn {
    display: none;
  }

  .hero {
    align-items: flex-end;
    padding-bottom: 72px;
  }

  .hero__media img,
  .hero__media video {
    object-position: 82% 50%;
  }

  .hero__slide--veri {
    left: 0;
    right: 0;
    bottom: 34%;
  }

  .hero__slide--veri video {
    object-position: 50% 50%;
    -webkit-mask-image: linear-gradient(0deg, transparent 0%, #000 30%);
    mask-image: linear-gradient(0deg, transparent 0%, #000 30%);
  }

  .hero__slide--dalga video {
    object-position: 50% 50%;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .hero__nav {
    margin-top: 20px;
  }

  .hero__media::after {
    background: linear-gradient(0deg, var(--bg) 0%, rgba(5, 8, 15, 0.88) 50%, rgba(5, 8, 15, 0.25) 100%);
  }

  .badge {
    font-size: 12.5px;
  }

  .hero__caption,
  .scroll-cue {
    display: none;
  }

  .hero__actions .btn {
    flex: 1 1 100%;
  }

  .layer--ai,
  .layer--ebys .layer__name {
    padding: 18px 20px;
  }

  .layer__mods {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .layers__link {
    height: 40px;
  }

  .cell {
    padding: 20px 16px 22px 20px;
  }

  .ref ul {
    gap: 4px 20px;
    font-size: 15.5px;
  }


  .aidemo__body {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .aidemo__doc {
    font-size: 14.5px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    height: 280px; /* sabit: senaryo değişince sayfa kaymasın */
    padding: 18px;
    -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent);
    mask-image: linear-gradient(180deg, #000 78%, transparent);
  }

  .aidemo__out {
    min-height: 640px;
    padding: 18px;
  }

  .aidemo__bar,
  .aidemo__foot {
    padding: 12px 18px;
  }

  /* Dar ekran: sekmeler yatay kayar */
  .aidemo__tabs {
    grid-auto-columns: 148px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .aidemo__tabs::-webkit-scrollbar {
    display: none;
  }

  .aidemo__tab {
    gap: 2px;
    padding: 12px 14px;
  }

  .aidemo__tab strong {
    font-size: 15px;
  }

  .aidemo__live {
    display: none;
  }

  .chat {
    grid-template-columns: 52px 1fr;
    gap: 10px;
  }

  .res-alt {
    grid-template-columns: 1fr 64px 30px;
    gap: 8px;
  }

  .guard__zone {
    padding: 52px 14px 18px;
    gap: 40px 12px;
  }

  .guard__out {
    padding: 0 14px 36px;
    gap: 12px;
  }

  .guard__label,
  .guard__out .guard__label {
    left: 14px;
  }

  .gnode {
    padding: 14px;
    justify-content: flex-start;
  }

  .gnode b {
    font-size: 16px;
  }

  .gnode--core b {
    font-size: 20px;
  }

  .gnode span {
    font-size: 13.5px;
  }

  .lawgrid,
  .certs ul {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .law {
    padding: 20px 20px 22px;
  }

  .law h3 {
    margin-top: 10px;
  }

  .tusi__stage .bubble {
    padding: 18px 20px;
  }

  .tusi__stage .bubble p {
    font-size: 16.5px;
  }

  .tusi__asks {
    gap: 8px;
    margin-top: 48px;
  }

  .ask {
    padding: 8px 14px;
    font-size: 14.5px;
  }

  .form {
    padding: 22px;
  }

  .form__grid {
    grid-template-columns: 1fr;
  }

  .footer__top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .cells {
    grid-template-columns: 1fr;
  }

  .cell {
    border-right: 0;
  }
}

@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;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .btn__fx .t,
  .logo__scan,
  .guard__fx .pk,
  .layers__link i::after,
  .aidemo__doc::after {
    display: none;
  }

  .logo__box {
    filter: none;
  }

  .btn__fx path {
    transform: none !important;
  }
}
