/* Longview Harbor LLC — site styles */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/newsreader-latin-opsz-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/newsreader-latin-opsz-italic.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-wght-normal.woff2") format("woff2");
}

/* ---------- Tokens ---------- */

:root {
  --paper: #ffffff;
  --ink: #12293a;
  --ink-soft: #465a6b;
  --deep: #2f6079;
  --mid: #6aa2bb;
  --pale: #bfdbe8;
  --mist: #edf5f8;
  --magenta: #a8246b;
  --rule: #d5e0e7;

  /* The logo sits on this colour. If your logo is light-on-transparent,
     set --header-bg to a dark colour (e.g. #12293a) and --header-ink to #ffffff. */
  --header-bg: #ffffff;
  --header-ink: var(--ink);

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --max: 76rem;
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
}

::selection {
  background: var(--pale);
}

:focus-visible {
  outline: 2px solid var(--magenta);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.5rem;
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 2;
  background: var(--header-bg);
  color: var(--header-ink);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: 2.75rem;
  width: auto;
  max-width: 14rem;
  object-fit: contain;
}

/* The text wordmark shows only when the logo is a square mark (brand--mark)
   or when logo.png is missing (brand--text). See assets/js/site.js. */
.brand-name {
  display: none;
  font-family: var(--serif);
  font-size: 1.4375rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.2;
}

.brand--mark .brand-name,
.brand--text .brand-name {
  display: inline;
}

.brand--text .brand-logo {
  display: none;
}

.site-nav ul {
  display: flex;
  gap: clamp(1.1rem, 3vw, 2.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding-block: 0.35rem;
  border-bottom: 1.5px solid transparent;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  border-bottom-color: var(--magenta);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 2rem clamp(2rem, 5vw, 5rem);
  padding-block: clamp(3rem, 6vw, 6rem);
}

.hero__copy {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin-bottom: 1.75rem;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.75rem, 1rem + 4.6vw, 5.25rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 34rem;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.55;
}

/* ---------- Compass rose ---------- */

.compass {
  display: block;
  justify-self: end;
  width: 100%;
  max-width: 37rem;
  height: auto;
  aspect-ratio: 1;
  overflow: visible; /* the bearing lines run past the box and fade out */
}

.ray-stop {
  stop-color: var(--ink);
}

.rays path {
  fill: none;
  stroke: url(#ray-fade);
  stroke-width: 0.8;
}

.rose-disc {
  fill: var(--paper);
}

.rose-band {
  fill: none;
  stroke: var(--mist);
  stroke-width: 22;
}

.ring {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
}

.ring--fine {
  stroke-width: 0.55;
}

.ring--guide {
  stroke-width: 0.5;
  opacity: 0.35;
}

.ticks {
  fill: none;
  stroke: var(--ink);
}

.ticks--1 {
  stroke-width: 7;
  opacity: 0.7;
}

.ticks--5 {
  stroke-width: 12;
}

.ticks--10 {
  stroke-width: 18;
}

.ticks--card {
  stroke-width: 9;
}

.rose-nums text {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  fill: var(--ink);
  text-anchor: middle;
}

.rose-cardinals text {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  fill: var(--ink);
  text-anchor: middle;
  dominant-baseline: central;
}

.north-star {
  fill: var(--magenta);
}

.pt-dark,
.pt-light {
  stroke: var(--ink);
  stroke-width: 0.8;
  stroke-linejoin: round;
}

#pt-1 .pt-dark {
  fill: var(--ink);
}

#pt-1 .pt-light {
  fill: var(--paper);
}

#pt-2 .pt-dark {
  fill: var(--deep);
}

#pt-2 .pt-light {
  fill: var(--mist);
}

#pt-3 .pt-dark {
  fill: var(--mid);
}

#pt-3 .pt-light {
  fill: var(--paper);
}

#pt-4 .pt-dark {
  fill: var(--pale);
}

#pt-4 .pt-light {
  fill: var(--paper);
}

#pt-4 .pt-dark,
#pt-4 .pt-light {
  stroke-width: 0.6;
}

.hub {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1;
}

.hub-dot {
  fill: var(--ink);
}

/* The compass card swings and settles on north once, when the page loads. */
.card {
  animation: settle 3.6s cubic-bezier(0.45, 0, 0.55, 1) 0.3s both;
}

@keyframes settle {
  0% {
    transform: rotate(-64deg);
  }
  34% {
    transform: rotate(15deg);
  }
  56% {
    transform: rotate(-6.5deg);
  }
  74% {
    transform: rotate(2.8deg);
  }
  89% {
    transform: rotate(-0.9deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  scroll-margin-top: 1rem;
}

.section--tint {
  background: var(--mist);
}

.section h2 {
  font-weight: 400;
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.012em;
}

.section h3 {
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 2.5rem clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.split--even {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

/* What we build */

.work__item {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 0.5rem 2.5rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--rule);
}

.work__item p {
  max-width: 34rem;
}

.work__item--lead {
  grid-template-columns: 1fr;
  gap: 0.9rem;
  padding-top: 0.2rem;
  padding-bottom: 2.25rem;
  border-top: 0;
}

.section .work__item--lead h3 {
  font-weight: 400;
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);
  line-height: 1.15;
}

.work__item--lead p {
  max-width: 38rem;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
  line-height: 1.55;
}

/* How we build */

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem clamp(1.5rem, 4vw, 3.5rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}

.principle {
  padding-top: 1.5rem;
  border-top: 1.5px solid var(--ink);
}

.principle h3 {
  margin-bottom: 0.6rem;
}

.principle p {
  max-width: 26rem;
}

/* Instrument dials: compass, barometer, chronometer. */
.dial {
  display: block;
  width: 5.25rem;
  height: 5.25rem;
  margin-bottom: 1.25rem;
}

.dial-rim {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.5;
}

.dial-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 0.7;
}

.dial-ticks {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3.2;
}

.dial-ticks--fine {
  stroke-width: 1.6;
  opacity: 0.6;
}

.dial-hand {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.9;
  stroke-linecap: round;
}

.dial-hand--thin {
  stroke-width: 1.1;
}

.dial-accent {
  fill: none;
  stroke: var(--magenta);
  stroke-width: 1.7;
  stroke-linecap: round;
}

.dial-accent--thin {
  stroke-width: 1;
}

.dial-accent-fill {
  fill: var(--magenta);
  stroke: var(--magenta);
  stroke-width: 0.9;
  stroke-linejoin: round;
}

.dial-pale {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 0.9;
  stroke-linejoin: round;
}

.dial-hub {
  fill: var(--ink);
}

/* Company */

.section__intro {
  max-width: 36rem;
  margin-top: 1.5rem;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
  line-height: 1.55;
}

.facts {
  max-width: 36rem;
  margin-top: 2.25rem;
  border-bottom: 1px solid var(--rule);
}

.facts > div {
  display: grid;
  grid-template-columns: 10.5rem minmax(0, 1fr);
  gap: 0.25rem 1.5rem;
  padding-block: 0.8rem;
  border-top: 1px solid var(--rule);
}

.facts dt {
  color: var(--ink-soft);
}

.contact {
  margin-top: 1.75rem;
}

.note {
  padding: 1.6rem 1.75rem 1.75rem;
  border: 1.5px solid var(--magenta);
}

.section .note h3 {
  margin-bottom: 0.9rem;
  color: var(--magenta);
  font-size: 1.375rem;
}

.note p {
  font-size: 0.9375rem;
  line-height: 1.6;
}

.note p + p {
  margin-top: 0.8rem;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: #dce7ee;
  font-size: 0.9375rem;
}

.site-footer__inner {
  padding-block: 2.25rem;
}

/* ---------- 404 ---------- */

.lost {
  padding-block: clamp(4rem, 12vw, 9rem);
}

.lost .dial {
  width: 6.5rem;
  height: 6.5rem;
  margin-bottom: 2rem;
}

/* A compass that has lost its heading: the needle wanders. */
.lost .dial-needle {
  transform-origin: 36px 36px;
  animation: wander 7s ease-in-out infinite alternate;
}

@keyframes wander {
  0% {
    transform: rotate(-70deg);
  }
  30% {
    transform: rotate(40deg);
  }
  55% {
    transform: rotate(-25deg);
  }
  80% {
    transform: rotate(95deg);
  }
  100% {
    transform: rotate(20deg);
  }
}

.lost h1 {
  margin-bottom: 1.25rem;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.5rem, 1.5rem + 4vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.lost p {
  max-width: 34rem;
  font-size: 1.1875rem;
}

.lost a {
  text-decoration-color: var(--magenta);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}

/* ---------- Smaller screens ---------- */

@media (max-width: 60rem) {
  .hero__inner {
    grid-template-columns: 1fr;
    padding-bottom: clamp(2.5rem, 8vw, 4rem);
  }

  .compass {
    justify-self: center;
    max-width: 30rem;
  }

  .split,
  .split--even {
    grid-template-columns: 1fr;
  }

  .principles {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .principle p {
    max-width: 34rem;
  }
}

@media (max-width: 36rem) {
  .work__item {
    grid-template-columns: 1fr;
  }

  .facts > div {
    grid-template-columns: 1fr;
  }

  .site-nav a {
    font-size: 0.9375rem;
  }
}

/* ---------- Motion and print ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card,
  .lost .dial-needle {
    animation: none;
  }
}

@media print {
  .rays,
  .site-nav,
  .skip-link {
    display: none;
  }

  .site-footer {
    background: none;
    color: var(--ink);
  }
}
