/* Ayattih Tech — site styles. Values come from the Ayattih Tech design system (tokens.json). */

@font-face { font-family: "Sora"; src: url("/assets/fonts/sora-variable.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/assets/fonts/ibm-plex-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/assets/fonts/ibm-plex-sans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/assets/fonts/ibm-plex-sans-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  /* brand */
  --brand-red: #ed1c24;
  --brand-crimson: #be1e2d;
  --brand-maroon: #871e2d;
  --brand-black: #000000;
  /* surfaces and text */
  --surface: #ffffff;
  --surface-subtle: #f5f5f5;
  --surface-inverse: #0b0b0c;
  --ink: #111111;
  --ink-muted: #5a5a5e;
  --ink-inverse: #f4f4f5;
  --ink-inverse-muted: #a1a1a8;
  --border: #e2e2e4;
  --border-control: #8c8c92;
  --action: var(--brand-crimson);
  --action-hover: var(--brand-maroon);
  --on-action: #ffffff;
  --accent-text: var(--brand-crimson);
  --accent-text-on-dark: #ff5c63;
  --focus-ring: var(--brand-crimson);
  /* type */
  --font-display: "Sora", "Montserrat", system-ui, sans-serif;
  --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  /* space */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px;
  --space-8: 32px; --space-12: 48px; --space-16: 64px; --space-24: 96px;
  /* shape */
  --radius-sm: 2px; --radius-md: 6px; --radius-lg: 12px;
  --content-max: 1200px;
  --measure: 68ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: var(--action-hover); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }
.dark :focus-visible { outline-color: var(--accent-text-on-dark); }

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); margin: 0; text-wrap: balance; }
h1 { font-size: 64px; line-height: 68px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 40px; line-height: 46px; font-weight: 700; letter-spacing: -0.015em; }
h3 { font-size: 22px; line-height: 28px; font-weight: 600; }
p { margin: 0; }
.lede { font-size: 18px; line-height: 28px; color: var(--ink-muted); max-width: 56ch; }

.wrap { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--space-8); }
.section { padding: var(--space-24) 0; }
.section-subtle { background: var(--surface-subtle); }
.dark { background: var(--surface-inverse); color: var(--ink-inverse); }
.dark h2, .dark h3 { color: var(--ink-inverse); }
.dark .lede { color: var(--ink-inverse-muted); }

.visually-hidden { 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; left: -9999px; top: 0; }
.skip:focus { left: var(--space-4); top: var(--space-4); background: var(--surface); padding: var(--space-2) var(--space-4); z-index: 10; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-family: var(--font-sans); font-size: 15px; line-height: 20px; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-primary:hover { background: var(--action-hover); color: var(--on-action); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--border-control); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.dark .btn-primary:focus-visible { outline-color: var(--accent-text-on-dark); }
.text-link { font-weight: 600; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); padding-top: var(--space-3); padding-bottom: var(--space-3); }
.brand img { width: 150px; height: auto; }
.nav { display: flex; align-items: center; gap: var(--space-8); }
.nav ul { display: flex; gap: var(--space-6); list-style: none; margin: 0; padding: 0; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--accent-text); text-decoration: underline; }
.nav-toggle { display: none; }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: var(--space-8); padding-top: var(--space-16); padding-bottom: var(--space-24); }
.hero h1 { max-width: 13ch; }
.hero .lede { margin-top: var(--space-6); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-8); }
.hero-art { justify-self: end; width: 100%; max-width: 480px; }

/* ODC spotlight */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-16); align-items: start; }
.split .lede { margin-top: var(--space-4); }
.split .text-link { display: inline-block; margin-top: var(--space-6); }
.roles { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.roles > div { padding: var(--space-8); }
.roles > div + div { border-left: 1px solid var(--border); background: var(--surface-subtle); }
.roles h3 { font-size: 18px; line-height: 24px; margin-bottom: var(--space-4); }
.roles ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.roles li { position: relative; padding-left: var(--space-6); }
.roles li::before { content: ""; position: absolute; left: 0; top: 9px; width: 10px; height: 10px; border-radius: var(--radius-sm); background: var(--brand-red); }
.roles > div + div li::before { background: var(--ink); }

/* Other services */
.section-head { max-width: 640px; margin-bottom: var(--space-12); }
.section-head .lede { margin-top: var(--space-4); }
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-8); }
.service { padding-top: var(--space-6); border-top: 3px solid var(--ink); }
.service p { margin-top: var(--space-3); color: var(--ink-muted); }
.service a { display: inline-block; margin-top: var(--space-4); }

/* Why */
.reasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-12) var(--space-16); }
.reason { display: grid; grid-template-columns: 40px 1fr; gap: var(--space-4); }
.reason svg { width: 32px; height: 28px; margin-top: 2px; }
.reason p { margin-top: var(--space-2); color: var(--ink-muted); max-width: 46ch; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-8); counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-bottom: var(--space-6);
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  color: var(--on-action); background: var(--brand-black); border-radius: var(--radius-md);
}
.steps li:last-child::before { background: var(--action); color: var(--on-action); }
.steps p { margin-top: var(--space-2); color: var(--ink-muted); }

/* Clocks */
.clocks-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-8); align-items: end; margin-bottom: var(--space-12); }
.clocks-head .lede { margin-top: var(--space-4); }
.clocks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid #2a2a2e; }
.clock { padding: var(--space-6) var(--space-4) 0 0; }
.clock + .clock { padding-left: var(--space-4); border-left: 1px solid #2a2a2e; }
.clock-city { font-weight: 600; }
.clock-time { white-space: nowrap; font-family: var(--font-display); font-size: 40px; line-height: 48px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: var(--space-2); }
.clock-day { color: var(--ink-inverse); font-size: 14px; line-height: 22px; }
.clock-meta { color: var(--ink-inverse-muted); font-size: 14px; line-height: 22px; }
.clock-home .clock-time { color: var(--accent-text-on-dark); }

/* About teaser */
.about-teaser { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-16); align-items: center; }
.about-teaser blockquote { margin: 0; font-family: var(--font-display); font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: -0.01em; }
.about-teaser p { color: var(--ink-muted); }
.about-teaser .text-link { display: inline-block; margin-top: var(--space-4); }

/* CTA */
.cta { position: relative; overflow: hidden; }
.cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-8); }
.cta .lede { margin-top: var(--space-4); }

/* Footer */
.site-footer { padding: var(--space-16) 0 var(--space-8); border-top: 1px solid #2a2a2e; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: var(--space-8); }
.site-footer .footer-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 28px; color: var(--ink-inverse); margin-bottom: var(--space-2); }
.site-footer p, .site-footer li { color: var(--ink-inverse-muted); font-size: 14px; line-height: 22px; }
.site-footer h3 { font-family: var(--font-sans); font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink-inverse); margin-bottom: var(--space-3); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.site-footer a { color: var(--ink-inverse); text-decoration: none; }
.site-footer a:hover { color: var(--accent-text-on-dark); text-decoration: underline; }
.legal { margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid #2a2a2e; font-size: 12px !important; line-height: 18px !important; }

/* Responsive */
@media (max-width: 960px) {
  h1 { font-size: 48px; line-height: 52px; }
  h2 { font-size: 32px; line-height: 38px; }
  .hero .wrap, .split, .about-teaser { grid-template-columns: 1fr; }
  .hero-art { justify-self: start; max-width: 320px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clocks { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: var(--space-6); }
  .clock:nth-child(4) { border-left: 0; padding-left: 0; }
  .clocks-head { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 var(--space-4); }
  .section { padding: var(--space-16) 0; }
  h1 { font-size: 40px; line-height: 44px; }
  h2 { font-size: 28px; line-height: 34px; }
  .brand img { width: 140px; }
  .nav-toggle { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-4); background: none; border: 1px solid var(--border-control); border-radius: var(--radius-md); font: 600 15px/20px var(--font-sans); color: var(--ink); }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--border); padding: var(--space-4); flex-direction: column; align-items: stretch; gap: var(--space-4); z-index: 5; }
  .nav.open { display: flex; }
  .nav ul { flex-direction: column; gap: var(--space-3); }
  .site-header { position: relative; }
  .services, .reasons, .steps, .roles { grid-template-columns: 1fr; }
  .roles > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .clocks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clock:nth-child(n) { border-left: 0; padding-left: 0; }
  .clock:nth-child(even) { padding-left: var(--space-4); border-left: 1px solid #2a2a2e; }
  .clock-time { font-size: 26px; line-height: 34px; }
  .hero-art { max-width: 240px; }
  .hero .wrap { padding-top: var(--space-12); padding-bottom: var(--space-16); }
  .footer-grid { grid-template-columns: 1fr; }
  .about-teaser blockquote { font-size: 26px; line-height: 34px; }
}
/* Inner pages */
.nav a[aria-current="page"] { color: var(--accent-text); text-decoration: underline; text-decoration-thickness: 2px; }
.page-hero { border-bottom: 1px solid var(--border); }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--space-8); align-items: center; padding-top: var(--space-12); padding-bottom: var(--space-16); }
.page-hero h1 { font-size: 56px; line-height: 60px; max-width: 16ch; }
.page-hero .lede { margin-top: var(--space-6); }
.page-hero-art { justify-self: end; width: 100%; max-width: 320px; }
.crumb { font-size: 14px; line-height: 22px; color: var(--ink-muted); margin-bottom: var(--space-4); }
.crumb a { color: var(--ink-muted); }
.aside-note { margin-top: var(--space-6); color: var(--ink-muted); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-6); }
.checklist li { position: relative; padding-left: var(--space-8); color: var(--ink-muted); }
.checklist li strong { display: block; color: var(--ink); font-weight: 600; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 7px; width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 14px solid var(--brand-red); }
.service p a { display: inline; margin: 0; }
.services:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.duty-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.duty-table th, .duty-table td { text-align: left; vertical-align: top; padding: var(--space-4) var(--space-6); border-bottom: 1px solid var(--border); }
.duty-table thead th { font-family: var(--font-display); font-size: 15px; font-weight: 600; background: var(--surface-subtle); }
.duty-table tbody th { font-weight: 600; width: 22%; }
.duty-table tbody tr:last-child th, .duty-table tbody tr:last-child td { border-bottom: 0; }
.duty-table td:last-child { color: var(--ink); }
.duty-table td:nth-child(2):not(:last-child) { color: var(--ink-muted); }
.steps-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-6); }
.faq-wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-16); align-items: start; }
.faq { border-top: 1px solid var(--border-control); }
.faq details { border-bottom: 1px solid var(--border-control); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: var(--space-4); padding: var(--space-6) 0; font-family: var(--font-display); font-size: 18px; line-height: 24px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-sans); font-weight: 400; font-size: 24px; line-height: 24px; color: var(--accent-text); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 var(--space-6); color: var(--ink-muted); max-width: var(--measure); }
@media (max-width: 960px) {
  .page-hero-grid, .faq-wrap { grid-template-columns: 1fr; }
  .page-hero-art { display: none; }
  .page-hero h1 { font-size: 44px; line-height: 48px; }
  .steps-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq-wrap { gap: var(--space-8); }
}
@media (max-width: 720px) {
  .page-hero h1 { font-size: 36px; line-height: 40px; }
  .services:has(> :nth-child(2):last-child) { grid-template-columns: 1fr; }
  .table-wrap { overflow: visible; }
  .duty-table { min-width: 0; }
  .duty-table thead { display: none; }
  .duty-table tr { display: block; padding: var(--space-4) var(--space-4); border-bottom: 1px solid var(--border); }
  .duty-table tbody tr:last-child { border-bottom: 0; }
  .duty-table th, .duty-table td { display: block; padding: 0; border: 0; width: auto; }
  .duty-table tbody th { font-family: var(--font-display); font-size: 17px; margin-bottom: var(--space-2); width: auto; }
  .duty-table td { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--space-2); margin-top: var(--space-2); }
  .duty-table td::before { content: attr(data-label); font-weight: 600; color: var(--ink); font-size: 14px; line-height: 22px; }
  .steps-5 { grid-template-columns: 1fr; }
}

/* How we work, About, Contact, legal */
.steps-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: var(--space-12); }
.people { display: grid; grid-template-columns: repeat(2, minmax(0, 280px)); gap: var(--space-8); }
.person-photo { aspect-ratio: 4 / 5; border-radius: var(--radius-lg); background: var(--surface); border: 1px dashed var(--border-control); display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-4); }
.person-photo span { font-family: var(--font-display); font-weight: 700; font-size: 40px; color: var(--border-control); letter-spacing: 0.02em; }
.person p { color: var(--ink-muted); margin-top: var(--space-1); }
.facts-table tbody th { width: 28%; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--space-16); align-items: start; }
.contact-form-wrap h2 { margin-bottom: var(--space-8); }
.contact-form { display: grid; gap: var(--space-6); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.field { display: grid; gap: var(--space-2); }
.field label { font-weight: 600; font-size: 15px; line-height: 20px; }
.field input, .field select, .field textarea {
  font: 16px/24px var(--font-sans); color: var(--ink); background: var(--surface);
  border: 1px solid var(--border-control); border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4); width: 100%; min-height: 48px;
}
.field textarea { resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; border-color: var(--focus-ring); }
.field [aria-invalid="true"] { border-color: var(--danger, #b42318); }
.form-error { color: #b42318; font-weight: 600; }
.form-note { color: var(--ink-muted); font-size: 14px; line-height: 22px; }
.contact-form .btn { justify-self: start; }
.contact-aside { background: var(--surface-subtle); border-radius: var(--radius-lg); padding: var(--space-8); }
.contact-aside h2 { font-size: 18px; line-height: 24px; margin-bottom: var(--space-2); }
.contact-aside p + h2 { margin-top: var(--space-6); }
.contact-aside p { color: var(--ink-muted); }
.contact-email { font-weight: 600; font-size: 18px; }
.page-hero-legal { padding: var(--space-12) 0 var(--space-12); max-width: 760px; }
.page-hero-legal h1 { font-size: 48px; line-height: 52px; }
.legal-date { margin-top: var(--space-4); color: var(--ink-muted); font-size: 14px; }
.prose { max-width: var(--measure); }
.prose h2 { font-size: 24px; line-height: 30px; margin: var(--space-12) 0 var(--space-3); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul { color: var(--ink); margin: 0 0 var(--space-4); }
.prose ul { padding-left: var(--space-6); }
.prose li + li { margin-top: var(--space-2); }
.notfound .page-hero-grid { padding-top: var(--space-24); padding-bottom: var(--space-24); }
@media (max-width: 960px) {
  .steps-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: 1fr; gap: var(--space-12); }
}
@media (max-width: 720px) {
  .steps-6 { grid-template-columns: 1fr; }
  .people { grid-template-columns: 1fr 1fr; gap: var(--space-4); }
  .field-row { grid-template-columns: 1fr; }
  .page-hero-legal h1 { font-size: 36px; line-height: 40px; }
  .facts-table td { display: block; padding-left: 0 !important; }
  .facts-table td::before { content: none; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
