/* ============================================================
   907 Systems
   Brand spec: ../01-strategy/brand.md
   Mark: ice #BCD2DB on slate #2B333A. One colour scheme, no alternates.
   Saira for headings (the mark's family), Barlow for body.
   Photography: see assets/CREDITS.md — Unsplash licence, self-hosted.

   Alaska carries the page. One pinned photograph sits behind everything and
   crossfades as you read; the words scroll over it with no section edges.
   Type is light and set like captions, never boxed. One accent, used rarely.

   Measured: ice-dim on ground 6.35 · ice on ground 9.9 · white on ground 15.9.
   Type on photographs always sits on a scrim of at least 80% ground.
   ============================================================ */

:root {
  --ground:  #1A2126;   /* slate-4 — the page between photographs */
  --slate:   #2B333A;   /* the brand ground */
  --white:   #FFFFFF;
  --head:    #F2F6F8;
  --ice:     #BCD2DB;
  --ice-dim: #8FA5B1;
  --rule:    rgba(188, 210, 219, .16);

  --glacier:    #5CC9F2;
  --glacier-hi: #8CDBF7;
  --on-glacier: #16222A;
  --glacier-dp: #1F6FA8;

  --paper:   #FFFFFF;
  --paper-2: #F2F5F6;
  --ink:     #1C2329;
  --ink-2:   #5C6B76;
  --line:    #DCE3E7;

  --sans: "Barlow", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --disp: "Saira", "Barlow", ui-sans-serif, system-ui, sans-serif;

  --shell: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ice);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* film grain over everything — ties the stock photographs and the pages together */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img { max-width: 100%; display: block; }
a { color: var(--glacier); }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }

.skip {
  position: absolute; top: 0; left: 0; z-index: 200;
  background: var(--slate); color: var(--ice); padding: 12px 18px;
  font-family: var(--disp); font-weight: 600; text-decoration: none;
  width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip:focus { width: auto; height: auto; overflow: visible; clip: auto; clip-path: none; }

.shell { max-width: var(--shell); margin: 0 auto; padding-inline: var(--gutter); }
:focus-visible { outline: 2px solid var(--glacier); outline-offset: 3px; }

/* ---------- type: light, large, quiet ---------- */
h1, h2, h3 { font-family: var(--disp); color: var(--head); margin: 0; text-wrap: balance; }
h1 { font-weight: 300; font-size: clamp(44px, 6.6vw, 104px); line-height: 1; letter-spacing: -.035em; color: var(--white); max-width: 13em; margin-inline: auto; }
h2 { font-weight: 300; font-size: clamp(36px, 4.6vw, 64px); line-height: 1.04; letter-spacing: -.025em; }
h3 { font-weight: 500; font-size: 22px; line-height: 1.25; letter-spacing: -.01em; }

.eyebrow {
  font-family: var(--disp); font-weight: 400; font-size: 14px; letter-spacing: .02em;
  color: var(--glacier); margin: 0 0 20px;
}
.soft { color: var(--ice-dim); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-weight: 500; font-size: 15.5px;
  padding: 14px 24px; border: 0; border-radius: 3px;
  background: var(--glacier); color: var(--on-glacier);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .25s, transform .25s;
}
.btn:hover { background: var(--glacier-hi); }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.text-link {
  font-family: var(--disp); font-weight: 400; font-size: 15.5px;
  color: var(--head); text-decoration: none;
  border-bottom: 1px solid rgba(242,246,248,.35); padding-bottom: 2px;
  transition: border-color .25s;
}
.text-link:hover { border-color: var(--glacier); }

/* ---------- nav: nothing over the photograph, solid once past it ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: linear-gradient(180deg, rgba(26,33,38,.55), rgba(26,33,38,0));
  transition: background .35s;
}
.nav.solid { background: rgba(26,33,38,.94); box-shadow: 0 1px 0 var(--rule); }
.nav-inner {
  max-width: var(--shell); margin: 0 auto; padding-inline: var(--gutter);
  height: 72px; display: flex; align-items: center; gap: 32px;
}
.nav-mark img { height: 30px; width: auto; }
/* everything sits together on the right: links, button, then the mark */
.nav-links { order: 1; margin-left: auto; }
.nav .btn  { order: 2; }
.nav-mark  { order: 3; }
.nav-links { display: flex; gap: 30px; }
.nav-links a {
  font-family: var(--disp); font-weight: 400; font-size: 15px;
  color: var(--head); text-decoration: none; opacity: .85; transition: opacity .2s;
}
.nav-links a:hover { opacity: 1; }
@media (max-width: 720px) { .nav-links { display: none; } .nav .btn { margin-left: auto; } }

/* ============================================================
   THE BACKDROP — one pinned layer behind the whole page.
   Photographs crossfade as the words scroll over them; three veils
   (flat, side, foot) set how dark it is for whatever is being read.
   Reading passages sit on a flat veil of .86+ ground, which keeps
   ice-dim above 4.5 even over the brightest sky in these photographs.
   ============================================================ */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--ground); --v: .38; --s: 0; --r: 0; --f: .4; }
.scene {
  position: absolute; inset: 0; background-size: cover; background-repeat: no-repeat;
  opacity: 0; transform: scale(1.06);
  transition: opacity 1.4s ease, transform 10s cubic-bezier(.2,.6,.2,1);
}
.scene.on { opacity: 1; transform: none; }
.scene[data-name="aurora"] { background-image: url("assets/ak-hero.jpg");     background-position: center 40%; }
.scene[data-name="bay"]    { background-image: url("assets/ak-divider.jpg");  background-position: center 55%; }
/* the portrait is 768px wide — too small to fill a screen sharply, so behind the words it is blurred,
   and the sharp copy sits in the page at a size the file can carry */
.scene[data-name="me"]     { background-image: url("assets/taylor-card.jpg"); background-position: center 44%; filter: blur(28px) saturate(1.1); inset: -60px; }
.scene[data-name="juneau"] { background-image: url("assets/ak-contact.jpg");  background-position: center 30%; }
.veil { position: absolute; inset: 0; transition: opacity 1.1s ease; }
.veil-flat { background: var(--ground); opacity: var(--v); }
.veil-side { background: linear-gradient(90deg, rgba(26,33,38,.95) 0%, rgba(26,33,38,.6) 45%, rgba(26,33,38,0) 78%); opacity: var(--s); }
.veil-side-r { background: linear-gradient(270deg, rgba(26,33,38,.95) 0%, rgba(26,33,38,.6) 45%, rgba(26,33,38,0) 78%); opacity: var(--r); }
.veil-foot { background: linear-gradient(180deg, rgba(26,33,38,0) 38%, rgba(26,33,38,.96) 100%); opacity: var(--f); }

/* ============================================================
   BLOCKS — no edges. Moments are a screen tall and let the photograph
   breathe; reading passages sit on a darkened version of it.
   ============================================================ */
.block { position: relative; }
.moment { min-height: 100svh; display: flex; align-items: flex-end; padding: 120px 0 clamp(72px, 12vh, 128px); }
.hero { align-items: center; text-align: center; padding-bottom: 96px; }
.moment .shell { width: 100%; }
.moment h1, .moment h2, .moment p { text-shadow: 0 1px 28px rgba(10, 14, 17, .45); }
.read { padding-block: clamp(120px, 15vw, 210px); }
/* without the script there is no crossfade, so reading passages bring their own ground */
html:not(.js) .read { background: rgba(26, 33, 38, .9); }

.hero-foot {
  display: flex; flex-direction: column; align-items: center;
  gap: 32px; margin-top: clamp(28px, 3.4vw, 44px);
}
.hero-lede { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.6; color: var(--head); max-width: 32em; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 26px; }


.about { align-items: center; }
.about-grid { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 520px); justify-content: center; gap: clamp(40px, 7vw, 112px); align-items: center; }
.portrait { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 40%; border-radius: 3px; box-shadow: 0 30px 80px rgba(10, 14, 17, .45); }
.about-copy { max-width: 520px; }
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .portrait { max-width: 480px; }
}
.about-copy h2 { margin-bottom: 24px; color: var(--white); }
.about-copy p { font-size: 17.5px; color: var(--head); }
.about-copy p.soft { color: var(--ice); }

.contact-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(40px, 6vw, 88px); align-items: start; }
@media (max-width: 960px) { .contact-inner { grid-template-columns: 1fr; } }
.contact-head { text-align: center; max-width: 720px; margin: 0 auto clamp(56px, 7vw, 96px); }
.contact-head h2 { font-size: clamp(56px, 9vw, 132px); line-height: .95; letter-spacing: -.04em; color: var(--white); }
.contact-head .sub { margin-inline: auto; }
.contact .sub { color: var(--ice); }

.head { max-width: 760px; margin-bottom: clamp(48px, 6vw, 80px); }
.head-right { margin-left: auto; text-align: right; }
.sub { font-size: 19px; line-height: 1.6; color: var(--ice-dim); max-width: 34em; margin-top: 22px; }

/* services — the four names are the navigation; the detail answers beside them */
.svc { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; margin-top: 8px; }
/* all three panels share one cell, sized by the longest, so switching never changes the
   height of anything — nothing moves under the pointer, so hover can't start a loop */
@media (min-width: 861px) {
  .tabs .svc-panels { display: grid; }
  .tabs .svc-panel { grid-area: 1 / 1; }
  .tabs .svc-panel[hidden] { display: block; visibility: hidden; }
}
.svc-names { display: flex; flex-direction: column; align-items: flex-start; }
.svc-name {
  appearance: none; background: none; border: 0; padding: 4px 0; cursor: pointer; text-align: left;
  font-family: var(--disp); font-weight: 300; font-size: clamp(40px, 4.8vw, 70px); white-space: nowrap;
  line-height: 1.04; letter-spacing: -.035em; color: rgba(242, 246, 248, .44);
  position: relative;
  transition: color .35s;
}
/* the marker sits in the margin, so selecting a name never moves any text */
.svc-name::before {
  content: ""; position: absolute; right: 100%; top: 52%; margin-right: 14px;
  width: clamp(18px, 2.2vw, 32px); height: 2px; background: var(--glacier);
  transform: scaleX(0); transform-origin: right center;
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}
.svc-name:hover { color: rgba(242, 246, 248, .7); }
.svc-name[aria-selected="true"] { color: var(--white); }
.svc-name[aria-selected="true"]::before { transform: scaleX(1); }
.svc-name:focus-visible { outline-offset: 6px; }
.svc-panel h3 { margin-bottom: 10px; }
.tabs .svc-panel h3 { display: none; }
.svc-lede { font-size: clamp(19px, 1.7vw, 22px); line-height: 1.5; color: var(--head); margin-bottom: 24px; max-width: 24em; }
.svc-panel li { font-size: 16px; color: var(--ice); padding: 6px 0 6px 24px; position: relative; border-top: 1px solid var(--rule); }
.svc-panel li:last-child { border-bottom: 1px solid var(--rule); }
.svc-panel li::before { content: ""; position: absolute; left: 0; top: 18px; width: 10px; height: 1px; background: var(--glacier); }
html:not(.tabs) .svc-names { display: none; }
@media (max-width: 860px) {
  .svc { grid-template-columns: 1fr; }
  .svc-names { display: none; }
  .tabs .svc-panel h3 { display: block; }
  .svc-panels { display: grid; gap: 56px; }
  .svc-panel h3 { font-weight: 300; font-size: 40px; letter-spacing: -.03em; color: var(--white); }
}
.also { margin-top: clamp(56px, 7vw, 96px); font-size: 17px; color: var(--ice-dim); max-width: 40em; }
.also strong { color: var(--head); font-weight: 600; }

/* process */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 4vw, 64px); }
.step:nth-child(2) { margin-top: clamp(80px, 9vw, 140px); }
.step:nth-child(3) { margin-top: clamp(160px, 18vw, 280px); }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .step:nth-child(n) { margin-top: 0; }
  .step:nth-child(2) { margin-left: 12%; }
  .step:nth-child(3) { margin-left: 24%; }
}
.step { border-top: 1px solid var(--rule); padding-top: 26px; }
.step-no { display: block; font-family: var(--disp); font-weight: 300; font-size: clamp(56px, 6vw, 88px); line-height: 1; letter-spacing: -.02em; color: var(--glacier); margin-bottom: 22px; font-variant-numeric: tabular-nums; }
.step h3 { margin-bottom: 10px; }
.step p { font-size: 16px; color: var(--ice-dim); max-width: 30em; }

/* who — the industries are the point; each one opens the form with it noted */
.who-head { text-align: center; max-width: 820px; margin: 0 auto clamp(48px, 6vw, 80px); }
.who-line { font-size: clamp(26px, 3vw, 40px); line-height: 1.2; color: var(--head); }
.kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .kinds { gap: 10px; } }
.kind {
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 28px;
  height: 100%; min-height: clamp(200px, 17vw, 250px);
  padding: clamp(22px, 2.4vw, 32px); border-radius: 4px; text-decoration: none;
  background: rgba(26, 33, 38, .55); border: 1px solid var(--rule);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background .35s, border-color .35s, transform .35s cubic-bezier(.16,1,.3,1);
}
.kind svg {
  width: clamp(44px, 4.2vw, 58px); height: auto; fill: none; stroke: var(--ice);
  stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; transition: stroke .35s, transform .35s;
}
.kind-name { font-family: var(--disp); font-weight: 300; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.12; letter-spacing: -.02em; color: var(--white); }
.kind-text { display: flex; flex-direction: column; gap: 8px; }
.kind-eg { font-size: 15px; line-height: 1.45; color: var(--ice); }
@media (hover: hover) and (min-width: 1001px) {
  .kind-eg { opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; }
  .kind:hover .kind-eg, .kind:focus-visible .kind-eg { opacity: 1; transform: none; }
}
.kind:hover, .kind:focus-visible { background: rgba(26, 33, 38, .8); border-color: var(--glacier); transform: translateY(-4px); }
.kind:hover svg, .kind:focus-visible svg { stroke: var(--glacier); transform: scale(1.06); }

/* contact lines + FAQ */
.lines { margin-top: 36px; border-top: 1px solid var(--rule); }
.lines a {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px;
  padding: 16px 0; border-bottom: 1px solid var(--rule);
  text-decoration: none; color: var(--white);
  font-family: var(--disp); font-weight: 400; font-size: 19px; transition: color .2s;
}
.lines a span { font-family: var(--sans); font-size: 14px; color: var(--ice); }
.lines a:hover { color: var(--glacier); }
.faq { margin-top: 32px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; position: relative; padding: 16px 32px 16px 0;
  font-family: var(--disp); font-weight: 400; font-size: 17px; color: var(--head);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 300; color: var(--glacier); transition: transform .25s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding-bottom: 18px; font-size: 16px; color: var(--ice); }

/* the form: a white sheet — dark inputs read as disabled */
.form { background: var(--paper); color: var(--ink); border-radius: 3px; padding: clamp(24px, 3vw, 36px); }
.form :focus-visible { outline-color: var(--glacier-dp); }
.form-bar { font-family: var(--disp); font-weight: 400; font-size: 22px; letter-spacing: -.01em; color: var(--ink); margin: 0 0 22px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; gap: 0; } }
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--disp); font-weight: 500; font-size: 13.5px; margin-bottom: 6px; color: var(--ink); }
.field .opt { font-family: var(--sans); font-weight: 400; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--sans); font-size: 16px; color: var(--ink);
  padding: 12px 13px; border: 1px solid var(--line); border-radius: 3px;
  background: var(--paper-2); transition: background .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--glacier-dp); outline-offset: -1px; background: var(--paper); }
.field textarea { min-height: 112px; resize: vertical; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--ink-2); margin: 4px 0 20px; }
.consent input { margin-top: 3px; flex: none; accent-color: var(--glacier-dp); }
/* glacier on white fails (1.89), so the form's button is slate */
.form .btn { background: var(--slate); color: var(--white); }
.form .btn:hover { background: var(--ground); }
.hp { position: absolute; left: -9999px; }

/* ---------- footer ---------- */
.foot { padding: 40px 0 calc(40px + env(safe-area-inset-bottom, 0px)); background: var(--ground); border-top: 1px solid var(--rule); }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.foot-mark { height: 34px; width: auto; }
.foot-line, .foot-meta { margin: 0; font-size: 14.5px; color: var(--ice-dim); }
.foot-links { display: flex; flex-wrap: wrap; gap: 24px; }
.foot-links a { color: var(--ice); text-decoration: none; font-size: 14.5px; }
.foot-links a:hover { color: var(--head); }
.foot-meta { margin-left: auto; }
@media (max-width: 720px) { .foot-meta { margin-left: 0; width: 100%; } }

/* ============================================================
   MOTION — opt-in only. JS adds `.motion` solely when the reader hasn't asked
   for reduced motion. Without it the page renders finished and still.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .motion .rise { opacity: 0; transform: translateY(16px); animation: rise 1.1s cubic-bezier(.16,1,.3,1) forwards; }
  .motion .rise.d1 { animation-delay: .25s; }
  .motion .reveal { opacity: 0; transform: translateY(14px); transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1); }
  .motion .reveal.in { opacity: 1; transform: none; }
  .motion.tabs .svc-panel:not([hidden]) { animation: panel .5s cubic-bezier(.16,1,.3,1); }
  .motion .step:nth-child(2) { transition-delay: .08s; }
  .motion .step:nth-child(3) { transition-delay: .16s; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes panel { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

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