:root {
  --ink: #1a1f2c;
  --ink-deep: #101827;
  --navy: #0d1726;
  --text: #303746;
  --muted: #6f7785;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --line: #dfe4ea;
  --amber: #c7892d;
  --amber-2: #e1a548;
  --amber-dark: #9b651f;
  --amber-soft: #f8eddc;
  --success: #176b4f;
  --danger: #b94040;
  --shadow-sm: 0 12px 34px rgba(20,28,42,.08);
  --shadow-lg: 0 30px 76px rgba(9,16,30,.18);
  --radius: 18px;
  --radius-lg: 28px;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
  --font-display: "Manrope", "Inter", "Segoe UI", Arial, sans-serif;
  --font-ar: "Cairo", Tahoma, Arial, sans-serif;
}
* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
html[dir="rtl"] body { font-family: var(--font-ar); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid rgba(225,165,72,.52); outline-offset: 3px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 78px;
  padding: 11px clamp(18px, 4vw, 54px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #fff;
  background: rgba(13,23,38,.92);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}
.brand span { display: grid; gap: 2px; }
.brand strong { font-family: var(--font-display); letter-spacing: .08em; font-size: .95rem; }
.brand small { color: rgba(255,255,255,.55); font-size: .65rem; letter-spacing: .08em; }
.language-switcher { display: flex; gap: 7px; flex-wrap: wrap; }
.lang-button {
  min-width: 42px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 10px;
  color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.035);
  font-size: .78rem;
  font-weight: 800;
  transition: .2s ease;
}
.lang-button:hover,
.lang-button.is-active {
  color: var(--ink);
  border-color: transparent;
  background: linear-gradient(135deg, #f6dfb7, #d39638);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(78px, 9vw, 132px) clamp(20px, 5vw, 70px) clamp(150px, 15vw, 220px);
  color: #fff;
  background:
    radial-gradient(circle at 80% 14%, rgba(225,165,72,.28), transparent 26%),
    radial-gradient(circle at 16% 78%, rgba(74,109,157,.22), transparent 34%),
    linear-gradient(135deg, #0d1726, #1b2738 58%, #26354a);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .28;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #000, transparent 92%);
}
.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin-inline: auto;
  text-align: center;
}
.eyebrow,
.step-label {
  margin: 0 0 14px;
  color: #edc276;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.03em; }
h1 { margin: 0; color: #fff; font-size: clamp(2.5rem, 6vw, 5.25rem); line-height: 1.04; }
.hero-copy > p:not(.eyebrow) {
  max-width: 850px;
  margin: 26px auto 0;
  color: rgba(255,255,255,.72);
  font-size: 1.08rem;
  line-height: 1.78;
}
.hero-points { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.hero-points span {
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  color: rgba(255,255,255,.73);
  background: rgba(255,255,255,.055);
  font-size: .84rem;
  backdrop-filter: blur(10px);
}

.calculator-shell {
  position: relative;
  z-index: 5;
  width: min(1320px, calc(100% - 34px));
  margin: clamp(-128px, -10vw, -94px) auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(360px, .84fr);
  gap: 22px;
  align-items: start;
}
.calculator-card,
.results-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.calculator-card {
  padding: clamp(28px, 4vw, 48px);
  background: var(--surface);
}
.results-card {
  position: sticky;
  top: 104px;
  min-height: 640px;
  padding: clamp(28px, 4vw, 42px);
  color: #fff;
  background:
    radial-gradient(circle at 80% 8%, rgba(225,165,72,.22), transparent 25%),
    linear-gradient(145deg, #101a29, #1b283a);
  border-color: rgba(255,255,255,.08);
}
.section-heading { margin-bottom: 30px; }
.section-heading h2,
.results-card h2,
.trust-section h2 { margin: 0; color: var(--ink); font-size: clamp(1.8rem, 3vw, 2.75rem); line-height: 1.16; }
.results-card h2 { color: #fff; }
.section-heading > p:last-child { color: var(--muted); line-height: 1.7; }
form { display: grid; gap: 24px; }
.form-grid,
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.field { display: grid; gap: 8px; }
.field > span:first-child,
.range-field strong { color: var(--ink); font-size: .9rem; font-weight: 700; }
.field small,
.range-field small { color: var(--muted); line-height: 1.5; }
input,
select {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface-soft);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
input:focus,
select:focus {
  border-color: rgba(199,137,45,.58);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(199,137,45,.10);
}
.input-with-unit { position: relative; display: block; }
.input-with-unit input { padding-inline-end: 92px; }
.input-with-unit > span {
  position: absolute;
  inset-inline-end: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: .82rem;
  pointer-events: none;
}
.range-field {
  padding: 20px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcfd;
}
.range-field > span { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.range-field output { color: var(--amber-dark); font-weight: 800; }
input[type="range"] { min-height: auto; padding: 0; accent-color: var(--amber); background: transparent; }
.contact-gate {
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid rgba(199,137,45,.20);
  border-radius: 18px;
  background: linear-gradient(135deg, #fffaf1, #f9f1e4);
}
.contact-gate h3 { margin: 0 0 8px; color: var(--ink); font-size: 1.28rem; }
.contact-gate > p { color: var(--muted); line-height: 1.65; }
.consent-row { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0; color: var(--text); line-height: 1.55; }
.consent-row input { width: 18px; min-height: 18px; margin-top: 3px; accent-color: var(--amber); }
.primary-button {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 13px;
  color: #1b2230;
  background: linear-gradient(135deg, #f3d59d, #d59a3a 58%, #b87522);
  box-shadow: 0 14px 28px rgba(184,117,34,.22);
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 20px 36px rgba(184,117,34,.30); }
.primary-button:disabled { opacity: .65; cursor: wait; transform: none; }
.privacy-note { margin: 10px 0 0; color: var(--muted); font-size: .82rem; text-align: center; }
.form-error,
.form-status { margin-top: 12px; padding: 12px 14px; border-radius: 10px; line-height: 1.5; }
.form-error { color: #7f2424; background: #fff0f0; border: 1px solid #f0caca; }
.form-status { color: #12553f; background: #edf8f3; border: 1px solid #c9e6da; }
.hidden-field { position: absolute !important; left: -9999px !important; opacity: 0 !important; pointer-events: none !important; }

.results-placeholder {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.sun-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: #1a2130;
  background: linear-gradient(135deg, #f4d8a5, #d79a3b);
  box-shadow: 0 18px 38px rgba(197,137,45,.23);
  font-size: 2rem;
}
.results-placeholder h2 { margin-top: 24px; }
.results-placeholder p { max-width: 390px; color: rgba(255,255,255,.62); line-height: 1.7; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.result-item {
  min-height: 118px;
  padding: 17px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 15px;
  background: rgba(255,255,255,.055);
}
.result-item.featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(225,165,72,.20), rgba(255,255,255,.055));
  border-color: rgba(225,165,72,.28);
}
.result-item span { color: rgba(255,255,255,.58); font-size: .82rem; }
.result-item strong { margin-top: 12px; color: #f2c778; font-family: var(--font-display); font-size: 1.45rem; line-height: 1.15; }
.recommendation { margin-top: 20px; color: rgba(255,255,255,.78); line-height: 1.68; }
.data-source,
.disclaimer { color: rgba(255,255,255,.50); font-size: .8rem; line-height: 1.55; }

.trust-section {
  width: min(1180px, calc(100% - 34px));
  margin: 0 auto;
  padding: clamp(86px, 9vw, 130px) 0;
  text-align: center;
}
.trust-section .eyebrow { color: var(--amber-dark); }
.trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 38px; }
.trust-grid article {
  min-height: 190px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.trust-grid strong { color: var(--amber-dark); font-family: var(--font-display); font-size: 2rem; }
.trust-grid span { margin-top: 10px; color: var(--muted); line-height: 1.55; }
footer {
  padding: 30px clamp(18px,4vw,54px);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255,255,255,.62);
  background: var(--navy);
}
footer a { color: #e5b563; }

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3 { font-family: var(--font-ar); letter-spacing: 0; }

@media (max-width: 1040px) {
  .calculator-shell { grid-template-columns: 1fr; max-width: 860px; }
  .results-card { position: relative; top: auto; min-height: auto; }
  .results-placeholder { min-height: 360px; }
}
@media (max-width: 720px) {
  .site-header { flex-direction: column; padding-block: 13px; }
  .brand { flex-direction: column; text-align: center; }
  .hero { padding-top: 70px; }
  .calculator-shell { width: min(100% - 22px, 860px); }
  .calculator-card,
  .results-card { padding: 22px; border-radius: 20px; }
  .form-grid,
  .contact-grid,
  .result-grid,
  .trust-grid { grid-template-columns: 1fr; }
  .result-item.featured { grid-column: auto; }
  footer { flex-direction: column; text-align: center; }
}
