/* Digital Edge. Palette from the original site and logo; Jost Light display, Poppins body.
   Fonts are self-hosted (no requests to Google from visitors' browsers). */
@font-face { font-family: "Jost"; src: url(assets/fonts/jost.woff2) format("woff2"); font-weight: 300 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url(assets/fonts/poppins-300.woff2) format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Poppins"; src: url(assets/fonts/poppins-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url(assets/fonts/poppins-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --navy: #1b2d40;
  --navy-deep: #122030;
  --glass: #a9c9cd;
  --ring: #b2ced0;    /* exact logo ring colour */
  --mist: #eef3f4;
  --white: #ffffff;
  --grey: #8f8f8f;
  --ink-soft: #4a5866;
  --rule: rgba(27, 45, 64, .14);

  --display: "Jost", "Futura", "Helvetica Neue", sans-serif;
  --sans: "Poppins", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1rem, 5vw, 5rem);
  --measure: 40rem;
  --section: clamp(6rem, 12vw, 11rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font: 300 clamp(1.125rem, .95rem + .4vw, 1.3rem)/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--glass); outline-offset: 4px; }
button { font: inherit; }

h1, h2, h3 { font-family: var(--display); font-weight: 300; margin: 0; letter-spacing: -.02em; }
h3 { font-weight: 400; letter-spacing: -.01em; }
h2 { font-size: clamp(2.5rem, 1.6rem + 3vw, 4.5rem); line-height: 1.08; }
h3 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.25rem); line-height: 1.2; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 10; padding: .75rem 1.25rem; background: var(--white); color: var(--navy); }
.skip:focus { top: 1rem; }

/* Buttons and links: one quiet, square-cornered button style */
.button {
  display: inline-block; padding: 1rem 2rem;
  background: var(--glass); color: var(--navy-deep);
  font: 500 1rem var(--sans); letter-spacing: .01em; text-decoration: none; text-align: center;
  border: 0; border-radius: 3px; cursor: pointer;
  transition: background .2s;
}
.button:hover { background: var(--white); }
.button-small { padding: .65rem 1.25rem; font-size: .95rem; }
.text-link { text-decoration: none; border-bottom: 1px solid var(--glass); padding-bottom: 2px; font-weight: 400; }
.text-link:hover { color: var(--glass); }

/* Header: transparent over the hero, solid once you scroll */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 5;
  display: flex; align-items: center; gap: 2.5rem;
  padding: 1.1rem var(--gutter);
  color: var(--white);
  background: rgba(18, 32, 48, .94);
}
@supports (animation-timeline: scroll()) {
  .site-header { background: transparent; animation: header-solid linear both; animation-timeline: scroll(); animation-range: 0 160px; }
  @keyframes header-solid { to { background: rgba(18, 32, 48, .94); box-shadow: 0 1px 0 rgba(169, 201, 205, .15); } }
}
.brand img { height: 2.75rem; width: auto; }
.site-header nav { display: flex; gap: 2.25rem; margin-left: auto; font-size: 1rem; font-weight: 400; }
.site-header nav a { text-decoration: none; opacity: .78; transition: opacity .2s; }
.site-header nav a:hover { opacity: 1; }

.menu { display: none; margin-left: auto; position: relative; }
.menu summary { list-style: none; cursor: pointer; width: 2.75rem; height: 2.75rem; display: grid; place-content: center; gap: 7px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary span { display: block; width: 24px; height: 1.5px; background: var(--white); transition: transform .25s; }
.menu[open] summary span:first-child { transform: translateY(4.25px) rotate(45deg); }
.menu[open] summary span:last-child { transform: translateY(-4.25px) rotate(-45deg); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + .75rem); min-width: 15rem;
  display: grid; padding: 1rem 1.5rem; background: var(--navy-deep); border: 1px solid rgba(169,201,205,.2);
}
.menu-panel a { padding: .7rem 0; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.08); }
.menu-panel a:last-child { border: 0; color: var(--glass); }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  min-height: min(100svh, 58rem);
  display: flex; align-items: center;
  padding: 9rem var(--gutter) 6rem;
  background: var(--navy);
  color: var(--white);
}
.hero-copy { position: relative; z-index: 1; max-width: min(52rem, 56vw); }
.hero h1 { font-size: clamp(2.8rem, 1.4rem + 5vw, 6.25rem); line-height: 1.02; letter-spacing: -.025em; }
.lede { max-width: var(--measure); color: rgba(255,255,255,.8); margin: 2rem 0 3rem; font-size: clamp(1.2rem, 1rem + .6vw, 1.5rem); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2.25rem; }

.hero-rings {
  position: absolute; right: var(--gutter); top: 54%;
  width: min(30vw, 26rem); translate: 0 -50%;
  fill: none; stroke: var(--ring); stroke-width: 55; overflow: visible;
  --m: calc(var(--p, 0) * 73);   /* drift apart as you scroll away (script.js sets --p) */
}
/* Hero: as soon as the hero is on screen (.is-in, script.js) the rings glide in from the corners
   and settle into the woven logo, then breathe while you stay */
.hero-rings .ring, .hero-rings .hole { translate: calc(var(--sx) * 120px) calc(var(--sy) * 120px); opacity: 0; }
.hero-rings.is-in .ring, .hero-rings.is-in .hole {
  translate: 0 0; opacity: 1;
  animation: assemble 1.3s cubic-bezier(.22, 1, .36, 1) backwards, breathe 8s ease-in-out infinite;
  animation-delay: calc((var(--i) - 1) * .08s), calc(1.6s + (var(--i) - 1) * .6s);
}
@keyframes assemble { from { translate: calc(var(--sx) * 120px) calc(var(--sy) * 120px); opacity: 0; } }
@keyframes breathe { 50% { translate: calc(var(--sx) * 18px) calc(var(--sy) * 18px); } }
@keyframes draw { to { stroke-dashoffset: 0; stroke-dasharray: none; } }

/* Statement: follows straight on from the hero */
.statement {
  display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 3rem 6rem; align-items: center;
  padding: clamp(4rem, 8vw, 7rem) var(--gutter) 0;
  overflow-x: clip;   /* rings travel outward as they split */
}
.statement p { margin: 0 0 1.5rem; max-width: 64rem; font: 300 clamp(1.7rem, 1.1rem + 2vw, 3rem)/1.3 var(--display); }

/* What we do */
.services { padding: clamp(4rem, 8vw, 7rem) var(--gutter) clamp(5rem, 10vw, 9rem); }
.services-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4rem 6rem; margin-top: 3.5rem; }
.services-list h3 { margin-bottom: .75rem; }
.services-list p { margin: 0; max-width: var(--measure); color: var(--ink-soft); }

/* Client quote: the one moment of drama on the page */
.results {
  display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 3rem 6rem; align-items: center;
  padding: clamp(6rem, 13vw, 12rem) var(--gutter); background: var(--mist);
  overflow-x: clip;
}
.results .ring-mark { grid-column: 2; grid-row: 1; }
.results figure { margin: 0; max-width: 64rem; }
.results blockquote { margin: 0; }
.results blockquote p { margin: 0; font: 300 clamp(1.6rem, 1rem + 1.8vw, 2.6rem)/1.4 var(--display); text-wrap: pretty; text-indent: -.45em; }
.results blockquote p::before { content: "\201C"; }
.results blockquote p::after { content: "\201D"; }
.results figcaption { margin-top: 2rem; font-size: 1.05rem; color: var(--ink-soft); }

/* How it works */
.approach {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 2rem 6rem;
  padding: clamp(5rem, 10vw, 9rem) var(--gutter);
}
.approach-body p { margin: 0 0 1.25rem; transition: color .4s; max-width: var(--measure); color: var(--ink-soft); }
.approach-body h3 { margin: 3rem 0 .75rem; }

/* Logo rings: the exact woven mark from the logo (assets generated from the logo file).
   Each .ring hides inside the neighbour's .hole, so rings and holes move together via --m.
   Pale = inactive, full colour = active.
   Statement: the logo comes apart. What we do: each service lights its own ring (matching its grid position).
   How it works: rings light up clockwise as you read. Testimonial: the logo comes back together. */
.ring, .hole { transform: translate(calc(var(--sx) * var(--m, 0) * 1px), calc(var(--sy) * var(--m, 0) * 1px)); }
.side { align-self: start; position: sticky; top: 8rem; }
.ring-mark, .ring-icon { display: block; fill: none; stroke: var(--ring); stroke-width: 55; overflow: visible; }
.ring-mark { width: min(100%, 14rem); }
.side .ring-mark { margin-top: 3rem; }
.ring-mark .ring circle, .ring-icon .ring circle { transition: stroke-opacity .6s, stroke-dashoffset 1.6s cubic-bezier(.6, 0, .2, 1); }
.ring-steps .ring circle, .ring-icon .ring circle { stroke-opacity: .2; }
.ring-steps .ring circle { stroke-dasharray: 1; stroke-dashoffset: 1; transition-delay: 0s, calc((var(--i) - 1) * .15s); }
.ring-steps.is-in .ring circle { stroke-dashoffset: 0; }
.ring-steps[data-active="0"] .ring[data-i="1"] circle,
.ring-steps[data-active="1"] .ring:is([data-i="1"], [data-i="2"]) circle,
.ring-steps[data-active="2"] .ring:not([data-i="4"]) circle,
.ring-steps[data-active="3"] .ring circle,
.ring-icon.is-in[data-n="1"] .ring[data-i="1"] circle,
.ring-icon.is-in[data-n="2"] .ring[data-i="2"] circle,
.ring-icon.is-in[data-n="3"] .ring[data-i="3"] circle,
.ring-icon.is-in[data-n="4"] .ring[data-i="4"] circle { stroke-opacity: 1; }

/* Scroll-driven sets (script.js sets --p from 0 to 1 as they move up the screen) */
.ring-mark[data-scrub] .ring circle { transition: none; }
.ring-split { --m: calc(var(--p, 0) * 160); }
.ring-split .ring circle { stroke-opacity: calc(1 - var(--p, 0) * .7); }
.ring-join { --m: calc((1 - var(--p, 0)) * 190); }
.ring-join .ring circle { stroke-opacity: calc(.15 + var(--p, 0) * .85); }

.ring-icon { width: 4rem; margin-bottom: 1.25rem; }
.ring-icon .ring circle { transition: stroke-opacity .9s .3s; }

/* About */
.about { display: grid; grid-template-columns: 1.1fr 1fr; background: var(--navy-deep); color: var(--white); }
.about img { width: 100%; height: 100%; min-height: 30rem; object-fit: cover; }
.about-copy { padding: clamp(4rem, 8vw, 7rem) var(--gutter); align-self: center; }
.about-copy h2 { margin-bottom: 2rem; }
.about-copy p { max-width: var(--measure); color: rgba(255,255,255,.78); margin: 0 0 1.25rem; }

/* FAQ: short enough to read in full, so no accordion */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 2rem 6rem; padding: clamp(5rem, 10vw, 9rem) var(--gutter); }
.faq-list { margin: 0; }
.faq-list div + div { margin-top: 2.25rem; }
.faq-list dt { font: 400 clamp(1.3rem, 1.1rem + .6vw, 1.6rem)/1.35 var(--display); margin-bottom: .4rem; }
.faq-list dd { margin: 0; max-width: var(--measure); color: var(--ink-soft); }

/* Contact */
.contact {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 3rem 6rem; align-items: start;
  padding: clamp(5rem, 10vw, 8rem) var(--gutter); background: var(--mist);
}
.contact-intro p { max-width: 32rem; color: var(--ink-soft); margin: 1.5rem 0 0; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem 1.5rem; }
.contact-form .wide, .contact-form .button { grid-column: 1 / -1; }
.contact-form label { display: grid; gap: .4rem; font-size: .95rem; font-weight: 400; color: var(--ink-soft); }
.contact-form input:not([type=radio], [type=checkbox]), .contact-form textarea {
  font: 300 1.1rem var(--sans); color: var(--navy);
  padding: .7rem 0; border: 0; border-bottom: 1px solid rgba(27,45,64,.3);
  background: transparent; border-radius: 0; resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-bottom-color: var(--navy); }
.contact-form [aria-invalid="true"] { border-bottom-color: #b42318 !important; }
.topic { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 2rem; }
.topic legend { font: 400 1.4rem var(--display); color: var(--navy); margin-bottom: .75rem; padding: 0; }
.topic label { display: flex; align-items: center; gap: .5rem; cursor: pointer; color: var(--navy); font-size: 1.05rem; }
.topic input { accent-color: var(--navy); margin: 0; }
.contact-form:has([value="Question"]:checked) .when-consult { display: none; }
.consent { display: flex !important; align-items: flex-start; gap: .75rem; line-height: 1.6; }
.consent input { margin-top: .3rem; accent-color: var(--navy); }
.honey { position: absolute; left: -9999px; }
.contact-form .button { justify-self: start; background: var(--navy); color: var(--white); }
.contact-form .button:hover { background: var(--navy-deep); }
.contact-form .button[disabled] { opacity: .6; cursor: wait; }
.form-status { margin: 0; min-height: 1.5em; font-weight: 400; }
.form-status.error { color: #b42318; }

/* Footer */
.site-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2.5rem;
  padding: 3rem var(--gutter); background: var(--navy-deep); color: rgba(255,255,255,.7); font-size: .95rem;
}
.site-footer .brand img { height: 2.5rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.75rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover, .cookie-settings:hover { color: var(--white); }
.cookie-settings { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; font-size: inherit; }
.site-footer p { margin: 0; }

/* Cookie banner: a slim bar, not a card */
.cookie-banner {
  position: fixed; inset: auto 0 0; z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 2rem;
  padding: .9rem var(--gutter);
  background: var(--navy-deep); color: rgba(255,255,255,.85); font-size: .95rem;
  border-top: 1px solid rgba(169,201,205,.2);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; }
.cookie-actions { display: flex; gap: 1.5rem; }
.cookie-actions button { background: none; border: 0; padding: .25rem 0; color: var(--white); cursor: pointer; font-size: .95rem; font-weight: 500; border-bottom: 1px solid var(--glass); }
.cookie-actions button + button { border-bottom-color: transparent; color: rgba(255,255,255,.7); }

/* Legal pages */
.legal-header { position: static; background: var(--navy-deep); }
.legal { max-width: 46rem; margin: 0 auto; padding: 5rem var(--gutter) 7rem; }
.legal h1 { font-size: clamp(2.4rem, 1.8rem + 2.4vw, 3.6rem); line-height: 1.1; margin-bottom: .75rem; }
.legal h2 { font-size: 1.6rem; margin: 3rem 0 1rem; }
.legal .updated { color: var(--ink-soft); margin: 0 0 3rem; }
.legal p, .legal li { color: #2f3f50; }
.legal ul { padding-left: 1.25rem; }
.legal table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.legal th, .legal td { text-align: left; padding: .75rem .5rem; border-bottom: 1px solid var(--rule); vertical-align: top; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-rings circle, .ring-mark circle, .hero-rings .ring, .hero-rings .hole { animation: none !important; stroke-dashoffset: 0; translate: 0 0; opacity: 1; }
  *, *::before, *::after { transition: none !important; }
}

@media (max-width: 1080px) {
  .site-header nav, .header-cta { display: none; }
  .menu { display: block; }
}
@media (max-width: 860px) {
  .hero-rings { right: -30vw; width: 85vw; opacity: .25; }
  .services-list, .approach, .about, .contact, .faq, .statement { grid-template-columns: minmax(0, 1fr); }
  .ring-mark { display: none; }
  .results { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .about img { aspect-ratio: 4 / 3; height: auto; min-height: 0; }
  .contact-form { grid-template-columns: minmax(0, 1fr); }
  .brand img { height: 2.25rem; }
}
