/* EGY UK — site stylesheet
   No build step. Modern CSS only: cascade layers, OKLCH + light-dark(),
   range media queries, popover-based mobile nav, scroll-driven reveals. */

@layer reset, tokens, base, layout, components, utilities;

/* ---------- Reset ---------- */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body { margin: 0; }
  h1, h2, h3, p { margin: 0; }
  ul { margin: 0; padding: 0; list-style: none; }
  img, svg { display: block; max-inline-size: 100%; block-size: auto; }
  button, input, textarea { font: inherit; color: inherit; }
  a { color: inherit; }
}

/* ---------- Design tokens ---------- */
@layer tokens {
  :root {
    color-scheme: light dark;

    --orange: oklch(68% 0.19 45);
    --orange-deep: oklch(58% 0.19 42);
    --green: oklch(72% 0.15 155);
    --green-deep: oklch(46% 0.13 155);
    --navy: oklch(27% 0.04 260);

    --bg:        light-dark(oklch(99% 0.004 90), oklch(17% 0.02 260));
    --surface:   light-dark(#fff, oklch(22% 0.02 260));
    --surface-2: light-dark(oklch(96.5% 0.01 90), oklch(25% 0.02 260));
    --text:      light-dark(var(--navy), oklch(94% 0.01 90));
    --muted:     light-dark(oklch(46% 0.03 260), oklch(74% 0.02 260));
    --line:      light-dark(oklch(89% 0.012 90), oklch(32% 0.02 260));
    --accent:    light-dark(var(--orange-deep), var(--orange));
    --accent-2:  light-dark(var(--green-deep), var(--green));
    --on-accent: #fff;

    --font-serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
    --font-sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

    --step--1: clamp(0.875rem, 0.85rem + 0.2vw, 1rem);
    --step-0:  clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
    --step-1:  clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem);
    --step-2:  clamp(1.5rem, 1.25rem + 1.1vw, 2.1rem);
    --step-3:  clamp(2rem, 1.5rem + 2.2vw, 3.1rem);
    --step-4:  clamp(2.4rem, 1.7rem + 3.6vw, 4.4rem);

    --space-xs: 0.5rem;
    --space-s: 1rem;
    --space-m: 1.5rem;
    --space-l: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: clamp(1.75rem, 1.25rem + 1.25vw, 2.5rem);

    --wrap: 80rem;
    --gutter: clamp(1rem, 4vw, 3rem);
    --measure: 60ch;
    --radius: 0.875rem;
    --radius-s: 0.5rem;
    --header-h: 4.5rem;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 12px 32px -16px rgb(0 0 0 / 0.25);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  }
}

/* ---------- Base ---------- */
@layer base {
  @font-face {
    font-family: "IBM Plex Serif";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/ibm-plex-serif-500.woff2") format("woff2");
  }
  @font-face {
    font-family: "IBM Plex Serif";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/ibm-plex-serif-600.woff2") format("woff2");
  }
  @font-face {
    font-family: "Nunito Sans";
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url("../fonts/nunito-sans-var.woff2") format("woff2");
  }

  html {
    scroll-padding-block-start: calc(var(--header-h) + 1rem);
    -webkit-text-size-adjust: 100%;
  }
  @media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
  }

  body {
    font-family: var(--font-sans);
    font-size: var(--step-0);
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
  }

  h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
    text-wrap: balance;
  }
  h1 { font-size: var(--step-4); }
  h2 { font-size: var(--step-3); }
  h3 { font-size: var(--step-1); }
  p { text-wrap: pretty; max-inline-size: var(--measure); }

  a { text-decoration-thickness: 0.08em; text-underline-offset: 0.15em; }
  a:hover { color: var(--accent); }

  ::selection { background: var(--green); color: var(--navy); }
}

/* ---------- Layout ---------- */
@layer layout {
  .wrap {
    inline-size: min(100% - 2 * var(--gutter), var(--wrap));
    margin-inline: auto;
  }

  .section { padding-block: var(--space-2xl); }
  .section--tint { background: var(--surface-2); }
  .section__head {
    display: grid;
    gap: var(--space-s);
    margin-block-end: var(--space-m);
    max-inline-size: none;
  }
  .section__head p { color: var(--muted); font-size: var(--step-1); line-height: 1.5; }

  .eyebrow {
    font-weight: 700;
    font-size: var(--step--1);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
  }

  .split {
    display: grid;
    gap: var(--space-l);
    align-items: center;
  }
  @media (width >= 56rem) {
    .split { grid-template-columns: 1.1fr 0.9fr; gap: var(--space-xl); }
    .split--flip > :first-child { order: 2; }
  }

  .skip-link {
    position: absolute; inset-block-start: 0.5rem; inset-inline-start: 0.5rem;
    translate: 0 -200%;
    background: var(--navy); color: #fff;
    padding: 0.5rem 1rem; border-radius: var(--radius-s);
    z-index: 100;
  }
  .skip-link:focus { translate: 0; }
}

/* ---------- Components ---------- */
@layer components {

  /* Header */
  .site-header {
    position: sticky; inset-block-start: 0; z-index: 50;
    block-size: var(--header-h);
    background: color-mix(in oklab, var(--bg) 82%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-block-end: 1px solid var(--line);
  }
  .site-header .wrap {
    block-size: 100%;
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-m);
  }
  .brand { display: inline-flex; align-items: center; }
  .brand img { block-size: clamp(2rem, 1.6rem + 0.9vw, 2.5rem); inline-size: auto; }

  .site-nav ul { display: flex; gap: clamp(1rem, 2vw, 2rem); align-items: center; }
  .site-nav a {
    font-weight: 600; text-decoration: none; padding-block: 0.25rem;
    border-block-end: 2px solid transparent;
    transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
  }
  .site-nav a:hover, .site-nav a[aria-current="true"] { border-color: var(--accent); color: inherit; }

  .menu-btn {
    display: none;
    inline-size: 2.75rem; block-size: 2.75rem;
    border: 1px solid var(--line); border-radius: var(--radius-s);
    background: var(--surface); cursor: pointer;
    place-items: center;
  }
  .menu-btn svg { inline-size: 1.4rem; block-size: 1.4rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

  /* Mobile: the nav is a native popover panel under the header. Opening and closing need no JS. */
  @media (width < 56rem) {
    .menu-btn { display: grid; }
    .site-nav[popover] {
      position: fixed; inset: var(--header-h) 0 auto 0;
      inline-size: 100%; margin: 0; padding: var(--space-m) var(--gutter) var(--space-l);
      border: 0; border-block-end: 1px solid var(--line);
      background: var(--surface); color: var(--text);
      box-shadow: var(--shadow);
    }
    .site-nav[popover]::backdrop { background: rgb(0 0 0 / 0.25); }
    .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
    .site-nav li + li { border-block-start: 1px solid var(--line); }
    .site-nav a { display: block; padding-block: 0.9rem; font-size: var(--step-1); border: 0; }
    .site-nav .nav-cta { margin-block-start: var(--space-m); border-block-start: 0; }
    .site-nav .nav-cta a { display: inline-flex; }
    .site-header .header-cta { display: none; }
  }
  @media (width >= 56rem) {
    .site-nav[popover] { display: block; position: static; inset: auto; inline-size: auto; margin: 0; padding: 0; border: 0; background: none; overflow: visible; }
    .site-nav .nav-cta { display: none; }
  }

  /* Buttons */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    min-block-size: 3rem; padding: 0.7rem 1.4rem;
    border-radius: 999px; border: 1px solid transparent;
    font-weight: 700; text-decoration: none; cursor: pointer;
    transition: transform 0.2s var(--ease), background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  }
  .btn:hover { transform: translateY(-1px); }
  .btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 20px -10px var(--accent); }
  .btn--primary:hover { color: var(--on-accent); background: color-mix(in oklab, var(--accent) 88%, black); }
  .btn--ghost { border-color: var(--line); background: var(--surface); }
  .btn--ghost:hover { color: inherit; border-color: var(--text); }
  .btn svg { inline-size: 1.1em; block-size: 1.1em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

  /* Hero */
  .hero { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4.5rem) var(--space-2xl); overflow: clip; position: relative; }
  .hero::before {
    content: ""; position: absolute; inset: auto -20% -40% auto;
    inline-size: 60vw; aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(closest-side, color-mix(in oklab, var(--green) 28%, transparent), transparent 70%);
    pointer-events: none;
  }
  .hero .wrap { position: relative; }
  .hero__copy { display: grid; gap: var(--space-m); }
  .h1-sub { display: block; white-space: nowrap; font-size: var(--step-2); font-weight: 500; color: var(--accent-2); letter-spacing: 0; margin-block-start: 0.35em; }
  .hero__lede { font-size: var(--step-1); color: var(--muted); line-height: 1.5; }
  .hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-s); margin-block-start: var(--space-xs); }
  .hero__art img { inline-size: min(100%, 36rem); margin-inline: auto; }

  .hero__contacts {
    display: flex; flex-wrap: wrap; gap: var(--space-s) var(--space-l);
    margin-block-start: var(--space-m); padding-block-start: var(--space-m);
    border-block-start: 1px solid var(--line);
    font-size: var(--step--1); color: var(--muted);
  }
  .hero__contacts a { text-decoration: none; font-weight: 600; color: var(--text); }
  .hero__contacts a:hover { color: var(--accent); }

  /* Cards */
  .card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: var(--space-m);
    display: grid; gap: var(--space-s); align-content: start;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
  }
  .card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in oklab, var(--accent-2) 50%, var(--line)); }
  .card p { color: var(--muted); font-size: var(--step--1); line-height: 1.55; }

  /* Numbered feature list */
  .feature-list { display: grid; gap: var(--space-m); }
  .feature { display: grid; grid-template-columns: auto 1fr; gap: var(--space-s) var(--space-m); align-items: start; }
  .feature__num {
    font-family: var(--font-serif); font-weight: 600; font-size: var(--step-1);
    color: var(--accent); inline-size: 2.5rem; block-size: 2.5rem; border-radius: 50%;
    display: grid; place-items: center;
    background: color-mix(in oklab, var(--accent) 12%, var(--surface));
  }
  .feature p { color: var(--muted); font-size: var(--step--1); }

  /* About */
  .about__body { display: grid; gap: var(--space-m); }
  .pull { font-family: var(--font-serif); font-size: var(--step-2); font-weight: 500; line-height: 1.35; max-inline-size: 30ch; }
  .pull::before { content: "\201C"; color: var(--accent); }
  .pull::after { content: "\201D"; color: var(--accent); }
  .signature { block-size: 4rem; inline-size: auto; opacity: 0.9; }

  /* Contact */
  .contact-grid { display: grid; gap: var(--space-l); }
  @media (width >= 56rem) { .contact-grid { grid-template-columns: 1fr 1fr; gap: var(--space-xl); } }

  .form { display: grid; gap: var(--space-s); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-m); }
  .field { display: grid; gap: 0.35rem; }
  .field label { font-weight: 600; font-size: var(--step--1); }
  .field input, .field textarea {
    inline-size: 100%; padding: 0.75rem 0.9rem;
    border: 1px solid var(--line); border-radius: var(--radius-s);
    background: var(--bg);
    transition: border-color 0.2s var(--ease);
  }
  .field input:focus, .field textarea:focus { border-color: var(--accent-2); outline: none; box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent-2) 30%, transparent); }
  .field textarea { min-block-size: 8rem; resize: vertical; }
  .form__note { font-size: var(--step--1); color: var(--muted); }
  .form__status { font-weight: 600; min-block-size: 1.5rem; }
  .hp { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
  .form button[disabled] { opacity: 0.6; cursor: progress; transform: none; }

  /* Footer */
  .site-footer { border-block-start: 1px solid var(--line); padding-block: var(--space-xl) var(--space-l); font-size: var(--step--1); color: var(--muted); }
  .site-footer .wrap { display: grid; gap: var(--space-m); }
  .site-footer ul { display: flex; flex-wrap: wrap; gap: var(--space-m); }
  .site-footer a { text-decoration: none; }
  .site-footer a:hover { text-decoration: underline; }
  .site-footer p { max-inline-size: 80ch; }
  .site-footer .brand img { block-size: 2rem; }
}

/* ---------- Utilities and motion ---------- */
@layer utilities {
  .muted { color: var(--muted); }

  @media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
      .reveal {
        animation: rise linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 35%;
      }
    }
    @keyframes rise {
      from { opacity: 0; translate: 0 1.5rem; }
      to   { opacity: 1; translate: 0 0; }
    }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
  }

  @media print {
    .site-header, .menu-btn, .hero__actions, .form, .skip-link { display: none !important; }
    body { background: #fff; color: #000; }
    a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
  }
}

/* ---------- Founder page and clients ---------- */
@layer components {

  .clients { display: grid; gap: var(--space-m); grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); align-items: center; }
  .clients li {
    display: grid; place-items: center; min-block-size: 6rem; padding: var(--space-s);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  }
  .clients img {
    max-block-size: 3.5rem; inline-size: auto;
    filter: grayscale(1); opacity: 0.75;
    transition: filter 0.25s var(--ease), opacity 0.25s var(--ease);
  }
  .clients li:hover img { filter: none; opacity: 1; }
}

/* ---------- Founder header with photo, client tiles with captions ---------- */
@layer components {

  .clients { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
  .clients li { gap: var(--space-s); grid-template-rows: 5rem auto; align-content: center; padding: var(--space-m) var(--space-s); }
  .clients img { max-block-size: 5rem; max-inline-size: 100%; inline-size: auto; filter: none; opacity: 1; }
   .clients span { font-size: var(--step--1); font-weight: 600; color: var(--muted); text-align: center; text-wrap: balance; }
}

/* ---------- Tiny paragraph headings on the founder page ---------- */

/* ---------- Compact client tiles: one row on desktop, two rows on phones ---------- */
@layer components {
  .clients { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-xs); align-items: stretch; }
  @media (width >= 56rem) { .clients { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-s); } }
  .clients li { min-block-size: 0; padding: var(--space-s) 0.5rem; grid-template-rows: 3.25rem auto; gap: 0.5rem; }
  .clients img { max-block-size: 3.25rem; }
  .clients span { font-size: 0.72rem; line-height: 1.3; }
  @media (width >= 56rem) { .clients span { font-size: 0.78rem; } }
}

/* ---------- Hero: equal columns, illustration matched to the text height ---------- */
@layer components {
  @media (width >= 56rem) {
    .hero .split { grid-template-columns: 1fr 1fr; align-items: stretch; }
    .hero__art { position: relative; min-block-size: 0; }
    .hero__art img {
      position: absolute; inset: 0;
      inline-size: 100%; block-size: 100%; max-inline-size: none; margin: 0;
      object-fit: contain; object-position: center;
    }
  }
}

/* ---------- Hero: shorter copy block, wider art column, art fills its column ---------- */
@layer components {
  .hero h1 { font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.5rem); }
  .hero .h1-sub { font-size: clamp(1.3rem, 1rem + 1.2vw, 1.8rem); }
  @media (width >= 56rem) {
    .hero .split { grid-template-columns: 0.9fr 1.1fr; gap: var(--space-l); }
  }
  @media (width >= 72rem) {
    .hero__art img { object-fit: cover; }
  }
}

/* ---------- All split sections: art column matches the text column height ---------- */
@layer components {
  @media (width >= 56rem) {
    .split { align-items: stretch; }
    .split__art { position: relative; min-block-size: 0; }
    .split__art img {
      position: absolute; inset: 0;
      inline-size: 100%; block-size: 100%; max-inline-size: none; margin: 0;
      object-fit: contain; object-position: center;
    }
  }
  @media (width >= 72rem) {
    .split__art img { object-fit: cover; }
  }
  /* Services and About: keep the text column from being too tall */
  #services .section__head h2, #about h2 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem); }
}

/* ---------- Keep text columns short enough for the art to fill without cropping ---------- */
@layer components {
  .hero h1 { font-size: clamp(2.1rem, 1.4rem + 2.4vw, 3rem); }
  .hero__contacts { margin-block-start: var(--space-l); }
  .pull { font-size: var(--step-1); }
  @media (width >= 56rem) {
    .split, .hero .split { grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
  }
  @media (width >= 72rem) {
    .feature-list { gap: var(--space-m); }
  }
}

@layer components {
  @media (width >= 56rem) { .hero__lede { font-size: var(--step-0); } }
}

/* ---------- Sector cards: photo tiles, six across on desktop ---------- */
@layer components {
  .sectors { display: grid; gap: var(--space-s); grid-template-columns: repeat(2, minmax(0, 1fr)); }
  @media (width >= 48rem) { .sectors { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  @media (width >= 72rem) { .sectors { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
  .sector {
    display: grid; grid-template-rows: auto 1fr; overflow: clip;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  }
  .sector:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
  .sector img { inline-size: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
  .sector__body { padding: 0.85rem 0.9rem 1rem; display: grid; gap: 0.35rem; align-content: start; }
  .sector h3 { font-size: 1rem; line-height: 1.25; }
  .sector p { font-size: 0.8rem; line-height: 1.45; color: var(--muted); }
}

/* ---------- Founder page: tighter header, visible button ---------- */

@layer components {
  #clients-title { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
}

@layer components {
  .section__head p { max-inline-size: none; }
}

@layer components {
  .section__head .eyebrow { color: var(--accent); font-size: var(--step--1); }
  .section__head { margin-block-end: var(--space-m); }
}

/* ---------- Section rhythm ---------- */
@layer components {
  .hero { padding-block: clamp(1.5rem, 1rem + 2vw, 3rem) var(--space-2xl); }
  .hero__contacts { margin-block-start: var(--space-m); padding-block-start: var(--space-s); }
  .section__head { margin-block-end: var(--space-s); }
  .section__head { gap: 0.5rem; }
  .site-footer { padding-block: var(--space-l) var(--space-m); }
}

/* ---------- About: quote and signature sit under the illustration ---------- */
@layer components {
  .about__aside { display: grid; gap: var(--space-m); align-content: start; justify-items: start; }
  .about__aside > img:first-child { inline-size: 100%; }
  @media (width >= 56rem) { #about .split { align-items: start; } }
}

/* ---------- Contact: align details with the form, drop italics and empty gap ---------- */
@layer components {
  .form__status:empty { display: none; }
  .form > div:has(> button) { margin-block-start: var(--space-xs); }
}

/* ---------- Footer: bigger logo, full-width legal text, stacked links on the right ---------- */
@layer components {
  .site-footer__grid { display: grid; gap: var(--space-l); align-items: start; }
  @media (width >= 48rem) { .site-footer__grid { grid-template-columns: minmax(0, 1fr) auto; } }
  .site-footer__main { display: grid; gap: var(--space-m); }
  .site-footer .brand img { block-size: 3rem; }
  .site-footer p { max-inline-size: none; }
  .site-footer__nav ul { display: grid; gap: 0.5rem; }
  @media (width >= 48rem) { .site-footer__nav ul { text-align: end; } }
  .site-footer__nav a { font-weight: 600; color: var(--text); }
}

@layer components {
  .pull { max-inline-size: none; }
}

/* ---------- Footer links on one line, separated by bars ---------- */
@layer components {
  .site-footer__nav ul { display: flex; flex-wrap: wrap; gap: 0; align-items: center; text-align: start; }
  .site-footer__nav li + li::before { content: "|"; color: var(--line); margin-inline: 0.75rem; }
  @media (width >= 48rem) { .site-footer__grid { align-items: start; } .site-footer__nav { padding-block-start: 0.75rem; } }
}

/* ---------- Footer links as the bottom strip ---------- */
@layer components {
  .site-footer__grid, .site-footer__grid { grid-template-columns: 1fr; gap: var(--space-m); }
  @media (width >= 48rem) { .site-footer__grid { grid-template-columns: 1fr; } .site-footer__nav { padding-block-start: 0; } }
  .site-footer__nav { border-block-start: 1px solid var(--line); padding-block-start: var(--space-s); }
  .site-footer__nav ul { justify-content: center; }
}

@layer components {
  .site-footer__main p:first-of-type { text-align: justify; text-wrap: wrap; }
}

/* ---------- Contact: form plus two detail columns ---------- */
@layer components {
  @media (width >= 56rem) {
    .contact-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--space-l); }
  }
}

/* ---------- Compact contact form ---------- */
@layer components {
  .form { gap: 0.85rem; padding: var(--space-m) var(--space-m) var(--space-m); }
  .field { gap: 0.3rem; }
  .field label { font-size: 0.85rem; }
  .field input, .field textarea { padding: 0.55rem 0.75rem; }
  .field textarea { min-block-size: 5.5rem; }
  .field--3 { display: grid; gap: 0.85rem; }
  @media (width >= 36rem) { .field--3 { grid-template-columns: 1fr 1fr 1fr; } }
  .form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-s) var(--space-m); margin-block-start: 0.25rem; }
  .form__actions .btn { min-block-size: 2.75rem; padding-block: 0.5rem; }
  .form__note { margin: 0; font-size: 0.8rem; }
}

@layer components {
  .form { gap: 0.7rem; padding: 1.25rem; }
  .field textarea { min-block-size: 4.75rem; }
}

/* ---------- Narrower contact form ---------- */
@layer components {
  @media (width >= 56rem) {
    .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr); gap: var(--space-xl); }
  }
  .form { container-type: inline-size; }
  @container (width < 34rem) {
    .field--3 { grid-template-columns: 1fr; }
  }
}

@layer components {
  @container (width < 34rem) {
    .field--3 { grid-template-columns: 1fr 1fr; }
    .field--3 > :last-child { grid-column: 1 / -1; }
  }
  @container (width < 22rem) {
    .field--3 { grid-template-columns: 1fr; }
    .field--3 > :last-child { grid-column: auto; }
  }
}

/* ---------- Contact details: three columns filling the right-hand side ---------- */

/* ---------- Contact: one-line form across the page, details row beneath ---------- */
@layer components {
  @media (width >= 56rem) {
    .contact-grid { grid-template-columns: 1fr; gap: var(--space-l); }
  }
  @media (width >= 64rem) {
    .form { grid-template-columns: 1fr 1fr 1fr 1.6fr auto; column-gap: var(--space-s); row-gap: 0.6rem; align-items: end; }
    .field--3, .form__actions { display: contents; }
    .field input, .field textarea { block-size: 2.75rem; min-block-size: 0; padding-block: 0; line-height: 2.75rem; }
    .field textarea { resize: none; overflow: hidden; white-space: nowrap; }
    .form__actions .btn { min-block-size: 2.75rem; }
    .form__note, .form__status { grid-column: 1 / -1; }
  }
}

/* ---------- Office address as a single line at the bottom ---------- */

/* ---------- Contact details: single lines with bar separators ---------- */
@layer components {
}

/* ---------- Footer office line ---------- */
@layer components {
  .site-footer__label { font-weight: 700; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
}

/* ---------- Footer: address, phones and email on one line ---------- */
@layer components {
  .site-footer__details { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0; color: var(--text); font-size: var(--step--1); }
  .site-footer__details > span { display: inline-flex; align-items: baseline; gap: 0.5rem; white-space: nowrap; }
  .site-footer__details > span + span::before { content: "|"; color: var(--line); margin-inline: 0.75rem; }
  .site-footer__details address { display: inline; font-style: normal; }
  .site-footer__details a { font-weight: 600; text-decoration: none; }
  .site-footer__details a:hover { text-decoration: underline; }
  .contact-grid { grid-template-columns: 1fr; }
}

@layer components {
  .site-footer__details { font-size: 0.85rem; }
  .site-footer__details .site-footer__label { font-size: 0.72rem; }
  .site-footer__details > span { gap: 0.4rem; }
  .site-footer__details > span + span::before { margin-inline: 0.55rem; }
}

@layer components {
  .site-footer__details .site-footer__label { font-weight: 700; color: var(--text); }
  .site-footer__details a, .site-footer__details span span:not(.site-footer__label) { font-weight: 400; }
}

@layer components {
  .site-footer__details, .site-footer__details .site-footer__label { font-size: var(--step--1); }
  .site-footer__details > span + span::before { margin-inline: 0.5rem; }
}

/* ---------- Footer details at full size: office line, then telephone and email ---------- */
@layer components {
  .site-footer__details { row-gap: 0.5rem; }
  .site-footer__details > span:first-child { flex-basis: 100%; }
  .site-footer__details > span:nth-child(2)::before { content: none; margin: 0; }
}

@layer components {
  .site-footer__details > span:first-child { flex-basis: auto; }
  .site-footer__details > span:nth-child(2)::before { content: "|"; margin-inline: 0.5rem; }
}

@layer components {
  .site-footer__details .site-footer__label { color: var(--accent-2); }
}

/* ---------- Credits page ---------- */
@layer components {
  .page-head { padding-block-end: 0; }
  .page-head h1 { font-size: var(--step-3); margin-block-start: 0.25rem; }
  .page-head__lede { color: var(--muted); font-size: var(--step-1); margin-block-start: var(--space-s); }
  .credits-list { display: grid; gap: var(--space-s); margin-block-start: var(--space-m); max-inline-size: 80ch; }
  .credits-list li { padding-block-end: var(--space-s); border-block-end: 1px solid var(--line); line-height: 1.55; }
  .credits-list strong { display: block; font-weight: 700; }
  .credits-list a { color: var(--accent); }
  .credits-note { margin-block-start: var(--space-m); color: var(--muted); font-size: var(--step--1); }
}
