/* MILOS Development: homepage styles
   Responsive reference build of the approved homepage (change requests 1 to 24).

   Mobile first. The approved designs are the 390 px phone and the 1440 px desktop;
   everything in between follows these breakpoints:
     560 px   form fields and service lists go to two columns
     640 px   tablet: Ask MILOS button in the header, buttons stop being full width,
              gallery shows the slider and project card side by side
     768 px   Meet the founder side by side, Method steps in a 2 x 2 grid, footer in two columns
     960 px   desktop layouts: split hero (52 / 48), two-column section headings, desktop type sizes
     1200 px  services in three columns, Method steps in one row of four
     1280 px  full menu in the header, hero at the approved 47 / 53 split, gallery with the 2 x 2 project tiles

   Colours, type and spacing follow the brand tokens (tokens.css in the brand kit). */

/* ---------- Fonts (Manrope, self-hosted, Latin subset, SIL Open Font License) ---------- */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/manrope-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/manrope-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/manrope-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/manrope-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  --primary: #153F59;        /* Primary Blue */
  --primary-dark: #0F2E42;   /* footer ground, button hover */
  --ocean: #4E8298;          /* Ocean Blue: large text and accents only */
  --ocean-text: #3E6D82;     /* Ocean for small labels (AA on ivory and white) */
  --gold: #B59A62;           /* Gold: lines, dots, icons. Never small text */
  --sand: #D9CDBB;
  --sand-2: #E9E1D2;
  --sand-3: #CFC1A9;
  --ivory: #F7F5F0;
  --white: #FFFFFF;
  --charcoal: #242424;
  --grey: #A7A49D;
  --muted: #5F5C57;
  --caption: #6F6B64;
  --line: #E7E1D5;
  --line-2: #E2DBCD;
  --line-3: #EFEAE0;
  --placeholder: #8A867F;    /* a little darker than Grey so placeholder text stays readable */
  --error: #9B2C2C;          /* form errors only */

  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);

  --max: 1280px;                                          /* content width at 1440 px and wider */
  --gutter: clamp(20px, calc(5.714vw - 2.29px), 80px);    /* 20 px on a 390 px phone, 80 px at 1440 px */
  --section-y: clamp(56px, calc(6.1vw + 32.2px), 120px);  /* 56 px on phones, 120 px at 1440 px */
  --header-h: 64px;
}
@media (min-width: 960px) {
  :root { --header-h: 78px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html.menu-open { overflow: hidden; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

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

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  padding: 12px 18px; border-radius: 999px;
  background: var(--primary); color: var(--white);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--white); }

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

.section { padding-block: var(--section-y); }
.section--white { background: var(--white); }
.section--sand { background: var(--sand-2); }

/* ---------- Shared type ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; line-height: 1; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 600; color: var(--ocean-text);
}
.eyebrow::before {
  content: ""; flex: none; width: 28px; height: 1px; background: var(--gold);
}
.eyebrow--primary { color: var(--primary); }
.eyebrow--light { color: var(--sand); }

.h2 {
  margin-top: 16px;
  font-size: clamp(32px, calc(26.8px + 1.33vw), 46px);
  line-height: 1.12; letter-spacing: -.015em; font-weight: 500;
  color: var(--primary);
  text-wrap: balance;
}
.lede {
  font-size: 17px; line-height: 1.65; color: var(--muted);
}

.section-head__intro { margin-top: 20px; }

@media (min-width: 960px) {
  .h2 { margin-top: 20px; line-height: 1.1; letter-spacing: -.02em; }
  .lede { font-size: 18px; line-height: 1.7; }
  .section-head {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(48px, 5.6vw, 80px); align-items: end;
  }
  .section-head__intro { margin-top: 0; }
}

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px;
  border: 1px solid transparent; border-radius: 999px;
  font-size: 16px; line-height: 1.2; font-weight: 600; text-align: center; text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn svg { flex: none; width: 18px; height: 18px; }
.btn--primary { background: var(--primary); color: var(--white); }
.btn--primary:hover { background: var(--primary-dark); color: var(--white); }
.btn--ivory { background: var(--ivory); color: var(--primary); }
.btn--ivory:hover { background: var(--white); color: var(--primary); }
.btn--outline { border-color: var(--primary); background: transparent; color: var(--primary); }
.btn--outline:hover { background: var(--primary); color: var(--white); }
@media (min-width: 960px) {
  .btn { min-height: 54px; padding: 0 30px; gap: 12px; }
}

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-size: 15px; font-weight: 600; color: var(--primary); text-decoration: none;
}
.link-arrow svg { flex: none; width: 18px; height: 18px; transition: transform .2s var(--ease); }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
}
.site-header__bar {
  display: flex; align-items: center; gap: 8px;
  height: calc(var(--header-h) - 1px); /* plus the 1 px line = 64 px on phones, 78 px on desktop */
}
.site-header__logo { flex: none; display: block; margin-right: auto; padding-block: 11px; } /* 44 px tall tap area */
.site-header__logo img { width: 230px; height: auto; }

.menu-toggle {
  order: 3;
  flex: none; width: 44px; height: 44px; margin-right: -10px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 12px; background: transparent; color: var(--primary); cursor: pointer;
}
.menu-toggle svg { width: 24px; height: 24px; }
.menu-toggle .icon-close { display: none; }
.site-header.is-open .menu-toggle .icon-open { display: none; }
.site-header.is-open .menu-toggle .icon-close { display: block; }

.site-header__actions { order: 2; display: none; align-items: center; gap: 20px; }
.site-header__phone {
  display: none; align-items: center; min-height: 44px;
  font-size: 14px; font-weight: 600; color: var(--primary); text-decoration: none; white-space: nowrap;
}
.site-header__phone:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn--header { min-height: 44px; padding: 0 22px; font-size: 14px; white-space: nowrap; }

/* Menu panel (below 1280 px) */
.site-menu { display: none; }
.site-header.is-open .site-menu {
  display: block;
  position: absolute; top: 100%; left: 0; right: 0;
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 40px rgba(21, 63, 89, .12);
}
.site-menu__inner { padding: 4px 0 28px; }
.site-nav a {
  display: flex; align-items: center; min-height: 56px;
  border-bottom: 1px solid var(--line);
  font-size: 18px; font-weight: 500; color: var(--charcoal); text-decoration: none;
}
.site-nav a:hover { color: var(--primary); }
.site-menu__contact { display: grid; gap: 8px; margin-top: 24px; }
.site-menu__contact .btn { width: 100%; }
.site-menu__call {
  display: flex; align-items: center; justify-content: center; min-height: 48px;
  font-size: 16px; font-weight: 600; color: var(--primary); text-decoration: none;
}

@media (min-width: 640px) {
  .site-header__bar { gap: 16px; }
  .site-header__logo img { width: 282px; }
  .site-header__actions { display: flex; }
  .site-menu__contact { margin-top: 12px; }
  .site-menu__contact .btn { display: none; }   /* Ask MILOS is already in the bar */
  .site-menu__call { justify-content: flex-start; }
}
@media (min-width: 800px) {
  .site-header__phone { display: inline-flex; }
  .site-menu__contact { display: none; }        /* and so is the phone number */
}
@media (min-width: 1280px) {
  .site-header__bar { gap: 32px; justify-content: space-between; }
  .site-header__logo { margin-right: 0; }
  .menu-toggle { display: none; }
  .site-menu, .site-header.is-open .site-menu {
    display: block; position: static; order: 1;
    max-height: none; overflow: visible;
    background: none; border: 0; box-shadow: none;
  }
  .site-menu__inner { width: auto; padding: 0; }
  .site-nav ul { display: flex; align-items: center; gap: clamp(20px, calc(5vw - 44px), 28px); }
  .site-nav a {
    min-height: 44px; border: 0;
    font-size: 14px; font-weight: 500; white-space: nowrap;
  }
  .site-nav a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 6px; }
}

/* ---------- Hero ---------- */
.hero { display: flex; flex-direction: column; background: var(--ivory); }
.hero__media {
  order: -1; position: relative;
  height: clamp(288px, 60vw, 520px);
  background: var(--sand-2);
}
.hero__media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 10%;
}
.hero__content {
  display: flex; flex-direction: column;
  padding: 24px var(--gutter) 52px;
}
.hero__eyebrow {
  display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; row-gap: 8px;
  font-size: 12px; line-height: 1.4; text-transform: uppercase; font-weight: 600; color: var(--ocean-text);
}
.hero__eyebrow::before { content: ""; flex: none; width: 28px; height: 1px; background: var(--gold); }
.hero__name { font-weight: 700; line-height: 1; color: var(--primary); letter-spacing: .18em; }
.hero__divider { display: none; width: 1px; height: 14px; background: var(--gold); }
.hero__role { flex-basis: 100%; letter-spacing: .1em; }
.hero__title {
  margin-top: 16px;
  font-size: clamp(32px, calc(22px + 2.6vw), 44px);
  line-height: 1.1; letter-spacing: -.02em; font-weight: 500;
  color: var(--primary);
  text-wrap: balance;
}
.hero__title span { display: block; }
.hero__title .accent { color: var(--ocean); }
.hero__cta { order: 1; margin-top: 18px; }
.hero__cta .btn { width: 100%; min-height: 56px; font-size: 17px; }
.hero__note {
  margin-top: 12px;
  font-size: 14px; line-height: 1.5; color: var(--caption); text-align: center; text-wrap: balance;
}
.hero__text { order: 2; font-size: 17px; line-height: 1.65; color: var(--muted); }
.hero__text--first { margin-top: 28px; }
.hero__text + .hero__text { margin-top: 14px; }
.hero__lead {
  order: 2; margin-top: 16px;
  font-size: 18px; line-height: 1.5; font-weight: 500; color: var(--primary);
}
.hero__lead span { display: block; }
.hero__points {
  order: 3; margin-top: 28px; padding-top: 24px;
  border-top: 1px solid var(--line-2);
  display: grid; gap: 18px 24px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); /* side by side when there is room */
}
.hero__points li { display: flex; align-items: center; gap: 14px; font-size: 16px; line-height: 1.45; color: var(--muted); }
.hero__points strong { display: block; font-weight: 600; color: var(--primary); }
.tick {
  flex: none; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--sand); border-radius: 999px;
}
.tick svg { width: 16px; height: 16px; }

@media (min-width: 640px) {
  .hero__content { padding-top: 40px; padding-bottom: 72px; }
  .hero__content > * { max-width: 640px; }
  .hero__cta .btn { width: auto; min-height: 58px; padding: 0 34px 0 36px; }
  .hero__note { font-size: 15px; text-align: left; }
}
@media (min-width: 960px) {
  .hero {
    container-type: inline-size;
    display: grid; grid-template-columns: minmax(0, 52fr) minmax(0, 48fr);
  }
  .hero__media { order: 0; grid-column: 2; grid-row: 1; height: auto; }
  .hero__media img { object-position: 50% 0%; }
  .hero__content {
    grid-column: 1; grid-row: 1;
    padding: 64px clamp(40px, 4.44vw, 64px) 80px var(--gutter);
    /* line the text up with the logo, however wide the screen */
    padding-left: max(var(--gutter), calc((100cqw - var(--max)) / 2));
  }
  .hero__content > * { order: 0; max-width: none; }
  .hero__eyebrow { letter-spacing: .16em; }
  .hero__name, .hero__role { letter-spacing: .16em; }
  .hero__divider { display: block; }
  .hero__role { flex-basis: auto; }
  .hero__title {
    margin-top: 22px;
    font-size: clamp(38px, 3.75vw, 54px);
    line-height: 1.06; letter-spacing: -.025em;
  }
  .hero__text--first { margin-top: 28px; }
  .hero__lead { margin-top: 18px; font-size: 19px; }
  .hero__cta { margin-top: 34px; }
  .hero__cta .btn { min-height: 62px; }
  .hero__note { margin-top: 14px; }
  .hero__points { margin-top: 36px; padding-top: 28px; }
  .tick { width: 36px; height: 36px; }
}
@media (min-width: 1280px) {
  .hero { grid-template-columns: minmax(0, 47fr) minmax(0, 53fr); } /* the approved 47 / 53 split */
}

/* ---------- Meet the founder ---------- */
.founder__grid { display: grid; gap: 36px; }
.founder__photo { max-width: 480px; }
.founder__photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%;
  border-radius: 20px; background: var(--sand-2);
}
.founder__text { font-size: 17px; line-height: 1.65; color: var(--muted); }
.h2 + .founder__text { margin-top: 20px; }
.founder__text + .founder__text { margin-top: 18px; }
.founder__sign { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.founder__name { font-size: 16px; line-height: 1.4; font-weight: 600; color: var(--primary); }
.founder__role { margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--caption); }

@media (min-width: 768px) {
  .founder__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(40px, 6.67vw, 96px); align-items: start;
  }
  .founder__photo { max-width: none; }
}
@media (min-width: 960px) {
  .founder__grid { align-items: center; }
  .founder__photo img { border-radius: 24px; }
  .founder__text { max-width: 620px; font-size: 18px; line-height: 1.7; }
  .h2 + .founder__text { margin-top: 28px; }
  .founder__text + .founder__text { margin-top: 20px; }
  .founder__sign { max-width: 620px; margin-top: 36px; padding-top: 24px; }
  .founder__name { font-size: 17px; }
}

/* ---------- What we can do ---------- */
.tiers { margin-top: 32px; display: grid; gap: 16px; }
.tier {
  padding: 24px 22px 8px;
  background: var(--white); border: 1px solid var(--line); border-radius: 20px;
}
.tier__num { font-size: 13px; line-height: 1; letter-spacing: .08em; font-weight: 600; color: var(--ocean-text); }
.tier__title { margin-top: 12px; font-size: 20px; line-height: 1.3; font-weight: 600; color: var(--primary); }
.tier__line { margin: 8px 0 14px; font-size: 15.5px; line-height: 1.6; color: var(--muted); }
.tier__list li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--line-3);
  font-size: 16px; line-height: 1.4; color: var(--charcoal);
}
.tier__list li::before {
  content: ""; flex: none; width: 6px; height: 6px; margin-top: 8px;
  border-radius: 999px; background: var(--gold);
}
@media (min-width: 560px) {
  .tier__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; align-content: start; }
}
@media (min-width: 960px) {
  .tiers { margin-top: 64px; gap: 24px; }
  .tier {
    padding: 40px 40px 28px; border-radius: 24px;
    display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 3.9vw, 56px);
  }
  .tier__title { margin-top: 14px; font-size: 26px; line-height: 1.25; letter-spacing: -.01em; }
  .tier__line { margin: 12px 0 0; font-size: 16px; line-height: 1.65; }
}
@media (min-width: 1200px) {
  .tier__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Project transformations ---------- */
.gallery { margin-top: 28px; display: grid; gap: 16px; }

/* before-and-after slider */
.ba {
  --pos: 50%;
  position: relative; overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 20px; background: var(--sand-2);
  touch-action: pan-y;
  -webkit-user-select: none; user-select: none;
  cursor: ew-resize;
}
.ba__pair, .ba__img, .ba__img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.ba__img img { object-fit: cover; object-position: 50% 50%; }
.ba__img--before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__tag {
  position: absolute; top: 14px; z-index: 2;
  padding: 7px 13px; border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  font-size: 12px; line-height: 1; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
  color: var(--primary);
  pointer-events: none;
  transition: opacity .2s var(--ease);
}
.ba__tag--before { left: 14px; }
.ba__tag--after { right: 14px; }
.ba.is-start .ba__tag--before, .ba.is-end .ba__tag--after { opacity: 0; }
.ba__line {
  position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 2;
  width: 2px; margin-left: -1px; background: var(--white);
  pointer-events: none;
}
.ba__handle {
  position: absolute; top: 50%; left: var(--pos); z-index: 3;
  width: 48px; height: 48px; margin: -24px 0 0 -24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--white);
  box-shadow: 0 6px 18px rgba(21, 63, 89, .25);
  cursor: grab;
}
.ba__handle svg { width: 20px; height: 20px; }
.ba__handle:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; box-shadow: 0 0 0 6px var(--primary), 0 6px 18px rgba(21, 63, 89, .25); }
.ba.is-dragging, .ba.is-dragging .ba__handle { cursor: grabbing; }

/* project card: every story sits in the same cell, so the card keeps the height of the
   longest one and nothing below it jumps when a different project is chosen */
.story-card {
  display: grid;
  padding: 24px 22px;
  background: var(--ivory); border: 1px solid var(--line); border-radius: 20px;
}
.story { grid-area: 1 / 1; }
.story:not(.is-active) { visibility: hidden; }
.story__label { font-size: 12px; line-height: 1.4; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--ocean-text); }
.story__title { margin-top: 10px; font-size: 22px; line-height: 1.25; font-weight: 600; color: var(--primary); text-wrap: balance; }
.story__text { margin-top: 14px; font-size: 16px; line-height: 1.65; color: var(--muted); }

/* project tiles: phone = four small thumbnails captioned "Project 1" to "Project 4" */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tile {
  display: block; width: 100%; padding: 0; margin: 0;
  border: 0; background: none; text-align: left; cursor: pointer;
  border-radius: 12px;
}
.tile__img {
  position: relative; display: block; height: 72px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 12px; background: var(--sand-2);
}
.tile__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile.is-active .tile__img { border: 2px solid var(--primary); }
.tile:hover:not(.is-active) .tile__img { border-color: var(--sand-3); }
.tile__text { display: block; margin-top: 6px; }
.tile__title { display: block; font-size: 13px; line-height: 1.4; color: var(--caption); }
.tile.is-active .tile__title { color: var(--primary); font-weight: 600; }
.tile__label {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

@media (min-width: 640px) {
  .gallery { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ba { grid-column: 1; grid-row: 1; aspect-ratio: auto; }
  .ba::before { content: ""; display: block; padding-top: 100%; } /* at least square, taller if the card is */
  .gallery__side { display: contents; }
  .story-card { grid-column: 2; grid-row: 1; }
  .tiles { grid-column: 1 / -1; grid-row: 2; gap: 16px; }
  .tile {
    display: flex; flex-direction: column; overflow: hidden;
    border: 1px solid var(--line); border-radius: 16px; background: var(--white);
  }
  .tile.is-active { border: 2px solid var(--primary); }
  .tile:hover:not(.is-active) { border-color: var(--sand-3); }
  .tile__img, .tile.is-active .tile__img { height: auto; aspect-ratio: 4 / 3; border: 0; border-radius: 0; }
  .tile__text { margin: 0; padding: 10px 14px 12px; }
  .tile__title, .tile.is-active .tile__title { font-size: 14px; font-weight: 600; color: var(--primary); }
  .tile__label {
    position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal;
    display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--caption);
  }
}
@media (min-width: 960px) {
  .gallery { margin-top: 56px; }
  .ba { border-radius: 24px; }
  .ba__tag { top: 20px; }
  .ba__tag--before { left: 20px; }
  .ba__tag--after { right: 20px; }
  .ba__handle { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
  .ba__handle svg { width: 22px; height: 22px; }
  .story-card { padding: 28px 32px 30px; border-radius: 24px; }
  .story__title { font-size: 24px; }
  .story__text { font-size: 17px; }
}
@media (min-width: 1280px) {
  .gallery { gap: 24px; }
  .gallery__side { display: flex; flex-direction: column; gap: 16px; grid-column: 2; grid-row: 1; }
  .story-card { grid-column: auto; grid-row: auto; }
  .tiles {
    flex: 1; grid-column: auto; grid-row: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr));
  }
  .tile__img, .tile.is-active .tile__img { aspect-ratio: auto; flex: 1 1 auto; height: 0; min-height: 80px; }
}

/* ---------- Thinking bigger ---------- */
.bigger { background: var(--primary); color: var(--ivory); }
.bigger .h2 { color: var(--ivory); }
.bigger__text { font-size: 17px; line-height: 1.65; color: rgba(247, 245, 240, .84); }
.bigger .h2 + .bigger__text { margin-top: 20px; }
.bigger__text + .bigger__text { margin-top: 14px; }
.bigger__figure { margin-top: 32px; }
.bigger__figure svg { width: 100%; max-width: 600px; height: auto; }
.bigger__figure figcaption {
  margin-top: 12px;
  font-size: 12px; line-height: 1; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--sand);
}
.bigger__cta { margin-top: 32px; }
.bigger__cta .btn { width: 100%; }
.bigger :focus-visible { outline-color: var(--ivory); }

@media (min-width: 640px) {
  .bigger__cta .btn { width: auto; }
}
@media (min-width: 960px) {
  .bigger__grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: 1fr auto auto 1fr;
    grid-template-areas: ". figure" "copy figure" "cta figure" ". figure";
    column-gap: clamp(48px, 5.6vw, 80px);
  }
  .bigger__copy { grid-area: copy; }
  .bigger__text { font-size: 18px; line-height: 1.7; }
  .bigger .h2 + .bigger__text { margin-top: 28px; }
  .bigger__text + .bigger__text { margin-top: 18px; }
  .bigger__figure { grid-area: figure; align-self: center; margin: 0; }
  .bigger__figure svg { max-width: 720px; }
  .bigger__figure figcaption { margin-top: 16px; }
  .bigger__cta { grid-area: cta; margin-top: 36px; }
}

/* ---------- Why MILOS ---------- */
.why__photo { margin-top: 28px; }
.why__photo img {
  width: 100%; height: clamp(250px, 36vw, 520px);
  object-fit: cover; object-position: 55% 50%;
  border-radius: 20px; background: var(--sand-2);
}
.why__list { margin-top: 32px; border-top: 1px solid var(--line-2); }
.why__item { padding: 24px 0; border-bottom: 1px solid var(--line-2); }
.why__num { font-size: 13px; line-height: 1; letter-spacing: .08em; font-weight: 600; color: var(--ocean-text); }
.why__title { margin-top: 12px; font-size: 20px; line-height: 1.3; font-weight: 600; color: var(--primary); }
.why__body p { margin-top: 10px; font-size: 16px; line-height: 1.65; color: var(--muted); }
.why__body p + p { margin-top: 12px; }

@media (min-width: 960px) {
  .why__photo { margin-top: 56px; }
  .why__photo img { border-radius: 24px; object-position: 50% 45%; }
  .why__list { margin-top: 72px; }
  .why__item {
    display: grid; grid-template-columns: 72px minmax(0, 5fr) minmax(0, 7fr); gap: 40px;
    padding: 36px 0;
  }
  .why__num { margin-top: 8px; font-size: 14px; }
  .why__title { margin-top: 0; font-size: 24px; letter-spacing: -.01em; font-weight: 500; }
  .why__body p { margin-top: 0; font-size: 17px; line-height: 1.7; }
  .why__body p + p { margin-top: 14px; }
}

/* ---------- The MILOS Method ---------- */
.steps { margin-top: 36px; }
.step { position: relative; padding: 0 0 32px 40px; }
.step:last-child { padding-bottom: 4px; }
.step::before {
  content: ""; position: absolute; left: 11px; top: 30px; bottom: 0;
  width: 1px; background: var(--sand-3);
}
.step:last-child::before { display: none; }
.step__marker {
  position: absolute; left: 0; top: 2px;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--gold); border-radius: 999px; background: var(--ivory);
}
.step__marker::after { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--gold); }
.step__label { font-size: 12px; line-height: 28px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--primary); }
.step__title { margin-top: 4px; font-size: 20px; line-height: 1.3; font-weight: 600; color: var(--primary); }
.step__text { margin-top: 8px; font-size: 16px; line-height: 1.65; color: var(--muted); }

.method__cta { margin-top: 32px; }
.method__cta .btn { width: 100%; }
.method__cta p { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--muted); text-align: center; }

@media (min-width: 640px) {
  .method__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
  .method__cta .btn { width: auto; }
  .method__cta p { margin-top: 0; font-size: 15px; text-align: left; }
}
@media (min-width: 768px) {
  .steps {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px; row-gap: 48px; margin-top: 56px;
  }
  .step, .step:last-child { padding: 0; }
  .step::before { left: 38px; right: -26px; top: 12px; bottom: auto; width: auto; height: 1px; }
  .step:nth-child(2n)::before { display: none; }
  .step__marker { position: relative; top: 0; }
  .step__label { margin-top: 28px; line-height: 1; }
  .step__title { margin-top: 14px; font-size: 22px; }
  .step__text { margin-top: 12px; line-height: 1.7; }
}
@media (min-width: 960px) {
  .method__cta { margin-top: 64px; }
}
@media (min-width: 1200px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 0; margin-top: 72px; }
  .step:nth-child(2n)::before { display: block; }
  .step:last-child::before { display: none; }
}

/* ---------- What homeowners say ---------- */
.reviews { padding-block: clamp(48px, calc(4.57vw + 30.2px), 96px); }
.reviews__card {
  padding: 32px 24px;
  background: var(--ivory); border: 1px solid var(--line); border-radius: 24px;
}
.reviews__card .h2 {
  font-size: clamp(26px, calc(20.06px + 1.524vw), 42px);
  line-height: 1.18; letter-spacing: -.01em;
}
.reviews__quote { margin-top: 24px; width: 32px; height: 25px; }
.reviews__text { margin-top: 18px; font-size: 16px; line-height: 1.65; color: var(--muted); }
.reviews__text + .reviews__text { margin-top: 12px; }
.reviews .link-arrow { margin-top: 12px; }

@media (min-width: 640px) {
  .reviews__card { padding: 48px; }
}
@media (min-width: 960px) {
  .reviews__card {
    padding: 64px; border-radius: 28px;
    display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: clamp(48px, 5vw, 72px); align-items: center;
  }
  .reviews__card .h2 { line-height: 1.12; letter-spacing: -.02em; }
  .reviews__quote { margin-top: 0; width: 40px; height: 31px; }
  .reviews__text { margin-top: 24px; font-size: 18px; line-height: 1.7; }
  .reviews__text + .reviews__text { margin-top: 16px; }
  .reviews .link-arrow { margin-top: 20px; }
}

/* ---------- Before We Get Started (FAQ) ---------- */
.faq__intro .h2 { font-size: clamp(30px, calc(25.5px + 1.14vw), 42px); line-height: 1.15; }
.faq__intro .lede { margin-top: 20px; }
.faq__intro .btn { margin-top: 24px; }
.faq__list { margin-top: 36px; border-top: 1px solid var(--line-2); }
.faq__item { border-bottom: 1px solid var(--line-2); }
.faq__q { font-size: 18px; line-height: 1.35; font-weight: 600; color: var(--primary); }
.faq__toggle {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  width: 100%; padding: 22px 0;
  border: 0; background: none; text-align: left;
  font: inherit; color: inherit; letter-spacing: inherit;
  cursor: pointer;
}
.faq__icon { flex: none; width: 20px; height: 20px; margin-top: 2px; }
.faq__icon .bar-v { transform-origin: 12px 12px; transition: transform .2s var(--ease); }
.faq__toggle[aria-expanded="true"] .faq__icon .bar-v { transform: scaleY(0); }
.faq__a { margin-top: -12px; padding-bottom: 22px; }
.faq__a p { font-size: 16px; line-height: 1.65; color: var(--muted); }

@media (min-width: 960px) {
  .faq__grid {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(48px, 6.67vw, 96px); align-items: start;
  }
  .faq__intro .h2 { line-height: 1.12; letter-spacing: -.02em; }
  .faq__intro .lede { margin-top: 24px; }
  .faq__intro .btn { margin-top: 32px; }
  .faq__list { margin-top: 0; }
  .faq__q { font-size: 22px; font-weight: 500; letter-spacing: -.005em; }
  .faq__toggle { gap: 24px; padding: 28px 0; }
  .faq__icon { width: 22px; height: 22px; margin-top: 4px; }
  .faq__a { margin-top: -16px; padding-bottom: 28px; }
  .faq__a p { font-size: 17px; line-height: 1.7; }
}

/* ---------- Let's talk about your project ---------- */
.ask__grid { display: grid; gap: 28px; }
.ask__intro .lede { margin-top: 20px; }
.ask__contact { margin-top: 24px; }
.ask__label { display: none; }
.ask__phone {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 24px;
  border: 1px solid var(--primary); border-radius: 999px;
  font-size: 17px; font-weight: 600; color: var(--primary); text-decoration: none;
}
.ask__phone svg { flex: none; width: 20px; height: 20px; stroke: var(--primary); }
.ask__phone:hover { background: rgba(21, 63, 89, .06); }
.ask__email { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--caption); text-align: center; }
.ask__email a { font-weight: 600; color: var(--primary); text-underline-offset: 3px; }
.only-wide { display: none; }

@media (min-width: 640px) {
  .ask__phone { display: inline-flex; padding: 0 28px; }
  .ask__email { text-align: left; }
}
@media (min-width: 960px) {
  .ask__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(48px, 5.6vw, 80px); align-items: start;
  }
  .ask__intro .lede { margin-top: 28px; }
  .ask__contact { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
  .ask__label {
    display: block;
    font-size: 12px; line-height: 1; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--ocean-text);
  }
  .ask__phone {
    margin-top: 14px; min-height: 0; padding: 0; gap: 14px;
    border: 0; border-radius: 0;
    font-size: 34px; line-height: 1.15; letter-spacing: -.01em; font-weight: 500;
  }
  .ask__phone:hover { background: none; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
  .ask__phone svg { width: 28px; height: 28px; stroke: var(--gold); }
  .ask__phone-prefix { display: none; }
  .ask__email { font-size: 16px; line-height: 1.6; color: var(--muted); }
  .only-wide { display: inline; }
  .only-narrow { display: none; }
}

/* form */
.enquiry {
  position: relative;
  padding: 24px 20px;
  background: var(--ivory); border: 1px solid var(--line); border-radius: 20px;
}
.enquiry__fields { display: grid; gap: 16px; }
.field label { display: block; font-size: 14px; line-height: 1.4; font-weight: 600; color: var(--charcoal); }
.field .optional { font-weight: 400; color: var(--caption); }
.field--full { grid-column: 1 / -1; }
.input {
  display: block; width: 100%; height: 52px; margin-top: 8px; padding: 0 16px;
  background: var(--white); border: 1px solid var(--sand); border-radius: 12px;
  font-size: 16px; color: var(--charcoal);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.input::placeholder { color: var(--placeholder); opacity: 1; }
.input:hover { border-color: var(--sand-3); }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(78, 130, 152, .28); }
.input:-moz-ui-invalid { box-shadow: none; }
textarea.input { height: 116px; min-height: 116px; padding: 14px 16px; line-height: 1.5; resize: vertical; }
select.input {
  -webkit-appearance: none; appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235F5C57' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 18px 18px;
  cursor: pointer;
}
select.input:invalid { color: var(--placeholder); }
select.input option { color: var(--charcoal); }
.input[aria-invalid="true"] { border-color: var(--error); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(155, 44, 44, .18); }
.field__error { margin-top: 6px; font-size: 14px; line-height: 1.4; font-weight: 500; color: var(--error); }

.enquiry__submit { margin-top: 24px; }
.enquiry__submit .btn { width: 100%; min-height: 56px; }
.enquiry__submit .btn[disabled] { opacity: .7; cursor: progress; }
.enquiry__submit p { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--caption); text-align: center; }
.enquiry__privacy { margin-top: 16px; font-size: 13px; line-height: 1.5; color: var(--caption); }
.enquiry__problem {
  margin-top: 16px; padding: 12px 14px;
  border: 1px solid rgba(155, 44, 44, .3); border-radius: 12px; background: var(--white);
  font-size: 15px; line-height: 1.5; color: var(--error);
}
.enquiry__problem a { color: inherit; font-weight: 600; }
.enquiry__done:focus { outline: none; }
.enquiry__done h3 { font-size: 24px; line-height: 1.25; font-weight: 600; color: var(--primary); }
.enquiry__done p { margin-top: 10px; font-size: 17px; line-height: 1.65; color: var(--muted); }

/* spam trap: hidden from people, filled in by bots */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

@media (min-width: 560px) {
  .enquiry { padding: 32px; }
  .enquiry__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (min-width: 640px) {
  .enquiry__submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
  .enquiry__submit .btn { width: auto; padding: 0 30px 0 32px; }
  .enquiry__submit p { margin-top: 0; font-size: 15px; text-align: left; }
}
@media (min-width: 960px) {
  .enquiry { padding: 40px; border-radius: 24px; }
  .enquiry__submit { margin-top: 28px; }
  .enquiry__privacy { margin-top: 20px; }
}

/* ---------- Footer ---------- */
.site-footer { padding: 44px 0 40px; background: var(--primary-dark); color: var(--ivory); }
.site-footer :focus-visible { outline-color: var(--ivory); }
.site-footer__logo { width: 200px; height: auto; margin-left: -10px; }
.site-footer__tagline { margin-top: 20px; font-size: 16px; line-height: 1.6; color: var(--ivory); }
.site-footer__heading {
  margin-top: 32px;
  font-size: 12px; line-height: 1; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--sand);
}
.site-footer__links { margin-top: 10px; }
.site-footer__links a {
  display: flex; align-items: center; min-height: 44px;
  font-size: 16px; color: var(--ivory); text-decoration: none;
}
.site-footer__links a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.site-footer__legal {
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid rgba(247, 245, 240, .14);
  font-size: 13px; line-height: 1.6; color: var(--grey);
}
@media (min-width: 768px) {
  .site-footer__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 48px; }
  .site-footer__contact { min-width: 240px; }
  .site-footer__heading { margin-top: 0; }
}
@media (min-width: 960px) {
  .site-footer { padding: 72px 0 56px; }
  .site-footer__logo { width: 240px; margin-left: -12px; }
  .site-footer__tagline { margin-top: 24px; font-size: 17px; }
  .site-footer__contact { min-width: 280px; }
  .site-footer__links { margin-top: 20px; display: grid; gap: 12px; }
  .site-footer__links a { display: inline-flex; min-height: 0; line-height: 1.5; }
  .site-footer__legal { margin-top: 48px; padding-top: 24px; font-size: 14px; }
}

/* ---------- Subtle motion: sections ease in as they scroll into view ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready [data-reveal] {
    opacity: 0; transform: translateY(18px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
  }
  .reveal-ready [data-reveal].is-visible { opacity: 1; transform: none; }
}

/* Visitors who ask for less motion get no transitions or smooth scrolling */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
