:root {
  --bg: #141907;
  --panel: rgba(18, 23, 8, 0.78);
  --surface: rgba(255, 255, 255, 0.045);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --line: rgba(242, 200, 108, 0.16);
  --line-strong: rgba(242, 200, 108, 0.45);
  --gold: #f2c86c;
  --gold-hi: #ffe066;
  --gold-lo: #f0a800;
  --gold-grad: linear-gradient(180deg, var(--gold-hi) 0%, #ffcc1a 55%, var(--gold-lo) 100%);
  --text: #f5f2e6;
  --muted: #b8b59f;
  --faint: #8a8873;
  --danger: #ff7a6b;
  --success: #6fdc8c;
  --radius: 14px;
  --radius-lg: 22px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* Arka plan: görsel sağda, sol taraf okunabilirlik için koyulaşır */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 22% 28%, rgba(242, 200, 108, 0.10), transparent 70%),
    linear-gradient(90deg, var(--bg) 0%, rgba(20, 25, 7, 0.92) 38%, rgba(20, 25, 7, 0.55) 70%, rgba(20, 25, 7, 0.35) 100%),
    url("../bg-clean.jpg") right center / cover no-repeat;
}

/* Üst çubuk */
.topbar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand img { height: 30px; width: auto; }
.topnav { display: flex; align-items: center; gap: 22px; }
.topnav-link {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}
.topnav-link:hover, .topnav-link:focus-visible { color: var(--gold); }

/* Yerleşim */
.layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 450px);
  grid-template-areas:
    "intro panel"
    "steps panel";
  grid-template-rows: auto 1fr;
  column-gap: 72px;
  row-gap: 40px;
  align-items: start;
}
.intro { grid-area: intro; }
.rules { grid-area: steps; max-width: 600px; scroll-margin-top: 20px; }
.panel { grid-area: panel; position: sticky; top: 24px; }

/* Başlık alanı */
h1 {
  margin: 0;
  font-family: var(--font-display);
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: 0.005em;
}
.h1-top {
  display: block;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.04em;
}
.h1-main {
  display: block;
  margin-top: 8px;
  font-size: clamp(2.9rem, 6.2vw, 5.4rem);
  font-weight: 800;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 24px rgba(240, 168, 0, 0.18));
  text-wrap: balance;
}

.lead {
  margin: 22px 0 0;
  max-width: 34ch;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--muted);
}

/* Kurallar */
.rules-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text);
}
.rules-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.step-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--gold-grad);
  color: #231d02;
  font-size: 22px;
  box-shadow: 0 10px 28px -10px rgba(240, 168, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.step-no {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.step h2 {
  margin: 2px 0 6px;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--gold);
}
.step p { margin: 0; color: var(--muted); font-size: 15px; }
.step strong, .panel-head strong, .result strong { color: var(--gold-hi); font-weight: 700; }

@media (hover: hover) and (pointer: fine) {
  .step:hover { border-color: var(--line-strong); }
}

/* Form paneli */
.panel {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.75);
}
.panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 28px;
  right: 28px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.panel-head p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

.form { margin-top: 22px; display: grid; gap: 12px; }

fieldset { margin: 0 0 8px; padding: 0; border: 0; min-width: 0; display: grid; gap: 12px; }
legend {
  float: left; /* legend'i fieldset kenarlığından çıkarıp normal öğe gibi davranmasını sağlar */
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
legend span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(242, 200, 108, 0.14);
  font-size: 12px;
}
fieldset + fieldset { padding-top: 18px; border-top: 1px dashed var(--line); }

.field { display: grid; gap: 6px; }
.field-label { font-size: 14px; font-weight: 500; color: var(--text); }
.field-label small { color: var(--faint); font-size: 12.5px; font-weight: 400; }

.field-control { position: relative; display: block; }
.field-control > i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  font-size: 15px;
  pointer-events: none;
  transition: color 0.2s ease;
}
.field-control input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 42px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* iOS'ta odaklanınca yakınlaştırmasın */
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.field-control input::placeholder { color: var(--faint); }
.field-control input:hover { background: var(--surface-hover); }
.field-control input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(242, 200, 108, 0.06);
  box-shadow: 0 0 0 3px rgba(242, 200, 108, 0.18);
}
.field-control:focus-within > i { color: var(--gold); }
.has-suffix input { padding-right: 40px; }
.suffix {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 600;
  pointer-events: none;
}

/* Butonlar */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s var(--ease-out), filter 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.btn-block { width: 100%; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 999px; }

.btn-primary {
  background: var(--gold-grad);
  color: #1f1a02;
  box-shadow: 0 14px 30px -14px rgba(240, 168, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-outline {
  border-color: var(--line-strong);
  background: rgba(242, 200, 108, 0.05);
  color: var(--gold);
}
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { filter: brightness(1.06); }
  .btn-outline:hover { background: rgba(242, 200, 108, 0.12); border-color: var(--gold); }
}
.form .btn-primary { margin-top: 6px; }
.btn.is-busy { opacity: 0.7; cursor: progress; }

/* Uyarılar */
.alert {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14.5px;
}
.alert ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.alert i { margin-top: 3px; }
.alert-error {
  border: 1px solid rgba(255, 122, 107, 0.35);
  background: rgba(255, 122, 107, 0.10);
  color: #ffd2cc;
}
.alert-error i { color: var(--danger); }

/* Başvuru sonucu */
.result { text-align: center; }
.result-icon {
  width: 64px;
  height: 64px;
  margin: 4px auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(111, 220, 140, 0.12);
  border: 1px solid rgba(111, 220, 140, 0.4);
  color: var(--success);
  font-size: 26px;
}
.result h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  text-transform: uppercase;
}
.result p { margin: 8px auto 0; max-width: 34ch; color: var(--muted); }

.ticket-no {
  margin: 22px 0;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(242, 200, 108, 0.05);
  display: grid;
  justify-items: center;
  gap: 4px;
}
.ticket-no-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.ticket-no strong {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold-hi);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.copy:hover, .copy.is-done { color: var(--success); border-color: rgba(111, 220, 140, 0.4); }

.actions { display: grid; gap: 10px; }
.panel > .actions { margin-top: 18px; }

/* Sorgu kartı */
.ticket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--line-strong);
}
.ticket-head strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--gold-hi);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.status.is-pending { background: rgba(255, 176, 32, 0.14); color: #ffc34d; border: 1px solid rgba(255, 176, 32, 0.4); }
.status.is-approved { background: rgba(111, 220, 140, 0.12); color: var(--success); border: 1px solid rgba(111, 220, 140, 0.4); }
.status.is-rejected { background: rgba(255, 122, 107, 0.12); color: var(--danger); border: 1px solid rgba(255, 122, 107, 0.4); }

.ticket-section { padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.ticket-section:last-child { border-bottom: 0; padding-bottom: 0; }
.ticket-section h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.ticket-section dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  font-size: 15px;
}
.ticket-section dt { color: var(--faint); }
.ticket-section dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.ticket-note { margin: 0; color: var(--text); }

/* Kurallar butonu ve penceresi */
.btn-ghost {
  height: 46px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}
.btn-ghost i { color: var(--gold); }
@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover { background: var(--surface-hover); color: var(--gold); }
}

.modal {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #161b09;
  color: var(--text);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.85);
  overflow: auto;
  overscroll-behavior: contain;
}
.modal::backdrop {
  background: rgba(6, 8, 2, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.modal-inner { position: relative; padding: 28px; }
.modal-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.modal-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.1;
}
.modal-close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.16s var(--ease-out);
}
.modal-close:hover { color: var(--gold); border-color: var(--line-strong); }
.modal-close:active { transform: scale(0.92); }
.modal-rules { list-style: none; margin: 0 0 24px; padding: 0; }
.modal-rules li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--line);
}
.modal-rules li:first-child { padding-top: 0; }
.modal-rules li:last-child { border-bottom: 0; padding-bottom: 0; }
.modal-no {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold-grad);
  color: #231d02;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
}
.modal-rules h3 {
  margin: 3px 0 4px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--gold);
}
.modal-rules p { margin: 0; color: var(--muted); font-size: 15px; }
.modal-rules strong { color: var(--gold-hi); font-weight: 700; }
body:has(.modal[open]) { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  .modal[open] { animation: modal-in 0.24s var(--ease-out); }
  .modal[open]::backdrop { animation: fade-in 0.24s ease-out; }
  @keyframes modal-in {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
  }
  @keyframes fade-in {
    from { opacity: 0; }
  }
}

@media (max-width: 560px) {
  .modal-inner { padding: 22px 18px; }
  .modal-head h2 { font-size: 1.7rem; }
}

/* Alt bilgi */
.footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 13.5px;
}
.footer p { margin: 0; }
.age {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border: 1px solid var(--faint);
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
}

.social { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.social a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(20, 25, 7, 0.7);
  color: var(--gold);
  font-size: 18px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.16s var(--ease-out);
}
.social a:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) {
  .social a:hover { background: var(--gold); color: #1f1a02; border-color: var(--gold); }
}

/* Geniş ekranda sosyal ikonlar sol kenarda sabit */
@media (min-width: 1320px) {
  .social {
    position: fixed;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    flex-direction: column;
    z-index: 10;
  }
}

/* Giriş animasyonu */
@media (prefers-reduced-motion: no-preference) {
  .intro, .step, .panel { animation: rise 0.6s var(--ease-out) both; }
  .panel { animation-delay: 0.08s; }
  .step:nth-child(1) { animation-delay: 0.12s; }
  .step:nth-child(2) { animation-delay: 0.18s; }
  .step:nth-child(3) { animation-delay: 0.24s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
}

/* Tablet ve mobil */
@media (max-width: 980px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "intro"
      "steps"
      "panel";
    grid-template-rows: none;
    row-gap: 28px;
    padding-top: 8px;
  }
  .panel { position: relative; top: 0; }
  .rules { max-width: none; }
  .lead { max-width: none; }
  .backdrop {
    background:
      linear-gradient(180deg, rgba(20, 25, 7, 0.6) 0%, rgba(20, 25, 7, 0.9) 45%, var(--bg) 100%),
      url("../bg-clean.jpg") 70% top / cover no-repeat;
  }
}

@media (max-width: 560px) {
  .topbar { padding: 16px; }
  .brand img { height: 24px; }
  .topnav { gap: 14px; }
  .layout { padding: 4px 16px 40px; }
  .panel { padding: 22px 18px; border-radius: 18px; }
  .step { grid-template-columns: 46px 1fr; gap: 14px; padding: 16px; }
  .step-icon { width: 46px; height: 46px; font-size: 18px; border-radius: 13px; }
  .step h2 { font-size: 1.3rem; }
  .footer { padding: 0 16px 28px; justify-content: center; text-align: center; }
  .ticket-head { flex-direction: column; align-items: flex-start; }
}
