/* =========================================================
   alihosny.ca — Main stylesheet
   Forest & Orange palette · Source Serif + Inter
   Phase 1
   ========================================================= */

/* === DESIGN TOKENS === */
:root {
  /* Colors */
  --bg: #F6F1E7;
  --bg-alt: #ECE5D5;
  --bg-card: #FFFDF7;
  --ink: #1A2E26;
  --ink-soft: #4A5F55;
  --ink-faint: #8A9A90;
  --accent: #2D5A4A;
  --accent-dark: #1E3F33;
  --orange: #E06A1F;
  --orange-dark: #B8501A;
  --orange-light: #F28A4A;
  --dark-bg: #0E1F18;
  --dark-ink: #F2EDD9;
  --dark-ink-soft: #9EA89A;
  --border: rgba(26, 46, 38, 0.12);
  --border-strong: rgba(26, 46, 38, 0.25);

  /* Typography */
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-arabic: 'Noto Naskh Arabic', 'Amiri', serif;

  /* Layout */
  --nav-height-mobile: 70px;
  --container-max: 1200px;
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 12px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-fast: 0.15s;
  --t-normal: 0.25s;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* === RTL SUPPORT === */
html[dir="rtl"] body {
  font-family: var(--font-arabic), var(--font-sans);
}
html[dir="rtl"] .hero { grid-template-columns: 1fr 1.15fr; }
html[dir="rtl"] .intro-grid { grid-template-columns: 1.4fr 0.8fr; }
html[dir="rtl"] .btn-arrow { transform: scaleX(-1); }
html[dir="rtl"] .btn:hover .btn-arrow { transform: scaleX(-1) translateX(3px); }

/* === CONTAINER === */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 32px;
}

/* === TOP NAV (DESKTOP) === */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0;
}
.nav-logo {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.5px;
  color: var(--ink);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
.nav-logo:hover { color: var(--orange-dark); }

.nav-links {
  display: flex;
  gap: 34px;
  font-size: 14px;
  align-items: center;
}
.nav-links a {
  text-decoration: none;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color var(--t-fast) var(--ease);
  position: relative;
}
.nav-links a:hover { color: var(--orange-dark); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 0; right: 0;
  height: 2px;
  background: var(--orange);
}

.lang-toggle {
  font-size: 12px;
  color: var(--ink-faint);
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
html[dir="rtl"] .lang-toggle {
  margin-left: 0;
  margin-right: 16px;
  padding-left: 0;
  padding-right: 16px;
  border-left: none;
  border-right: 1px solid var(--border);
}
.lang-toggle:hover { color: var(--orange-dark); }

/* === HERO === */
.hero {
  padding: 60px 0 90px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero-kicker {
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 24px;
  font-weight: 600;
  color: var(--orange-dark);
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: 58px;
  line-height: 1.05;
  letter-spacing: -1.6px;
  font-weight: 500;
  margin-bottom: 28px;
  color: var(--ink);
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--orange-dark);
}
.hero-lede {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 36px;
  max-width: 520px;
}
.hero-photo {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: 0 30px 60px -20px rgba(26, 46, 38, 0.2);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* === BUTTONS === */
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--t-normal) var(--ease);
  font-family: inherit;
  border: none;
}
.btn-primary {
  background: var(--orange);
  color: #fff;
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  padding: 12.5px 24px;
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-1px);
}
.btn-arrow { transition: transform var(--t-normal) var(--ease); display: inline-block; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* === KPI BAND === */
.kpi-band {
  background: var(--accent-dark);
  padding: 60px 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.kpi-band::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 40%;
  background: linear-gradient(135deg, transparent 0%, rgba(224, 106, 31, 0.14) 100%);
  pointer-events: none;
}
html[dir="rtl"] .kpi-band::before {
  right: auto; left: 0;
  background: linear-gradient(225deg, transparent 0%, rgba(224, 106, 31, 0.14) 100%);
}
.kpi-intro {
  text-align: center;
  margin-bottom: 44px;
  position: relative;
}
.kpi-intro-label {
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--orange-light);
  margin-bottom: 10px;
}
.kpi-intro h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 28px;
  color: #fff;
  letter-spacing: -0.5px;
}
.kpi-intro h2 em {
  font-style: italic;
  color: var(--orange-light);
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  position: relative;
}
.kpi { text-align: center; }
.kpi-num {
  font-family: var(--font-sans);
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -1.8px;
  color: #fff;
  white-space: nowrap;
}
.kpi-suffix {
  font-size: 24px;
  font-weight: 500;
  color: var(--orange-light);
}
.kpi-label {
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-top: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

/* === INTRO / APPROACH === */
.intro { padding: 110px 0; }
.intro-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.4fr;
  gap: 80px;
}
.intro-label {
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--orange-dark);
  margin-bottom: 16px;
}
.intro h2 {
  font-family: var(--font-serif);
  font-size: 42px;
  line-height: 1.15;
  letter-spacing: -0.9px;
  font-weight: 500;
  color: var(--ink);
}
.intro h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--orange-dark);
}
.intro p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.intro p:last-child { margin-bottom: 0; }

/* === SERVICES === */
.services { padding: 80px 0 110px; }
.services-head {
  text-align: center;
  margin-bottom: 60px;
}
.services-head .intro-label { display: inline-block; }
.services-head h2 {
  font-family: var(--font-serif);
  font-size: 42px;
  letter-spacing: -0.8px;
  font-weight: 500;
  margin-bottom: 16px;
  color: var(--ink);
}
.services-head h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--orange-dark);
}
.services-head p {
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto;
  color: var(--ink-soft);
  line-height: 1.6;
}
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--bg-card);
  padding: 40px 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: all var(--t-normal) var(--ease);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -20px rgba(26, 46, 38, 0.22);
  border-color: var(--orange);
}
.service-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 44px;
  font-weight: 400;
  line-height: 1;
  margin-bottom: 22px;
  color: var(--accent);
  transition: color var(--t-normal) var(--ease);
}
.service-card:hover .service-num { color: var(--orange-dark); }
.service-card h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--ink);
}
.service-card p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* === DARK CTA BAND === */
.cta-band {
  background: var(--dark-bg);
  color: var(--dark-ink);
  padding: 110px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  top: -50%; left: 50%;
  transform: translateX(-50%);
  width: 120%; height: 200%;
  background: radial-gradient(ellipse at center, rgba(224, 106, 31, 0.14) 0%, transparent 50%);
  pointer-events: none;
}
.cta-band-inner {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}
.cta-kicker {
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--orange-light);
  margin-bottom: 20px;
}
.cta-band h2 {
  font-family: var(--font-serif);
  font-size: 46px;
  line-height: 1.18;
  letter-spacing: -1px;
  font-weight: 400;
  margin-bottom: 22px;
}
.cta-band h2 em {
  font-style: italic;
  color: var(--orange-light);
}
.cta-band p {
  font-size: 18px;
  line-height: 1.65;
  color: var(--dark-ink-soft);
  margin-bottom: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* === FOOTER === */
.foot {
  background: var(--bg-alt);
  padding: 60px 0 40px;
  font-size: 13px;
  color: var(--ink-soft);
  border-top: 1px solid var(--border);
}
.foot-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.foot-top h4 {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--ink);
}
.foot-top p { line-height: 1.6; }
.foot-top ul { list-style: none; }
.foot-top li { margin-bottom: 8px; }
.foot-top a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
.foot-top a:hover { color: var(--orange-dark); }
.foot-bottom {
  padding-top: 30px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.foot-logo {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--ink);
  font-size: 16px;
}

/* === MOBILE BOTTOM NAV === */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 10px 8px 14px;
  padding-bottom: max(14px, env(safe-area-inset-bottom, 14px));
  z-index: 50;
  box-shadow: 0 -8px 24px -12px rgba(26, 46, 38, 0.12);
}
.mobile-nav-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
  border-radius: 8px;
  transition: all var(--t-fast) var(--ease);
}
.mobile-nav-item:hover { background: var(--bg-alt); }
.mobile-nav-item.active { color: var(--orange-dark); }
.mobile-nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: transparent;
  border: 1.5px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast) var(--ease);
}
.mobile-nav-item.active .mobile-nav-icon {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  border-width: 0;
}
.mobile-nav-icon svg {
  width: 14px; height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* === MOBILE TOP BAR === */
.mobile-topbar {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
}
.mobile-topbar-right {
  display: flex;
  gap: 10px;
  align-items: center;
}
.mobile-lang {
  font-size: 11px;
  color: var(--ink-soft);
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bg-alt);
  font-weight: 500;
  text-decoration: none;
}
.mobile-more {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
}
.mobile-more-dots { display: flex; gap: 3px; }
.mobile-more-dots span {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--ink-soft);
}

/* Mobile "More" panel */
.more-panel {
  position: fixed;
  inset: 0;
  background: rgba(14, 31, 24, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}
.more-panel.open { display: flex; }
.more-panel-inner {
  background: var(--bg-card);
  width: 100%;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  padding: 24px 24px 40px;
}
.more-panel h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  margin-bottom: 16px;
}
.more-panel a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}
.more-panel a:last-child { border-bottom: none; }

/* === RESPONSIVE === */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .kpi-num { font-size: 44px; }
}

@media (max-width: 860px) {
  /* Switch to mobile layout */
  .nav { display: none; }
  .mobile-topbar { display: flex; }
  .mobile-nav { display: block; }
  body { padding-bottom: var(--nav-height-mobile); }

  .container { padding: 0 20px; }

  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 20px 0 50px;
  }
  html[dir="rtl"] .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; letter-spacing: -1px; }
  .hero-lede { font-size: 15px; }
  .hero-photo { aspect-ratio: 4/3; }
  .hero-photo img { object-position: center 20%; }
  .cta-row { flex-direction: column; gap: 10px; }
  .cta-row .btn { width: 100%; justify-content: center; }

  .kpi-band { padding: 40px 0; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .kpi-num { font-size: 38px; }
  .kpi-intro h2 { font-size: 20px; }

  .intro { padding: 60px 0; }
  .intro-grid { grid-template-columns: 1fr; gap: 30px; }
  html[dir="rtl"] .intro-grid { grid-template-columns: 1fr; }
  .intro h2, .services-head h2, .cta-band h2 { font-size: 28px; }

  .service-grid { grid-template-columns: 1fr; gap: 12px; }
  .services { padding: 50px 0 60px; }

  .cta-band { padding: 70px 0; }
  .cta-band p { font-size: 15px; }

  .foot-top { grid-template-columns: 1fr; gap: 30px; }
  .foot-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* === UTILITIES === */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 16px;
  text-decoration: none;
  z-index: 1000;
}
.skip-link:focus { top: 0; }

/* =========================================================
   ABOUT PAGE
   ========================================================= */
.about-hero {
  padding: 50px 0 70px;
  max-width: 900px;
}
.about-eyebrow {
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 22px;
  font-weight: 600;
  color: var(--orange-dark);
}
.about-title {
  font-family: var(--font-serif);
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -1.2px;
  font-weight: 500;
  margin-bottom: 28px;
  color: var(--ink);
  max-width: 18ch;
}
.about-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--orange-dark);
}
.about-lede {
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 640px;
}

.about-section {
  padding: 70px 0;
  border-top: 1px solid var(--border);
}
.about-section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}
.about-section--craft {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  position: relative;
}
.about-section--craft::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--orange) 50%, transparent 100%);
  opacity: 0.5;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.4fr;
  gap: 80px;
  align-items: start;
}
.about-grid-label .intro-label {
  margin-bottom: 16px;
}
.about-section-title {
  font-family: var(--font-serif);
  font-size: 32px;
  line-height: 1.18;
  letter-spacing: -0.6px;
  font-weight: 500;
  color: var(--ink);
  position: sticky;
  top: 20px;
}
.about-section-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--orange-dark);
}
.about-grid-body p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.about-grid-body p:last-child { margin-bottom: 0; }

@media (max-width: 860px) {
  .about-hero { padding: 20px 0 40px; }
  .about-title { font-size: 32px; letter-spacing: -0.8px; max-width: none; }
  .about-lede { font-size: 16px; }

  .about-section { padding: 45px 0; }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  html[dir="rtl"] .about-grid { grid-template-columns: 1fr; }
  .about-section-title {
    font-size: 26px;
    position: static;
  }
  .about-grid-body p { font-size: 15px; line-height: 1.7; }
}

/* =========================================================
   CONSULTING PAGE
   ========================================================= */
.page-hero {
  padding: 50px 0 60px;
  max-width: 820px;
}
.page-hero .eyebrow {
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-weight: 600;
  color: var(--orange-dark);
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -1.2px;
  font-weight: 500;
  margin-bottom: 26px;
  color: var(--ink);
}
.page-hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--orange-dark);
}
.page-hero .lede {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 640px;
}

.services-detail {
  padding: 40px 0 80px;
}
.service-detail {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 28px;
  padding: 40px 0;
  border-top: 1px solid var(--border);
}
.service-detail:last-child { border-bottom: 1px solid var(--border); }
.service-detail-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 44px;
  font-weight: 400;
  color: var(--orange);
  line-height: 1;
}
.service-detail h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 14px;
  color: var(--ink);
}
.service-detail h3 em {
  font-style: italic;
  color: var(--orange-dark);
}
.service-detail p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.service-detail .deliverable {
  display: block;
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--bg-alt);
  border-left: 3px solid var(--orange);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  border-radius: 0 4px 4px 0;
}
html[dir="rtl"] .service-detail .deliverable {
  border-left: none;
  border-right: 3px solid var(--orange);
  border-radius: 4px 0 0 4px;
}
.service-detail .deliverable strong {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--orange-dark);
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.principles {
  padding: 80px 0;
  background: var(--bg-alt);
}
.principles-head {
  text-align: center;
  margin-bottom: 50px;
}
.principles-head h2 {
  font-family: var(--font-serif);
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: -0.8px;
  font-weight: 500;
  color: var(--ink);
}
.principles-head h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--orange-dark);
}
.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 48px;
}
.principle {
  display: flex;
  gap: 20px;
}
.principle-marker {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.principle h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}
.principle p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.pricing-section {
  padding: 80px 0;
}
.pricing-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.4fr;
  gap: 80px;
  align-items: start;
}
.pricing-head h2 {
  font-family: var(--font-serif);
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.6px;
  font-weight: 500;
  color: var(--ink);
}
.pricing-head h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--orange-dark);
}
.pricing-body p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-soft);
}

@media (max-width: 860px) {
  .page-hero { padding: 20px 0 40px; }
  .page-hero h1 { font-size: 32px; letter-spacing: -0.8px; }
  .page-hero .lede { font-size: 16px; }

  .services-detail { padding: 20px 0 40px; }
  .service-detail {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 30px 0;
  }
  .service-detail h3 { font-size: 21px; }
  .service-detail p { font-size: 15px; }

  .principles { padding: 50px 0; }
  .principles-head h2 { font-size: 26px; }
  .principles-grid { grid-template-columns: 1fr; gap: 28px; }

  .pricing-section { padding: 50px 0; }
  .pricing-grid { grid-template-columns: 1fr; gap: 20px; }
  html[dir="rtl"] .pricing-grid { grid-template-columns: 1fr; }
  .pricing-head h2 { font-size: 24px; }
  .pricing-body p { font-size: 15px; }
}

/* =========================================================
   LIBRARY PAGE
   ========================================================= */
.library-content {
  padding: 40px 0 80px;
}
.library-group {
  margin-bottom: 50px;
}
.library-group-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.library-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.library-item:last-child { border-bottom: none; }
.library-item h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--ink);
}
.library-item .author {
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 10px;
  font-style: italic;
}
.library-item p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.library-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-faint);
  font-style: italic;
  font-family: var(--font-serif);
}

@media (max-width: 860px) {
  .library-content { padding: 20px 0 40px; }
  .library-group-title { font-size: 19px; }
}

/* =========================================================
   CONTACT PAGE & FORM
   ========================================================= */
.contact-page {
  padding: 40px 0 80px;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 70px;
  align-items: start;
}
.contact-form {
  background: var(--bg-card);
  padding: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.form-field {
  margin-bottom: 20px;
}
.form-field label {
  display: block;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: var(--bg);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--orange);
  background: var(--bg-card);
}
.form-field textarea {
  resize: vertical;
  min-height: 160px;
  font-family: inherit;
  line-height: 1.6;
}
.form-field.error input,
.form-field.error textarea {
  border-color: #B8501A;
}
.form-field .error-msg {
  display: none;
  margin-top: 8px;
  font-size: 13px;
  color: #B8501A;
}
.form-field.error .error-msg { display: block; }

/* Honeypot — hidden from humans, visible to bots */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-submit {
  margin-top: 10px;
}
.form-submit .btn {
  width: 100%;
  justify-content: center;
  font-size: 15px;
  padding: 16px 24px;
}

.form-status {
  padding: 20px 24px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}
.form-status.success {
  background: rgba(45, 90, 74, 0.08);
  border: 1px solid rgba(45, 90, 74, 0.3);
  color: var(--accent-dark);
}
.form-status.error {
  background: rgba(184, 80, 26, 0.08);
  border: 1px solid rgba(184, 80, 26, 0.3);
  color: var(--orange-dark);
}
.form-status h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 6px;
}
.form-status p {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.contact-side h2 {
  font-family: var(--font-serif);
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.8px;
  font-weight: 500;
  margin-bottom: 20px;
  color: var(--ink);
}
.contact-side h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--orange-dark);
}
.contact-side p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
}

@media (max-width: 860px) {
  .contact-page {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 20px 0 50px;
  }
  html[dir="rtl"] .contact-page { grid-template-columns: 1fr; }
  .contact-form { padding: 24px; }
  .contact-side h2 { font-size: 26px; }
  .contact-side p { font-size: 15px; }
}

/* =========================================================
   BLOG — listing, post, markdown body
   ========================================================= */

/* ---- TAG FILTER ---- */
.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.tag-chip:hover {
  background: var(--bg-card);
  border-color: var(--border-strong);
  color: var(--ink);
}
.tag-chip.active {
  background: var(--accent-dark);
  color: #fff;
  border-color: var(--accent-dark);
}
.tag-chip .tag-count {
  font-size: 11px;
  opacity: 0.6;
  font-weight: 400;
}

.filter-banner {
  padding: 12px 18px;
  background: rgba(224, 106, 31, 0.08);
  border-left: 3px solid var(--orange);
  border-radius: 0 4px 4px 0;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 30px;
}
html[dir="rtl"] .filter-banner {
  border-left: none;
  border-right: 3px solid var(--orange);
  border-radius: 4px 0 0 4px;
}
.filter-banner a { color: var(--orange-dark); font-weight: 600; }

/* ---- POST LIST ---- */
.blog-list-section { padding: 40px 0 80px; }

.post-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.post-card {
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}
.post-card:last-child { border-bottom: none; }

.post-card-meta {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 12px;
  font-weight: 600;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.post-card-tags a {
  color: var(--ink-soft);
  text-decoration: none;
}
.post-card-tags a:hover { color: var(--orange-dark); }

.post-card-title {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.6px;
  margin-bottom: 14px;
}
.post-card-title a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s;
}
.post-card-title a:hover { color: var(--orange-dark); }

.post-card-excerpt {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 16px;
  max-width: 640px;
}

.post-card-readmore {
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--orange-dark);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.15s;
}
.post-card-readmore:hover { gap: 10px; }

.blog-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-faint);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
}

/* ---- SINGLE POST ---- */
.post-article { padding: 40px 0 80px; }

.post-header {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 0 30px;
}

.post-back {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 30px;
  transition: color 0.15s;
}
.post-back:hover { color: var(--orange-dark); }

.post-meta {
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 20px;
  font-weight: 600;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.post-meta-sep { opacity: 0.4; }
.post-ai-badge {
  background: rgba(45, 90, 74, 0.12);
  color: var(--accent-dark);
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0.3px;
}

.post-title {
  font-family: var(--font-serif);
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -1.2px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 22px;
}

.post-lede {
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 30px;
  font-family: var(--font-serif);
  font-weight: 400;
}

.post-translation-note {
  display: inline-block;
  padding: 8px 14px;
  background: var(--bg-alt);
  border-radius: 4px;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 4px;
}
.post-translation-note a { color: var(--orange-dark); font-weight: 600; text-decoration: none; }

.post-featured {
  max-width: 960px;
  margin: 10px auto 40px;
  border-radius: 6px;
  overflow: hidden;
}
.post-featured img {
  width: 100%;
  height: auto;
  display: block;
}

.post-body-wrap { padding: 20px 0 40px; }
.post-body {
  max-width: 720px;
  margin: 0 auto;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink);
}

/* Markdown body elements */
.post-body .md-p { margin-bottom: 1.2em; }
.post-body .md-h1,
.post-body .md-h2,
.post-body .md-h3,
.post-body .md-h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.25;
  margin-top: 2em;
  margin-bottom: 0.6em;
  letter-spacing: -0.4px;
}
.post-body .md-h1 { font-size: 32px; }
.post-body .md-h2 { font-size: 26px; }
.post-body .md-h3 { font-size: 22px; }
.post-body .md-h4 { font-size: 19px; font-weight: 600; }
.post-body .md-h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--orange);
  margin-top: 8px;
}

.post-body .md-ul,
.post-body .md-ol {
  margin: 0 0 1.2em 1.2em;
  padding-left: 20px;
}
html[dir="rtl"] .post-body .md-ul,
html[dir="rtl"] .post-body .md-ol {
  margin: 0 1.2em 1.2em 0;
  padding-right: 20px;
  padding-left: 0;
}
.post-body .md-ul li,
.post-body .md-ol li { margin-bottom: 0.5em; }

.post-body .md-quote {
  margin: 1.5em 0;
  padding: 16px 24px;
  border-left: 4px solid var(--orange);
  background: var(--bg-alt);
  color: var(--ink);
  font-style: italic;
  border-radius: 0 4px 4px 0;
  font-size: 0.95em;
}
html[dir="rtl"] .post-body .md-quote {
  border-left: none;
  border-right: 4px solid var(--orange);
  border-radius: 4px 0 0 4px;
}

.post-body .md-code {
  background: #0E1F18;
  color: #F2EDD9;
  padding: 18px 20px;
  border-radius: 4px;
  overflow-x: auto;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 14px;
  line-height: 1.6;
  margin: 1.2em 0;
}
.post-body .md-inline-code {
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 0.88em;
  color: var(--accent-dark);
}

.post-body .md-a {
  color: var(--orange-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.post-body .md-a:hover { color: var(--ink); }

.post-body .md-img {
  max-width: 100%;
  height: auto;
  margin: 1.5em auto;
  display: block;
  border-radius: 4px;
}

.post-body hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 2em auto;
  max-width: 120px;
}

/* ---- POST FOOTER ---- */
.post-footer {
  max-width: 720px;
  margin: 40px auto 0;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.post-footer-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 30px;
}
.post-footer-tags .label {
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
  margin-right: 6px;
}

.post-author-note {
  background: var(--bg-alt);
  padding: 20px 24px;
  border-radius: 6px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.post-author-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--orange-dark);
  font-weight: 600;
  margin-bottom: 6px;
}
.post-author-note a {
  color: var(--orange-dark);
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 860px) {
  .blog-list-section { padding: 20px 0 50px; }
  .post-card-title { font-size: 24px; }
  .post-card-excerpt { font-size: 15px; }

  .post-article { padding: 20px 0 50px; }
  .post-title { font-size: 30px; letter-spacing: -0.8px; }
  .post-lede { font-size: 17px; }
  .post-body { font-size: 16.5px; }
  .post-body .md-h1 { font-size: 26px; }
  .post-body .md-h2 { font-size: 22px; }
  .post-body .md-h3 { font-size: 19px; }
}
