/* Ruknara - main stylesheet. Design tokens from docs/00-BRAND/03-VISUAL/{02-color-palette,03-typography}.md */

:root {
  /* Colors */
  --color-primary:        #0E5C5C; /* Sukoon Teal */
  --color-primary-ink:    #0B4A4A; /* Teal Ink */
  --color-primary-bright: #147575;
  --color-accent:         #C99A3B; /* Assured Gold */
  --color-accent-hover:   #B0842E;
  --color-on-accent:      #26231E; /* never white on gold */
  --color-sand:           #E7DAC4;
  --color-teal-mist:      #DCEAE8;
  --color-text:           #26231E; /* Warm Ink */
  --color-text-muted:     #6E675C; /* Stone Greige */
  --color-bg:             #FAF6EF; /* Majlis Cream */
  --color-surface:        #FFFDFA; /* Soft White */
  --color-border:         #DED5C7;
  --color-success:        #3F7A57;

  /* Fonts */
  --font-arabic: 'IBM Plex Sans Arabic', 'Noto Sans Arabic', 'Geeza Pro', 'Segoe UI', Tahoma, sans-serif;
  --font-latin:  'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Type scale - Arabic (base 17px) */
  --ar-display: 3.125rem; --ar-h1: 2.625rem; --ar-h2: 2.1875rem; --ar-h3: 1.8125rem;
  --ar-h4: 1.5rem; --ar-lead: 1.25rem; --ar-body: 1.0625rem; --ar-caption: 0.875rem;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow-soft: 0 8px 30px rgba(11, 74, 74, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-arabic);
  font-size: var(--ar-body);
  line-height: 1.9;
  color: var(--color-text);
  background: var(--color-bg);
  letter-spacing: 0; /* NEVER change for Arabic - breaks joined script */
}

html[dir="rtl"], [dir="rtl"] body { text-align: right; }

h1, h2, h3, h4 { font-weight: 600; line-height: 1.4; margin: 0 0 0.6em; letter-spacing: 0; }
h1 { font-size: var(--ar-h1); }
h2 { font-size: var(--ar-h2); }
h3 { font-size: var(--ar-h3); }
h4 { font-size: var(--ar-h4); }
p { margin: 0 0 1em; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-ink); }
em, i { font-style: normal; font-weight: 500; } /* no faux italic on Arabic */

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

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section--sand { background: var(--color-sand); }
.section--mist { background: var(--color-teal-mist); }
.section--ink { background: var(--color-primary-ink); color: var(--color-bg); }
.section--ink a { color: var(--color-accent); }

/* Grounding baseline - a quiet structural device, per visual-direction.md */
.section { border-top: 1px solid var(--color-border); }
.section:first-of-type { border-top: none; }

.btn {
  display: inline-block;
  padding: 16px 32px;
  border-radius: 999px;
  font-weight: 500;
  font-size: var(--ar-body);
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-on-accent); /* never white on gold */
}
.btn-primary:hover { background: var(--color-accent-hover); color: var(--color-on-accent); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}
.btn-secondary:hover { background: var(--color-teal-mist); color: var(--color-primary-ink); }

.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-soft);
}

/* Header / nav */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}
.site-header .logo img { height: 40px; width: auto; }
.site-header nav { display: flex; gap: 28px; align-items: center; }
.site-header nav a { color: var(--color-text); font-size: var(--ar-caption); }

/* Hero */
.hero { padding: 56px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 0.5em; }
.hero .lead { font-size: var(--ar-lead); color: var(--color-text-muted); margin-bottom: 1.6em; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 1.2em; }
.hero-tagline { color: var(--color-accent); font-weight: 600; font-size: var(--ar-lead); }
.hero-image { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); }

/* Trust bar */
.trust-bar { display: flex; gap: 40px; flex-wrap: wrap; justify-content: center; text-align: center; }
.trust-stat .num { font-size: var(--ar-h2); font-weight: 600; color: var(--color-primary); display: block; }
.trust-stat .label { color: var(--color-text-muted); font-size: var(--ar-caption); }

/* Pillars grid */
.pillars-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.pillar-card { text-align: center; }
.pillar-card .icon { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px; background: var(--color-teal-mist); display: flex; align-items: center; justify-content: center; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.price-card { text-align: center; position: relative; }
.price-card.featured { border: 2px solid var(--color-accent); }
.price-card .period { color: var(--color-text-muted); font-size: var(--ar-caption); margin-bottom: 12px; }
.price-card .amount { font-size: var(--ar-h2); font-weight: 600; color: var(--color-primary); margin-bottom: 20px; }
.price-card .amount small { font-size: var(--ar-caption); font-weight: 400; color: var(--color-text-muted); }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step .step-num { display: inline-flex; width: 40px; height: 40px; border-radius: 50%; background: var(--color-primary); color: var(--color-bg); align-items: center; justify-content: center; font-weight: 600; margin-bottom: 16px; }

/* Device grid */
.device-grid { display: flex; gap: 32px; flex-wrap: wrap; justify-content: center; align-items: center; }
.device-grid span { color: var(--color-text-muted); font-size: var(--ar-caption); }

/* FAQ */
details { border-bottom: 1px solid var(--color-border); padding: 20px 0; }
details summary { font-weight: 500; cursor: pointer; font-size: var(--ar-lead); }
details p { margin-top: 12px; color: var(--color-text-muted); }

/* Footer */
.site-footer { padding: 48px 0 32px; font-size: var(--ar-caption); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 16px; }
.footer-links a { color: var(--color-bg); opacity: 0.85; }

/* Email capture */
.lead-magnet { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.lead-magnet input[type="email"] {
  padding: 14px 18px; border-radius: 999px; border: 1px solid var(--color-border);
  font-family: var(--font-arabic); font-size: var(--ar-caption); min-width: 260px;
}

@media (max-width: 860px) {
  .hero-grid, .pillars-grid, .pricing-grid, .steps { grid-template-columns: 1fr; }
  .pillars-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .site-header { flex-wrap: wrap; row-gap: 14px; }
  .site-header .logo img { height: 32px; }
  .site-header nav { flex-wrap: wrap; gap: 10px 18px; width: 100%; justify-content: center; order: 3; }
  .site-header nav a.btn-secondary { order: -1; width: 100%; text-align: center; }
}

/* Latin secondary register */
[lang="en"], [dir="ltr"] { font-family: var(--font-latin); }
