/* Spectrum website
   Palette follows the Spectrum corporate identity (warm taupe + muted orange). */

:root {
  --brown-900: #3D332D;   /* primary_dark: hero, footer */
  --brown-700: #5C4A42;   /* primary: headings, bands */
  --brown-500: #8C6B45;   /* secondary */
  --orange: #C77A2E;      /* accent: CTAs, the rule */
  --orange-deep: #A85F1F; /* accent text on light */
  --cream: #FAF6F1;       /* page background */
  --cream-2: #F4EFE8;     /* alternate section */
  --taupe: #E8DDD3;       /* bands, dividers */
  --taupe-2: #D9CFC4;     /* borders */
  --taupe-3: #C9B8A8;
  --ink: #2B2622;         /* body text */
  --muted: #6E5F56;       /* secondary text (darkened from #7A6A60 for contrast) */

  --font-display: "Saira", "Readex Pro", system-ui, sans-serif;
  --font-body: "Readex Pro", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: clamp(1.75rem, 1.4rem + 1.4vw, 2.4rem);
  --step-4: clamp(2.2rem, 1.5rem + 3vw, 3.6rem);

  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(64px, 9vw, 120px);
  --radius: 6px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--brown-700);
  line-height: 1.12;
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.005em;
}

/* Arabic: Saira has no Arabic glyphs, so headings use Readex Pro */
html[lang="ar"] {
  --font-display: "Readex Pro", Tahoma, sans-serif;
}
html[lang="ar"] body { line-height: 1.8; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { line-height: 1.35; letter-spacing: 0; }

p { margin: 0; }

a { color: var(--orange-deep); }

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

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.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 {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 100;
  background: var(--brown-900);
  color: var(--cream);
  padding: 10px 16px;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font: 500 1rem/1.2 var(--font-body);
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: .9375rem; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-deep); }
.btn-ghost { color: var(--cream); border-color: rgba(250, 246, 241, .45); }
.btn-ghost:hover { border-color: var(--cream); background: rgba(250, 246, 241, .08); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 241, .94);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--taupe);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}
.brand img { height: 38px; width: auto; }
/* The logo always reads left-to-right */
.brand { direction: ltr; flex-shrink: 0; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.site-nav ul a {
  color: var(--brown-700);
  text-decoration: none;
  font-weight: 400;
  font-size: .9875rem;
  padding-block: 6px;
  border-bottom: 2px solid transparent;
}
.site-nav ul a:hover { border-bottom-color: var(--taupe-3); }

.lang-btn {
  background: none;
  border: 1.5px solid var(--taupe-2);
  border-radius: var(--radius);
  color: var(--brown-700);
  font: 500 .9375rem/1 var(--font-body);
  padding: 9px 14px;
  cursor: pointer;
}
.lang-btn:hover { border-color: var(--brown-700); }

.menu-btn {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; padding: 0;
  cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block;
  width: 22px; height: 2px;
  background: var(--brown-700);
  border-radius: 2px;
  position: relative;
  transition: transform .2s ease, background-color .2s ease;
}
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; inset-inline-start: 0; }
.menu-icon::before { top: -7px; }
.menu-icon::after { top: 7px; }
.menu-btn[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-icon::before { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-icon::after { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero {
  background: var(--brown-900);
  color: var(--cream);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding-block: clamp(56px, 8vw, 104px);
}
.hero h1 {
  color: var(--cream);
  font-size: var(--step-4);
  font-weight: 600;
  max-width: 15ch;
}
html[lang="ar"] .hero h1 { max-width: 16ch; }
.rule {
  display: block;
  width: 72px;
  height: 4px;
  background: var(--orange);
  margin-block: 28px;
}
.hero-lead {
  font-size: var(--step-1);
  line-height: 1.6;
  color: rgba(250, 246, 241, .82);
  max-width: 34em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero-visual { margin: 0; }
.arcs { width: 100%; height: auto; display: block; overflow: visible; }
.arcs .source { fill: var(--orange); }
.arc-band {
  fill: none;
  stroke: #5A4941;
  stroke-width: 38;
  transition: stroke .2s ease;
}
.arc text {
  fill: rgba(250, 246, 241, .9);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
  pointer-events: none;
}
html[lang="ar"] .arc text { font-size: 15px; letter-spacing: 0; }
.arc { cursor: pointer; outline: none; }
.arc:hover .arc-band,
.arc:focus-visible .arc-band { stroke: var(--orange); }
.arc:hover text,
.arc:focus-visible text { fill: #fff; }
.arc:focus-visible .arc-band { stroke: var(--orange); stroke-width: 42; }

/* The bands radiate out from the source, hold, sweep away and repeat every 10s */
@media (prefers-reduced-motion: no-preference) {
  .arc-band {
    stroke-dasharray: 700;
    stroke-dashoffset: 700;
    animation: radiate 10s infinite;
    animation-delay: calc(.25s + var(--i) * .11s);
  }
  .arc text {
    opacity: 0;
    animation: label-in 10s ease infinite;
    animation-delay: calc(.8s + var(--i) * .11s);
  }
  .arcs .source {
    transform-origin: 320px 520px;
    animation: source-in .5s ease-out both;
  }
  /* Hold still while someone points at or tabs onto a band */
  .arcs:hover .arc-band, .arcs:hover .arc text,
  .arcs:focus-within .arc-band, .arcs:focus-within .arc text {
    animation-play-state: paused;
  }
}
@keyframes radiate {
  0%   { stroke-dashoffset: 700; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
  9%   { stroke-dashoffset: 0; }
  92%  { stroke-dashoffset: 0; animation-timing-function: cubic-bezier(.6, 0, .8, .4); }
  100% { stroke-dashoffset: -700; }
}
@keyframes label-in {
  0%, 100% { opacity: 0; }
  5%, 85%  { opacity: 1; }
  90%      { opacity: 0; }
}
@keyframes source-in { from { opacity: 0; transform: scale(.6); } }

/* Sections */
.section { padding-block: var(--section-y); }
.section-head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: var(--step-3); }
.section-head p { margin-top: 16px; color: var(--muted); font-size: var(--step-1); line-height: 1.55; }

/* Services: the spectrum band */
.band {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
}
.band-seg {
  position: relative;
  min-height: 92px;
  padding: 18px 16px 16px;
  text-align: start;
  font: 500 .9875rem/1.3 var(--font-body);
  color: var(--brown-700);
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
/* A warm tonal spectrum across the six practices */
.band-seg:nth-child(1) { background: #F1E9E0; }
.band-seg:nth-child(2) { background: #EBE1D6; }
.band-seg:nth-child(3) { background: #E5D8CB; }
.band-seg:nth-child(4) { background: #DFCFC0; }
.band-seg:nth-child(5) { background: #D8C6B5; }
.band-seg:nth-child(6) { background: #D1BDAA; }
.band-seg:first-child { border-start-start-radius: var(--radius); border-end-start-radius: var(--radius); }
.band-seg:last-child { border-start-end-radius: var(--radius); border-end-end-radius: var(--radius); }
.band-seg:hover { color: var(--brown-900); }
.band-seg::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 4px;
  background: transparent;
  transition: background-color .2s ease;
}
.band-seg[aria-selected="true"] {
  background: var(--brown-700);
  color: var(--cream);
}
.band-seg[aria-selected="true"]::before { background: var(--orange); }

.panels {
  background: #fff;
  border: 1px solid var(--taupe);
  border-radius: var(--radius);
  margin-top: 4px;
}
.panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(24px, 4vw, 48px);
}
.panel[hidden] { display: none; }
.panel h3 { font-size: var(--step-2); }
.panel-intro p { margin-top: 14px; max-width: 36em; }
.panel-intro .sites { margin-top: 24px; color: var(--muted); font-size: .9375rem; }
.panel-intro .sites strong {
  display: block;
  color: var(--brown-700);
  font-weight: 500;
  margin-bottom: 2px;
}
.panel-list {
  list-style: none;
  margin: 0;
  padding: 0;
  align-self: center;
}
.panel-list li {
  padding: 12px 0;
  padding-inline-start: 22px;
  border-bottom: 1px solid var(--taupe);
  position: relative;
}
.panel-list li:last-child { border-bottom: 0; }
.panel-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: calc(12px + 0.8em);
  width: 8px;
  height: 8px;
  margin-top: -4px;
  background: var(--brown-500);
  /* chevron-like wedge, pointing in reading direction */
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
html[dir="rtl"] .panel-list li::before { clip-path: polygon(100% 0, 0 50%, 100% 100%); }

/* Process: a real sequence, so it is numbered */
.process { background: var(--cream-2); }
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 32px;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 64px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--brown-700);
  background: var(--cream);
  font: 600 1.0625rem/1 var(--font-display);
  color: var(--brown-700);
  z-index: 1;
}
.steps li::after {
  content: "";
  position: absolute;
  top: 20px;
  inset-inline-start: 40px;
  inset-inline-end: -32px;
  height: 1.5px;
  background: var(--taupe-3);
}
.steps li:last-child::after { display: none; }
.steps h3 { font-size: var(--step-1); }
.steps p { margin-top: 10px; color: var(--muted); font-size: .9875rem; }

/* About */
.about { background: var(--brown-700); color: var(--cream); }
.about-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
}
.about h2 { color: var(--cream); font-size: var(--step-3); }
.about-copy p { margin-top: 18px; color: rgba(250, 246, 241, .85); max-width: 34em; }
.about-copy p:first-of-type { margin-top: 24px; font-size: var(--step-1); color: var(--cream); }
.principles { margin: 0; display: grid; gap: 0; }
.principles > div {
  padding-block: 20px;
  border-bottom: 1px solid rgba(250, 246, 241, .18);
}
.principles > div:first-child { padding-top: 0; }
.principles > div:last-child { border-bottom: 0; }
.principles dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-1);
  color: var(--cream);
}
.principles dd { margin: 6px 0 0; color: rgba(250, 246, 241, .78); }

/* Contact */
.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
}
.contact h2 { font-size: var(--step-3); }
.contact-copy > p { margin-top: 16px; color: var(--muted); font-size: var(--step-1); }
.contact-details { margin: 40px 0 0; display: grid; gap: 20px; }
.contact-details dt { font-size: var(--step--1); color: var(--muted); }
.contact-details dd { margin: 2px 0 0; font-weight: 400; color: var(--brown-700); }
.contact-details a { color: var(--brown-700); }
html[dir="rtl"] .contact-details a { display: inline-block; }

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  background: #fff;
  border: 1px solid var(--taupe);
  border-radius: var(--radius);
  padding: clamp(20px, 3.5vw, 40px);
}
.field { display: grid; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: .9375rem; font-weight: 400; color: var(--brown-700); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  font: 300 1rem/1.4 var(--font-body);
  color: var(--ink);
  background: var(--cream);
  border: 1.5px solid var(--taupe-2);
  border-radius: var(--radius);
}
html[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brown-700);
  box-shadow: 0 0 0 3px rgba(199, 122, 46, .28);
}
.field [aria-invalid="true"] { border-color: #A4452F; background: #FCF4F1; }
.field-error { font-size: var(--step--1); color: #8E3A26; line-height: 1.45; }
.field-error:empty { display: none; }
.field-error bdi { white-space: nowrap; }

/* Service needed: dropdown with multiple choice */
.field-label { font-size: .9375rem; font-weight: 400; color: var(--brown-700); }
.multi { position: relative; }
.multi-trigger {
  position: relative;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  padding-inline-end: 44px;
  font: 300 1rem/1.4 var(--font-body);
  color: var(--ink);
  text-align: start;
  background: var(--cream);
  border: 1.5px solid var(--taupe-2);
  border-radius: var(--radius);
  cursor: pointer;
}
.multi-trigger::after {
  content: "";
  position: absolute;
  inset-inline-end: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 1.5px solid var(--brown-700);
  border-bottom: 1.5px solid var(--brown-700);
  transform: rotate(45deg);
  transition: transform .15s ease, margin-top .15s ease;
}
.multi-trigger[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: -2px; }
.multi-trigger:hover { border-color: var(--taupe-3); }
.multi-trigger:focus-visible,
.multi-trigger[aria-expanded="true"] {
  outline: none;
  border-color: var(--brown-700);
  box-shadow: 0 0 0 3px rgba(199, 122, 46, .28);
}
.multi-value { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multi-value.is-empty { color: var(--muted); }
.multi-panel {
  position: absolute;
  z-index: 20;
  inset-inline: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 6px;
  min-width: 0;
  background: var(--cream);
  border: 1.5px solid var(--brown-700);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(61, 51, 45, .18);
}
.multi-panel[hidden] { display: none; }
.multi-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 6px 10px;
  border-radius: calc(var(--radius) - 2px);
  font-size: .9375rem;
  color: var(--ink);
  cursor: pointer;
}
.multi-option:hover { background: var(--cream-2); }
.multi-option:has(input:checked) { background: var(--cream-2); color: var(--brown-700); font-weight: 400; }
.multi-option:has(input:focus-visible) { outline: 2px solid var(--orange); outline-offset: -2px; }
.multi-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--brown-700);
  cursor: pointer;
}
.multi-unsure { margin-top: 4px; border-top: 1px solid var(--taupe-2); border-radius: 0; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form-foot .btn:disabled { opacity: .6; cursor: progress; }
/* Spam trap: kept off screen for people, still filled in by bots */
.hp-field { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }
.form-status:empty { display: none; }
.form-status { font-size: .9375rem; padding: 12px 14px; border-radius: var(--radius); background: var(--cream-2); color: var(--brown-700); }
.form-status:focus { outline: none; }
.form-status a { color: inherit; text-decoration: underline; }
.form-status.is-ok { background: #E6EAD9; color: #3E4A26; }
.form-status.is-error { background: #F3DDD5; color: #7A2E1C; }

/* Footer */
.site-footer { background: var(--brown-900); color: rgba(250, 246, 241, .7); }
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px 48px;
  padding-block: 40px;
  font-size: .9375rem;
}
.footer-logo { height: 34px; width: auto; direction: ltr; }
.footer-legal p { color: rgba(250, 246, 241, .85); }
.footer-ar { font-family: "Readex Pro", Tahoma, sans-serif; }
/* Each name line carries its own dir, so align both to the page's reading side */
html[dir="ltr"] .footer-legal p { text-align: left; }
html[dir="rtl"] .footer-legal p { text-align: right; }

.footer-meta { display: grid; gap: 4px; justify-items: end; text-align: end; }
.footer-meta a { color: rgba(250, 246, 241, .85); }
.footer-meta a:hover { color: #fff; }

/* Form privacy line */
.form-privacy { font-size: var(--step--1); color: var(--muted); }
.form-privacy a { color: var(--brown-700); }

/* Privacy notice page */
.legal-inner { max-width: 760px; }
.legal h1 { font-size: var(--step-4); }
.legal .rule { margin-block: 24px; }
.legal-updated { font-size: var(--step--1); color: var(--muted); }
.legal-intro { margin-top: 16px; font-size: var(--step-1); line-height: 1.55; }
.legal h2 { font-size: var(--step-2); margin-top: 48px; }
.legal p, .legal ul { margin-top: 12px; max-width: 66ch; }
.legal ul { padding-inline-start: 1.25em; }
.legal li { margin-top: 6px; }
.legal li::marker { color: var(--brown-500); }
.legal a { color: var(--brown-700); }
.legal-back { margin-top: 56px !important; padding-top: 24px; border-top: 1px solid var(--taupe); }

/* Tablet */
@media (max-width: 1080px) {
  .site-nav ul { gap: 20px; }
  .site-nav { gap: 20px; }
  .band { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .band-seg { min-height: 72px; border-radius: 0 !important; }
  .band-seg:nth-child(1) { border-start-start-radius: var(--radius) !important; }
  .band-seg:nth-child(3) { border-start-end-radius: var(--radius) !important; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .steps li::after { display: none; }
}

/* Collapse navigation */
@media (max-width: 920px) {
  .menu-btn { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px var(--gutter) 24px;
    background: var(--cream);
    border-bottom: 1px solid var(--taupe);
    box-shadow: 0 12px 24px rgba(61, 51, 45, .12);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 12px 0; border-bottom: 1px solid var(--taupe); }
  .lang-btn { align-self: flex-start; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; width: 100%; margin-inline: auto; }
  .panel { grid-template-columns: 1fr; }
  .about-inner, .contact-inner { grid-template-columns: 1fr; }
}

/* Phone */
@media (max-width: 600px) {
  :root { --header-h: 64px; }
  .brand img { height: 32px; }
  .band { grid-template-columns: 1fr 1fr; }
  .band-seg:nth-child(3) { border-start-end-radius: 0 !important; }
  .band-seg:nth-child(2) { border-start-end-radius: var(--radius) !important; }
  .steps { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-meta { justify-items: start; text-align: start; }
  .btn { width: 100%; }
  .site-nav .btn { width: auto; }
  .form-foot .btn { width: 100%; }
}
