/* Softhex Tech — site styles
   Tokens: petrol (brand ground), amber (workshop signal), mist/paper (quiet surfaces) */
:root {
  --petrol: #0f3440;
  --petrol-2: #174a59;
  --petrol-3: #23606f;
  --ink: #13232b;
  --ink-2: #44575f;
  --paper: #f7f9fa;
  --mist: #e7eef0;
  --line: #d2dde1;
  --amber: #f2a900;
  --amber-soft: #ffe7a8;
  --white: #ffffff;
  --wa-bubble: #dcf8c6;
  --wa-ground: #ece5dd;
  --radius-s: 6px;
  --radius-m: 14px;
  --shadow-lift: 0 18px 40px -18px rgba(5, 25, 32, 0.55);
  --font: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --measure: 62ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; }

/* Language switching: both languages live in the HTML; only one is shown */
html[lang="ar"] [data-l="en"],
html[lang="en"] [data-l="ar"] { display: none !important; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
.skip {
  position: absolute; inset-inline-start: 1rem; top: -4rem;
  background: var(--amber); color: var(--ink); padding: .5rem 1rem; border-radius: var(--radius-s);
  z-index: 50; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 1rem; }

.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  background: var(--petrol);
  color: var(--white);
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 68px;
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  text-decoration: none; font-weight: 700; font-size: 1.2rem; letter-spacing: .01em;
}
.brand svg { width: 30px; height: 30px; flex: none; }
.brand .brand-sub { font-weight: 400; opacity: .7; }
.nav { display: flex; gap: 1.5rem; margin-inline-start: auto; }
.nav a { text-decoration: none; opacity: .85; font-size: .975rem; }
.nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--amber); }
.lang-toggle {
  font: inherit; font-size: .9rem; font-weight: 600;
  background: transparent; color: var(--white);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px; padding: .3rem .95rem; cursor: pointer;
}
.lang-toggle:hover { border-color: var(--amber); }

/* ---------- Hero ---------- */
.hero {
  background: var(--petrol);
  color: var(--white);
  padding-block: clamp(3rem, 7vw, 6rem) clamp(3.5rem, 8vw, 7rem);
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 4.1rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.01em;
  max-width: 14ch;
}
html[lang="ar"] .hero h1 { line-height: 1.3; letter-spacing: 0; max-width: 13ch; }
.hero .lede {
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: rgba(255, 255, 255, .82);
  max-width: 46ch;
}
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8rem 1.4rem; border-radius: var(--radius-s);
  font-weight: 600; text-decoration: none; font-size: 1rem;
  border: 2px solid transparent;
}
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { background: #ffbb1f; }
.btn-ghost { border-color: rgba(255, 255, 255, .45); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); }

/* The reminder scene: an Egyptian plate + the WhatsApp message the owner sends */
.scene { position: relative; justify-self: center; width: min(360px, 100%); margin: 0 0 4.4rem; display: flex; flex-direction: column; }
.chat {
  background: var(--wa-ground);
  border-radius: 22px;
  padding: 0 0 1.1rem;
  color: var(--ink);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  direction: rtl;
  font-size: .95rem;
}
.chat-head {
  display: flex; align-items: center; gap: .7rem;
  background: #075e54; color: var(--white);
  padding: .85rem 1rem;
}
.chat-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--amber); color: var(--ink);
  display: grid; place-items: center; font-weight: 700; flex: none;
}
.chat-name { font-weight: 600; line-height: 1.3; }
.chat-status { font-size: .78rem; opacity: .8; }
.chat-body { padding: 1rem .9rem 0; display: grid; gap: .6rem; }
.bubble {
  background: var(--wa-bubble);
  border-radius: 12px 12px 12px 4px;
  padding: .7rem .85rem .45rem;
  max-width: 92%;
  justify-self: end;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .08);
}
.bubble p { line-height: 1.6; }
.bubble .meta { display: flex; justify-content: flex-start; gap: .3rem; font-size: .72rem; color: #5f7a6b; margin-top: .25rem; direction: ltr; }
.ticks { color: #34b7f1; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; max-width: 92%; justify-self: end; width: 92%; }
.quick span {
  background: var(--white); border-radius: 10px; text-align: center;
  padding: .45rem; color: #128c7e; font-weight: 600; font-size: .9rem;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .08);
}
.typing {
  justify-self: end; background: var(--wa-bubble); border-radius: 12px 12px 12px 4px;
  padding: .7rem .9rem; display: none; gap: 5px;
}
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #6c8a79; display: block; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

.plate {
  position: absolute;
  left: -2.2rem;
  bottom: -4.4rem;
  width: 190px;
  background: var(--white);
  border: 2px solid #1d2a30;
  border-radius: 9px;
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  transform: rotate(-4deg);
  direction: rtl;
  color: #111;
}
.plate-band {
  background: #4aa3df; color: #fff;
  display: flex; justify-content: space-between; align-items: center;
  padding: .15rem .6rem; font-size: .72rem; font-weight: 700; line-height: 1.5;
}
.plate-band span:last-child { direction: ltr; letter-spacing: .08em; }
.plate-body { display: grid; grid-template-columns: 1fr 1fr; }
.plate-body span {
  text-align: center; font-size: 1.5rem; font-weight: 700; padding: .25rem 0 .3rem; letter-spacing: .12em;
}
.plate-body span:first-child { border-inline-end: 2px solid #1d2a30; }
.scene-caption { order: -1; margin: 0 0 .8rem; font-size: .85rem; color: rgba(255, 255, 255, .65); text-align: center; }

/* Message reveal: the page's single orchestrated moment */
.js .chat .bubble, .js .chat .quick { opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease; }
.js .chat.is-typing .typing { display: flex; }
.js .chat.is-sent .bubble, .js .chat.is-sent .quick { opacity: 1; transform: none; }
.js .chat.is-sent .quick { transition-delay: .25s; }

/* ---------- Sections ---------- */
section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-head { max-width: var(--measure); }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.2; font-weight: 700; }
html[lang="ar"] .section-head h2 { line-height: 1.35; }
.section-head p { margin-top: 1rem; color: var(--ink-2); font-size: 1.1rem; }

/* Pitlane */
.product-name {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 700; font-size: 1rem; color: var(--petrol-2);
  margin-bottom: 1rem;
}
.product-name::before {
  content: ""; width: 26px; height: 6px; border-radius: 3px;
  background: repeating-linear-gradient(90deg, var(--amber) 0 8px, transparent 8px 12px);
}
.features {
  margin-top: 3rem;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2rem, 5vw, 4rem);
}
.feature { padding-block: 1.4rem; border-top: 1px solid var(--line); }
.feature dt { font-weight: 700; font-size: 1.1rem; }
.feature dd { margin-top: .35rem; color: var(--ink-2); max-width: 48ch; }

/* Steps: a real sequence, so numbered */
.journey { background: var(--mist); }
.steps {
  margin-top: 3rem;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  counter-reset: step;
  list-style: none;
  position: relative;
}
.steps::before {
  content: ""; position: absolute; inset-inline: 22px; top: 22px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--petrol-3) 0 10px, transparent 10px 18px);
}
.step { position: relative; padding-inline-end: 1.2rem; counter-increment: step; }
.step::before {
  content: counter(step);
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--petrol); color: var(--amber);
  font-weight: 700; font-size: 1.15rem;
  border: 4px solid var(--mist);
}
.step:last-child::before { background: var(--amber); color: var(--ink); }
.step h3 { font-size: 1.05rem; margin-top: 1rem; line-height: 1.4; }
.step p { margin-top: .4rem; color: var(--ink-2); font-size: .97rem; }

/* About */
.about .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about-body p + p { margin-top: 1rem; }
.about-body p { color: var(--ink-2); max-width: var(--measure); }
.facts { display: grid; gap: 0; border-top: 1px solid var(--line); margin-top: 1.8rem; }
.facts div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .8rem; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-2); }
.facts dd { font-weight: 600; text-align: end; }

/* Contact */
.contact { background: var(--petrol); color: var(--white); }
.contact .section-head p { color: rgba(255, 255, 255, .8); }
.contact-mail {
  display: inline-block; margin-top: 2rem;
  font-size: clamp(1.5rem, 4vw, 2.6rem); font-weight: 700;
  color: var(--white); text-decoration: none; direction: ltr;
  border-bottom: 3px solid var(--amber); padding-bottom: .15rem;
  word-break: break-all;
}
.contact-mail:hover { color: var(--amber-soft); }
.contact .actions { margin-top: 2rem; }
.contact-more { margin-top: 2rem; color: rgba(255, 255, 255, .78); max-width: var(--measure); }
.contact-more a { color: var(--white); text-decoration-color: var(--amber); text-underline-offset: 4px; }

/* Footer */
.site-footer { background: #0b2730; color: rgba(255, 255, 255, .72); padding-block: 2rem; font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.site-footer nav { display: flex; gap: 1.5rem; margin-inline-start: auto; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }

/* ---------- Legal pages ---------- */
.legal-hero { background: var(--petrol); color: var(--white); padding-block: 3rem 2.5rem; }
.legal-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.2; }
.legal-hero p { margin-top: .6rem; color: rgba(255, 255, 255, .75); }
.legal { padding-block: 3rem 5rem; }
.legal article { max-width: 72ch; }
.legal h2 { font-size: 1.35rem; margin-top: 2.4rem; line-height: 1.4; scroll-margin-top: 90px; }
.legal p, .legal li { color: #2c3d44; }
.legal p { margin-top: .8rem; }
.legal ul { margin-top: .8rem; padding-inline-start: 1.3rem; list-style: disc; }
.legal li + li { margin-top: .4rem; }
.legal .note {
  margin-top: 2rem; padding: 1rem 1.2rem; background: var(--mist);
  border-inline-start: 4px solid var(--amber); border-radius: var(--radius-s);
}
.legal a { color: var(--petrol-2); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap, .about .wrap { grid-template-columns: 1fr; }
  .scene { margin-top: 1rem; }
  .steps { grid-template-columns: 1fr; gap: 1.6rem; }
  .steps::before { inset-inline: auto; inset-inline-start: 22px; top: 22px; bottom: 22px; width: 2px; height: auto;
    background: repeating-linear-gradient(180deg, var(--petrol-3) 0 10px, transparent 10px 18px); }
  .step { display: grid; grid-template-columns: 46px 1fr; column-gap: 1rem; padding: 0; }
  .step::before { grid-row: span 2; }
  .step h3 { margin-top: .55rem; }
}
@media (max-width: 680px) {
  .nav { display: none; }
  .lang-toggle { margin-inline-start: auto; }
  .features { grid-template-columns: 1fr; }
  .plate { left: -.4rem; width: 160px; }
  .plate-body span { font-size: 1.25rem; }
  .site-footer nav { margin-inline-start: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .chat .bubble, .js .chat .quick { opacity: 1; transform: none; transition: none; }
  .typing i { animation: none; }
}
