/* SUKOON — proposed visual direction v1 (pending brand approval)
   Palette from the founder's stated preferences: cream, olive, sage, taupe, clay.
   Logical properties (margin-inline, padding-inline…) keep the layout correct in RTL. */
:root {
  --cream: #F4EFE6; --paper: #FBF8F2; --sand: #E9E1D4;
  --olive: #56603C; --olive-deep: #3C4329; --sage: #A9B494; --sage-soft: #DCE2D0;
  --taupe: #8C7D6E; --clay: #985539; --clay-soft: #F1DFD4;
  --ink: #2C3026; --muted: #5F5E53; --line: #DAD1C2;
  --radius: 18px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(44,48,38,.05), 0 8px 24px rgba(44,48,38,.06);
  --wrap: 1120px;
  --f-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --f-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
[dir="rtl"] {
  --f-display: 'Noto Naskh Arabic', 'IBM Plex Sans Arabic', 'Geeza Pro', serif;
  --f-body: 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, 'Segoe UI', Tahoma, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 1.0625rem/1.7 var(--f-body); }
[dir="rtl"] body { font-size: 1.125rem; line-height: 1.85; }
img, svg { display: block; max-width: 100%; }
a { color: var(--olive-deep); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--clay); }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.2; color: var(--ink); margin: 0 0 .6em; letter-spacing: -.01em; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { font-weight: 500; letter-spacing: 0; line-height: 1.45; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); max-width: 20ch; }
[dir="rtl"] h1 { max-width: 22ch; font-size: clamp(1.9rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; max-width: 68ch; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
section.wrap { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 100; }
.skip:focus { top: 1rem; color: #fff; }
.muted { color: var(--muted); } .small { font-size: .875rem; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(244,239,230,.92); backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.bar { display: flex; align-items: center; gap: 1rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--olive); }
.brand .mark { width: 38px; height: 38px; }
.brand .word { display: flex; flex-direction: column; line-height: 1.05; }
.brand .en { font-family: 'Fraunces', Georgia, serif; letter-spacing: .22em; font-size: .95rem; color: var(--olive-deep); }
.brand .ar { font-family: 'Noto Naskh Arabic', serif; font-size: 1.05rem; color: var(--olive); }
.nav { margin-inline-start: auto; }
.nav ul { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: .45rem .6rem; border-radius: 999px; text-decoration: none; color: var(--ink); font-size: .9rem; white-space: nowrap; }
.nav a:hover { background: var(--sand); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--sage-soft); color: var(--olive-deep); }
.bar-end { display: flex; align-items: center; gap: .6rem; }
.lang { text-decoration: none; font-size: .95rem; padding: .4rem .6rem; border-radius: 999px; border: 1px solid var(--line); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 999px; width: 44px; height: 44px; cursor: pointer; }
.burger, .burger::before, .burger::after { display: block; width: 18px; height: 1.5px; background: var(--ink); margin: auto; position: relative; transition: transform .2s; }
.burger::before, .burger::after { content: ''; position: absolute; inset-inline-start: 0; }
.burger::before { top: -6px; } .burger::after { top: 6px; }
.menu-btn[aria-expanded="true"] .burger { background: transparent; }
.menu-btn[aria-expanded="true"] .burger::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .burger::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 1100px) {
  .menu-btn { display: inline-grid; place-items: center; }
  .nav { position: fixed; inset: 72px 0 auto 0; background: var(--cream); border-bottom: 1px solid var(--line); display: none; padding: .5rem 1rem 1.25rem; max-height: calc(100vh - 72px); overflow: auto; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; }
  .nav a { font-size: 1.05rem; padding: .75rem .8rem; border-radius: 10px; }
  .bar-end { margin-inline-start: auto; }
}
@media (max-width: 520px) { .bar-end .btn-sm { display: none; } .brand .mark { width: 32px; height: 32px; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .7rem 1.35rem; border-radius: 999px; font: 500 1rem var(--f-body); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.btn-sm { min-height: 40px; padding: .45rem 1rem; font-size: .92rem; }
.btn-primary { background: var(--olive); color: #fff; }
.btn-primary:hover { background: var(--olive-deep); color: #fff; }
.btn-primary:disabled { background: var(--sage); cursor: not-allowed; }
.btn-ghost { border-color: var(--olive); color: var(--olive-deep); background: transparent; }
.btn-ghost:hover { background: var(--sage-soft); color: var(--olive-deep); }
.ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.link { background: none; border: 0; color: var(--olive-deep); text-decoration: underline; cursor: pointer; font: inherit; font-size: .875rem; }

/* hero */
.hero { padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 5vw, 3.5rem); position: relative; overflow: hidden; }
.hero-home { padding-bottom: clamp(4rem, 10vw, 7rem); }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .8rem; color: var(--clay); margin-bottom: 1rem; font-weight: 500; }
[dir="rtl"] .eyebrow { letter-spacing: 0; text-transform: none; font-size: .95rem; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 58ch; }
.lead-sm { color: var(--muted); font-size: 1.08rem; }
.horizon { position: absolute; inset-inline-end: -8vw; top: 10%; width: min(46vw, 560px); aspect-ratio: 1; border-radius: 50%; border: 1.5px solid var(--sage); opacity: .55; pointer-events: none; }
.horizon::after { content: ''; position: absolute; inset: 18%; border-radius: 50%; background: radial-gradient(circle at 50% 40%, var(--sage-soft), transparent 70%); }
@media (max-width: 760px) { .horizon { width: 80vw; top: auto; bottom: -40vw; opacity: .35; } }

/* cards & grids */
.grid2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid3 { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.2rem, 2.5vw, 1.75rem); box-shadow: var(--shadow); }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.empty { color: var(--muted); border-style: dashed; box-shadow: none; background: transparent; }
.pillars { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pillar { background: var(--paper); padding: 1.6rem 1.4rem 1.4rem; text-decoration: none; color: var(--ink); position: relative; transition: background .2s; min-height: 220px; display: flex; flex-direction: column; }
.pillar:hover { background: var(--sage-soft); color: var(--ink); }
.pillar .num { font-family: 'Fraunces', serif; color: var(--clay); font-size: .9rem; margin-bottom: 1.2rem; }
.pillar p { color: var(--muted); font-size: .97rem; }
.pillar .arrow { margin-top: auto; color: var(--olive); }
[dir="rtl"] .pillar .arrow { transform: scaleX(-1); align-self: flex-start; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); counter-reset: s; }
.steps li { counter-increment: s; padding-top: 1.2rem; border-top: 1.5px solid var(--olive); }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: 'Fraunces', serif; color: var(--clay); font-size: .9rem; display: block; margin-bottom: .6rem; }
[dir="rtl"] .steps li::before { content: counter(s, arabic-indic); }
.steps p { color: var(--muted); }
.note { border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem); display: flex; gap: 1rem; }
.note h2 { font-size: 1.35rem; }
.note-safety { background: var(--clay-soft); border: 1px solid #E6C9B8; }
.note-calm { background: var(--sage-soft); border: 1px solid #C8D1B6; }
.note p:last-of-type { margin-bottom: .5rem; }
.cta { text-align: center; } .cta h2, .cta p { margin-inline: auto; } .cta .ctas { justify-content: center; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
table { border-collapse: collapse; width: 100%; min-width: 680px; }
th, td { text-align: start; vertical-align: top; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); font-size: .97rem; }
thead th { font-family: var(--f-display); font-size: 1.1rem; font-weight: 500; background: var(--sand); }
tbody th { color: var(--olive-deep); font-weight: 500; width: 16%; }
tr:last-child th, tr:last-child td { border-bottom: 0; }

/* resources */
.resources { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.resource { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.resource small { display: block; color: var(--muted); }
.phone { font: 500 1.35rem 'IBM Plex Sans', sans-serif; text-decoration: none; background: var(--olive); color: #fff; padding: .35rem 1.1rem; border-radius: 999px; }
.phone:hover { background: var(--olive-deep); color: #fff; }
.contact { text-decoration: none; display: flex; flex-direction: column; gap: .3rem; color: var(--ink); }
.contact span { color: var(--muted); font-size: .9rem; }
.contact strong { font-weight: 500; font-size: 1.05rem; word-break: break-all; }

/* forms */
.form { display: grid; gap: 1rem; max-width: 760px; }
.form label { display: grid; gap: .35rem; font-weight: 500; font-size: .95rem; }
input, select, textarea { font: inherit; font-weight: 400; color: var(--ink); background: #fff; border: 1px solid #CFC5B4; border-radius: var(--radius-sm); padding: .75rem .9rem; min-height: 48px; width: 100%; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--olive); box-shadow: 0 0 0 3px var(--sage-soft); }
[dir="rtl"] input[dir="ltr"] { text-align: right; }
.hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
.form .check, .gate .check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.check input { width: 20px; height: 20px; min-height: 0; margin-top: .3rem; flex: none; accent-color: var(--olive); }
fieldset.radios { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
fieldset.radios legend { font-weight: 500; font-size: .95rem; margin-bottom: .4rem; }
fieldset.radios label { display: inline-flex; flex-direction: row; align-items: center; gap: .4rem; font-weight: 400; }
fieldset.radios input { width: 18px; height: 18px; min-height: 0; accent-color: var(--olive); }
.invalid { border-color: var(--clay) !important; box-shadow: 0 0 0 3px var(--clay-soft) !important; }
.hp { position: absolute; inset-inline-start: -9999px; }
.form-status:not(:empty) { padding: 1rem; border-radius: var(--radius-sm); background: var(--sage-soft); }
.form-status.err { background: var(--clay-soft); }

/* companion */
.companion { max-width: 820px; padding: 0; overflow: hidden; }
.gate { padding: clamp(1.3rem, 3vw, 2rem); display: grid; gap: 1rem; }
.disclosure { background: var(--sage-soft); padding: .9rem 1rem; border-radius: var(--radius-sm); margin: 0; }
.chat-head { display: flex; align-items: center; gap: .6rem; padding: .8rem 1.2rem; border-bottom: 1px solid var(--line); background: var(--sand); }
.chat-head .link { margin-inline-start: auto; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--olive); }
.log { list-style: none; margin: 0; padding: 1.2rem; display: flex; flex-direction: column; gap: .8rem; min-height: 280px; max-height: 60vh; overflow-y: auto; }
.msg { max-width: 85%; padding: .75rem 1rem; border-radius: 16px; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--olive); color: #fff; border-end-end-radius: 4px; }
.msg.assistant { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-end-start-radius: 4px; }
.msg.safety { align-self: stretch; max-width: 100%; background: var(--clay-soft); border: 1px solid #E6C9B8; }
.msg .resources { margin-top: .8rem; }
.msg .resource { padding: .7rem .9rem; box-shadow: none; }
.msg .phone { font-size: 1.1rem; }
.msg.typing { color: var(--muted); font-style: italic; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0 1.2rem 1rem; }
.chip { font: inherit; font-size: .9rem; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: .45rem .9rem; cursor: pointer; color: var(--ink); min-height: 40px; }
.chip:hover { background: var(--sage-soft); }
.composer { display: flex; gap: .6rem; padding: 1rem 1.2rem; border-top: 1px solid var(--line); background: var(--paper); }
.composer textarea { min-height: 52px; }

/* footer */
.site-footer { background: var(--olive-deep); color: #EDE8DC; padding-block: 3rem 2rem; margin-top: 2rem; }
.site-footer a { color: #EDE8DC; }
.site-footer .brand { color: #EDE8DC; } .site-footer .brand .en, .site-footer .brand .ar { color: #EDE8DC; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.tag { margin-top: 1rem; font-size: .9rem; opacity: .85; }
.foot-links { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 2.5rem; }
.foot-links a { text-decoration: none; display: inline-block; padding: .25rem 0; }
.safety-line { border-top: 1px solid rgba(237,232,220,.25); margin-top: 2rem; padding-top: 1.25rem; max-width: none; }
.site-footer .muted { color: #CFC8B8; }
[data-pending]::after { content: none; }
[hidden] { display: none !important; }
.btn { white-space: nowrap; }
.composer .btn { flex: none; align-self: flex-end; }

.signin { text-decoration: none; font-size: .95rem; padding: .4rem .6rem; }
@media (max-width: 520px) { .signin { display: none; } }
