:root {
  --paper: #FAF9F7;
  --card: #FFFFFF;
  --charcoal: #1A1A1B;
  --gold: #C5A059;
  --gold-strong: #B08D45;
  --gold-soft: #F4ECDD;
  --hairline: #E6E3DE;
  --muted: #6B6A67;

  /* Spacing scale (8px base) */
  --space-section: clamp(56px, 9vw, 104px);
  --shadow-sm: 0 1px 2px rgba(26, 26, 27, 0.04);
  --shadow-md: 0 12px 32px -12px rgba(26, 26, 27, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: "IBM Plex Sans", "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; }

a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap {
  max-width: 700px;
  margin-inline: auto;
  padding-inline: 24px;
}

.wrap.wide { max-width: 1080px; }

@media (max-width: 480px) {
  .wrap { padding-inline: 20px; }
}

/* ---------- Header ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 249, 247, 0.82);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--hairline);
}

nav.wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  padding-block: 15px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-end: auto;
  text-decoration: none;
  color: var(--charcoal);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.brand img { width: 30px; height: 30px; display: block; border-radius: 8px; }

.navlinks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 22px;
}

.navlinks a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  padding-block: 4px;
  transition: color 0.15s ease;
}

.navlinks a:hover, .navlinks a[aria-current="page"] {
  color: var(--charcoal);
}

.langswitch {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px 12px;
}

.langswitch a { color: var(--muted); text-decoration: none; margin: 0 3px; transition: color 0.15s ease; }
.langswitch a:hover { color: var(--charcoal); }
.langswitch a[aria-current="page"] { color: var(--charcoal); font-weight: 600; }

/* ---------- Main ---------- */

main { padding: clamp(40px, 6vw, 72px) 0 var(--space-section); }

h1 {
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.1;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h2 { font-size: 21px; margin: 40px 0 12px; letter-spacing: -0.01em; }
p { color: var(--charcoal); }

.lede {
  color: var(--muted);
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.55;
  max-width: 54ch;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  text-align: center;
  padding-block: clamp(24px, 5vw, 56px) clamp(28px, 5vw, 48px);
  margin-bottom: var(--space-section);
}

.hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -8%;
  transform: translateX(-50%);
  width: min(720px, 92%);
  height: 460px;
  background: radial-gradient(ellipse at center, var(--gold-soft) 0%, rgba(244, 236, 221, 0) 68%);
  opacity: 0.85;
  z-index: -1;
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(48px, 9vw, 84px);
  line-height: 1.02;
  margin-bottom: 18px;
}

.hero .lede { margin-inline: auto; }

.hero-icon {
  width: clamp(88px, 12vw, 104px);
  height: clamp(88px, 12vw, 104px);
  margin: 0 auto clamp(20px, 3vw, 28px);
  display: block;
  border-radius: 24px;
  border: 1px solid var(--hairline);
  background: var(--card);
  box-shadow: var(--shadow-md);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: clamp(28px, 4vw, 40px);
}

.updated { color: var(--muted); font-size: 15px; margin: -6px 0 8px; }

a.btn {
  display: inline-block;
  padding: 13px 26px;
  background: var(--gold);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15.5px;
  border-radius: 10px;
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

a.btn:hover {
  background: var(--gold-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

a.btn.ghost {
  background: var(--card);
  border: 1px solid var(--hairline);
  color: var(--charcoal);
  box-shadow: var(--shadow-sm);
}

a.btn.ghost:hover {
  background: var(--card);
  border-color: var(--gold);
  color: var(--charcoal);
}

p + a.btn { margin-top: 20px; }

ul { padding-inline-start: 22px; }
li { margin-bottom: 10px; }

/* ---------- Prose pages (privacy / terms) ---------- */

main .wrap:not(.wide) h2 { margin-top: 44px; }
main p { max-width: 66ch; }

/* ---------- Features ---------- */

.features-section > .kicker:first-child { margin-top: 0; }

.kicker {
  color: var(--gold-strong);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: var(--space-section) 0 10px;
}

.features-section h2 {
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.12;
  margin: 0 0 clamp(24px, 3vw, 36px);
  letter-spacing: -0.02em;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Barber section has 4 cards — render as a clean 2x2 */
.features--pair {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 880px) {
  .features,
  .features--pair { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .features,
  .features--pair { grid-template-columns: 1fr; }
}

.feature {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #DAD5CC;
}

.ficon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--gold-soft);
  color: var(--gold-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ficon svg { width: 22px; height: 22px; }

.feature h3 { font-size: 17.5px; margin: 18px 0 8px; letter-spacing: -0.01em; }

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.note {
  color: var(--muted);
  font-size: 15px;
  margin: clamp(20px, 3vw, 28px) 0 0;
  text-align: center;
}

.langstrip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px 16px;
  background: linear-gradient(180deg, var(--card), var(--gold-soft));
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: clamp(24px, 4vw, 34px) 28px;
  margin-top: var(--space-section);
  box-shadow: var(--shadow-sm);
}

.langstrip .ficon { flex-shrink: 0; background: #fff; }
.langstrip p { margin: 0; color: var(--charcoal); font-size: 16px; }
.langstrip strong { color: var(--charcoal); font-weight: 700; }

/* ---------- RTL (Arabic, Kurdish Sorani) ---------- */

html[dir="rtl"] body {
  font-family: "Noto Sans Arabic", "Noto Kufi Arabic", "Noto Sans", Tahoma, "Segoe UI", sans-serif;
  line-height: 1.75;
}

/* Letter-spacing degrades Arabic-script shaping */
html[dir="rtl"] h1,
html[dir="rtl"] .hero h1,
html[dir="rtl"] .brand,
html[dir="rtl"] .feature h3,
html[dir="rtl"] .features-section h2 { letter-spacing: 0; }
html[dir="rtl"] .kicker { letter-spacing: 0; font-size: 14px; }

html[dir="rtl"] .feature p { line-height: 1.7; }
html[dir="rtl"] .langswitch a { margin: 0 4px; }

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--hairline);
  padding: 28px 0;
  color: var(--muted);
  font-size: 14px;
}

footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

footer a { color: var(--muted); overflow-wrap: anywhere; transition: color 0.15s ease; }
footer a:hover { color: var(--charcoal); }
