/* Al-Jadarah — site styles. One file, no framework. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Cinzel";
  src: url("../fonts/cinzel.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --bg: #f3f3f1;
  --panel: #e8e8e5;
  --card: #ffffff;
  --ink: #1b1b1a;
  --muted: #5b5b58;
  --line: #d6d6d2;
  --silver: #a9abae;
  --maroon: #97302a;
  --maroon-deep: #7a241f;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1320px;
  --section: clamp(72px, 10vw, 140px);

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --roman: "Cinzel", "Trajan Pro", Georgia, serif;

  /* the three dots, from the brand mark */
  --dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 66 20'%3E%3Cg fill='%2397302a' stroke='%23d0d0cd' stroke-width='2.4'%3E%3Crect x='1.2' y='1.2' width='17.6' height='17.6' rx='3'/%3E%3Crect x='24.2' y='1.2' width='17.6' height='17.6' rx='3'/%3E%3Crect x='47.2' y='1.2' width='17.6' height='17.6' rx='3'/%3E%3C/g%3E%3C/svg%3E");
  --dot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect x='1.2' y='1.2' width='17.6' height='17.6' rx='3' fill='%2397302a' stroke='%23d0d0cd' stroke-width='2.4'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--maroon); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); }
.skip:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- brand motif ---------- */
.dots { display: inline-block; width: 46px; height: 14px; background: var(--dots) no-repeat center / contain; flex: none; }
.dots--sm { width: 33px; height: 10px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(243, 243, 241, 0.92); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand { display: block; flex: none; }
.brand img { width: 186px; height: auto; }

.nav-toggle { display: none; }
.nav { display: flex; align-items: center; gap: clamp(4px, 0.8vw, 12px); }
.nav a {
  text-decoration: none; font-size: 0.9375rem; color: var(--ink); position: relative;
  padding: 10px 16px; border-radius: 999px; transition: color 0.2s ease, background-color 0.2s ease;
}
.nav a:hover { color: var(--maroon); }
/* current page: a full maroon pill */
.nav a[aria-current="page"], .nav a[aria-current="page"]:hover { color: #fff; background: var(--maroon); }
/* the three dots slide in under a menu item on hover */
.nav a::after {
  content: ""; position: absolute; left: 50%; bottom: -8px; width: 26px; height: 8px; margin-left: -13px;
  background: var(--dots) no-repeat center / contain;
  opacity: 0; transform: translateY(-4px); transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: none;
}
.nav a:hover::after, .nav a:focus-visible::after { opacity: 1; transform: translateY(0); }
.nav a[aria-current="page"]::after { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  background: var(--ink); color: #fff; text-decoration: none; font: 500 0.9375rem/1 var(--sans);
  border: 0; cursor: pointer; transition: background-color 0.2s ease;
}
.btn:hover { background: var(--maroon); color: #fff; }
.btn--maroon { background: var(--maroon); }
.btn--maroon:hover { background: var(--maroon-deep); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--ink); color: #fff; }

.link { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link:hover { color: var(--maroon); }

@media (max-width: 960px) {
  .brand img { width: 140px; }
  .js .nav-toggle {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px;
    border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink);
    font: 500 0.9375rem/1 var(--sans); cursor: pointer;
  }
  .nav-toggle i { display: block; width: 16px; height: 2px; background: currentColor; position: relative; }
  .nav-toggle i::before, .nav-toggle i::after { content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor; transition: transform 0.2s ease; }
  .nav-toggle i::before { top: -5px; } .nav-toggle i::after { top: 5px; }
  .nav-toggle[aria-expanded="true"] i { background: transparent; }
  .nav-toggle[aria-expanded="true"] i::before { transform: translateY(5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] i::after { transform: translateY(-5px) rotate(-45deg); }

  .site-header .wrap { flex-wrap: wrap; min-height: 68px; }
  .nav { width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 4px 0 20px; }
  .js .nav { display: none; }
  .js .nav.is-open { display: flex; }
  .nav a { font-size: 1.25rem; padding: 14px 16px; border-radius: 14px; }
  .nav a::after { display: none; }
}

/* ---------- section scaffolding ---------- */
.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * 0.6); }
.section-head { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); max-width: 760px; }
.section-head .dots { margin-bottom: 4px; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
.section-head p { color: var(--muted); font-size: 1.125rem; max-width: 60ch; }

.lead { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.55; color: var(--muted); max-width: 54ch; }

/* ---------- home hero ---------- */
.hero { padding-top: clamp(24px, 4vw, 56px); }
.hero-top { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: end; margin-bottom: clamp(28px, 4vw, 48px); }
.hero h1 { font-size: clamp(2.375rem, 5.4vw, 4.75rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.02; max-width: 15ch; text-wrap: balance; }
.hero-side { display: grid; gap: 24px; justify-items: start; padding-bottom: 6px; }
.hero-side p { color: var(--muted); font-size: 1.125rem; max-width: 40ch; }

.hero-panel { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--panel); aspect-ratio: 16 / 9; }
.hero-panel img { width: 100%; height: 100%; object-fit: cover; }
.hero-word {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
  font-family: var(--roman); font-weight: 500; letter-spacing: 0.02em; line-height: 0.72;
  font-size: clamp(64px, 17.4vw, 252px); text-align: center; color: var(--bg);
  transform: translateY(9%); pointer-events: none; user-select: none; white-space: nowrap;
}

@media (max-width: 860px) {
  .hero-top { grid-template-columns: 1fr; align-items: start; }
  .hero-panel { aspect-ratio: 4 / 4.4; }
  .hero-word { font-size: 20.5vw; }
}

/* ---------- statement + figures ---------- */
.statement { font-size: clamp(1.625rem, 3.3vw, 2.75rem); font-weight: 400; letter-spacing: -0.02em; line-height: 1.2; max-width: 34ch; text-wrap: pretty; }
.statement span { color: var(--muted); }
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: clamp(48px, 6vw, 88px); border-top: 1px solid var(--line); }
.figures--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.figure { padding: 28px 24px 0 0; }
.figure + .figure { padding-left: 24px; border-left: 1px solid var(--line); }
.figure b { display: block; font-weight: 300; font-stretch: 78%; font-size: clamp(2.5rem, 5vw, 4.5rem); letter-spacing: -0.03em; line-height: 1; }
.figure b small { font-size: 0.42em; font-weight: 400; letter-spacing: 0; margin-left: 4px; }
.figure > span { display: block; margin-top: 12px; color: var(--muted); font-size: 0.9375rem; max-width: 20ch; }
@media (max-width: 860px) {
  .figures, .figures--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figure, .figure + .figure { padding: 24px 16px 24px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .figure:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
}

/* ---------- pillars (home) ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); align-items: start; }
.pillar { text-decoration: none; display: grid; gap: 20px; }
.pillar:nth-child(2) { margin-top: clamp(0px, 6vw, 80px); }
.pillar figure { margin: 0; border-radius: var(--radius-md); overflow: hidden; background: var(--panel); aspect-ratio: 4 / 5; }
.pillar figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.pillar:hover figure img { transform: scale(1.03); }
.pillar h3 { font-size: clamp(1.375rem, 2vw, 1.75rem); }
.pillar p { color: var(--muted); margin-top: 8px; }
.pillar .link { margin-top: 16px; }
@media (max-width: 860px) {
  .pillars { grid-template-columns: 1fr; gap: 48px; }
  .pillar:nth-child(2) { margin-top: 0; }
  .pillar figure { aspect-ratio: 4 / 3.4; }
}

/* ---------- numbered process (real sequences only) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); counter-reset: step; }
.step { border-top: 1px solid var(--ink); padding-top: 22px; counter-increment: step; }
.step::before { content: counter(step, decimal-leading-zero); display: block; font-stretch: 78%; font-weight: 300; font-size: 2.25rem; line-height: 1; color: var(--maroon); margin-bottom: 28px; }
.step h3 { font-size: 1.25rem; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 1rem; }
.steps--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 960px) { .steps, .steps--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; } }
@media (max-width: 520px) { .steps, .steps--5 { grid-template-columns: 1fr; } }

/* ---------- call to action ---------- */
.cta { background: var(--maroon); color: #fff; border-radius: var(--radius-lg); padding: clamp(36px, 6vw, 88px); display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 32px 64px; align-items: end; }
.cta h2 { font-size: clamp(2rem, 4.4vw, 3.75rem); max-width: 14ch; }
.cta p { color: rgba(255, 255, 255, 0.82); margin-top: 18px; max-width: 42ch; }
.cta-actions { display: grid; gap: 18px; justify-items: start; }
.cta-actions a:not(.btn) { color: #fff; text-decoration-color: rgba(255,255,255,.4); text-underline-offset: 4px; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } }

/* ---------- inner pages ---------- */
.page-head { padding-top: clamp(32px, 5vw, 72px); }
.page-head-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: end; margin-bottom: clamp(32px, 4vw, 56px); }
.page-head h1 { font-size: clamp(2.5rem, 6vw, 5.25rem); letter-spacing: -0.035em; line-height: 1; }
.page-head .lead { margin-top: 22px; }
.jump { display: grid; gap: 0; border-top: 1px solid var(--line); }
.jump a { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.jump a:hover { color: var(--maroon); }
.jump a span { color: var(--muted); font-stretch: 85%; }
.page-image { border-radius: var(--radius-lg); overflow: hidden; background: var(--panel); aspect-ratio: 2 / 1; }
.page-image img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .page-head-grid { grid-template-columns: 1fr; align-items: start; }
  .page-image { aspect-ratio: 4 / 3; }
}

.service { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: clamp(24px, 5vw, 80px); padding-block: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.service:first-child { border-top: 0; }
.service h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
.service-head { display: grid; gap: 18px; align-content: start; }
.service-body { display: grid; gap: 24px; align-content: start; }
.service-body > p { font-size: 1.1875rem; line-height: 1.55; max-width: 52ch; }
@media (min-width: 861px) { .service-head { position: sticky; top: 110px; } }
@media (max-width: 860px) { .service { grid-template-columns: 1fr; } }

.ticks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; }
.ticks li { position: relative; padding-left: 22px; color: var(--muted); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 9px; height: 9px; background: var(--dot) no-repeat center / contain; }
@media (max-width: 560px) { .ticks { grid-template-columns: 1fr; } }

.flow { display: flex; flex-wrap: wrap; gap: 8px; }
.flow li { padding: 8px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 0.9375rem; counter-increment: flow; }
.flow { counter-reset: flow; }
.flow li::before { content: counter(flow) "  "; color: var(--maroon); font-weight: 600; white-space: pre; }

.image-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 2vw, 24px); }
.image-pair figure, .image-grid figure { margin: 0; border-radius: var(--radius-md); overflow: hidden; background: var(--panel); aspect-ratio: 4 / 3; }
.image-pair img, .image-grid img { width: 100%; height: 100%; object-fit: cover; }
.image-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(12px, 2vw, 24px); }
.image-grid figure { grid-column: span 2; }
.image-grid figure:nth-child(-n+2) { grid-column: span 3; }
@media (max-width: 700px) {
  .image-pair { grid-template-columns: 1fr; }
  .image-grid { grid-template-columns: 1fr 1fr; }
  .image-grid figure, .image-grid figure:nth-child(-n+2) { grid-column: span 1; }
  .image-grid figure:first-child { grid-column: span 2; }
}

.band { background: var(--card); border-radius: var(--radius-lg); padding: clamp(32px, 5vw, 72px); }
.band .figures { margin-top: 0; border-top: 0; }
.band .figure { padding-top: 0; }
@media (max-width: 860px) { .band .figure { padding-top: 20px; } .band .figure:nth-child(-n+2) { padding-top: 0; } }

/* project record */
.projects { border-top: 1px solid var(--ink); }
.project { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.project h3 { font-size: 1.375rem; }
.project h3 small { display: block; font-size: 0.875rem; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-top: 6px; }
.project b { font-weight: 300; font-stretch: 78%; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1; letter-spacing: -0.03em; }
.project b small { font-size: 0.45em; font-weight: 400; margin-left: 4px; }
.project p { color: var(--muted); }
@media (max-width: 760px) { .project { grid-template-columns: 1fr; gap: 10px; } }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.split figure { margin: 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--panel); }
.split figure img { width: 100%; height: 100%; object-fit: cover; }
.split .prose { display: grid; gap: 20px; }
.split .prose p { color: var(--muted); max-width: 56ch; }
.split .prose h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); }
.value { background: var(--card); border-radius: var(--radius-md); padding: 28px 24px 32px; display: grid; gap: 12px; align-content: start; }
.value h3 { font-size: 1.375rem; }
.value p { color: var(--muted); font-size: 1rem; }
@media (max-width: 960px) { .values { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .values { grid-template-columns: 1fr; } }

.checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); }
.checks li { border-top: 1px solid var(--line); padding-top: 18px; color: var(--muted); }
.checks li strong { display: block; color: var(--ink); font-weight: 500; font-size: 1.125rem; margin-bottom: 6px; }
@media (max-width: 760px) { .checks { grid-template-columns: 1fr; } }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.form { background: var(--card); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 48px); display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 8px; align-content: start; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 0.9375rem; font-weight: 500; }
.field label span { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink); font: 400 1rem/1.4 var(--sans);
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--maroon); outline-offset: 0; border-color: transparent; background: #fff; }
.form .btn { justify-self: start; }
.form-note { grid-column: 1 / -1; color: var(--muted); font-size: 0.875rem; }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }
.contact-details { display: grid; gap: 28px; }
.contact-details dl { margin: 0; display: grid; gap: 22px; }
.contact-details dt { color: var(--muted); font-size: 0.875rem; margin-bottom: 4px; }
.contact-details dd { margin: 0; font-size: 1.125rem; }
.contact-details figure { margin: 0; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 4 / 3; background: var(--panel); }
.contact-details figure img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { padding-block: clamp(24px, 3vw, 40px) 32px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 32px; padding-top: 40px; border-top: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.wordmark i { width: 22px; height: 22px; background: var(--dot) no-repeat center / contain; }
.wordmark span { font-family: var(--roman); font-weight: 500; font-size: 1.375rem; letter-spacing: 0.04em; }
.site-footer p, .site-footer li { color: var(--muted); font-size: 0.9375rem; }
.site-footer p { margin-top: 14px; max-width: 36ch; }
.site-footer h2 { font-size: 0.9375rem; font-weight: 500; letter-spacing: 0; margin-bottom: 14px; }
.site-footer ul { display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--maroon); }
.footer-base { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 56px; color: var(--muted); font-size: 0.875rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* the first content section after a page header sits closer to it */
.page-head + .section { padding-top: clamp(40px, 5vw, 72px); }
.contact-details figure.wide { aspect-ratio: 900 / 373; }

/* contact form: spam trap and send status */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { grid-column: 1 / -1; padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 500; }
.form-status.is-ok { background: #edf3ee; color: #22492c; }
.form-status.is-error { background: #f6e9e8; color: var(--maroon-deep); }
.form .btn[disabled] { opacity: 0.6; cursor: progress; }
.field-error { color: var(--maroon-deep); font-size: 0.875rem; font-weight: 500; }
.field [aria-invalid="true"] { border-color: var(--maroon); background: #fbf3f2; }

/* comfortable tap targets for footer and contact links on touch screens */
.site-footer li a, .contact-details dd a { display: inline-block; padding-block: 6px; }

/* utility classes (kept out of the HTML so the security policy can forbid inline styles) */
.section--flush { padding-top: 0; }
.ratio-4-5 { aspect-ratio: 4 / 5; }
.ratio-4-3 { aspect-ratio: 4 / 3; }
.checks--stack { grid-template-columns: 1fr; }
.focus-60 { object-position: 60% 50%; }
.mt-18 { margin-top: 18px; }
.mt-28 { margin-top: 28px; }

/* 404 page */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn--ghost:hover { background: transparent; color: var(--maroon); box-shadow: inset 0 0 0 1px var(--maroon); }
.hero-panel--404 { aspect-ratio: 16 / 7; }
.hero-word--404 { font-size: clamp(140px, 30vw, 440px); line-height: 0.7; transform: translateY(12%); }
.lost-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border-top: 1px solid var(--ink); }
.lost-links a { display: grid; gap: 8px; align-content: start; padding: 24px 24px 28px 0; text-decoration: none; border-bottom: 1px solid var(--line); position: relative; }
.lost-links a strong { font-weight: 500; font-size: 1.25rem; letter-spacing: -0.01em; }
.lost-links a span { color: var(--muted); font-size: 0.9375rem; }
.lost-links a:hover strong { color: var(--maroon); }
.lost-links a::after { content: ""; position: absolute; left: 0; bottom: 10px; width: 26px; height: 8px; background: var(--dots) no-repeat center / contain; opacity: 0; transition: opacity 0.2s ease; }
.lost-links a:hover::after, .lost-links a:focus-visible::after { opacity: 1; }
@media (max-width: 860px) { .hero-panel--404 { aspect-ratio: 4 / 3.6; } .hero-word--404 { font-size: 46vw; } }

/* ===================================================================
   Version 1.1 — motion.
   Everything that moves on its own lives inside "no-preference", so
   visitors who switch on "Reduce motion" see a calm, still site.
   =================================================================== */

/* 6. Buttons: a deeper maroon sweeps in from the left on hover */
.btn--maroon {
  background: linear-gradient(90deg, var(--maroon-deep) 0 50%, var(--maroon) 50% 100%);
  background-size: 201% 100%; background-position: 100% 0;
  transition: background-position 0.45s cubic-bezier(0.2, 0.7, 0.1, 1);
}
.btn--maroon:hover, .btn--maroon:focus-visible {
  background: linear-gradient(90deg, var(--maroon-deep) 0 50%, var(--maroon) 50% 100%);
  background-size: 201% 100%; background-position: 0 0;
}
.btn--light {
  background: linear-gradient(90deg, var(--ink) 0 50%, #fff 50% 100%);
  background-size: 201% 100%; background-position: 100% 0;
  transition: background-position 0.45s cubic-bezier(0.2, 0.7, 0.1, 1), color 0.3s ease;
}
.btn--light:hover, .btn--light:focus-visible {
  background: linear-gradient(90deg, var(--ink) 0 50%, #fff 50% 100%);
  background-size: 201% 100%; background-position: 0 0; color: #fff;
}

/* 5. Figures keep their width while counting */
.figure b, .project b { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: no-preference) {

  /* 1. Home: the photo fades in, then the JADARAH letters rise one by one */
  .hero-word span { display: inline-block; transform: translateY(115%); animation: letter-rise 1s cubic-bezier(0.2, 0.75, 0.1, 1) forwards; }
  .hero-word span:nth-child(1) { animation-delay: 0.55s; }
  .hero-word span:nth-child(2) { animation-delay: 0.63s; }
  .hero-word span:nth-child(3) { animation-delay: 0.71s; }
  .hero-word span:nth-child(4) { animation-delay: 0.79s; }
  .hero-word span:nth-child(5) { animation-delay: 0.87s; }
  .hero-word span:nth-child(6) { animation-delay: 0.95s; }
  .hero-word span:nth-child(7) { animation-delay: 1.03s; }
  @keyframes letter-rise { to { transform: translateY(0); } }

  /* 2. Banners drift very slowly, like the opening shot of a film */
  .hero-panel img { animation: photo-in 1.1s ease-out both, drift 24s cubic-bezier(0.25, 0.1, 0.25, 1) 0.2s both; }
  .page-image img { animation: drift 24s cubic-bezier(0.25, 0.1, 0.25, 1) both; }
  @keyframes photo-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes drift { from { transform: scale(1); } to { transform: scale(1.045); } }

  /* 3. The three dots arrive one square at a time when they scroll into view */
  .js .dots:not(.is-in) { clip-path: inset(0 100% 0 0); }
  .js .dots.is-in { animation: dots-in 0.9s both; }
  @keyframes dots-in {
    0%   { clip-path: inset(0 100% 0 0); animation-timing-function: step-end; }
    25%  { clip-path: inset(0 66% 0 0);  animation-timing-function: step-end; }
    55%  { clip-path: inset(0 32% 0 0);  animation-timing-function: step-end; }
    85%, 100% { clip-path: inset(0 0 0 0); }
  }

  /* 4. Pages cross-fade into each other; the header stays still */
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }
  ::view-transition-old(root) { animation: 0.3s ease both page-out; }
  ::view-transition-new(root) { animation: 0.45s ease 0.05s both page-in; }
  @keyframes page-out { to { opacity: 0; } }
  @keyframes page-in { from { opacity: 0; transform: translateY(8px); } }
}
/* letters split for the reveal are a touch wider than the plain word, so size down slightly on narrow screens */
@media (max-width: 860px) { .hero-word { font-size: 19.2vw; } }
@media (max-width: 400px) { .hero-word { font-size: 18.2vw; } }
/* JADARAH: size the word to the photo panel's width (screen width minus the side margins), so it always fits edge to edge */
.hero-word:not(.hero-word--404) { font-size: min(252px, calc((100vw - 2 * var(--gutter)) / 5.15)); }

/* WebP images come wrapped in <picture>; let the inner <img> keep its usual layout */
picture { display: contents; }

/* lift the J so its curved tail clears the bottom edge of the photo (otherwise it reads as an I) */
.hero-word .hero-j { position: relative; top: -0.2em; }
