/* ============================================================
   SULTAN FREIGHT — FORMS V2 SHARED DESIGN SYSTEM
   Palette B (approved). Dark-mode-default futuristic premium.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  /* Brand tokens */
  --navy:        #030D1C;
  --navy-2:      #1B2A4A;
  --navy-3:      #0A1733;
  --gold:        #D4A84B;
  --gold-2:      #C49A3F;
  --gold-glow:   rgba(212, 168, 75, 0.45);
  --electric:    #4FC3F7;
  --electric-glow: rgba(79, 195, 247, 0.35);
  --body-color:  #556070;
  --heading:     #1B2A4A;
  --white:       #FFFFFF;
  --white-soft:  rgba(255, 255, 255, 0.92);
  --white-dim:   rgba(255, 255, 255, 0.62);
  --white-faint: rgba(255, 255, 255, 0.42);
  --danger:      #FF5670;
  --success:     #2BD9A4;

  /* Glass tokens */
  --glass-bg:        rgba(255, 255, 255, 0.06);
  --glass-bg-strong: rgba(255, 255, 255, 0.09);
  --glass-border:    rgba(255, 255, 255, 0.10);
  --glass-border-strong: rgba(255, 255, 255, 0.18);

  /* Gradients */
  --grad-bg:    radial-gradient(circle at top, #1B2A4A 0%, #030D1C 60%);
  --grad-gold:  linear-gradient(135deg, #D4A84B 0%, #C49A3F 100%);
  --grad-gold-hover: linear-gradient(135deg, #E8BC5B 0%, #D4A84B 100%);
  --grad-card:  linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);

  /* Typography */
  --font-display: 'Syne', serif;
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Spacing */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-glow-gold: 0 0 40px rgba(212,168,75,0.40), 0 0 80px rgba(212,168,75,0.20);
  --shadow-glow-blue: 0 0 0 3px rgba(79,195,247,0.30);
  --shadow-card: 0 18px 50px rgba(0,0,0,0.45), 0 2px 6px rgba(0,0,0,0.25);
}

/* ---------- Base reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--grad-bg);
  color: var(--white-soft);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  line-height: 1.55;
}

a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--electric); }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
img, svg { max-width: 100%; display: block; }

/* ---------- Typography helpers ---------- */
.h-display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  background: linear-gradient(180deg, #FFFFFF 0%, rgba(255,255,255,0.65) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.h-section {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.015em;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--white);
  margin: 0 0 .5em;
}
.subtle {
  color: var(--white-dim);
  font-size: 1.05rem;
  max-width: 60ch;
}
.mono { font-family: var(--font-mono); }

/* ---------- Animated grid background (Linear-style) ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(79,195,247,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,195,247,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
  animation: gridDrift 24s linear infinite;
}
@keyframes gridDrift {
  0%   { background-position: 0 0, 0 0; }
  100% { background-position: 60px 60px, 60px 60px; }
}
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(700px circle at 15% 10%, rgba(79,195,247,0.18), transparent 50%),
    radial-gradient(600px circle at 85% 80%, rgba(212,168,75,0.14), transparent 55%);
}

/* ---------- Glass panel ---------- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
}
.glass-strong {
  background: var(--glass-bg-strong);
  border-color: var(--glass-border-strong);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 26px;
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--r-pill);
  transition: transform .2s ease, box-shadow .25s ease, background .25s;
  min-height: 52px;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--grad-gold);
  color: var(--navy);
  box-shadow: var(--shadow-glow-gold);
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute; inset: -2px;
  background: var(--grad-gold);
  border-radius: inherit;
  z-index: -1;
  filter: blur(14px);
  opacity: .6;
  animation: pulseGlow 2.4s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { opacity: .35; transform: scale(.98); }
  50%      { opacity: .75; transform: scale(1.04); }
}
.btn-primary:hover { transform: translateY(-2px); background: var(--grad-gold-hover); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: var(--glass-bg);
  color: var(--white);
  border: 1px solid var(--glass-border-strong);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: var(--glass-bg-strong); border-color: var(--gold); }

.btn-block { width: 100%; }
.btn-lg { padding: 20px 32px; font-size: 1.1rem; min-height: 64px; }

/* ---------- Form fields ---------- */
.field { margin-bottom: 18px; position: relative; }
.field label,
.field .field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white-dim);
  margin-bottom: 8px;
}
.input, .select, .textarea {
  width: 100%;
  padding: 16px 18px;
  font-size: 16px; /* prevents iOS zoom */
  font-family: inherit;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-md);
  color: var(--white);
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--white-faint); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--electric);
  box-shadow: var(--shadow-glow-blue);
  background: rgba(255,255,255,0.07);
}
.select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8' fill='none'><path d='M1 1L7 7L13 1' stroke='%234FC3F7' stroke-width='2' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 44px;
}
.select option, .select optgroup { color: #000; background: #fff; }
.textarea { resize: vertical; min-height: 110px; }

.field.error .input,
.field.error .select,
.field.error .textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(255,86,112,0.25);
}
.field-error {
  display: none;
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 6px;
}
.field.error .field-error { display: block; }

/* honeypot hide */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* shake on invalid submit */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX(8px); }
  60%      { transform: translateX(-5px); }
  80%      { transform: translateX(5px); }
}
.shake { animation: shake .45s cubic-bezier(.36,.07,.19,.97); }

/* checkbox/radio pill style */
.opt {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all .2s;
  font-size: .95rem;
  font-weight: 500;
  user-select: none;
}
.opt input { display: none; }
.opt:hover { border-color: var(--gold); }
.opt.checked, .opt input:checked + span {
  background: var(--grad-gold);
  color: var(--navy);
  border-color: var(--gold);
}

/* ---------- Trust strip ---------- */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  justify-content: center;
  align-items: center;
  font-size: 0.85rem;
  color: var(--white-dim);
  padding: 14px 18px;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}
.trust-strip .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); display: inline-block; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 14px;
}
@media (max-width: 720px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat {
  text-align: center;
  padding: 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
}
.stat .n { font-family: var(--font-mono); font-weight: 700; color: var(--gold); font-size: 1.1rem; }
.stat .l { font-size: .78rem; color: var(--white-dim); margin-top: 4px; }

/* ---------- Language toggle ---------- */
.lang-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 80;
  display: inline-flex;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--r-pill);
  padding: 4px;
  font-size: 0.82rem;
  font-weight: 700;
}
.lang-toggle button {
  padding: 7px 14px;
  border-radius: var(--r-pill);
  color: var(--white-dim);
  transition: all .2s;
}
.lang-toggle button.active {
  background: var(--grad-gold);
  color: var(--navy);
}

/* ---------- Shimmer loading ---------- */
.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border-radius: var(--r-md);
}
.skeleton::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(212,168,75,0.20), transparent);
  animation: shimmer 1.8s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.is-loading .form-body > * { opacity: .35; pointer-events: none; }
.is-loading .form-body { position: relative; }
.is-loading .form-body::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(212,168,75,0.18), transparent);
  animation: shimmer 1.6s infinite;
  z-index: 5;
  border-radius: var(--r-md);
  pointer-events: none;
}

/* ---------- Success overlay ---------- */
.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(3, 13, 28, 0.94);
  backdrop-filter: blur(24px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn .35s ease;
}
.success-overlay.active { display: flex; }
.success-card {
  text-align: center;
  max-width: 520px;
  padding: 48px 32px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--r-xl);
  position: relative;
}
.success-card .ticket {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--gold);
  background: rgba(212,168,75,0.10);
  padding: 8px 18px;
  border-radius: var(--r-md);
  border: 1px solid rgba(212,168,75,0.30);
  margin: 14px 0 22px;
}
.success-card h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 18px 0 8px;
  color: var(--white);
}
.success-card p { color: var(--white-dim); margin: 0 0 22px; }

/* SVG check draw-in */
.check-svg { width: 96px; height: 96px; margin: 0 auto; }
.check-svg .ring {
  fill: none;
  stroke: var(--gold);
  stroke-width: 4;
  stroke-dasharray: 308;
  stroke-dashoffset: 308;
  animation: drawRing 0.9s ease forwards;
}
.check-svg .check {
  fill: none;
  stroke: var(--gold);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: drawCheck 0.5s ease 0.55s forwards;
}
@keyframes drawRing  { to { stroke-dashoffset: 0; } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* confetti */
.confetti {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  overflow: hidden;
}
.confetti span {
  position: absolute;
  top: -20px;
  width: 10px; height: 10px;
  background: var(--gold);
  border-radius: 2px;
  opacity: 0;
  animation: confettiFall 2.6s ease-in forwards;
}
.confetti span:nth-child(2n) { background: var(--electric); border-radius: 50%; }
.confetti span:nth-child(3n) { background: #fff; }
@keyframes confettiFall {
  0%   { transform: translate3d(0, -30px, 0) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translate3d(var(--cx,0), 110vh, 0) rotate(720deg); opacity: 0; }
}

/* ---------- Utilities ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 22px; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 22px; }
.center-text { text-align: center; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.hidden { display: none !important; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(212,168,75,0.10);
  border: 1px solid rgba(212,168,75,0.30);
  color: var(--gold);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tilt {
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
}
.tilt:hover {
  transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateY(-4px);
  box-shadow: 0 30px 70px rgba(0,0,0,0.5), 0 0 0 1px var(--gold);
}

/* fade in/up on load */
.fade-in { opacity: 0; transform: translateY(12px); animation: fadeUp .6s ease forwards; }
.fade-in.d1 { animation-delay: .08s; }
.fade-in.d2 { animation-delay: .16s; }
.fade-in.d3 { animation-delay: .24s; }
.fade-in.d4 { animation-delay: .32s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* particle field for v4 */
.particles {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
}
.particles span {
  position: absolute;
  border-radius: 50%;
  background: var(--electric);
  opacity: .25;
  filter: blur(1px);
  animation: floatP linear infinite;
}
@keyframes floatP {
  from { transform: translateY(100vh) translateX(0); }
  to   { transform: translateY(-20vh) translateX(40px); }
}

/* scroll snap utility */
.snap-y { scroll-snap-type: y mandatory; }
.snap-section { scroll-snap-align: start; }
