/* =========================================================================
   أسس كارز — Design tokens
   Colors below are a placeholder gold/bronze + near-black palette chosen to
   match the described logo (gold/bronze swoosh, bold black wordmark).
   Once the real logo file lands in public/assets/logo.png, re-pick exact hex
   values with a color picker and swap them here — everything else derives
   from these variables so a retune is cheap.
   ========================================================================= */
:root {
  --color-bg: #FAF7F2;
  --color-surface: #FFFFFF;
  --color-border: #E7DFD1;

  --color-ink: #17140F;          /* near-black text */
  --color-ink-muted: #5B564C;

  --gold-light: #EFCB78;
  --gold: #C89B3C;
  --bronze: #8A5A2B;
  --gradient-gold: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 45%, var(--bronze) 100%);

  --color-success: #2E7D4F;
  --color-error: #B3261E;

  --font-display: 'Almarai', 'Tajawal', system-ui, sans-serif;
  --font-body: 'Tajawal', 'Almarai', system-ui, sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 2px 8px rgba(23, 20, 15, 0.06);
  --shadow-md: 0 8px 24px rgba(23, 20, 15, 0.10);

  --max-width: 720px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3 { font-family: var(--font-display); margin: 0; }

p { margin: 0; }

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

.wrap {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 20px;
}

/* Focus visibility everywhere, per accessibility requirements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.uploader:focus-within {
  outline: 3px solid var(--bronze);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  right: -9999px;
  top: 0;
  background: var(--color-ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 100;
}
.skip-link:focus {
  right: 12px;
  top: 12px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 12px;
}

.brand { display: flex; align-items: center; gap: 10px; min-height: 40px; }

.brand-logo {
  height: 40px;
  width: auto;
}

.brand-fallback {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-fallback__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--color-ink);
}
.brand-fallback__tag {
  font-size: 0.7rem;
  color: var(--bronze);
  font-weight: 700;
}

.header-cta {
  background: var(--gradient-gold);
  color: var(--color-ink);
  font-weight: 700;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--color-ink);
  color: #fff;
  padding-block: 56px 72px;
}

/* Signature element: a single gold sweep echoing the logo's swoosh */
.hero-sweep {
  position: absolute;
  inset: auto -20% -60% -20%;
  height: 220px;
  background: var(--gradient-gold);
  filter: blur(2px);
  transform: rotate(-4deg);
  opacity: 0.9;
}

.hero-inner { position: relative; text-align: center; }

.hero-title {
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 14px;
}

.hero-sub {
  color: rgba(255, 255, 255, 0.82);
  max-width: 46ch;
  margin-inline: auto;
  font-size: 1.02rem;
}

.hero-cta {
  display: inline-block;
  margin-top: 26px;
  background: var(--gradient-gold);
  color: var(--color-ink);
  font-weight: 800;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
}

/* ---------- Lead form section ---------- */
.lead-section { padding-block: 40px; }

.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 6px;
}

.section-sub {
  text-align: center;
  color: var(--color-ink-muted);
  margin-bottom: 24px;
}

.lead-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.field { margin-bottom: 20px; }

.field-label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.field-hint {
  color: var(--color-ink-muted);
  font-size: 0.82rem;
  margin-top: 6px;
}

.field-error {
  color: var(--color-error);
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 6px;
}

.text-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--color-bg);
  color: var(--color-ink);
  direction: ltr;
  text-align: right;
}

.text-input:invalid[data-touched="true"] {
  border-color: var(--color-error);
}

/* Uploader */
.uploader { position: relative; }

.uploader input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.uploader-visual {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.uploader:hover .uploader-visual { border-color: var(--gold); }

.uploader-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--color-ink-muted);
  font-size: 0.9rem;
  padding: 20px;
  text-align: center;
}
.uploader-placeholder svg { color: var(--bronze); }

.uploader-preview {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  background: var(--color-ink);
}

/* Submit button */
.submit-btn {
  width: 100%;
  background: var(--gradient-gold);
  color: var(--color-ink);
  border: none;
  border-radius: 999px;
  padding: 16px;
  font-size: 1.05rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.submit-btn:disabled { opacity: 0.75; cursor: not-allowed; }

.submit-btn__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(23, 20, 15, 0.3);
  border-top-color: var(--color-ink);
  border-radius: 50%;
}

.submit-btn.is-sending .submit-btn__spinner {
  display: inline-block;
  animation: spin 0.7s linear infinite;
}

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

.reassurance {
  text-align: center;
  margin-top: 14px;
  color: var(--color-ink-muted);
  font-size: 0.9rem;
}

.form-status {
  margin-top: 16px;
  text-align: center;
  font-weight: 700;
  min-height: 1.4em;
}
.form-status[data-state="success"] { color: var(--color-success); }
.form-status[data-state="error"] { color: var(--color-error); }

/* Sparkle burst on success — echoes the logo's 4-point sparkle */
.form-status .sparkle {
  display: inline-block;
  margin-inline-end: 4px;
  animation: sparkle-pop 0.5s ease;
}
@keyframes sparkle-pop {
  0% { transform: scale(0.4) rotate(-15deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); }
}

/* ---------- Quick links ---------- */
.quick-links { padding-block: 8px 32px; }
.quick-links-inner {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.quick-link {
  flex: 1 1 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
  text-decoration: none;
  color: var(--color-ink);
  font-weight: 700;
  font-size: 0.9rem;
}
.quick-link:hover { border-color: var(--gold); }

/* ---------- Reviews ---------- */
.reviews { padding-block: 8px 56px; }
.reviews-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.review-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px;
}
.review-text {
  margin-bottom: 8px;
  color: var(--color-ink);
}
.review-author {
  color: var(--color-ink-muted);
  font-size: 0.85rem;
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 24px;
  text-align: center;
  color: var(--color-ink-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--color-border);
}

/* ---------- Motion & small screens ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

@media (min-width: 560px) {
  .hero-title { font-size: 2.8rem; }
}
