:root {
  --bg: #140409;
  --surface: rgba(255, 255, 255, 0.085);
  --surface-strong: rgba(255, 255, 255, 0.14);
  --text: #fff7ec;
  --muted: rgba(255, 247, 236, 0.72);
  --line: rgba(255, 255, 255, 0.16);
  --burgundy: #5a1020;
  --burgundy-deep: #2b0710;
  --gold: #d4af58;
  --gold-soft: #f1d98c;
  --gray: #2f3136;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f7f4ed;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --text: #230811;
  --muted: rgba(35, 8, 17, 0.68);
  --line: rgba(90, 16, 32, 0.16);
  --shadow: 0 30px 90px rgba(90, 16, 32, 0.13);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  font-family: Cairo, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 10%, rgba(212, 175, 88, 0.22), transparent 32%),
    radial-gradient(circle at 92% 18%, rgba(90, 16, 32, 0.62), transparent 35%),
    linear-gradient(135deg, var(--bg), var(--burgundy-deep));
  overflow-x: hidden;
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 18% 10%, rgba(212, 175, 88, 0.22), transparent 32%),
    radial-gradient(circle at 92% 18%, rgba(90, 16, 32, 0.11), transparent 35%),
    linear-gradient(135deg, #fffaf1, #ece7df);
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(14px);
  pointer-events: none;
  z-index: -3;
}

.ambient-one {
  width: 440px;
  height: 440px;
  inset: auto auto -160px -130px;
  background: rgba(90, 16, 32, 0.58);
}

.ambient-two {
  width: 330px;
  height: 330px;
  inset: 7% -110px auto auto;
  background: rgba(212, 175, 88, 0.25);
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px;
  margin-bottom: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.065);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

html[data-theme="light"] .topbar { background: rgba(255,255,255,.72); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #2b0710;
  font-weight: 900;
  font-family: Inter, Cairo, sans-serif;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  box-shadow: 0 16px 34px rgba(212, 175, 88, .24);
}

.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 1rem; font-weight: 900; }
.brand-copy small { color: var(--muted); font-size: .78rem; }

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

.pill-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 11px 15px;
  min-height: 42px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.pill-btn:hover { transform: translateY(-2px); border-color: rgba(212,175,88,.55); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(360px, .72fr);
  gap: 26px;
  align-items: stretch;
}

.hero-copy,
.visual-card,
.contact-shell {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, var(--surface), rgba(255,255,255,.035));
  backdrop-filter: blur(22px);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-copy { padding: clamp(28px, 5vw, 58px); }

.eyebrow {
  width: fit-content;
  margin: 0 0 18px;
  color: var(--gold-soft);
  font-weight: 900;
  letter-spacing: .04em;
  border: 1px solid rgba(212, 175, 88, .34);
  background: rgba(212, 175, 88, .11);
  border-radius: 999px;
  padding: 9px 14px;
}

h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(2.35rem, 7vw, 5.7rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
  font-weight: 900;
}

html[dir="rtl"] h1 { letter-spacing: -0.035em; }

.lead {
  margin: 22px 0 26px;
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.9;
}

.countdown-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(0,0,0,.18);
}

html[data-theme="light"] .countdown-card { background: rgba(255,255,255,.58); }

.countdown-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 800;
}
.countdown-top strong { color: var(--gold-soft); }

.timer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.time-box {
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 15px 9px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.045));
}

.time-box strong {
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  line-height: 1;
  font-family: Inter, Cairo, sans-serif;
  font-weight: 900;
}

.time-box span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}

.progress-wrap {
  height: 8px;
  margin-top: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.12);
}

.progress-wrap span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--burgundy), var(--gold));
  transition: width .8s ease;
}

.signal-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.signal-row div {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,.06);
}

.signal-row b {
  display: block;
  color: var(--gold-soft);
  font-family: Inter, Cairo, sans-serif;
  margin-bottom: 4px;
}

.signal-row span { color: var(--muted); font-weight: 800; font-size: .9rem; }

.visual-card {
  min-height: 580px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.visual-card::before {
  content: "";
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(212,175,88,.18);
  border-radius: 30px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black, transparent 68%);
}

.orbital {
  position: relative;
  width: min(360px, 80vw);
  height: min(360px, 80vw);
  display: grid;
  place-items: center;
}

.core {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border-radius: 35px;
  color: #2b0710;
  font-size: 2.5rem;
  font-weight: 900;
  font-family: Inter, Cairo, sans-serif;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  box-shadow: 0 26px 90px rgba(212,175,88,.28);
}

.orbit {
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(212, 175, 88, .28);
  border-radius: 50%;
  animation: spin 18s linear infinite;
}
.orbit-b { inset: 64px; transform: rotate(38deg); animation-duration: 12s; animation-direction: reverse; }

.dot {
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--gold-soft);
  box-shadow: 0 0 30px rgba(212,175,88,.88);
}
.dot-a { top: 41px; right: 96px; }
.dot-b { bottom: 82px; left: 46px; }
.dot-c { top: 158px; left: 12px; background: #fff7ec; }

.mini-panel {
  position: absolute;
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.11);
  backdrop-filter: blur(18px);
  border-radius: 18px;
  padding: 14px 16px;
  font-weight: 900;
}
html[data-theme="light"] .mini-panel { background: rgba(255,255,255,.74); }
.mini-panel span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #43d383;
  box-shadow: 0 0 18px #43d383;
}
.panel-one { top: 12%; right: 10%; }
.panel-two { bottom: 13%; left: 9%; }

.contact-shell {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 22px;
  align-items: start;
  margin-top: 26px;
  padding: clamp(22px, 4vw, 36px);
}

.contact-intro h2 {
  margin: 0 0 14px;
  font-size: clamp(1.65rem, 3vw, 2.6rem);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -0.035em;
}
.contact-intro p:not(.eyebrow) { color: var(--muted); line-height: 1.9; margin: 0; }

.contact-form {
  display: grid;
  gap: 14px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label { display: grid; gap: 8px; }
label span { color: var(--muted); font-weight: 900; font-size: .94rem; }

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.08);
  color: var(--text);
  border-radius: 16px;
  outline: none;
  padding: 15px 15px;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

html[data-theme="light"] input,
html[data-theme="light"] textarea { background: rgba(255,255,255,.82); }

input:focus, textarea:focus {
  border-color: rgba(212, 175, 88, .72);
  box-shadow: 0 0 0 4px rgba(212,175,88,.11);
}

textarea { resize: vertical; min-height: 132px; }

.submit-btn {
  border: 0;
  color: #2b0710;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  border-radius: 18px;
  min-height: 56px;
  padding: 14px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 900;
  box-shadow: 0 22px 44px rgba(212,175,88,.22);
  transition: transform .2s ease, box-shadow .2s ease;
}
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 26px 54px rgba(212,175,88,.29); }
.submit-btn i { font-style: normal; font-family: Inter, Cairo, sans-serif; }

.hidden-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.form-alert {
  border-radius: 16px;
  padding: 13px 15px;
  font-weight: 800;
}
.form-alert.success { color: #0f432c; background: rgba(67, 211, 131, .18); border: 1px solid rgba(67, 211, 131, .34); }
.form-alert.error { color: #7d1a28; background: rgba(255, 95, 113, .16); border: 1px solid rgba(255, 95, 113, .3); }
html[data-theme="dark"] .form-alert.error { color: #ffd5dc; }
html[data-theme="dark"] .form-alert.success { color: #ccffe3; }

.reveal { animation: reveal .75s ease both; }
.visual-card.reveal { animation-delay: .12s; }
.contact-shell.reveal { animation-delay: .2s; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 980px) {
  .hero-grid, .contact-shell { grid-template-columns: 1fr; }
  .visual-card { min-height: 430px; }
}

@media (max-width: 640px) {
  .page-shell { width: min(100% - 20px, 1180px); padding-top: 12px; }
  .topbar { border-radius: 24px; align-items: flex-start; }
  .brand-mark { width: 44px; height: 44px; }
  .brand-copy small { display: none; }
  .actions { flex-shrink: 0; }
  .pill-btn { padding: 10px 12px; }
  .timer, .signal-row, .field-grid { grid-template-columns: 1fr 1fr; }
  .signal-row div:last-child { grid-column: span 2; }
  h1 { font-size: clamp(2.1rem, 12vw, 4.4rem); }
  .hero-copy { padding: 24px 18px; border-radius: 26px; }
  .visual-card { min-height: 360px; border-radius: 26px; }
  .contact-shell { padding: 20px; border-radius: 26px; }
  .mini-panel { display: none; }
}

@media (max-width: 420px) {
  .timer { grid-template-columns: 1fr 1fr; }
  .time-box strong { font-size: 1.75rem; }
}
