/* Yerleşim ve bileşenler. Renk ve font değerleri tokens.css'ten gelir. */

* { box-sizing: border-box; }

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  /* Kaydırınca en yakın ekrana otur. Dar/kısa ekranda içerik taşabildiği için yumuşak (proximity). */
  scroll-snap-type: y proximity;
}

@media (min-width: 900px) and (min-height: 700px) {
  html { scroll-snap-type: y mandatory; } /* geniş ekranda her kaydırma bir sonraki ekrana geçer */
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  /* Bulutsu: iki yumuşak ışık lekesi + gece zemini */
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(110, 84, 255, 0.28), transparent 60%),
    radial-gradient(50rem 36rem at -10% 100%, rgba(40, 90, 220, 0.24), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
  background-attachment: fixed;
}

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Her .screen tam bir ekran yüksekliğinde bir bölümdür */
.screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
}

/* Bölümün altındaki "aşağı" oku */
.next {
  width: 44px;
  height: 44px;
  margin: 0 auto 20px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--text);
  border: 1px solid var(--line);
  animation: nudge 2.4s ease-in-out infinite;
}

.next:hover { border-color: var(--line-strong); }
.next:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

.next svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes nudge {
  50% { transform: translateY(5px); }
}

/* Üst şerit */
.top {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.brand { display: flex; gap: 12px; align-items: center; }

.brand-mark { width: 32px; height: 32px; display: block; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.14em;
}

.tools { display: flex; gap: 12px; font-family: var(--font-mono); font-size: 13px; }
.lang { display: flex; gap: 4px; }

.tool-btn { padding: 0 12px; }
.tool-btn[hidden] { display: none; }

.lang-btn,
.tool-btn {
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  font: inherit;
  cursor: pointer;
}

.lang-btn:hover,
.tool-btn:hover { border-color: var(--line-strong); }

.lang-btn[aria-pressed="true"] {
  background: var(--text);
  color: var(--night);
  border-color: var(--text);
  font-weight: 500;
}

/* Ana düzen: geniş ekranda yan yana, dar ekranda alt alta */
.main {
  flex-grow: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: center;
}

/* 2. ekran: soru-cevaplar */
.about {
  flex-grow: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 56px;
}

.qa-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
}

.qa {
  padding-top: 20px;
  border-top: 1px solid var(--line-strong);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qa-index {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--violet);
}

.qa-question {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.05;
  text-transform: uppercase;
}

.qa-answer { margin: 0; font-size: 18px; line-height: 1.55; color: var(--muted); }

.call {
  margin: 0;
  max-width: 32ch;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.25;
}

/* 3. ekran: başlık üstte, form altta yatay */
.join {
  flex-grow: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}

.join .title { font-size: clamp(28px, 8cqi, 96px); }
.join .tally { padding-top: 0; }

.hero {
  flex: 999 1 480px;
  min-width: 0;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.title span { display: block; }

.eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.24em;
  color: var(--violet);
}

.title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  /* cqi = .hero genişliğinin yüzdesi: en uzun kelime her ekranda satıra sığar */
  font-size: clamp(28px, 9.2cqi, 104px);
  line-height: 0.98;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  /* Metalik yazı: krom gibi açık-koyu-açık geçiş */
  background: linear-gradient(180deg, #ffffff 0%, #dfe3ff 38%, #8a92cf 52%, #c9cef5 66%, #f4f5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.title-accent {
  background: linear-gradient(180deg, #e2dcff 0%, #b3a6ff 40%, #6f5cf0 56%, #a99bff 72%, #ddd6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 0;
  max-width: 46ch;
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
}

.tally {
  margin: 0;
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: baseline;
}

.tally-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 64px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.tally-label {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.tally-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 10px var(--violet);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  50% { opacity: 0.35; }
}

/* Form paneli */
.panel { flex: 1 1 360px; min-width: 0; }

.panel,
.join-box {
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 24px 60px rgba(3, 4, 20, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.form { display: flex; flex-direction: column; gap: 20px; }

/* Yatay form (3. ekran): geniş ekranda kutular ve buton tek satırda */
@media (min-width: 900px) {
  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr auto;
    gap: 16px;
    align-items: end;
  }
  .form-row .submit { height: 48px; padding: 0 28px; font-size: 16px; }
  .form-row .captcha,
  .form-row .message,
  .form-row .note { grid-column: 1 / -1; }
}

.field { display: flex; flex-direction: column; gap: 8px; }

.field label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.field .label-required { color: var(--text); }
.hint { color: #8f94bd; }
.hint-required { color: var(--violet); }

.field input {
  height: 48px;
  padding: 0 14px;
  background: rgba(7, 8, 24, 0.8);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 0;
  font: inherit;
  font-size: 16px;
}

.field input::placeholder { color: #7f84ad; }
.field input:hover { border-color: var(--line-strong); }
.field input:focus-visible,
.submit:focus-visible,
.ghost:focus-visible,
.lang-btn:focus-visible,
.tool-btn:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

#email { border-color: var(--line-strong); }
.field input[aria-invalid="true"] { border-color: var(--danger); }

.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.submit {
  height: 56px;
  border: 0;
  /* Metalik mor buton */
  background: linear-gradient(180deg, #c9bfff 0%, #9b8cff 45%, #6f5cf0 55%, #8676ff 100%);
  color: #0a0b1e;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 8px 28px rgba(110, 84, 255, 0.35);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.submit:hover { filter: brightness(1.08); }
.submit:active { transform: translateY(1px); }
.submit:disabled { filter: saturate(0.4) brightness(0.8); cursor: progress; }

.message {
  margin: 0;
  min-height: 1.4em;
  font-size: 14px;
  line-height: 1.4;
  color: var(--danger);
}

.message:empty { display: none; }
.captcha:empty { display: none; }

.note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* Kayıt alındı durumu */
.done { display: flex; flex-direction: column; gap: 16px; padding: 24px 0; }
.done[hidden], .form[hidden] { display: none; }

.done-mark {
  width: 56px;
  height: 56px;
  fill: none;
  stroke: var(--violet);
  stroke-width: 7;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.done-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 38px;
  line-height: 1.05;
  text-transform: uppercase;
}

.done-text { margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); }
.done-email {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text);
  overflow-wrap: anywhere; /* uzun adres kutudan taşmasın */
}

.ghost {
  align-self: flex-start;
  min-height: 44px;
  padding: 0 16px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
}

.ghost:hover { border-color: var(--line-strong); }

@media (max-width: 480px) {
  .panel, .join-box { padding: 24px 20px; }
  .about { gap: 40px; padding-top: 48px; }
  .top { padding: 20px 24px; gap: 12px; }
  .brand { gap: 8px; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-name { font-size: 16px; letter-spacing: 0.1em; }
  .tools { gap: 8px; }
  .panel { padding: 24px 20px; }
  .tally-number { font-size: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .next { animation: none; }
  .tally-dot { animation: none; }
  .submit { transition: none; }
}
