/* ============================================================
   YAVERTA Care — الموقع (الإصدار 2)
   الألوان والخطوط من Business-Final/03. لا ألوان جديدة.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --teal: #1F6F5F;        /* Ocean Teal: رئيسي */
  --snow: #FAFAF8;        /* Snow White: خلفية */
  --linen: #E8E9E6;       /* Warm Linen: محايد */
  --onyx: #353535;        /* Onyx Black: النصوص */
  --mint: #8EC9B5;        /* Pale Teal: لمسات فقط */

  --ink-soft: rgba(53, 53, 53, .74);
  --line: rgba(53, 53, 53, .14);
  --on-teal-soft: rgba(250, 250, 248, .8);

  --f-head: "Cairo", system-ui, sans-serif;
  --f-body: "Tajawal", system-ui, sans-serif;

  --t-sm: .9375rem;
  --t-base: 1.0625rem;
  --t-lg: 1.25rem;
  --t-h3: 1.375rem;
  --t-h2: clamp(1.625rem, 1.2rem + 1.6vw, 2.375rem);
  --t-h1: clamp(2.125rem, 1.4rem + 3vw, 3.5rem);
  --t-num: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);

  --wrap: 1160px;
  --gutter: 16px;
  --sec: clamp(64px, 8vw, 112px);
  --r-panel: 22px;
  --r-ctl: 12px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
[id] { scroll-margin-top: 80px; }
body {
  margin: 0;
  background: var(--snow);
  color: var(--onyx);
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: 1.8;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 {
  font-family: var(--f-head);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 .5em;
  color: var(--onyx);
}
h1 { font-size: var(--t-h1); line-height: 1.22; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--teal); text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.n { font-family: var(--f-head); font-variant-numeric: tabular-nums; unicode-bidi: isolate; direction: ltr; display: inline-block; }
.lead { font-size: var(--t-lg); color: var(--ink-soft); max-width: 38em; }
.muted { color: var(--ink-soft); }
.small { font-size: var(--t-sm); }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }
.sec { padding-block: var(--sec); }
.sec-linen { background: var(--linen); }
.sec-teal { background: var(--teal); color: var(--snow); }
.sec-teal h2, .sec-teal h3 { color: var(--snow); }
.sec-head { max-width: 40em; margin-bottom: clamp(32px, 4vw, 52px); }
.sec-head p { color: var(--ink-soft); font-size: var(--t-lg); margin: 0; }
.sec-teal .sec-head p { color: var(--on-teal-soft); }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--teal); color: var(--snow); padding: 8px 14px; z-index: 50; }
.skip:focus { inset-inline-start: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px;
  font: 600 1rem/1 var(--f-head);
  border-radius: 999px; border: 2px solid var(--teal);
  background: var(--teal); color: var(--snow);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.btn:hover { background: var(--snow); color: var(--teal); }
.btn-ghost { background: transparent; color: var(--teal); }
.btn-ghost:hover { background: var(--teal); color: var(--snow); }
.sec-teal .btn { background: var(--snow); color: var(--teal); border-color: var(--snow); }
.sec-teal .btn:hover { background: transparent; color: var(--snow); }
.btn svg { width: 20px; height: 20px; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250, 250, 248, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand img { width: 168px; height: auto; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a {
  font: 600 1rem/1 var(--f-head); color: var(--onyx); text-decoration: none;
  padding: 12px 14px; border-radius: 999px;
}
.nav a:hover { background: var(--linen); }
.nav a[aria-current="page"] { color: var(--teal); box-shadow: inset 0 -2px 0 var(--teal); border-radius: 0; }
.header-wa { min-height: 44px; padding: 0 18px; }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .site-header .wrap { min-height: 64px; gap: 12px; }
  .brand img { width: 152px; }
  .header-wa span { display: none; }
  .header-wa { width: 44px; padding: 0; margin-inline-start: auto; }
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 999px;
    background: transparent; color: var(--onyx); cursor: pointer;
  }
  .nav {
    position: absolute; inset-inline: 0; top: 100%;
    flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px;
    background: var(--snow); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { box-shadow: none; }
}

/* ---------- Hero (الرئيسية) ---------- */
.hero { padding-block: clamp(40px, 6vw, 88px) var(--sec); }
.hero-grid { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: 1fr 1.05fr; } }
.hero h1 { max-width: 12em; }
.hero .lead { margin-bottom: 28px; }
.hero-facts { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 10px; }
.hero-facts li { display: flex; gap: 12px; align-items: baseline; }
.hero-facts li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); flex: none; transform: translateY(-2px); }

/* لوحة القراعي: العنصر الأبرز في الموقع */
.shelf {
  background: var(--linen);
  border-radius: var(--r-panel);
  padding: clamp(20px, 3vw, 32px);
}
.shelf-q { font: 700 var(--t-h3)/1.4 var(--f-head); margin: 0 0 16px; }
.shelf-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 20px; }
.stepper { display: inline-flex; align-items: center; background: var(--snow); border-radius: 999px; padding: 4px; }
.stepper button {
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: transparent; color: var(--teal); font: 700 1.5rem/1 var(--f-head); cursor: pointer;
}
.stepper button:hover { background: var(--linen); }
.stepper output { min-width: 3.2em; text-align: center; font: 700 1.5rem/1 var(--f-head); }
.price-in { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-sm); color: var(--ink-soft); }
.price-in input { width: 64px; }
.wall {
  height: clamp(200px, 26vw, 260px);
  display: flex; flex-wrap: wrap-reverse; align-content: flex-start;
  gap: 3px;
  overflow: hidden;
  border-bottom: 2px solid var(--onyx);
  padding-bottom: 6px;
}
.wall svg { width: var(--g, 14px); height: calc(var(--g, 14px) * 1.4); display: block; color: var(--teal); flex: none; }
.wall svg.new { animation: drop .35s ease-out both; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.wall-cap { display: flex; justify-content: space-between; font-size: var(--t-sm); color: var(--ink-soft); margin: 8px 0 20px; }
.shelf-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.shelf-out div { border-top: 1px solid var(--line); padding-top: 10px; }
.shelf-out strong { display: block; font: 700 clamp(1.375rem, 1rem + 1.4vw, 1.875rem)/1.2 var(--f-head); color: var(--teal); }
.shelf-out span { font-size: var(--t-sm); color: var(--ink-soft); }
.shelf-more { margin: 20px 0 0; font-size: var(--t-sm); }
@media (max-width: 520px) {
  .shelf-out { grid-template-columns: 1fr; gap: 0; }
  .shelf-out div { display: flex; justify-content: space-between; align-items: baseline; padding-block: 10px; }
  .shelf-out strong { font-size: 1.375rem; }
}

/* ---------- Gap statement ---------- */
.gap-grid { display: grid; gap: clamp(28px, 4vw, 56px); grid-template-columns: 1fr; }
@media (min-width: 900px) { .gap-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.gap-quote { font: 700 clamp(1.5rem, 1rem + 2vw, 2.25rem)/1.45 var(--f-head); margin: 0; }
.gap-quote span { display: block; color: var(--teal); }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.plain-list li:first-child { border-top: 1px solid var(--line); }
.plain-list strong { display: block; font-family: var(--f-head); font-size: var(--t-lg); margin-bottom: 2px; }
.plain-list p { margin: 0; color: var(--ink-soft); }

/* ---------- Steps (زيارة التركيب: تسلسل حقيقي) ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: s; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 0 40px; } }
.steps li { counter-increment: s; position: relative; padding: 22px 0 22px 0; padding-inline-start: 64px; border-top: 1px solid var(--line); }
.steps li::before {
  content: counter(s);
  position: absolute; inset-inline-start: 0; top: 20px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--teal); color: var(--teal);
  display: grid; place-items: center;
  font: 700 1.125rem/1 var(--f-head);
}
.steps h3 { font-size: var(--t-lg); margin-bottom: 4px; }
.steps p { margin: 0; color: var(--ink-soft); }

/* ---------- Split with photo ---------- */
.split { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.photo { border-radius: var(--r-panel); overflow: hidden; background: var(--linen); }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo figcaption { font-size: .8125rem; color: var(--ink-soft); padding: 8px 12px; }

/* ---------- Install-only band ---------- */
.band { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .band { grid-template-columns: 1.3fr 1fr; } }
.band-prices { list-style: none; margin: 0; padding: 0; }
.band-prices li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(250, 250, 248, .25); }
.band-prices li:first-child { border-top: 1px solid rgba(250, 250, 248, .25); }
.band-prices .n { font-weight: 700; }
.sec-teal .muted { color: var(--on-teal-soft); }

/* ---------- Maintenance sticker (ملصق الصيانة) ---------- */
.sticker {
  background: var(--snow);
  border: 2px dashed var(--teal);
  border-radius: 14px;
  padding: 20px 22px;
  max-width: 420px;
  box-shadow: 0 1px 0 var(--line);
}
.sticker-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.sticker-top img { width: 34px; height: 34px; }
.sticker-top b { font: 700 1.0625rem/1.3 var(--f-head); }
.sticker-top small { display: block; color: var(--ink-soft); font-size: .8125rem; }
.sticker table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.sticker td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.sticker td:last-child { text-align: left; white-space: nowrap; font-family: var(--f-head); font-weight: 600; }
.sticker tr.soon td:last-child { color: var(--teal); }
.sticker-foot { margin: 12px 0 0; font-size: .8125rem; color: var(--ink-soft); }

/* ---------- Honest stance ---------- */
.stance { border-inline-start: 4px solid var(--mint); padding-inline-start: clamp(16px, 3vw, 28px); max-width: 44em; }
.stance p:last-child { margin: 0; }

/* ---------- Tools page ---------- */
.page-head { padding-block: clamp(40px, 6vw, 80px) clamp(24px, 3vw, 40px); }
.page-head h1 { max-width: 14em; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.toc a {
  text-decoration: none; color: var(--onyx); font: 600 var(--t-sm)/1 var(--f-head);
  padding: 12px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--snow);
}
.toc a:hover { border-color: var(--teal); color: var(--teal); }
.tool { display: grid; gap: clamp(24px, 4vw, 56px); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .tool { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.tool-intro p { color: var(--ink-soft); }
.panel { background: var(--snow); border: 1px solid var(--line); border-radius: var(--r-panel); padding: clamp(20px, 3vw, 32px); }
.sec-linen .panel { border-color: transparent; }
.field { margin-bottom: 22px; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { display: block; font: 600 1rem/1.5 var(--f-head); margin-bottom: 10px; padding: 0; }
.row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }
input[type="number"], input[type="date"], input[type="text"], input[type="tel"], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  font: 500 1rem/1.4 var(--f-body); color: var(--onyx);
  background: var(--snow); border: 1.5px solid var(--line); border-radius: var(--r-ctl);
}
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(31, 111, 95, .18); }
input[type="number"] { font-family: var(--f-head); font-weight: 600; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { position: relative; cursor: pointer; }
.choices input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choices span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--snow);
  font-size: var(--t-sm); font-weight: 500; line-height: 1.4;
}
.choices input:checked + span { border-color: var(--teal); background: var(--teal); color: var(--snow); }
.choices input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }

.result { border-top: 2px solid var(--teal); padding-top: 20px; margin-top: 8px; }
.result h3 { color: var(--teal); margin-bottom: 6px; }
.result .big { font: 700 var(--t-num)/1.1 var(--f-head); color: var(--teal); margin: 4px 0 8px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px 20px; margin: 16px 0; }
.facts div { border-top: 1px solid var(--line); padding-top: 8px; }
.facts b { display: block; font: 700 var(--t-lg)/1.3 var(--f-head); }
.facts span { font-size: .875rem; color: var(--ink-soft); }
.note { font-size: var(--t-sm); color: var(--ink-soft); background: var(--linen); border-radius: var(--r-ctl); padding: 12px 14px; margin: 16px 0 0; }
.sec-linen .note { background: var(--snow); }

/* أعمدة المقارنة: محور واحد، أفقية من اليمين */
.bars { display: grid; gap: 14px; margin: 18px 0 8px; }
.bar-row { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; align-items: center; }
.bar-row > span { font-size: var(--t-sm); }
.bar-track { display: flex; align-items: center; gap: 10px; height: 40px; }
.bar { height: 100%; border-radius: 4px 0 0 4px; background: var(--teal); min-width: 4px; transition: width .35s ease; }
.bar.alt { background: var(--onyx); }
.bar-val { font: 700 var(--t-sm)/1 var(--f-head); white-space: nowrap; }
.horizon { display: inline-flex; background: var(--linen); border-radius: 999px; padding: 4px; gap: 2px; }
.horizon button { border: 0; background: transparent; border-radius: 999px; min-height: 40px; padding: 0 16px; font: 600 var(--t-sm)/1 var(--f-head); color: var(--onyx); cursor: pointer; }
.horizon button[aria-pressed="true"] { background: var(--snow); color: var(--teal); box-shadow: 0 0 0 1px var(--line); }

/* مقياس TDS */
.scale { position: relative; margin: 26px 0 8px; }
.scale-track { display: grid; grid-template-columns: 5fr 25fr 30fr 40fr; height: 14px; border-radius: 999px; overflow: hidden; direction: ltr; }
.scale-track i:nth-child(1) { background: var(--mint); }
.scale-track i:nth-child(2) { background: rgba(142, 201, 181, .5); }
.scale-track i:nth-child(3) { background: var(--linen); }
.scale-track i:nth-child(4) { background: rgba(53, 53, 53, .2); }
.sec-linen .scale-track i:nth-child(3) { background: var(--snow); }
.scale-marker { position: absolute; top: -8px; width: 4px; height: 30px; background: var(--onyx); border-radius: 2px; transform: translateX(-50%); transition: left .3s ease; }
.scale-labels { position: relative; height: 1.2em; direction: ltr; font: 600 .8125rem/1 var(--f-head); color: var(--ink-soft); margin-top: 10px; }
.scale-labels span { position: absolute; transform: translateX(-50%); }
.scale-labels span:first-child { transform: none; }
.scale-labels span:last-child { transform: translateX(-100%); }

/* ---------- Prices page ---------- */
.ptable { width: 100%; border-collapse: collapse; }
.ptable caption { text-align: start; font: 700 var(--t-h3)/1.4 var(--f-head); padding-bottom: 6px; }
.ptable th { text-align: start; font: 600 var(--t-sm)/1.4 var(--f-head); color: var(--ink-soft); padding: 12px 10px; border-bottom: 2px solid var(--onyx); }
.ptable td { padding: 16px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ptable td.num, .ptable th.num { text-align: left; white-space: nowrap; }
.ptable td b { font-family: var(--f-head); }
.ptable .total { font: 700 var(--t-lg)/1.2 var(--f-head); color: var(--teal); }
.ptable .sub { display: block; font-size: .875rem; color: var(--ink-soft); }
.ptable + .ptable, .table-gap { margin-top: clamp(40px, 5vw, 64px); }
@media (max-width: 720px) {
  .ptable thead { display: none; }
  .ptable tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .ptable td { border: 0; padding: 0; }
  .ptable td:first-child { grid-column: 1 / -1; }
  .ptable td[data-l]::before { content: attr(data-l) " "; color: var(--ink-soft); font-size: .8125rem; font-family: var(--f-body); }
  .ptable td.num { text-align: start; }
  .ptable td.total-cell { grid-column: 2; grid-row: 2 / span 3; align-self: center; }
}
.included { columns: 2 260px; column-gap: 40px; padding: 0; margin: 0; list-style: none; }
.included li { break-inside: avoid; padding: 10px 0 10px; padding-inline-start: 30px; position: relative; border-bottom: 1px solid var(--line); }
.included li::before {
  content: ""; position: absolute; inset-inline-start: 2px; top: 18px; width: 14px; height: 8px;
  border-inline-start: 2px solid var(--teal); border-bottom: 2px solid var(--teal);
  transform: rotate(-45deg);
}
.rules { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.rules h3 { font-size: var(--t-lg); margin-bottom: 4px; }
.rules p { margin: 0; color: var(--ink-soft); }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 0; padding-inline-end: 36px; position: relative;
  font: 600 var(--t-lg)/1.5 var(--f-head);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; inset-inline-end: 6px; top: 30px; width: 10px; height: 10px;
  border-inline-end: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(45deg);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 34px; }
.faq details p { color: var(--ink-soft); max-width: 46em; padding-bottom: 8px; }

.form-status { margin-top: 16px; }
.form-status:empty { display: none; }
.form-status .ok { background: var(--linen); border-radius: var(--r-ctl); padding: 16px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal); color: var(--snow); padding-block: 56px 28px; }
.foot-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer img { width: 168px; margin-bottom: 14px; }
.site-footer p, .site-footer li { color: var(--on-teal-soft); font-size: var(--t-sm); }
.site-footer h3 { color: var(--snow); font-size: 1rem; margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 4px 0; }
.site-footer a { color: var(--snow); }
.motto { font: 700 1.25rem/1.4 var(--f-head); color: var(--snow) !important; }
.foot-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(250, 250, 248, .2); font-size: .8125rem; color: var(--on-teal-soft); }

/* زر واتساب العائم: للهاتف فقط */
.wa-float {
  position: fixed; inset-inline-start: 16px; bottom: 16px; z-index: 30;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--teal); color: var(--snow);
  display: none; place-items: center;
  box-shadow: 0 4px 14px rgba(31, 111, 95, .35);
}
.wa-float svg { width: 28px; height: 28px; }
@media (max-width: 860px) { .wa-float { display: grid; } }

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