:root{
  --clay:#AB4520; --clay-deep:#7B3217; --clay-wash:#F7ECE9;
  --whin:#14161F; --whin-soft:#33374A;
  --haar:#F6F7FA; --paper:#FAFBFD; --pure:#FFFFFF;
  --dock:#E2E5EC; --dock-soft:#EFF1F6;
  --drizzle:#5B6070; --firth:#1F6E88;
  --ground:var(--haar); --surface:var(--pure); --ink:var(--whin);
  --body:var(--whin-soft); --muted:var(--drizzle); --line:var(--dock);
  --display:'Space Grotesk',system-ui,-apple-system,sans-serif;
  --sans:'IBM Plex Sans',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --mono:'IBM Plex Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --clay:#EF824A; --clay-deep:#FFB089; --clay-wash:#2A1A12;
  --whin:#0C0E15; --whin-soft:#C7CAD6; --haar:#E9EAF0;
  --paper:#141724; --pure:#181C2B; --dock:#252938; --dock-soft:#1C2030;
  --drizzle:#969BB0; --firth:#5FB0CE;
  --ground:var(--whin); --surface:var(--pure); --ink:var(--haar); --body:var(--whin-soft);
}}
:root[data-theme="dark"]{
  --clay:#EF824A; --clay-deep:#FFB089; --clay-wash:#2A1A12;
  --whin:#0C0E15; --whin-soft:#C7CAD6; --haar:#E9EAF0;
  --paper:#141724; --pure:#181C2B; --dock:#252938; --dock-soft:#1C2030;
  --drizzle:#969BB0; --firth:#5FB0CE;
  --ground:var(--whin); --surface:var(--pure); --ink:var(--haar); --body:var(--whin-soft);
}
*{box-sizing:border-box}
html{overflow-x:hidden;overflow-x:clip}
body{margin:0;background:var(--ground);color:var(--ink);font-family:var(--sans);
  font-size:17px;line-height:1.7;-webkit-font-smoothing:antialiased;
  overflow-x:hidden;overflow-x:clip;text-size-adjust:100%;-webkit-text-size-adjust:100%}
a{color:var(--clay);text-decoration:none}
:focus-visible{outline:2px solid var(--clay);outline-offset:3px;border-radius:4px}

/* The weft: the mark's two horizontal bands, at page scale, full bleed. */
.weft{display:flex;flex-direction:column}
.weft i{display:block}
.weft i:first-child{height:4px;background:var(--clay)}
.weft i:last-child{height:2px;background:var(--firth);margin-top:5px}

.wrap{max-width:1080px;margin:0 auto;padding:0 32px;position:relative}

/* The town, as a mask rather than an image — so it takes a palette colour and
   works on either ground. It bleeds off the right edge, the way the mark's bands
   leave their frame. */
.town{position:absolute;top:-40px;right:-190px;width:620px;height:740px;
  background:var(--dock);pointer-events:none;z-index:-1;opacity:.55;
  -webkit-mask-image:url(assets/kirkcaldy-outline.png);mask-image:url(assets/kirkcaldy-outline.png);
  -webkit-mask-size:contain;mask-size:contain;
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .town{opacity:.7}}

header{display:flex;align-items:center;justify-content:space-between;gap:24px;
  padding:34px 0 30px;flex-wrap:wrap}
.logo{display:inline-flex;align-items:center;gap:.34em;font-size:34px;color:var(--ink)}
.logo .m{width:.698em;height:.698em;flex:0 0 auto}
.logo .m svg{width:100%;height:100%;display:block}
.logo .t{font-family:var(--mono);font-weight:600;letter-spacing:.005em;display:inline-flex;gap:.30em}
.logo .t span:last-child{font-weight:400;opacity:.55}
nav{display:flex;gap:26px;font-family:var(--mono);font-size:13.5px;letter-spacing:.09em;
  text-transform:uppercase;font-weight:500}
nav a{color:var(--muted)}
nav a:hover{color:var(--ink)}

.hero{padding:64px 0 72px}
.hero h1{font-family:var(--display);font-weight:700;letter-spacing:-.03em;
  font-size:clamp(40px,6.4vw,68px);line-height:1.03;margin:0 0 26px;color:var(--ink);
  text-wrap:balance;max-width:13ch}
.hero p{font-size:19px;line-height:1.65;color:var(--body);margin:0;max-width:54ch}
.hero .kicker{font-family:var(--mono);font-size:11px;letter-spacing:.18em;
  text-transform:uppercase;color:var(--clay);font-weight:600;margin-bottom:20px}

/* Section rule: two bands, thick and thin — the sett again, not a hairline. */
.rule{display:flex;flex-direction:column;gap:4px;margin:0}
.rule i:first-child{display:block;height:3px;background:var(--ink);width:64px}
.rule i:last-child{display:block;height:2px;background:var(--clay);width:34px}

section{padding:64px 0}
h2{font-family:var(--display);font-weight:700;font-size:clamp(27px,3.4vw,34px);
  letter-spacing:-.024em;line-height:1.14;margin:26px 0 14px;color:var(--ink);text-wrap:balance}
.lede{font-size:18px;color:var(--body);max-width:60ch;margin:0}

.work{display:grid;gap:26px;margin-top:42px}
.card{border:1px solid var(--line);border-radius:16px;background:var(--surface);
  padding:34px 36px;display:grid;gap:20px;
  grid-template-columns:minmax(0,1fr) auto;align-items:start}
.card > *{grid-column:1}
.shot{grid-column:2;grid-row:1 / span 4;align-self:center;margin-left:34px}
.shot img{display:block;border-radius:10px;box-shadow:0 14px 34px -18px rgba(20,22,31,.45)}
.shot--wide img{width:340px;height:auto}
.shot--tall img{width:158px;height:auto}
.shot--icon img{width:128px;height:auto;border-radius:28px}
.card-top{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap}
.card h3{font-family:var(--display);font-weight:700;font-size:25px;letter-spacing:-.02em;
  margin:0;color:var(--ink)}
.tag{font-family:var(--mono);font-size:12px;letter-spacing:.13em;text-transform:uppercase;
  font-weight:600;padding:4px 10px;border-radius:999px}
.tag--live{background:var(--clay-wash);color:var(--clay-deep)}
.tag--beta{background:var(--dock-soft);color:var(--muted)}
.card > p{margin:0;color:var(--body);max-width:62ch;font-size:17px}
.points{display:grid;gap:12px;margin:0;padding:0;list-style:none}
.points li{display:flex;gap:12px;color:var(--body);font-size:15.5px;line-height:1.6;max-width:60ch}
.points li::before{content:"";flex:0 0 auto;width:3px;height:1.15em;background:var(--clay);
  margin-top:.16em}
.go{font-family:var(--mono);font-size:13px;font-weight:600;letter-spacing:.02em;
  color:var(--clay);display:inline-flex;align-items:center;gap:8px}
.go:hover{color:var(--clay-deep)}

.two{display:grid;grid-template-columns:1fr 1fr;gap:56px;align-items:start}
.note{border-left:3px solid var(--firth);padding-left:20px;display:flex;gap:22px;align-items:flex-start}
.note img{display:block;width:98px;height:auto;border-radius:8px;flex:0 0 auto;
  box-shadow:0 10px 26px -16px rgba(20,22,31,.45)}
.note h4{font-family:var(--mono);font-size:12px;letter-spacing:.15em;text-transform:uppercase;
  color:var(--muted);font-weight:600;margin:0 0 10px}
.note p{margin:0;color:var(--body);font-size:15.5px;line-height:1.65}

footer{border-top:1px solid var(--line);margin-top:40px;padding:40px 0 72px;
  display:flex;justify-content:space-between;gap:24px;flex-wrap:wrap;align-items:flex-end}
.who{font-family:var(--mono);font-size:12.5px;letter-spacing:.02em;color:var(--muted);
  display:flex;align-items:center;gap:15px}
.who img{display:block;width:52px;height:52px;border-radius:50%;object-fit:cover;
  object-position:50% 22%;flex:0 0 auto}
.who b{display:block;font-family:var(--sans);font-size:17px;font-weight:600;
  letter-spacing:0;color:var(--ink);margin-bottom:2px}
.mail{font-family:var(--display);font-weight:600;font-size:clamp(21px,3vw,27px);
  letter-spacing:-.02em;color:var(--ink);border-bottom:3px solid var(--clay);padding-bottom:2px}
.mail:hover{color:var(--clay)}
.fine{font-family:var(--mono);font-size:12px;letter-spacing:.1em;text-transform:uppercase;
  color:var(--muted)}

@media (max-width:900px){
  .two{grid-template-columns:1fr;gap:34px}
}

/* ── Phone ──────────────────────────────────────────────────────────────────
   Everything below here had never actually run: with no viewport meta, iOS
   laid the page out at 980px and scaled the result down.                    */
@media (max-width:760px){
  body{font-size:16.5px}
  .wrap{padding:0 20px}

  /* The town comes down to phone scale and steps back. A map you read the
     headline through is a texture; one you read it against is noise. */
  .town{top:-24px;right:-132px;width:392px;height:468px;opacity:.42}

  header{padding:22px 0 18px;gap:12px}
  .logo{font-size:24px}
  nav{width:100%;gap:20px;font-size:12.5px}
  nav a{padding:5px 0}

  .hero{padding:30px 0 48px}
  .hero h1{font-size:clamp(32px,8.7vw,46px);max-width:none;margin-bottom:20px}
  .hero p{font-size:17px;max-width:none}

  section{padding:44px 0}
  h2{font-size:clamp(25px,6.6vw,31px);margin-top:22px}
  .lede{font-size:16.5px;max-width:none}

  .work{gap:20px;margin-top:30px}
  .card{padding:24px 22px;grid-template-columns:1fr;gap:17px;border-radius:14px}
  .card h3{font-size:22px}
  .card > p{font-size:16.5px;max-width:none}
  .points{gap:11px}
  .points li{font-size:15.5px;max-width:none}
  .shot{grid-column:1;grid-row:auto;margin:8px 0 0;align-self:start}
  .shot--wide img{width:100%;max-width:none}
  .shot--tall{justify-self:center}
  .shot--tall img{width:166px}
  .shot--icon{justify-self:start}
  .shot--icon img{width:96px;border-radius:21px}
  .go{padding:6px 0}

  .note{flex-direction:column;gap:14px;padding-left:16px}
  .note img{width:104px}

  footer{flex-direction:column;align-items:flex-start;gap:26px;
    margin-top:28px;padding:32px 0 60px}
  .mail{font-size:20px}
}
@media (max-width:760px) and (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .town{opacity:.5}
}

/* ── Narrow phone (mini / SE) ─────────────────────────────────────────────── */
@media (max-width:400px){
  .wrap{padding:0 17px}
  .logo{font-size:21px}
  nav{gap:14px}
  .hero h1{font-size:31px}
  .card{padding:22px 18px}
  .town{right:-118px;width:352px;height:420px}
  .mail{font-size:17.5px}
  .who{gap:13px}
  .who img{width:46px;height:46px}
}

/* ── About ─────────────────────────────────────────────────────────────────── */
.about-hero{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:56px;align-items:center}
.about-hero .portrait{width:100%;height:auto;border-radius:16px;display:block;
  box-shadow:0 18px 40px -22px rgba(20,22,31,.5)}
.prose{max-width:62ch}
.prose p{font-size:18px;color:var(--body);margin:0 0 1.1em}
.prose a{border-bottom:1px solid currentColor}
nav a[aria-current="page"]{color:var(--ink)}
@media (max-width:760px){
  .about-hero{grid-template-columns:1fr;gap:28px}
  .about-hero .portrait{max-width:260px;order:-1}
  .prose p{font-size:17px}
}
