/* ==========================================================================
   NorthBound Web — site.css
   Static, dependency-free. Mobile-first.
   Palette: 3 brand colours + 2 structural neutrals + 1 raised surface.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts (self-hosted, latin subset, variable)
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-var-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: normal;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-var-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   2. Design tokens
   -------------------------------------------------------------------------- */

:root {
  /* Brand — three colours */
  --paper: #F6F4EE;
  --ink: #1C1B18;
  --accent: #1B3A5C;

  /* Structural neutrals */
  --rule: #D9D5CB;
  --muted: #6B6862;

  /* Raised surface */
  --raised: #FFFFFF;

  /* Typefaces */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Display weight */
  --weight-display: 500;
  --weight-medium: 500;
  --weight-semibold: 600;

  /* Type scale */
  --text-xs: 13px;
  --text-sm: 14px;
  --text-md: 16px;
  --text-base: 17px;
  --text-lg: 19px;
  --text-xl: 22px;
  --text-2xl: 32px;
  --text-3xl: 52px;
  --text-hero: clamp(31px, 7.2vw, 60px);
  --text-price: clamp(88px, 17vw, 152px);

  /* Display tracking — tuned for Fraunces, not Playfair */
  --track-hero: -0.01em;
  --track-price: -0.02em;
  --track-price-sm: -0.01em;
  --track-h2: -0.01em;
  --track-h3: -0.005em;
  --track-eyebrow: 0.08em;
  --track-badge: 0.04em;

  /* Line heights */
  --leading-hero: 1.06;
  --leading-price: 0.9;
  --leading-h2: 1.18;
  --leading-h3: 1.25;
  --leading-body: 1.55;
  --leading-tight: 1.5;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 56px;
  --space-10: 72px;
  --space-11: 80px;
  --space-12: 88px;

  /* Layout */
  --container: 1040px;
  --container-wide: 1180px;
  --gutter: 24px;
  --radius: 4px;
  --radius-sm: 3px;
  --radius-photo: 8px;
  --measure: 46ch;

  /* Motion */
  --rise-distance: 8px;
  --rise-duration: 200ms;
  --rise-ease: cubic-bezier(0.2, 0, 0, 1);
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover { color: var(--ink); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

p { margin: 0; }

strong { font-weight: var(--weight-semibold); }

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.container--wide { max-width: var(--container-wide); }

.section { background: var(--paper); }
.section--rule-top { border-top: 1px solid var(--rule); }
.section--rule-bottom { border-bottom: 1px solid var(--rule); }

/* Accent panel */
.band {
  background: var(--accent);
  color: var(--paper);
}

/* Plain links on an accent panel invert to paper. Buttons keep their own
   colours — scoped with :not(.btn) so this never outranks a button modifier. */
.band a:not(.btn) { color: var(--paper); }
.band a:not(.btn):hover { color: var(--paper); }

.section__body {
  padding-top: var(--space-11);
  padding-bottom: var(--space-11);
}

.section__body--tight {
  padding-top: var(--space-10);
  padding-bottom: var(--space-10);
}

.section__body--hero {
  padding-top: var(--space-11);
  padding-bottom: var(--space-12);
}

.section__body--wide {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

/* Section split by a full-bleed band: heading group, then band, then footnote */
.section__body--head { padding-top: var(--space-10); }

.section__body--foot {
  padding-top: var(--space-7);
  padding-bottom: var(--space-10);
}

/* Measure utilities — line length, in characters */
.measure-50 { max-width: 50ch; }
.measure-52 { max-width: 52ch; }
.measure-54 { max-width: 54ch; }
.measure-76 { max-width: 76ch; }
.measure-88 { max-width: 88ch; }

/* --------------------------------------------------------------------------
   5. Type
   -------------------------------------------------------------------------- */

.display,
.hero__title,
.section__title,
.price,
.price--sm,
.feature__title {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-optical-sizing: auto;
  font-variant-numeric: lining-nums;
  font-feature-settings: 'lnum' 1, 'onum' 0;
}

.hero__title {
  font-size: var(--text-hero);
  line-height: var(--leading-hero);
  letter-spacing: var(--track-hero);
  margin: 0 0 var(--space-6);
  max-width: 720px;
}

.section__title {
  font-size: var(--text-2xl);
  line-height: var(--leading-h2);
  letter-spacing: var(--track-h2);
  margin: 0 0 var(--space-8);
  border-left: 3px solid var(--ink);
  padding-left: var(--space-4);
}

.band .section__title {
  border-left-color: var(--paper);
  color: var(--paper);
}

.price {
  font-size: var(--text-price);
  line-height: var(--leading-price);
  letter-spacing: var(--track-price);
  margin: 0 0 var(--space-6);
}

.price--sm {
  font-size: var(--text-3xl);
  line-height: 1;
  letter-spacing: var(--track-price-sm);
  margin: 0 0 var(--space-2);
}

.feature__title {
  font-size: var(--text-lg);
  line-height: var(--leading-h3);
  letter-spacing: var(--track-h3);
  margin: 0 0 var(--space-1);
}

.lede {
  font-size: var(--text-base);
  line-height: var(--leading-body);
  margin: 0 0 var(--space-7);
  max-width: var(--measure);
}

.lede--tight { margin-bottom: var(--space-2); }
.lede--flush { margin-bottom: 0; }

/* Secondary line inside an accent panel */
.lede--dim { color: rgba(246, 244, 238, 0.72); }

/* Small print — the "quoted separately" block */
.fineprint {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* Trailing explanatory note under a section */
.section__note {
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--muted);
  margin-top: var(--space-7);
}

.text-muted { color: var(--muted); }
.text-sm { font-size: var(--text-sm); }

.note {
  font-size: var(--text-base);
  line-height: var(--leading-tight);
  color: var(--muted);
  margin: 0;
}

/* Must follow .note — its `margin: 0` shorthand would otherwise reset this. */
.note--spaced { margin-top: var(--space-7); }

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  text-decoration: none;
  padding: 14px var(--space-6);
  border-radius: var(--radius);
}

.btn--accent {
  background: var(--accent);
  color: var(--paper);
}

.btn--accent:hover { color: var(--paper); }

.btn--paper {
  background: var(--paper);
  color: var(--accent);
}

.btn--paper:hover { color: var(--accent); }

.btn--raised {
  background: var(--raised);
  color: var(--accent);
}

.btn--raised:hover { color: var(--accent); }

.btn--compact { padding: 12px var(--space-5); }

/* Quiet link on an accent panel */
.link-quiet {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--paper);
  text-decoration-color: rgba(246, 244, 238, 0.5);
}

/* --------------------------------------------------------------------------
   7. Header / nav
   -------------------------------------------------------------------------- */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
}

.site-header__logo {
  display: block;
  line-height: 0;
  flex: none;
}

/* Logo steps up once there is room. The mark is a wide lockup, so on
   narrow phones it has to give way to the nav rather than push it off-screen. */
.site-header__logo img {
  height: 26px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: none;
}

.site-nav__link,
.site-nav__current {
  font-size: 15px;
  font-weight: var(--weight-medium);
  color: var(--ink);
}

.site-nav__link { text-decoration: none; }

/* Header button is tighter than a body button, and steps up with the header. */
.site-header .btn {
  font-size: 15px;
  padding: 10px 12px;
}

@media (min-width: 400px) {
  .site-header__logo img { height: 32px; }
  .site-nav { gap: var(--space-3); }

  .site-nav__link,
  .site-nav__current { font-size: var(--text-md); }

  .site-header .btn {
    font-size: var(--text-md);
    padding: 11px 14px;
  }
}

@media (min-width: 480px) {
  .site-header__inner { gap: var(--space-4); }
  .site-header__logo img { height: 42px; }
  .site-nav { gap: var(--space-6); }

  .site-nav__link,
  .site-nav__current { font-size: var(--text-base); }

  .site-header .btn {
    font-size: var(--text-base);
    padding: 12px var(--space-5);
  }
}

/* --------------------------------------------------------------------------
   8. Grids
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: var(--space-8);
  align-items: start;
}

.grid--people {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-7);
  max-width: 520px;
}

.grid--tiers {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
}

.grid--cols3 {
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.grid--plans {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 48px;
}

.grid--work {
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: var(--space-9) var(--space-8);
}

/* Divider between columns — suppressed on narrow screens */
.col-divided {
  padding-left: 0;
  border-left: 0;
}

@media (min-width: 760px) {
  .col-divided {
    padding-left: var(--space-8);
    border-left: 1px solid var(--rule);
  }
}

/* --------------------------------------------------------------------------
   9. People
   -------------------------------------------------------------------------- */

.person__figure { display: block; }

.person__photo {
  width: 100%;
  max-width: 200px;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--rule);
  border-radius: var(--radius-photo);
}

.person__name {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-1);
}

.person__figure + .person__name { margin-top: var(--space-4); }

.person__role {
  font-size: var(--text-base);
  line-height: var(--leading-tight);
  color: var(--muted);
  margin: 0;
  max-width: 28ch;
}

/* --------------------------------------------------------------------------
   10. Pricing tiers
   -------------------------------------------------------------------------- */

.tier {
  padding: 28px var(--space-6);
  border: 1px solid var(--rule);
}

.tier--featured {
  border-color: var(--ink);
  background: var(--raised);
}

.tier__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
}

.tier__name {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  margin: 0 0 var(--space-4);
}

.tier__head .tier__name { margin: 0; }

.tier__meta {
  font-size: var(--text-base);
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-5);
}

.tier__list {
  display: grid;
  gap: var(--space-2);
  font-size: var(--text-base);
  line-height: var(--leading-tight);
  color: var(--muted);
}

.badge {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--track-badge);
  text-transform: uppercase;
  color: var(--paper);
  background: var(--accent);
  padding: var(--space-1) 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.tier-footnote {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  border-top: 1px solid var(--rule);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
}

.tier-footnote p { max-width: 60ch; }

.tier-footnote__price {
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   11. Rule lists (features, plans)
   -------------------------------------------------------------------------- */

.rule-list {
  font-size: var(--text-base);
  line-height: var(--leading-tight);
}

.rule-list li {
  border-top: 1px solid var(--rule);
  padding: var(--space-3) 0;
}

/* --------------------------------------------------------------------------
   12. Process
   -------------------------------------------------------------------------- */

.step__eyebrow {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.step__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
}

.step__body {
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* --------------------------------------------------------------------------
   13. Plans
   -------------------------------------------------------------------------- */

.plan__name {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  margin: 0 0 var(--space-3);
}

.plan__price { margin: 0 0 var(--space-1); }

.plan__period {
  font-size: var(--text-base);
  color: var(--muted);
}

.plan__meta {
  font-size: var(--text-base);
  line-height: var(--leading-tight);
  color: var(--muted);
  margin: 0 0 var(--space-5);
}

/* --------------------------------------------------------------------------
   14. Work / project cards
   -------------------------------------------------------------------------- */

.project__image {
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
}

.project__title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  margin: var(--space-4) 0 var(--space-1);
}

.project__body {
  font-size: var(--text-base);
  line-height: var(--leading-tight);
  color: var(--muted);
  margin: 0;
}

/* Full-bleed project images on narrow screens */
@media (max-width: 700px) {
  .bleed {
    padding-left: 0;
    padding-right: 0;
  }

  .bleed .section__title,
  .bleed .project__title,
  .bleed .project__body {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }

  .bleed .project__image {
    border-left: 0;
    border-right: 0;
  }
}

/* --------------------------------------------------------------------------
   15. CTA band
   -------------------------------------------------------------------------- */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-6);
}

.cta-band { margin-top: var(--space-9); }

.cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-top: 36px;
  padding-bottom: 36px;
}

.cta-band__text { max-width: 52ch; }

/* This one sits beside text on a wide band — keep it on one line. */
@media (min-width: 760px) {
  .cta-band__inner .btn { white-space: nowrap; }
}

/* --------------------------------------------------------------------------
   16. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--rule);
}

.site-footer__inner {
  padding-top: 28px;
  padding-bottom: var(--space-8);
}

.site-footer p {
  font-size: var(--text-base);
  line-height: var(--leading-tight);
  color: var(--muted);
  margin: 0;
}

/* --------------------------------------------------------------------------
   17. Reveal on scroll — the only motion on the site
   8px rise, 200ms, respects prefers-reduced-motion.
   Hidden state applies only when JS is available (html.js), so the page is
   fully readable with JS disabled.
   -------------------------------------------------------------------------- */

.js [data-rise] {
  opacity: 0;
  transform: translateY(var(--rise-distance));
  transition:
    opacity var(--rise-duration) var(--rise-ease),
    transform var(--rise-duration) var(--rise-ease);
}

.js [data-rise].is-revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js [data-rise] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   18. Error page
   -------------------------------------------------------------------------- */

.error-body {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

/* --------------------------------------------------------------------------
   19. Print
   -------------------------------------------------------------------------- */

@media print {
  body { background: var(--raised); }
  a[href^="http"] { text-decoration: none; }
  section { break-inside: avoid; }
  [data-noprint] { display: none; }
  .js [data-rise] { opacity: 1 !important; transform: none !important; }
}
