/*
  Mathew Wilson — site styles.
  Desktop values come from the Figma frame "03 — Asymmetric / Profile & services grid" (1600px content width).
  Every size scales smoothly between a 375px phone and the 1600px desktop frame with clamp():
  the second number in each clamp() is the phone value, the last is the Figma desktop value.
*/

/* Inter 4.1 variable font. One file covers every weight, so weight changes can animate smoothly. */
@font-face{font-family:"Inter";font-style:normal;font-weight:100 900;font-display:swap;src:url("/assets/inter-variable.woff2") format("woff2")}

:root{
  --ink:#171717;
  --yellow:#fed24b;
  --paper:#fbf8f2;
  --rule:#d6d1c7;
  --muted:#5c5a55;

  --content-width:1600px;
  --edge:clamp(0.5rem, 0.198rem + 1.29vw, 1.25rem);          /* yellow left edge: 8 → 20 */
  --gutter:clamp(1.25rem, 1.02rem + 0.98vw, 2rem);           /* page side padding: 20 → 32 */

  --space-60:clamp(2.5rem, 2.117rem + 1.633vw, 3.75rem);     /* 40 → 60 */
  --space-48:clamp(2rem, 1.694rem + 1.306vw, 3rem);          /* 32 → 48 */
  --space-40:clamp(2rem, 1.847rem + 0.653vw, 2.5rem);        /* 32 → 40 */
  --space-32:clamp(1.5rem, 1.347rem + 0.653vw, 2rem);        /* 24 → 32 */
  --space-24:clamp(1.25rem, 1.173rem + 0.327vw, 1.5rem);     /* 20 → 24 */

  --text-hero:clamp(2.25rem, 1.714rem + 2.286vw, 4rem);      /* 36 → 64 */
  --text-title:clamp(1.5rem, 1.347rem + 0.653vw, 2rem);      /* 24 → 32 */
  --text-h5:clamp(1.1875rem, 1.13rem + 0.245vw, 1.375rem);   /* 19 → 22 */
  --text-body:clamp(1.0625rem, 1.005rem + 0.245vw, 1.25rem); /* 17 → 20 */
  --text-small:clamp(0.9375rem, 0.899rem + 0.163vw, 1.0625rem); /* 15 → 17 */
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{margin:0;background:#fff;color:var(--ink);font-family:"Inter",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;font-weight:300;font-size:var(--text-body);line-height:1.6;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-feature-settings:"cv11";font-optical-sizing:none}
h1,h2,h3,h4,h5,p,figure,blockquote{margin:0}
h1,h2,h3,h4,h5{font-weight:500}
img{display:block;max-width:100%}
a{color:inherit;text-underline-offset:0.2em;text-decoration-thickness:1px}
a:hover{background:var(--yellow)}
a:focus-visible,summary:focus-visible{outline:2px solid var(--ink);outline-offset:4px}
[hidden]{display:none!important}

/* Page frame: yellow edge down the left side, content centred in the remaining space */
.site{position:relative;min-height:100vh;padding-left:var(--edge);overflow-x:clip}
.site::before{content:"";position:absolute;inset:0 auto 0 0;width:var(--edge);background:var(--yellow)}
.shell{width:100%;max-width:var(--content-width);margin-inline:auto;padding-inline:var(--gutter)}
.skip-link{position:absolute;left:calc(var(--edge) + 16px);top:-100px;z-index:10;padding:12px 16px;background:var(--ink);color:#fff;font-weight:500}
.skip-link:focus{top:12px}
.skip-link:hover{background:var(--ink)}

/* Header */
.header-inner{display:flex;align-items:center;justify-content:space-between;gap:var(--space-24);padding-block:var(--gutter)}
/* Figma: words sit 32px apart; the current page (Home) is a yellow box with 10px side padding.
   Every item has that padding, but items that aren't current pull it back with -10px margins, so the words stay exactly
   where Figma puts them and hovering grows the yellow box into the gap instead of moving anything. */
.site-nav{display:flex;padding-left:10px;flex-wrap:wrap;align-items:center;gap:8px clamp(1.5rem, 1.347rem + 0.653vw, 2rem); /* 24 → 32 */font-size:var(--text-body);line-height:1.6}
.site-nav a{display:inline-grid;justify-items:center;padding:2px 10px;margin-inline:-10px;text-decoration:none;font-weight:300;transition:font-weight .2s ease,background-color .2s ease}
/* Every link keeps the same -10px margin, so the menu does not move between pages. The 10px padding lines the first highlight up with the page edge. */
/* An invisible medium-weight copy of the label reserves the wider width, so the menu doesn't move as the weight changes */
.site-nav a::after{content:attr(data-label);font-weight:500;height:0;overflow:hidden;visibility:hidden;user-select:none;pointer-events:none}
.site-nav a:hover,.site-nav a:focus-visible,.site-nav a[aria-current="page"]{background:var(--yellow);font-weight:500}
.logo-link{flex:none;margin-left:auto;border-radius:50%}
.logo-link:hover{background:none}
.logo{width:clamp(2.5rem, 2.309rem + 0.816vw, 3.125rem);height:auto;aspect-ratio:1}

/* Opening heading */
.hero-band{padding-block:clamp(2rem, 1.54rem + 1.959vw, 3.5rem) clamp(3rem, 2.388rem + 2.612vw, 5rem)}
.hero{font-size:var(--text-hero);line-height:1.203;letter-spacing:-0.0234em;overflow-wrap:break-word}
.hero-line{display:block;text-wrap:balance}
/* Second line: yellow block 8px above, 12px right, 4px below and 8px left of the text (Figma), 89px tall per line.
   It stays an inline highlight so long headings wrap onto further highlighted lines on small screens. */
.hero-line-two{line-height:1.39}
.hero .accent{position:relative;top:0.033em;background:var(--yellow);padding:0.125em 0.1875em 0.0625em 0.125em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.hero-line-two:has(.accent:empty){display:none}

/* Main content band */
.content-band{background:var(--paper);padding-block:clamp(2.5rem, 2.04rem + 1.959vw, 4rem) clamp(3.5rem, 2.735rem + 3.265vw, 6rem)}
.content-band:not(:has(section)){display:none}

/* Sections: label with arrow, then a large heading, then content */
.section-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--space-32);scroll-margin-top:24px}
.section-grid+.section-grid{margin-top:var(--space-60)}
.section-grid[data-section-type="contact"]:not(:first-child){margin-top:clamp(4rem, 3.388rem + 2.612vw, 6rem)}
/* Figma: Contact label sits above its arrow, 48px above the heading, in a 740px column */
.section-grid[data-section-type="contact"]{gap:var(--space-48);max-width:46.25rem}
[data-section-type="contact"] .section-label{flex-direction:column}
.section-label{font-size:var(--text-title);line-height:1.406;display:flex;flex-wrap:wrap;column-gap:16px}
.section-heading{font-size:var(--text-title);line-height:1.375;max-width:46.25rem;overflow-wrap:break-word}
.section-body{min-width:0}
.section-main{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--space-32);align-content:start;min-width:0}

/* "Label beside content" layout, offered in the CMS */
@media (min-width:64rem){
  .layout-side:not(.has-feature){grid-template-columns:minmax(0,1fr) minmax(0,2fr);column-gap:var(--space-60)}
  .layout-side.has-feature .section-main{grid-template-columns:minmax(0,1fr) minmax(0,2fr);column-gap:var(--space-32)}
}

/* Asymmetric profile row: text column beside a large feature image */
.has-feature{gap:var(--space-60)}
.has-feature .section-heading{max-width:none}
.feature-image{min-width:0;max-width:40rem}
.feature-image img{width:100%;height:auto;aspect-ratio:754/750;object-fit:cover}
@media (min-width:64rem){
  /* Figma: row is 769px tall at 1600px (754px image column + 19px), so the next section starts 79px below the image */
  .has-feature{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;padding-bottom:1.1875rem}
  .feature-image{max-width:none}
}
@media (min-width:100rem){
  /* Figma: at full width the profile row runs into the right page padding (1568px wide, 754px columns) */
  .has-feature{margin-right:calc(-1 * var(--gutter))}
}

/* Prose */
.prose-copy p+p,.prose-copy p+ul,.prose-copy p+ol,.prose-copy ul+p,.prose-copy ol+p{margin-top:1.6em}
.prose-copy ul,.prose-copy ol{padding-left:1.4em;margin:0}
.prose-copy li+li{margin-top:0.4em}
.prose-copy a{text-decoration:underline}
.markdown-page h2{margin:2em 0 .6em}
.markdown-page h2:first-child{margin-top:0}
.markdown-page img{display:block;max-width:100%;height:auto;margin-block:1em}
.prose-copy h4{font-weight:500;margin:1.5em 0 0.6em}
.prose-copy pre{overflow:auto;padding:16px;border:1px solid var(--rule)}
.prose-copy table{display:block;max-width:100%;overflow:auto;border-collapse:collapse}
.prose-copy td,.prose-copy th{border:1px solid var(--rule);padding:8px}
.text-copy{max-width:46.25rem}

/* Image and text */
.intro-detail{display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--space-24);margin-top:var(--space-32)}
.intro-copy{flex:1 1 16rem;min-width:0}
.portrait{flex:none;width:min(100%,17.5rem);height:auto;aspect-ratio:1;object-fit:cover}
.portrait.image-size-small{width:min(100%,12.5rem)}
.portrait.image-size-wide{width:100%;aspect-ratio:auto}
.image-top{flex-direction:column}
.image-top .intro-copy{flex-basis:auto;width:100%}
.image-top .portrait.image-size-wide{max-width:46.25rem}
.intro-detail figure{flex:none;width:min(100%,17.5rem)}
.intro-detail figure .portrait{width:100%}
.links{display:flex;flex-wrap:wrap;gap:8px 24px;margin-top:16px}
.links a{text-decoration:underline}
.section-body>.links{margin-top:var(--space-24)}

/* Services */
.services{margin-top:var(--space-40);display:grid;grid-template-columns:minmax(0,1fr);gap:var(--space-48) var(--space-60)}
@media (min-width:48rem){.services{grid-template-columns:repeat(2,minmax(0,1fr))}}
.service-grid{display:flex;flex-direction:column;gap:var(--space-24);min-width:0}
.service-rows>.service-grid{border-top:1px solid var(--rule);padding-block:var(--space-32)}
.service-cards>.service-grid{border:1px solid var(--rule);padding:var(--space-24)}
.service-grid h4{font-size:var(--text-body);line-height:1.5}
.service-grid h5{font-size:var(--text-h5);line-height:1.4545}
.service-grid .prose-copy{padding-block:22px 18px}
.service-grid .prose-copy p+p{margin-top:18px}

/* Contact */
[data-section-type="contact"] .section-body>p{margin-top:var(--space-24)}
/* Email: on hover it gets the menu's yellow box and 10px side padding, pulled back with margins so nothing moves. Weight stays light. */
.contact-email{display:flex;flex-wrap:wrap;align-items:center;column-gap:12px}
.contact-email a{padding-inline:10px;margin-inline:-10px;text-decoration:underline;overflow-wrap:anywhere;transition:background-color .2s ease}
/* Copy button: icon only, same yellow box on hover, same height as the 32px text line */
.copy-email{position:relative;display:inline-grid;place-items:center;width:32px;height:32px;margin-left:8px;padding:0;border:0;border-radius:0;background:none;color:var(--ink);cursor:pointer;transition:background-color .2s ease}
.copy-email:hover,.copy-email:focus-visible{background:var(--yellow)}
.copy-email:focus-visible{outline:2px solid var(--ink);outline-offset:4px}
.copy-email .icon{grid-area:1/1;transition:opacity .2s ease}
.copy-email .icon-done,.copy-email.is-copied .icon-copy{opacity:0}
.copy-email.is-copied .icon-done{opacity:1}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* Other section types offered in the CMS */
.gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,18rem),1fr));gap:var(--space-24);margin-top:var(--space-32)}
.gallery .portrait,.gallery img{width:100%;aspect-ratio:auto}
figure{min-width:0}
figcaption{font-size:var(--text-small);line-height:1.6;margin-top:12px;color:var(--muted)}
.quote{margin-top:var(--space-32);border-left:4px solid var(--yellow);padding-left:var(--space-24);max-width:46.25rem}
.quote footer{font-size:var(--text-small);margin-top:16px}
.faq{border-top:1px solid var(--rule);padding-block:20px;max-width:46.25rem}
.section-body>.faq:first-of-type{margin-top:var(--space-32)}
.faq summary{cursor:pointer;font-weight:500}
.faq .prose-copy{margin-top:16px}
.download-list{margin:var(--space-32) 0 0;padding-left:1.4em}
.download-list li+li{margin-top:8px}
.download-list a{text-decoration:underline}

/* Footer */
.site-footer .shell{padding-block:clamp(2.5rem, 1.888rem + 2.612vw, 4rem) clamp(2.5rem, 2.194rem + 1.306vw, 3.5rem);font-size:var(--text-small);line-height:1.647}
.footer-top{display:block;width:max-content;height:clamp(2.75rem, 2.673rem + 0.327vw, 3rem);font-size:clamp(1.5rem, 1.423rem + 0.327vw, 1.75rem);line-height:1.43;text-decoration:none}
.site-footer p:empty{display:none}

@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}.site-nav a,.contact-email a,.copy-email,.copy-email .icon{transition:none}}
