/* Green Mountain Fog 3.0
   Concept: a fogged-up window looking out over Lake Champlain at sunset.
   Visitors can wipe the glass with the cursor (or a finger); scrolling clears it.
   Everything below the window stays calm, legible, and quiet. */

:root {
  /* palette: blue hour over the lake */
  --ink: #161a3d;        /* night sky, dark sections */
  --dusk: #2e3474;       /* indigo, primary on light */
  --lilac: #c9c4e3;      /* fog, soft rules on dark */
  --haze: #f3f2f8;       /* page background */
  --paper: #ffffff;      /* raised surfaces */
  --text: #1b1f3a;       /* body text */
  --muted: #585d7d;      /* secondary text */
  --line: #dcdaea;       /* rules on light */
  --apricot: #f6ad8a;    /* sunset accent, used sparingly */

  --serif: "Young Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, sans-serif;

  --step--1: .9375rem;
  --step-0: 1.1875rem;
  --step-1: 1.375rem;
  --step-2: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --step-3: clamp(2.1rem, 1.5rem + 2.6vw, 3.5rem);
  --step-4: clamp(2.75rem, 1.4rem + 5.6vw, 6.25rem);

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --max: 82rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--haze);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; margin: 0; padding: 0; }

:focus-visible { outline: 3px solid var(--apricot); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: .6rem 1rem; background: var(--paper); color: var(--ink); text-decoration: none; border-radius: 8px;
}
.skip:focus { top: 1rem; }

/* sections share one content width */
.familiar, .services, .how, .about, .builds, .contact-inner, .footer {
  padding-inline: max(var(--gutter), (100% - var(--max)) / 2);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.1rem; padding: .7rem 1.5rem;
  font-family: var(--sans); font-size: 1.05rem; font-weight: 700;
  text-decoration: none; border-radius: 999px; border: 2px solid transparent;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-light { background: var(--haze); color: var(--ink); }
.btn-light:hover { background: var(--apricot); color: var(--ink); }
.btn-outline-light { border-color: rgb(243 242 248 / .7); color: var(--haze); }
.btn-outline-light:hover { background: var(--haze); color: var(--ink); border-color: var(--haze); }
.btn-small { min-height: 2.6rem; padding: .45rem 1.15rem; font-size: .975rem; }
.btn-large { min-height: 3.8rem; padding: 1rem 2rem; font-size: clamp(1.05rem, .85rem + .9vw, 1.4rem); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem var(--gutter);
  color: var(--haze);
  transition: background-color .3s, color .3s, box-shadow .3s;
}
.nav.is-solid {
  color: var(--ink);
  background: rgb(243 242 248 / .86);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--line);
}
.nav.is-solid .btn-light { background: var(--dusk); color: var(--paper); }
.nav.is-solid .btn-light:hover { background: var(--ink); }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.brand-mark { width: 2.1rem; height: 2.1rem; }

.menu-btn {
  font: inherit; font-weight: 700; font-size: .975rem; color: inherit; cursor: pointer;
  background: transparent; border: 2px solid currentColor; border-radius: 999px; padding: .4rem 1.05rem;
}
.menu a:not(.btn) {
  text-decoration: none; font-size: 1rem; font-weight: 600;
  text-underline-offset: .35em; text-decoration-thickness: 2px;
}
.menu a:not(.btn):hover { text-decoration: underline; text-decoration-color: var(--apricot); }

@media (min-width: 900px) {
  .menu-btn { display: none; }
  .menu, .menu:popover-open, .menu:not(:popover-open) {
    display: flex; align-items: center; gap: clamp(1.1rem, 2.2vw, 2.1rem);
    position: static; inset: auto; margin: 0; padding: 0;
    background: none; border: 0; color: inherit; overflow: visible; width: auto; height: auto;
  }
}
@media (max-width: 899.98px) {
  .menu:popover-open {
    display: grid; gap: .1rem;
    position: fixed; inset: 4.4rem var(--gutter) auto auto; margin: 0;
    min-width: 15rem; padding: 1rem 1.25rem 1.25rem;
    background: var(--paper); color: var(--ink);
    border: 1px solid var(--line); border-radius: 16px;
    box-shadow: 0 24px 60px -24px rgb(22 26 61 / .45);
  }
  .menu a:not(.btn) { display: block; padding: .6rem 0; font-size: 1.1rem; }
  .menu-cta { margin-top: .6rem; }
  .menu .btn-light { background: var(--dusk); color: var(--paper); }
}

/* ---------- hero: the window ---------- */
.hero { height: 165vh; position: relative; }
.hero-stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  display: grid; align-items: center;
  color: var(--haze);
  background: var(--ink);
  touch-action: pan-y;          /* vertical swipes scroll; sideways swipes wipe the glass */
  --clear: 0;                   /* 0 = fogged, 1 = clear; set from scroll in site.js */
  --sx: 50%;                    /* horizontal crop of the scene; site.js matches it */
}
.window {
  position: absolute; inset: 0;
  scale: calc(1.06 - var(--clear) * .06);
  transform-origin: 60% 70%;
}
.scene, .fog, .fog-fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene { object-fit: cover; object-position: var(--sx) 100%; }
@media (max-width: 700px) { .hero-stage { --sx: 72%; } .contact { --sx: 72%; } }
.fog { opacity: calc(1 - var(--clear)); }
.fog-fallback {           /* used only when the canvas fog can't run */
  backdrop-filter: blur(16px) brightness(1.08);
  -webkit-backdrop-filter: blur(16px) brightness(1.08);
  background: rgb(214 210 234 / .16);
  opacity: calc(1 - var(--clear));
}
.has-fog .fog-fallback { display: none; }

.hero-stage::after {      /* a soft shade behind the headline, for legibility */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 70% at 18% 40%, rgb(14 17 44 / .55), rgb(14 17 44 / 0) 70%);
}
.hero-copy {
  position: relative; z-index: 2;
  padding: 6rem var(--gutter) 7rem;
  padding-inline: max(var(--gutter), (100% - var(--max)) / 2);
  pointer-events: none;            /* the glass underneath gets the wipes */
  opacity: clamp(0, (1 - var(--clear) * 1.25), 1);
  translate: 0 calc(var(--clear) * -60px);
}
.hero-copy a { pointer-events: auto; }
.hero h1 {
  font-size: var(--step-4);
  line-height: 1.0;
  max-width: 12.5ch;
  text-shadow: 0 2px 40px rgb(14 17 44 / .45);
}
.lede {
  margin-top: 1.6rem; max-width: 31em;
  font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem);
  color: rgb(243 242 248 / .92);
  text-shadow: 0 1px 18px rgb(14 17 44 / .5);
}
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.1rem; }

.wipe-hint {
  position: absolute; z-index: 2; left: 50%; bottom: 1.6rem; translate: -50% 0;
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem 1rem;
  font-size: var(--step--1); font-weight: 600; white-space: nowrap;
  color: var(--haze);
  background: rgb(22 26 61 / .38);
  border: 1px solid rgb(243 242 248 / .25);
  border-radius: 999px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  opacity: calc(1 - var(--clear) * 4);
  transition: translate .4s;
}
.wipe-hint::before {
  content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--apricot);
}

/* page-load: the headline arrives, then the first wipe happens (in site.js) */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .lede, .actions { animation: arrive 1.1s cubic-bezier(.2,.7,.2,1) both; }
  .lede { animation-delay: .15s; }
  .actions { animation-delay: .3s; }
}
@keyframes arrive { from { opacity: 0; translate: 0 18px; } }

/* ---------- things come into focus as they scroll in ---------- */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
  @media (prefers-reduced-motion: no-preference) {
    .quote, .step {
      animation: focus-in linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 30%;
    }
  }
}
@keyframes focus-in {
  from { opacity: .15; filter: blur(10px); translate: 0 24px; }
  to   { opacity: 1; filter: blur(0); translate: 0 0; }
}

/* ---------- sound familiar ---------- */
.familiar {
  padding-block: clamp(5rem, 11vw, 9rem) clamp(4rem, 8vw, 6rem);
  display: grid; gap: 3rem;
}
.familiar-head p { margin-top: .9rem; color: var(--muted); font-size: var(--step-1); }
.quotes { display: grid; gap: 1rem; }
.quote {
  display: grid; gap: 1.1rem; align-content: space-between;
  padding: 1.6rem 1.6rem 1.4rem;
  background: var(--paper);
  border-radius: 22px 22px 22px 6px;     /* a speech bubble, pointing at the reader */
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -30px rgb(46 52 116 / .45);
}
.quote q {
  font-family: var(--serif); font-size: clamp(1.25rem, 1.1rem + .6vw, 1.55rem); line-height: 1.3;
  quotes: "“" "”";
}
.quote span {
  display: flex; align-items: center; gap: .55rem;
  font-size: var(--step--1); font-weight: 700; color: var(--dusk);
}
.quote span::before { content: ""; width: 1.4rem; height: 2px; background: var(--apricot); border-radius: 2px; }
@media (min-width: 720px) { .quotes { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) {
  .familiar { grid-template-columns: 4fr 8fr; align-items: start; }
  .familiar-head { position: sticky; top: 7rem; }
  .quote:nth-child(even) { margin-top: 3rem; margin-bottom: -3rem; }
  .quotes { padding-bottom: 3rem; }
}

/* ---------- services ---------- */
.services {
  padding-block: clamp(4rem, 8vw, 7rem);
  background: var(--paper);
  border-radius: 40px 40px 0 0;
}
.section-intro { margin-top: 1rem; max-width: 34em; color: var(--muted); font-size: var(--step-1); }
.service-cols { display: grid; gap: 3rem; margin-top: 3.5rem; }
.col-title {
  font-family: var(--sans); font-size: 1rem; font-weight: 800; letter-spacing: .01em;
  color: var(--dusk);
  padding-bottom: .9rem; border-bottom: 2px solid var(--dusk);
}
.service-list { margin: 0; }
.service-list > div {
  display: grid; gap: .4rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}
.service-list dt { font-family: var(--serif); font-size: 1.4rem; line-height: 1.2; }
.service-list dd { margin: 0; color: var(--muted); max-width: 32em; }
.note {
  margin-top: 2rem; padding: 1.25rem 1.4rem;
  background: var(--haze); border-radius: 16px;
  color: var(--muted); font-size: 1.05rem;
}
.note strong { color: var(--text); }
@media (min-width: 960px) {
  .service-cols { grid-template-columns: 1fr 1fr; column-gap: clamp(2.5rem, 6vw, 6rem); }
}

/* ---------- how it works ---------- */
.how {
  position: relative;
  padding-block: clamp(5rem, 10vw, 8rem);
  background:
    radial-gradient(60% 80% at 85% 110%, rgb(246 173 138 / .28), transparent 60%),
    radial-gradient(50% 70% at 10% 0%, rgb(201 196 227 / .16), transparent 60%),
    var(--ink);
  color: var(--haze);
}
.steps { display: grid; gap: 1.25rem; margin-top: 3rem; counter-reset: none; }
.step {
  position: relative;
  padding: 2rem 1.75rem 1.9rem;
  border-radius: 24px;
  background: rgb(243 242 248 / .06);
  border: 1px solid rgb(201 196 227 / .2);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.step-num {
  display: block;
  font-family: var(--serif); font-size: 4.5rem; line-height: .9;
  color: var(--apricot);
}
.step h3 { margin-top: 1.25rem; font-size: var(--step-2); }
.step p { margin-top: .7rem; color: rgb(243 242 248 / .82); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* ---------- about ---------- */
.about { padding-block: clamp(5rem, 10vw, 8rem); }
.about-card {
  display: grid; gap: 2rem;
}
.about-body { display: grid; gap: 1.1rem; max-width: 36em; font-size: 1.2rem; }
.creds {
  display: grid; gap: 0;
  border-top: 2px solid var(--text);
}
.creds li {
  padding: 1.1rem 1rem 1.1rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 1.05rem;
}
.creds strong { color: var(--text); font-weight: 700; }
@media (min-width: 640px) { .creds { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) {
  .about-card { grid-template-columns: 5fr 7fr; column-gap: clamp(2rem, 6vw, 6rem); }
  .creds { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
  .creds li { padding-right: 1.5rem; }
}

/* ---------- side projects ---------- */
.builds { padding-block: 0 clamp(5rem, 10vw, 8rem); }
.build-list { display: grid; gap: 1rem; margin-top: 2rem; }
.build-list a {
  display: grid; gap: .6rem; height: 100%;
  padding: 1.8rem 1.8rem 1.6rem;
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  transition: border-color .2s, translate .2s;
}
.build-list a:hover { border-color: var(--dusk); translate: 0 -3px; }
.build-list h3 { font-size: var(--step-2); }
.build-list p { color: var(--muted); max-width: 30em; }
.build-where {
  margin-top: .3rem; font-weight: 700; font-size: 1rem; color: var(--dusk);
  text-decoration: underline; text-decoration-color: var(--apricot); text-decoration-thickness: 2px; text-underline-offset: .3em;
}
@media (min-width: 760px) { .build-list { grid-template-columns: 1fr 1fr; } }

/* ---------- contact: the window, clear at last ---------- */
.contact {
  position: relative; isolation: isolate;
  min-height: min(52rem, 100svh);
  display: grid; align-items: start;
  padding-block: clamp(5rem, 10vw, 8rem) 0;
  color: var(--haze);
  background: var(--ink);
  overflow: hidden;
}
.contact-scene {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: var(--sx, 50%) 100%;
}
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgb(22 26 61 / .92) 0%, rgb(22 26 61 / .55) 45%, rgb(22 26 61 / 0) 75%);
}
.contact-inner { max-width: calc(46rem + var(--gutter) * 2); padding-inline: var(--gutter); }
@media (min-width: 1100px) { .contact-inner { padding-inline: max(var(--gutter), (100vw - var(--max)) / 2); max-width: none; } }
.contact h2 { font-size: var(--step-4); line-height: 1; max-width: 11ch; }
.contact p { margin-top: 1.4rem; max-width: 30em; font-size: 1.2rem; color: rgb(243 242 248 / .9); }
.contact .btn { margin-top: 2.2rem; }

.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem;
  padding-block: 1.5rem;
  background: #10132e; color: rgb(243 242 248 / .72); font-size: var(--step--1);
}
.footer a { color: var(--haze); }

/* ---------- reduced motion: no drifting or zooming, the glass stays wipeable ---------- */
@media (prefers-reduced-motion: reduce) {
  .window { scale: 1; }
  .hero-copy { translate: none; }
}
