/* Akkas Solutions — site styles */
:root {
  --sand: #F7F1EA;
  --shell: #FFFCF7;
  --espresso: #1E1914;
  --pearl: #7F5539;
  --pearl-deep: #6A4630;
  --dune: #DDB892;
  --cream: #F3E9DF;
  --line: #E2D3C1;
  --muted: #5C4A3D;
  --muted-on-dark: #CDBBA8;
  --error: #A3321F;

  --font-latin: "Jost", system-ui, sans-serif;
  --font-arabic: "IBM Plex Sans Arabic", "Geeza Pro", system-ui, sans-serif;
  --font: var(--font-latin);

  /* type scale, ratio 1.333 */
  --t-sm: 0.9375rem;
  --t-base: 1.125rem;
  --t-md: 1.5rem;
  --t-lg: 2rem;
  --t-xl: clamp(2rem, 1.4rem + 2.4vw, 2.75rem);
  --t-hero: clamp(2.6rem, 1.6rem + 4.2vw, 4.4rem);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 7rem;

  --radius: 10px;
  --wrap: 72rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html[lang="ar"] { --font: var(--font-arabic); }

*, *::before, *::after { box-sizing: border-box; }

/* Fluid root size: 16px on phones, growing to 18px on laptops and desktops.
   Everything set in rem (type, spacing, widths) scales with it, so large screens don't look timid. */
html {
  font-size: clamp(100%, 0.85rem + 0.35vw, 112.5%);
  scroll-behavior: smooth; -webkit-text-size-adjust: 100%;
}
/* Arabic letterforms read smaller than Latin at the same size: one step up everywhere. */
html[lang="ar"] { font-size: clamp(106.25%, 0.9rem + 0.37vw, 118.75%); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--sand);
  color: var(--espresso);
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
html[lang="ar"] body { line-height: 1.85; }

h1, h2, h3 { margin: 0; font-weight: 500; line-height: 1.15; text-wrap: balance; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { line-height: 1.45; font-weight: 600; }
p { margin: 0; }
img, svg { display: block; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--pearl); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
@media (min-width: 48rem) { .wrap { width: min(100% - 4rem, var(--wrap)); } }

.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 100;
  background: var(--espresso); color: var(--sand); padding: 0.75rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3.25rem; padding: 0.75rem 1.5rem;
  border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-size: 1.0625rem; font-weight: 500; text-decoration: none;
  cursor: pointer; touch-action: manipulation;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn-primary { background: var(--pearl); color: #fff; }
.btn-primary:hover { background: var(--pearl-deep); }
.btn-secondary { border-color: var(--espresso); color: var(--espresso); }
.btn-secondary:hover { background: var(--espresso); color: var(--sand); }

/* ---------- header ---------- */
.site-header { padding-block: var(--space-3); }
.header-inner { display: flex; align-items: center; gap: var(--space-3); }
.brand { display: block; margin-inline-end: auto; }
.brand-logo { height: 2.6rem; width: auto; }
.site-nav { display: none; gap: var(--space-4); }
.site-nav a { text-decoration: none; padding-block: 0.5rem; }
.site-nav a:hover { color: var(--pearl); text-decoration: underline; text-underline-offset: 0.3em; }
@media (min-width: 56rem) { .site-nav { display: flex; } }

.lang-toggle {
  min-height: 2.75rem; padding: 0.4rem 1rem;
  background: transparent; color: var(--espresso);
  border: 1.5px solid var(--line); border-radius: 999px;
  font-size: 1rem; cursor: pointer;
}
.lang-toggle[lang="ar"] { font-family: var(--font-arabic); }
.lang-toggle[lang="en"] { font-family: var(--font-latin); }
.lang-toggle:hover { border-color: var(--espresso); }

/* ---------- hero ---------- */
.hero { padding-block: var(--space-4) var(--space-6); }
.hero-grid { display: grid; gap: var(--space-5); align-items: center; }
@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--space-6); }
}
.hero-copy h1 { font-size: var(--t-hero); letter-spacing: -0.02em; max-width: 14ch; }
html[lang="ar"] .hero-copy h1 { letter-spacing: 0; max-width: 16ch; }
.hero-lede { margin-top: var(--space-3); max-width: 38rem; font-size: 1.1875rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: var(--space-4); }

/* the arch window */
.arch-demo { margin: 0; width: min(100%, 28rem); justify-self: center; }
.arch { position: relative; aspect-ratio: 400 / 520; }
.arch-frame { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.arch-frame path { fill: var(--shell); stroke: var(--pearl); stroke-width: 18; vector-effect: non-scaling-stroke; }
@media (min-width: 30rem) { .arch-frame path { stroke-width: 22; } }
.arch-pearl {
  position: absolute; left: 50%; top: 17%; width: 9%; aspect-ratio: 1;
  translate: -50% 0; border-radius: 50%; background: var(--pearl);
}
.chat {
  position: absolute; inset: 29% 11% 3% 11%;
  display: flex; flex-direction: column; overflow: hidden;
  font-size: 1rem; line-height: 1.45;
}
html[lang="ar"] .chat { line-height: 1.7; }
.chat-who { font-size: var(--t-sm); color: var(--muted); text-align: center; padding-bottom: 0.75rem; }
.chat-who { flex: none; }
.chat-list {
  list-style: none; margin: 0; padding: 0;
  flex: 1; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 0.5rem;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 2.5rem);
  mask-image: linear-gradient(to bottom, transparent 0, #000 2.5rem);
}
@media (max-width: 26rem) { .chat { font-size: 0.9375rem; } }
.msg {
  max-width: 85%; padding: 0.55rem 0.85rem; border-radius: 14px;
  transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out);
}
.msg-in { align-self: flex-start; background: var(--cream); border-end-start-radius: 4px; }
.msg-out { align-self: flex-end; background: var(--espresso); color: var(--sand); border-end-end-radius: 4px; }
.msg.is-pending { opacity: 0; transform: translateY(8px); }
.msg-typing { display: inline-flex; gap: 4px; padding: 0.75rem 0.9rem; }
.msg-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--sand); opacity: 0.5; animation: blink 1s infinite; }
.msg-typing span:nth-child(2) { animation-delay: 0.15s; }
.msg-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 50% { opacity: 1; } }
.arch-demo figcaption { margin-top: var(--space-2); font-size: var(--t-sm); color: var(--muted); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .msg { transition: none; }
  .msg-typing span { animation: none; }
}

/* ---------- section rhythm ---------- */
.services, .why, .contact { padding-block: var(--space-6); }
.process { padding-block: var(--space-6); }
@media (min-width: 48rem) {
  .services, .process, .why, .contact { padding-block: var(--space-7); }
}
section h2 { font-size: var(--t-xl); letter-spacing: -0.01em; }
html[lang="ar"] section h2 { letter-spacing: 0; }

/* ---------- services: big type rows ---------- */
.service-list { list-style: none; margin: var(--space-5) 0 0; padding: 0; border-top: 1.5px solid var(--espresso); }
.service { display: grid; gap: var(--space-2); padding-block: var(--space-4); border-bottom: 1px solid var(--line); }
.service h3 { font-size: var(--t-lg); }
.service-body { display: grid; gap: var(--space-2); max-width: 40rem; }
.service-body p { color: var(--muted); }
.service-eg { font-size: var(--t-sm); color: var(--pearl) !important; font-weight: 500; }
@media (min-width: 56rem) {
  .service { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-5); padding-block: var(--space-5); }
}

/* ---------- process: dark band ---------- */
.process { background: var(--espresso); color: var(--cream); }
.steps { list-style: none; margin: var(--space-5) 0 0; padding: 0; display: grid; gap: var(--space-4); }
@media (min-width: 40rem) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); } }
.step { padding-top: var(--space-3); border-top: 1px solid #4A3D33; }
.step-num {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin-bottom: var(--space-3);
  border: 2px solid var(--dune); border-radius: 999px 999px 0 0; color: var(--dune);
  font-size: 1.125rem; font-weight: 500;
}
.step h3 { font-size: var(--t-md); color: var(--sand); }
.step p { margin-top: 0.5rem; color: var(--muted-on-dark); }

/* ---------- why ---------- */
.why-grid { display: grid; gap: var(--space-4); margin-top: var(--space-5); }
@media (min-width: 56rem) { .why-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); } }
.why-item h3 { font-size: var(--t-md); }
.why-item p { margin-top: 0.5rem; color: var(--muted); }

/* ---------- contact ---------- */
.contact { background: var(--cream); }
.contact-grid { display: grid; gap: var(--space-5); }
@media (min-width: 60rem) { .contact-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-6); } }
.contact-intro h2 { max-width: 16ch; }
.contact-intro > p { margin-block: var(--space-3) var(--space-4); color: var(--muted); max-width: 32rem; }
.contact-direct { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); margin-top: var(--space-3) !important; }
.contact-direct a { text-underline-offset: 0.25em; padding-block: 0.4rem; }
html[lang="ar"] .contact-direct a { font-family: var(--font-latin); }

.brief {
  background: var(--shell); border: 1px solid var(--line); border-radius: 18px;
  padding: var(--space-4) var(--space-3); display: grid; gap: var(--space-3);
}
@media (min-width: 40rem) { .brief { padding: var(--space-5) var(--space-4); } }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 500; font-size: 1rem; }
.req { color: var(--pearl); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 3rem; padding: 0.7rem 0.9rem;
  font: inherit; font-size: 1rem; color: var(--espresso);
  background: #fff; border: 1.5px solid #CDBBA8; border-radius: var(--radius);
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 1px; border-color: var(--pearl); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error); font-size: 0.9375rem; }
.field-error:empty { display: none; }
.req-note { font-size: var(--t-sm); color: var(--muted); }
.btn-submit { justify-self: start; min-width: 10rem; }
.btn-submit[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.form-status:empty { display: none; }
.form-status { font-weight: 500; }
.form-status.is-ok { color: #2F5D2A; }
.form-status.is-error { color: var(--error); }
.hidden-field {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---------- footer ---------- */
.site-footer { background: var(--espresso); color: var(--muted-on-dark); padding-block: var(--space-5) 6rem; font-size: var(--t-sm); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.footer-logo { height: 2rem; width: auto; margin-inline-end: auto; }
.footer-links { display: flex; gap: var(--space-3); }
.footer-links a { padding-block: 0.5rem; text-underline-offset: 0.25em; }

/* ---------- floating WhatsApp ---------- */
.wa-float {
  position: fixed; inset-inline-end: 1rem; bottom: 1rem; z-index: 50;
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 3.25rem; padding: 0.75rem 1.2rem;
  background: var(--pearl); color: #fff; border: 2px solid var(--cream); border-radius: 999px;
  text-decoration: none; font-weight: 500;
  box-shadow: 0 6px 20px rgba(30, 25, 20, 0.25);
}
.wa-float:hover { background: var(--pearl-deep); }
@media (min-width: 48rem) { .wa-float { inset-inline-end: 1.5rem; bottom: 1.5rem; } }
