/* Northern Global: design system and home page.
   Palette comes from the logo (navy #003366, silver #c0c0c0) plus one wood tone
   used only for the generation rings and small accents. */

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 300 600;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/assets/fonts/hanken-grotesk-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --navy: #003366;
  --ink: #061a33;
  --silver: #c0c0c0;
  --mist: #edf0f4;
  --paper: #fafbfc;
  --heartwood: #b08352;
  --text: #14253b;
  --text-soft: #4a5a70;
  --rule: #d5dae1;

  --serif: "Newsreader", "Iowan Old Style", Georgia, "Songti TC", serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, "PingFang HK", sans-serif;

  --wrap: 86rem;
  --on-dark: #c5cfdc;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --section: clamp(5rem, 11vw, 10rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, address { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
a { color: inherit; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--heartwood); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 0; z-index: 100; padding: 0.75rem 1rem; background: var(--ink); color: #fff; }
.skip:focus { left: 0; }

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

/* Type */
.display {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(2.6rem, 6.4vw, 6.25rem);
  line-height: 1.02;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.heading {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 18ch;
  text-wrap: balance;
}
.lede { font-size: clamp(1.1rem, 1.35vw, 1.3rem); line-height: 1.55; color: var(--text-soft); max-width: 34rem; }

/* Buttons and links */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 1rem 1.6rem; border-radius: 999px;
  background: var(--navy); color: #fff;
  font: 500 1rem/1 var(--sans); text-decoration: none;
  transition: background-color 0.3s var(--ease);
}
[data-magnetic] { will-change: transform; }
.button:hover { background: var(--ink); }
.button--small { padding: 0.7rem 1.15rem; font-size: 0.95rem; }
.button--light { background: #fff; color: var(--ink); }
.button--light:hover { background: var(--mist); }
.text-link {
  font-weight: 500; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 0.2rem;
  transition: background-size 0.4s var(--ease);
}
.text-link:hover { background-size: 0 1px; background-position: 100% 100%; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: var(--gutter);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  transition: transform 0.5s var(--ease);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header:focus-within { transform: none; } /* keyboard users always see the header they are in */
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand-mark { width: 2rem; height: 2rem; }
.mark-navy { fill: var(--navy); }
.mark-silver { fill: var(--silver); }
.brand-name { font: 600 1.05rem/1 var(--sans); letter-spacing: 0.01em; color: var(--navy); }
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.25rem); }
.site-nav a:not(.button) { text-decoration: none; font-size: 0.98rem; position: relative; padding-block: 0.4rem; }
.site-nav a:not(.button)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease);
}
.site-nav a:not(.button):hover::after { transform: scaleX(1); transform-origin: left; }
.menu-toggle { display: none; background: none; border: 1px solid var(--rule); border-radius: 999px; padding: 0.55rem 1rem; font: 500 0.95rem/1 var(--sans); color: var(--text); }

/* Opening: hero and statement on the left, growth rings held on the right */
.opening { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); position: relative; overflow-x: clip; }
.opening-copy { padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); position: relative; z-index: 2; }
.opening-rings { position: sticky; top: 0; height: 100svh; contain: layout; }
.rings { position: absolute; top: 50%; left: 50%; width: min(118vh, 78vw); height: auto; transform: translate(-44%, -48%); }
.ring { fill: none; stroke: var(--navy); stroke-width: 1.2; stroke-opacity: 0.42; stroke-dasharray: 1 1; }
.ring--gen { stroke: var(--heartwood); stroke-width: 2.2; stroke-opacity: 1; }
.ring-pith { fill: var(--heartwood); }
.ring-label circle { fill: var(--heartwood); }
.ring-label text { font: 500 17px var(--sans); fill: var(--text); paint-order: stroke; stroke: var(--paper); stroke-width: 6px; }

.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; gap: clamp(1.75rem, 3.5vh, 3rem); padding-top: calc(var(--header-h) + 2rem); padding-bottom: clamp(1.5rem, 4vh, 3rem); }
.hero-title { margin-right: -22%; font-size: clamp(2.6rem, 5.4vw, 5.2rem); } /* the headline is allowed to run over the rings */
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero-title .line > span { display: block; }
.hero-foot { display: grid; gap: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.75rem; }
.credentials { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: clamp(1.5rem, 3vw, 3.5rem); padding-top: 1.25rem; border-top: 1px solid var(--rule); font-size: 0.92rem; }
.credentials dt { color: var(--text-soft); }
.credentials dd { font-weight: 500; }

.statement { min-height: 92svh; display: flex; align-items: center; padding-block: var(--section); }
.statement-text { font-family: var(--serif); font-size: clamp(1.5rem, 2.5vw, 2.4rem); line-height: 1.28; letter-spacing: -0.01em; max-width: 17em; }

/* Section furniture */
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.5rem 3rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.section-note { color: var(--text-soft); max-width: 22rem; }

/* Services */
.services { padding-block: var(--section); }
.service-list { border-top: 1px solid var(--text); }
.service {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) 4rem; align-items: center; gap: 1.5rem 3rem;
  padding: clamp(1.5rem, 3vw, 2.6rem) 0; border-bottom: 1px solid var(--rule);
  text-decoration: none; position: relative;
}
.service::before { content: ""; position: absolute; inset: 0 calc(var(--gutter) * -0.5); background: var(--mist); opacity: 0; transition: opacity 0.4s var(--ease); z-index: -1; }
.service:hover::before, .service:focus-visible::before { opacity: 1; }
.service-name { font: 400 clamp(1.6rem, 2.9vw, 2.6rem)/1.1 var(--serif); letter-spacing: -0.012em; transition: transform 0.5s var(--ease); }
.service:hover .service-name { transform: translateX(0.75rem); }
.service-text { color: var(--text-soft); }
.service-icon { width: 3.5rem; height: 3.5rem; fill: none; stroke: var(--navy); stroke-width: 1.4; justify-self: end; }
.service-icon > * { stroke-dasharray: 1 1; stroke-dashoffset: 0; }
@media (hover: hover) {
  .service-icon > * { stroke-dashoffset: 1; transition: stroke-dashoffset 0.9s var(--ease); }
  .service-icon > *:nth-child(2) { transition-delay: 0.12s; }
  .service-icon > *:nth-child(3) { transition-delay: 0.24s; }
  .service:hover .service-icon > *, .service:focus-visible .service-icon > * { stroke-dashoffset: 0; }
}

/* Philosophy: an oak that grows as the visitor scrolls */
.oak { background: var(--ink); color: #fff; padding-block: var(--section); }
.oak-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.oak-copy { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); }
.oak-label { font: 500 1rem/1.4 var(--sans); color: var(--silver); }
.oak-quote { font-size: clamp(2rem, 3.6vw, 3.6rem); max-width: 18ch; }
.oak-text { color: var(--on-dark); max-width: 30rem; font-size: 1.1rem; }
.oak-art { align-self: end; }
.oak-tree { width: 100%; height: auto; max-height: 86vh; fill: none; stroke: #dfe5ee; stroke-linecap: round; }
/* The gap is longer than the dash so an undrawn limb shows nothing, not even a dot at its tip. */
.oak-tree path { stroke-dasharray: 1 2; }
.oak-tree .ground { stroke: var(--silver); stroke-width: 1.5; stroke-opacity: 0.5; }
.oak-tree .root { stroke: var(--silver); stroke-opacity: 0.55; }
.oak-tree .leaf { fill: #9fb4cf; stroke: none; transform-box: fill-box; transform-origin: center; }
.oak-tree .leaf--warm { fill: var(--heartwood); }
/* With animation on, the section is tall and its content holds in place while the tree grows. */
.anim .oak { height: 280vh; padding-block: 0; }
.anim .oak-sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; overflow: hidden; }
.anim .oak-tree path { stroke-dashoffset: 1.01; }
.anim .oak-tree .leaf { opacity: 0; }

/* How we operate: held in place on larger screens, a plain list on phones */
.steps { padding-block: var(--section); }
.steps-grid { display: grid; gap: 3rem; }
.steps-progress { display: none; }
.step { padding-block: 1.75rem; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 2.5rem 1fr; column-gap: 1rem; }
.step-number { font: 400 1.6rem/1.1 var(--serif); color: var(--heartwood); grid-row: span 2; }
.step-title { font: 400 clamp(1.5rem, 2.4vw, 2.2rem)/1.15 var(--serif); margin-bottom: 0.6rem; }
.step p { color: var(--text-soft); max-width: 34rem; }

/* 900px is also the breakpoint used in site.js */
@media (min-width: 900px) {
  .anim .steps { height: 300vh; padding-block: 0; }
  .anim .steps-sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; }
  .steps-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 5rem; align-items: center; }
  .anim .steps-progress { display: block; margin-top: 2.5rem; width: 100%; max-width: 20rem; height: 2px; background: var(--rule); }
  .steps-progress span { display: block; height: 100%; background: var(--navy); transform: scaleX(0); transform-origin: left; }
  .anim .steps-list { display: grid; }
  .anim .step { grid-area: 1 / 1; grid-template-columns: 5rem 1fr; border-top: 0; opacity: 0; transform: translateY(2rem); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); pointer-events: none; }
  .anim .step.is-active { opacity: 1; transform: none; pointer-events: auto; }
  .anim .step.is-past { transform: translateY(-2rem); }
  .anim .step-number { font-size: 4rem; }
  .anim .step-title { font-size: clamp(2rem, 3vw, 3rem); }
  .anim .step p { font-size: 1.15rem; }
}

/* Hong Kong */
.harbour { background: var(--mist); padding-block: var(--section); }
.harbour-art { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.skyline { width: 100%; height: auto; fill: none; stroke: var(--navy); }
.skyline path { stroke-dasharray: 1 1; }
.skyline .tower { stroke-width: 1.2; }
.skyline .ridge { stroke: var(--silver); stroke-width: 1.5; }
.skyline .shore { stroke-width: 1.5; }
.skyline .water { stroke: var(--silver); stroke-width: 1; }
.reasons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 3rem; }
.reasons li { padding-block: 1.6rem; border-top: 1px solid var(--rule); }
.reasons h3 { font: 400 1.45rem/1.2 var(--serif); margin-bottom: 0.5rem; }
.reasons p { color: var(--text-soft); max-width: 26rem; }

/* Insights */
.insights { padding-block: var(--section); }
.insight-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 2.5rem 3rem; }
.insight-list a { display: block; text-decoration: none; padding-top: 1.5rem; border-top: 1px solid var(--text); }
.insight-list h3 { font: 400 clamp(1.4rem, 2vw, 1.8rem)/1.2 var(--serif); margin-bottom: 0.75rem; transition: color 0.3s; }
.insight-list a:hover h3 { color: var(--navy); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.insight-list p { color: var(--text-soft); }

/* Closing and footer */
.closing { background: var(--navy); color: #fff; padding-block: var(--section); }
.closing-inner { display: grid; gap: 1.75rem; justify-items: start; }
.closing .lede { color: var(--on-dark); }
.site-footer { background: var(--ink); color: var(--on-dark); padding-block: 4rem 2.5rem; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1.3fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer-brand { display: flex; gap: 1rem; align-items: flex-start; }
.footer-brand .mark-navy { fill: #fff; }
.footer-brand .brand-mark { flex: none; width: 2.25rem; height: 2.25rem; }
.footer-name { color: #fff; font-weight: 500; }
.footer-nav { display: grid; gap: 0.6rem; align-content: start; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-legal { border-top: 1px solid rgb(255 255 255 / 0.16); padding-top: 2rem; display: grid; gap: 0.75rem; font-size: 0.85rem; }
.footer-legal p { max-width: 60rem; }

/* ---------- Inner pages ---------- */
.page-hero { padding-top: calc(var(--header-h) + clamp(3rem, 9vw, 7rem)); padding-bottom: clamp(2.5rem, 6vw, 5rem); display: grid; gap: 1.5rem; }
.page-hero .display { font-size: clamp(2.5rem, 5.6vw, 5.2rem); max-width: 16ch; }
.page-hero .lede { max-width: 40rem; }
.crumb { font-size: 0.95rem; color: var(--text-soft); }
.crumb a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.crumb a:hover { border-color: currentColor; }

.band { padding-block: var(--section); }
.band--mist { background: var(--mist); }
.band--tight { padding-block: clamp(3rem, 6vw, 5rem); }
/* Heading on the left, content on the right */
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 2rem clamp(2rem, 6vw, 6rem); align-items: start; }
.split > .heading { position: sticky; top: calc(var(--header-h) + 1.5rem); }

.prose { max-width: 42rem; font-size: 1.1rem; line-height: 1.7; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font: 400 clamp(1.6rem, 2.4vw, 2.1rem)/1.2 var(--serif); letter-spacing: -0.01em; margin-top: 2.2em; }
.prose h3 { font: 600 1.05rem/1.4 var(--sans); margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul > li { position: relative; padding-left: 1.6rem; }
.prose ul > li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 0.9rem; height: 1px; background: var(--heartwood); }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.5em; }
.prose a { text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.prose strong { font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; font-size: 1rem; margin-top: 1.6em; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 0.85rem 1rem 0.85rem 0; border-bottom: 1px solid var(--rule); }
.prose thead th { border-bottom-color: var(--text); font-weight: 600; }
.prose blockquote { margin: 1.8em 0; padding-left: 1.4rem; border-left: 2px solid var(--heartwood); font: 400 1.4rem/1.4 var(--serif); }
.table-scroll { overflow-x: auto; }
.table-scroll table { min-width: 34rem; } /* on a phone the table scrolls sideways instead of squeezing */

/* Lists of short items with a heading each */
.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; }
.points > li { padding-block: 1.5rem; border-top: 1px solid var(--rule); }
.points h3 { font: 400 1.4rem/1.2 var(--serif); margin-bottom: 0.5rem; }
.points p { color: var(--text-soft); }
.points--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Label and value pairs */
.facts { display: grid; gap: 0; }
.facts > div { display: grid; grid-template-columns: minmax(9rem, 1fr) 2fr; gap: 1.5rem; padding-block: 1.1rem; border-top: 1px solid var(--rule); }
.facts > div:last-child { border-bottom: 1px solid var(--rule); }
.facts dt { color: var(--text-soft); }
.facts dd { font-weight: 500; }

/* People */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 2.5rem 2rem; }
.person-photo { aspect-ratio: 4 / 5; background: var(--mist); border: 1px dashed var(--rule); display: grid; place-items: center; margin-bottom: 1rem; color: var(--text-soft); font-size: 0.9rem; text-align: center; padding: 1rem; }
.person h3 { font: 400 1.4rem/1.2 var(--serif); }
.person-role { color: var(--text-soft); margin-block: 0.25rem 0.6rem; }

/* Information still to come from the company. Easy to spot, easy to search for. */
.todo { background: #fff3d6; color: #6b4a00; padding: 0.05em 0.4em; border-radius: 0.25em; font-weight: 500; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.notice { border: 1px solid #e3c98a; background: #fff8e6; color: #5c4200; padding: 1rem 1.25rem; border-radius: 0.5rem; max-width: 42rem; font-size: 0.98rem; }

/* Next steps between pages */
.band > .prose + .next-links, .split + .next-links, .prose + .next-links, p + .next-links { margin-top: 3rem; }
.next-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0 3rem; border-top: 1px solid var(--text); }
.next-links a { display: block; padding-block: 1.4rem; border-bottom: 1px solid var(--rule); text-decoration: none; font: 400 1.4rem/1.2 var(--serif); transition: padding-left 0.4s var(--ease); }
.next-links a:hover { padding-left: 0.6rem; }
.next-links small { display: block; font: 400 0.95rem/1.4 var(--sans); color: var(--text-soft); margin-bottom: 0.3rem; }

/* Insights */
.insight-meta { font-size: 0.9rem; color: var(--text-soft); margin-bottom: 0.6rem; }
.insight-list--all { grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
.article { padding-top: calc(var(--header-h) + clamp(3rem, 8vw, 6rem)); padding-bottom: var(--section); }
.article-head { display: grid; gap: 1.25rem; margin-bottom: clamp(2rem, 5vw, 4rem); }
.article-title { font-size: clamp(2.2rem, 4.8vw, 4.4rem); max-width: 20ch; }
.article-meta { color: var(--text-soft); }
.article-note { max-width: 42rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); font-size: 0.92rem; color: var(--text-soft); }
.read-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--heartwood); transform: scaleX(0); transform-origin: left; }

/* Contact and form */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 3rem clamp(2rem, 6vw, 6rem); align-items: start; }
.map-card { display: block; margin-top: 2rem; border: 1px solid var(--rule); background: var(--mist); text-decoration: none; overflow: hidden; }
.map-card svg { width: 100%; height: auto; }
.map-card span { display: block; padding: 0.9rem 1.1rem; font-weight: 500; background: var(--paper); border-top: 1px solid var(--rule); }
.form { display: grid; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 500; font-size: 0.98rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: inherit; background: #fff;
  border: 1px solid #aeb7c3; border-radius: 0.4rem; padding: 0.8rem 0.9rem;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }
.field-hint { font-size: 0.88rem; color: var(--text-soft); }
.form .hp { position: absolute; left: -9999px; }
.form-notice { font-size: 0.9rem; color: var(--text-soft); max-width: 40rem; }
.form-notice p + p { margin-top: 0.6em; }
.form .notice, .form + .form-notice { margin-top: 0.5rem; }
.form-notice h3 { font: 600 0.95rem/1.4 var(--sans); color: var(--text); margin-bottom: 0.3rem; }
.form button.button { border: 0; cursor: pointer; justify-self: start; }

.not-found { min-height: 78svh; display: grid; align-content: center; gap: 1.5rem; justify-items: start; padding-top: calc(var(--header-h) + 3rem); padding-bottom: 4rem; }
.not-found .next-links { width: 100%; }

/* Line masks would cut the tails of g, y and p at these tight line heights. */
.split-line-mask { padding-bottom: 0.14em; margin-bottom: -0.14em; }

/* Animation start-states. Only applied when scripts run and motion is welcome (see layout head). */
.anim [data-reveal], .anim [data-hero-title], .anim [data-hero-foot] { visibility: hidden; }
.anim [data-rings] .ring, .anim [data-skyline] path { stroke-dashoffset: 1; }
.anim [data-rings] .ring-label, .anim [data-rings] .ring-pith { opacity: 0; }

/* Page-to-page cross-fade where the browser supports it */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.35s; }

@media (max-width: 899px) {
  /* Without scripts the links stay in the header and wrap; with scripts they fold into a menu. */
  .site-header { height: auto; min-height: var(--header-h); flex-wrap: wrap; row-gap: 0.25rem; }
  .site-nav { flex-wrap: wrap; }
  .js .site-header { height: var(--header-h); flex-wrap: nowrap; }
  .js .menu-toggle { display: block; }
  .js .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; flex-wrap: nowrap; align-items: flex-start; gap: 1.1rem;
    padding: 1.5rem var(--gutter) 2rem; background: var(--paper); border-bottom: 1px solid var(--rule);
    display: none;
  }
  .js .site-nav.is-open { display: flex; }
  .js .site-nav a:not(.button) { font-size: 1.25rem; }

  .opening { display: block; }
  .opening-copy { padding-inline: var(--gutter); }
  .opening-rings { position: absolute; inset: 0 0 auto 0; height: 100svh; z-index: 1; pointer-events: none; overflow: hidden; }
  .rings { left: 78%; top: 34%; width: 135vw; opacity: 0.55; }
  .ring-label { display: none; }
  .hero-title { margin-right: 0; }
  .credentials { grid-template-columns: 1fr; gap: 0.75rem; }
  .credentials > div { display: flex; justify-content: space-between; gap: 1rem; }
  .statement { min-height: 0; }
  .service { grid-template-columns: 1fr 3rem; gap: 0.75rem 1rem; }
  .service-text { grid-column: 1; }
  .service-icon { grid-row: 1 / span 2; grid-column: 2; width: 2.75rem; height: 2.75rem; align-self: start; }
  .oak-inner { grid-template-columns: 1fr; gap: 1rem; }
  .oak-art { order: -1; }
  .oak-tree { max-height: 36svh; margin-inline: auto; }
  .anim .oak-sticky { padding-top: var(--header-h); }
  .oak-quote { font-size: clamp(1.7rem, 7vw, 2.4rem); }
  .anim .oak { height: 230vh; }
  .reasons { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split > .heading { position: static; }
  .points, .points--three { grid-template-columns: 1fr; }
  .facts > div { grid-template-columns: 1fr; gap: 0.2rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand, .footer-address { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  @view-transition { navigation: none; }
}
