/* Blue Terminus — site styles (draft v2)
   Layout concept: photographic plates of ice and rock open each page; the
   content below is open text on cold paper-white, separated by space and thin
   rules. No cards, no pills: labels are small mono caps, facts lead. */

:root {
  /* Brand: navy taken from the logo mark */
  --navy: #0b2a55;
  --navy-deep: #071c3a;
  --glacier: #4f7aa6;     /* mid blue for links and labels */
  --ice: #dce8f2;         /* pale ice tint */
  --slate: #56677b;       /* blue-biased grey for secondary text */
  --rule: #cfd9e4;
  --paper: #f4f7fa;       /* cold near-white page ground */
  --fg: #0e1f36;
  --heading: var(--navy);
  --logo-fill: var(--navy);
  --logo-cut: #ffffff;
  --btn-bg: var(--navy);
  --btn-fg: #ffffff;
  --tbd-bg: #fff4d6;
  --tbd-fg: #6b4d00;
  --on-photo: #ffffff;
  --photo-shade: rgba(7, 28, 58, 0.62);

  --font-display: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: clamp(1.45rem, 2.4vw, 1.75rem);
  --step-3: clamp(2rem, 4.2vw, 2.75rem);
  --step-4: clamp(2.4rem, 6vw, 4.25rem);

  --wrap: 72rem;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --glacier: #8fb6dc;
    --ice: #1a3357;
    --slate: #9aacc0;
    --rule: #22395a;
    --paper: #06152b;
    --fg: #e4ecf5;
    --heading: #f2f6fb;
    --logo-fill: #f2f6fb;
    --logo-cut: #06152b;
    --btn-bg: #dce8f2;
    --btn-fg: #071c3a;
    --tbd-bg: #3d3112;
    --tbd-fg: #f5dc9a;
    --photo-shade: rgba(3, 12, 26, 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --glacier: #8fb6dc;
  --ice: #1a3357;
  --slate: #9aacc0;
  --rule: #22395a;
  --paper: #06152b;
  --fg: #e4ecf5;
  --heading: #f2f6fb;
  --logo-fill: #f2f6fb;
  --logo-cut: #06152b;
  --btn-bg: #dce8f2;
  --btn-fg: #071c3a;
  --tbd-bg: #3d3112;
  --tbd-fg: #f5dc9a;
  --photo-shade: rgba(3, 12, 26, 0.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--glacier); text-underline-offset: 0.18em; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--glacier); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--heading);
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: var(--step-4); font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: var(--step-3); font-weight: 600; }
h3 { font-size: var(--step-2); font-weight: 600; line-height: 1.25; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 32px);
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

.label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
}

.lede { font-size: var(--step-1); line-height: 1.5; max-width: 40rem; }
.muted { color: var(--slate); }
.stack { display: grid; gap: 18px; align-content: start; min-width: 0; }

/* ---------- Header ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px 28px; padding-block: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand svg { width: 38px; height: 38px; flex: none; }
.brand-name {
  font-family: var(--font-display); font-weight: 600; font-size: 1.45rem;
  color: var(--logo-fill); white-space: nowrap;
}
.logo-square { fill: var(--logo-fill); }
.logo-cut { fill: var(--logo-cut); }

.site-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 22px; }
.site-nav a {
  color: var(--fg); text-decoration: none; font-size: 0.95rem; font-weight: 500;
  padding-block: 4px; border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--glacier); }
.site-nav a.btn { color: var(--btn-fg); border: 1.5px solid var(--btn-bg); padding: 8px 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 3px;
  font-weight: 600; font-size: 0.97rem; text-decoration: none;
  background: var(--btn-bg); color: var(--btn-fg); border: 1.5px solid var(--btn-bg);
}
.btn:hover { filter: brightness(1.12); }
.btn-ghost { background: transparent; color: var(--heading); border-color: currentColor; }
.on-photo .btn { background: #ffffff; color: #071c3a; border-color: #ffffff; }
.on-photo .btn-ghost { background: transparent; color: #ffffff; border-color: rgba(255,255,255,0.8); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Photographic plates ---------- */
.plate {
  position: relative; isolation: isolate; color: var(--on-photo);
  background: var(--navy-deep) center / cover no-repeat;
}
.plate::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, var(--photo-shade) 0%, rgba(7,28,58,0.35) 60%, rgba(7,28,58,0.15) 100%);
}
.plate h1, .plate h2 { color: var(--on-photo); }
.plate .label { color: rgba(255,255,255,0.78); }
.plate .wrap { padding-block: clamp(64px, 11vw, 140px) clamp(48px, 7vw, 88px); display: grid; gap: 22px; }
.plate .lede { color: rgba(255,255,255,0.92); }
.plate-sm .wrap { padding-block: clamp(56px, 8vw, 104px) clamp(40px, 5vw, 64px); }
.band .wrap { padding-block: clamp(72px, 11vw, 130px); }
.band .statement { font-family: var(--font-display); font-size: var(--step-3); line-height: 1.2; max-width: 38rem; }
.caption {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.72);
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(28px, 4vw, 44px); max-width: 46rem; }

/* Two columns: heading left, text right */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 28px 64px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Columns divided by thin rules, no fills */
.ruled { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 32px; }
.ruled > div { border-left: 1px solid var(--rule); padding-left: 20px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.ruled h3 { font-size: var(--step-1); }
.ruled p { color: var(--slate); }

/* Featured client: one expanding card. At rest, a tall photo band with the
   headline and a navy "Read the five stories" bar. Opened (hover, tap, click),
   the photo shrinks vertically and the drawer grows down to the full height of
   the vignettes. It stays open until the card scrolls out of view. */
.feature { margin-bottom: clamp(48px, 7vw, 80px); border-radius: 3px; overflow: hidden; background: var(--navy); }
.feature-visual {
  position: relative; isolation: isolate; overflow: hidden;
  height: clamp(360px, 38vw, 480px); display: flex; align-items: flex-end; color: #ffffff;
  background: var(--navy-deep);
}
.feature.open .feature-visual { height: clamp(230px, 22vw, 280px); }
.feature-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.feature-visual::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(7,28,58,0.94) 0%, rgba(7,28,58,0.55) 50%, rgba(7,28,58,0.1) 100%);
}
.feature-head { display: grid; gap: 12px; padding: clamp(24px, 3.5vw, 44px); max-width: 52rem; }
.feature-head .label { color: rgba(255,255,255,0.8); }
.feature-head h3 { color: #ffffff; font-size: var(--step-3); line-height: 1.12; }
.feature.open .feature-head h3 { font-size: var(--step-2); }
.feature-head .result { color: rgba(255,255,255,0.92); font-weight: 600; }

.feature-drawer { color: #e8eef5; border-top: 1px solid rgba(255,255,255,0.14); }
.feature-tab {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%;
  padding: 18px clamp(24px, 3.5vw, 44px); background: none; border: 0; color: inherit; cursor: pointer; text-align: left;
}
.feature-tab .tab-label { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; }
.feature-tab .arrow { font-size: 1.4rem; line-height: 1; }
.feature.open .feature-tab .arrow { transform: rotate(180deg); }
.feature-tab:focus-visible { outline: 3px solid #8fb6dc; outline-offset: -6px; }
.feature-body { display: grid; grid-template-rows: 1fr; }
.js .feature:not(.open) .feature-body { grid-template-rows: 0fr; }
.feature-body-inner { overflow: hidden; min-height: 0; }
.js .feature:not(.open) .feature-body-inner { visibility: hidden; }

.vignettes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; padding: 0 clamp(24px, 3.5vw, 44px) clamp(16px, 2vw, 24px); }
.vignette { border-top: 1px solid rgba(255,255,255,0.16); padding-block: 26px 30px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.vignette .label { color: #8fb6dc; }
.vignette h4 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); line-height: 1.3; color: #ffffff; text-wrap: balance; }
.vpart { display: grid; gap: 4px; }
.vpart-label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.6); }
.vignette .status { font-weight: 600; color: #ffffff; }
.vignette .tbd { background: #3d3112; color: #f5dc9a; }
.others-label { margin-bottom: 16px; }
/* An odd last vignette spans the row, with problem and solution side by side */
.vignette.wide { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; }
.vignette.wide > .label, .vignette.wide > h4, .vignette.wide > .status { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .vignettes { grid-template-columns: 1fr; }
  .vignette.wide { grid-template-columns: 1fr; }
  .feature.open .feature-visual { height: 260px; }
}
@media (prefers-reduced-motion: no-preference) {
  .feature-visual { transition: height 0.6s cubic-bezier(.2,.7,.2,1); }
  .feature-head h3 { transition: font-size 0.5s ease; }
  .feature-body { transition: grid-template-rows 0.7s cubic-bezier(.2,.7,.2,1); }
  .feature-body-inner { transition: visibility 0.7s; }
  .feature-tab .arrow { transition: transform 0.3s ease; }
}

/* Client stories: full-width photo cards. The headline sits on the photo; a
   narrow panel on the right says "Read the story" and, when hovered, focused or
   tapped, slides leftwards over half the card to show the story. It stays open
   until the card scrolls out of view. Phones stack the panel under the photo. */
.stories { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.story-card {
  position: relative; display: flex; overflow: hidden; border-radius: 3px;
  height: clamp(380px, 36vw, 470px); background: var(--navy-deep);
}
.story-visual { position: relative; flex: 1 1 auto; min-width: 0; isolation: isolate; color: #ffffff; }
.story-visual img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: var(--focus, 50% 50%); z-index: -2; transform: scale(1.001);
}
.story-visual::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(7,28,58,0.92) 0%, rgba(7,28,58,0.55) 45%, rgba(7,28,58,0.12) 100%);
}
.story-head {
  position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 10px;
  padding: clamp(22px, 3vw, 36px);
}
.story-head .label { color: rgba(255,255,255,0.8); }
.story-head h3 { color: #ffffff; font-size: var(--step-3); max-width: 34ch; line-height: 1.12; }
.story-head .result { color: rgba(255,255,255,0.92); font-weight: 600; max-width: 60ch; }

.story-panel {
  position: relative; flex: 0 0 168px; display: flex; flex-direction: column;
  background: var(--navy); color: #e8eef5; border-left: 1px solid rgba(255,255,255,0.14);
}
.story-tab {
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 16px;
  flex: 1 1 auto; width: 100%; padding: 24px 22px; text-align: left; cursor: pointer;
  background: none; border: 0; color: inherit; font: 600 0.95rem var(--font-body);
}
.story-tab:focus-visible { outline: 3px solid #8fb6dc; outline-offset: -6px; }
.story-tab .arrow { font-size: 1.6rem; line-height: 1; }
.story-tab .tab-label { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; }
.story-text {
  position: absolute; inset: 0; padding: clamp(24px, 3vw, 40px);
  display: grid; align-content: center; gap: 18px;
  width: min(36rem, 50vw); opacity: 0; visibility: hidden; pointer-events: none;
}
.story-text .tab-label { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: #8fb6dc; }
.story-text { overflow-y: auto; }
.story-part { display: grid; gap: 6px; }
.story-part + .story-part { border-top: 1px solid rgba(255,255,255,0.16); padding-top: 16px; }
.story-part p:not(.tab-label) { font-size: 0.97rem; line-height: 1.6; }

.story.open .story-panel { flex-basis: min(52%, 36rem); }
.story.open .story-tab { opacity: 0; pointer-events: none; }
.story.open .story-text { opacity: 1; visibility: visible; pointer-events: auto; }
.story.open .story-head h3 { font-size: var(--step-2); }
.story:hover .story-visual img { transform: scale(1.03); }

@media (max-width: 860px) {
  .story-card { flex-direction: column; height: auto; }
  .story-visual { min-height: 300px; }
  .story-head h3, .story.open .story-head h3 { font-size: var(--step-2); }
  .story-panel, .story.open .story-panel { flex-basis: auto; border-left: 0; border-top: 1px solid rgba(255,255,255,0.14); }
  .story-tab { flex-direction: row; align-items: center; padding: 16px 20px; }
  .story-tab .arrow { transform: rotate(-90deg); font-size: 1.3rem; }
  .story.open .story-tab { display: none; }
  .story-text { position: static; width: auto; display: none; padding: 22px 20px 26px; }
  .story.open .story-text { display: grid; }
}

@media (prefers-reduced-motion: no-preference) {
  .story-panel { transition: flex-basis 0.65s cubic-bezier(.2,.7,.2,1); }
  .story-head h3 { transition: font-size 0.5s ease; }
  .story-visual img { transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
  .story-tab { transition: opacity 0.2s ease; }
  .story-text { transition: opacity 0.35s ease 0s, visibility 0s linear 0.35s; }
  .story.open .story-text { transition: opacity 0.45s ease 0.3s, visibility 0s linear 0s; }
  @supports (animation-timeline: view()) {
    .story { animation: story-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
    @keyframes story-rise { from { opacity: 0.4; transform: translateY(32px); } to { opacity: 1; transform: none; } }
  }
}

/* Team */
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 48px 64px; }
.person { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; align-items: start; }
.portrait {
  width: 120px; aspect-ratio: 4 / 5; max-width: 100%; border-radius: 2px;
  background: linear-gradient(160deg, var(--ice), var(--rule));
  display: grid; place-items: center; text-align: center;
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--slate); padding: 8px;
}
.person .role { color: var(--glacier); font-weight: 600; font-size: 0.95rem; margin-top: 4px; }
.person ul { margin: 12px 0 0; padding-left: 1.1em; display: grid; gap: 6px; }
@media (max-width: 480px) { .person { grid-template-columns: 1fr; } }

/* Contact lines */
.contact-lines { margin: 0; display: grid; border-top: 1px solid var(--rule); }
.contact-lines > div {
  display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); gap: 8px 32px;
  padding-block: 24px; border-bottom: 1px solid var(--rule); align-items: baseline;
}
.contact-lines dd { margin: 0; display: grid; gap: 6px; }
.contact-lines .value { font-family: var(--font-display); font-size: var(--step-2); color: var(--heading); }
@media (max-width: 640px) { .contact-lines > div { grid-template-columns: 1fr; } }

/* Placeholder marker: anything still to be supplied */
.tbd {
  background: var(--tbd-bg); color: var(--tbd-fg); border-radius: 3px;
  padding: 1px 6px; font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500;
}

/* CTA strip */
.cta .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta h2 { max-width: 30rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #c8d6e5; font-size: 0.93rem; }
.site-footer .wrap { padding-block: 48px 36px; display: grid; gap: 28px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-start; }
.site-footer .brand-name { color: #ffffff; }
.footer-brand { display: grid; gap: 10px; }
.tagline { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: #8ea3bb; }
.site-footer .logo-square { fill: #ffffff; }
.site-footer .logo-cut { fill: var(--navy-deep); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: #ffffff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-meta { border-top: 1px solid rgba(255,255,255,0.14); padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; color: #8ea3bb; font-size: 0.82rem; }
.footer-meta a { color: #c8d6e5; text-decoration: underline; }

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: filter 0.15s ease; }
}
