/* Homepage only. The learner pages keep assets/css/site.css. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500 650;
  font-display: swap;
  src: url("/assets/fonts/fraunces.woff2") format("woff2");
}

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 500 600;
  font-display: swap;
  src: url("/assets/fonts/fraunces-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Familjen Grotesk";
  font-style: normal;
  font-weight: 400 650;
  font-display: swap;
  src: url("/assets/fonts/familjen-grotesk.woff2") format("woff2");
}

@font-face {
  font-family: "Familjen Grotesk";
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/fonts/familjen-grotesk-italic.woff2") format("woff2");
}

:root {
  --paper: #f3ede3;
  --paper-2: #f7f2ea;
  --sheet: #e6ddd0;
  --ink: #161410;
  --ink-soft: #3c342c;
  --pine: #13261e;
  --pine-deep: #0c1a14;
  --cream: #f6f1e8;
  --brass: #e2a84a;
  --brass-ink: #7a4516;
  --rule: rgba(22, 20, 16, 0.16);
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --header: 4.75rem;
  --display: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", "Noto Serif", serif;
  --sans: "Familjen Grotesk", "Noto Sans", sans-serif;
  color-scheme: light;
}

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

html { scroll-padding-top: var(--header); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 450;
  line-height: 1.5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
button, input { font: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: inherit; }

::selection {
  background: var(--pine);
  color: var(--cream);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 80;
  background: var(--pine);
  color: var(--cream);
  padding: 0.55rem 0.8rem;
  text-decoration: none;
}

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

.motion .js { scroll-behavior: smooth; }

html.motion { scroll-behavior: smooth; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header);
  display: flex;
  align-items: center;
  background: rgba(243, 237, 227, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled { border-bottom-color: var(--rule); }

.nav-shell {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  min-height: 2.75rem;
}

.brand img { width: 2rem; height: 2rem; }

.brand-name {
  font-family: var(--display);
  font-weight: 560;
  font-size: 1.22rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand-name span {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-left: 0.45rem;
  position: relative;
  top: -0.08em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 550;
}

.site-nav a[aria-current="true"] {
  text-decoration: underline;
  text-decoration-color: var(--brass-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

.nav-email {
  background: var(--pine);
  color: var(--cream);
  padding: 0.62rem 0.85rem;
  line-height: 1;
}

.nav-email:hover { background: var(--pine-deep); }

.nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  padding: 0.45rem 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  min-height: calc(100dvh - var(--header));
  background: var(--paper-2);
}

.hero-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.5rem;
  min-height: calc(100dvh - var(--header));
  padding: clamp(2rem, 5vw, 4.25rem) clamp(1.5rem, 4vw, 4rem) 4.75rem var(--gutter);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 1.35rem;
  height: 2px;
  background: var(--brass-ink);
  flex: none;
}

.hero h1 {
  margin-top: 1rem;
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(4.4rem, 6.3vw, 7.35rem);
  line-height: 0.84;
  letter-spacing: -0.045em;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 1, "wght" 560;
}

.hero h1 em {
  font-style: italic;
  font-weight: 520;
  font-variation-settings: "opsz" 144, "SOFT" 70, "WONK" 1, "wght" 520;
  position: relative;
  display: inline-block;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  left: 0.02em;
  right: 0.32em;
  bottom: -0.07em;
  height: 0.032em;
  background: var(--brass-ink);
  transform: scaleX(1);
  transform-origin: left center;
}

.lead {
  margin-top: 1.35rem;
  max-width: 34rem;
  font-size: 1.15rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem 1.5rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 3rem;
  padding: 0.85rem 1.15rem;
  background: var(--pine);
  color: var(--cream);
  text-decoration: none;
  font-weight: 600;
  line-height: 1;
}

.btn:hover { background: var(--pine-deep); }

.btn-light {
  background: var(--cream);
  color: var(--pine);
}

.btn-light:hover { background: #fffdf8; }

.btn-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
}

.text-link {
  font-weight: 600;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

.hero-mail {
  margin-top: 0.95rem;
  font-size: 0.98rem;
}

.hero-mail a {
  text-underline-offset: 0.18em;
}

.hero-index {
  position: absolute;
  left: var(--gutter);
  bottom: 1.45rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero-index i {
  display: block;
  width: 1.15rem;
  height: 1px;
  background: var(--brass-ink);
}

.hero-plate {
  position: relative;
  display: grid;
  place-items: center;
  color: var(--cream);
  background:
    radial-gradient(120% 90% at 50% 42%, #1c382c 0%, #13261e 56%, #0d1b15 100%);
  overflow: hidden;
}

.hero-plate::before {
  content: "";
  position: absolute;
  inset: 0.85rem;
  border: 1px solid rgba(246, 241, 232, 0.2);
  pointer-events: none;
}

.mark {
  width: min(82%, 540px);
  height: auto;
  display: block;
  user-select: none;
}

.ticks { color: rgba(246, 241, 232, 0.82); }

.rose-major-left { fill: rgba(246, 241, 232, 0.38); }
.rose-major-right { fill: rgba(246, 241, 232, 0.92); }
.rose-minor-left { fill: rgba(246, 241, 232, 0.2); }
.rose-minor-right { fill: rgba(246, 241, 232, 0.55); }
.rose-north-left { fill: #c4843a; }
.rose-north-right { fill: var(--brass); }

.cardinal {
  fill: rgba(246, 241, 232, 0.78);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.cardinal-n { fill: var(--brass); }

.north-arc {
  stroke: var(--brass);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.hub { fill: #102018; }

.needle-north { fill: var(--cream); }
.needle-south { fill: #c4843a; }

.boss {
  fill: #102018;
  stroke: var(--brass);
  stroke-width: 1.2;
}

.boss-core { fill: var(--brass); }

.rose,
.needle,
.ticks,
.cardinals {
  transform-box: view-box;
  transform-origin: 200px 200px;
}

.plate-caption {
  position: absolute;
  left: 1.6rem;
  right: 1.6rem;
  bottom: 1.15rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(246, 241, 232, 0.82);
}

/* Sections */

.section { padding: clamp(4.25rem, 8vw, 7rem) 0; }

.section-inner {
  width: min(1120px, calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
  gap: 1.5rem 2.5rem;
  align-items: end;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.section h2 {
  margin-top: 0.7rem;
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(2.6rem, 4.6vw, 4.4rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
  font-variation-settings: "opsz" 100, "SOFT" 20, "wght" 560;
}

.dek {
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.services { list-style: none; }

.service {
  position: relative;
  display: grid;
  grid-template-columns: 4.25rem minmax(12rem, 0.75fr) minmax(16rem, 1.15fr);
  gap: 0.75rem 1.5rem;
  align-items: baseline;
  padding: 1.65rem 0 1.65rem 0.85rem;
  border-top: 1px solid var(--rule);
}

.service:last-child { border-bottom: 1px solid var(--rule); }

.service::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  bottom: 0.85rem;
  width: 2px;
  background: var(--brass-ink);
  transform: scaleY(0);
  transform-origin: top;
}

.num {
  font-family: var(--display);
  font-style: italic;
  font-weight: 520;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.service h3 {
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(1.65rem, 2.3vw, 2.25rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.service p {
  color: var(--ink-soft);
  max-width: 40rem;
}

.services-close { margin-top: 1.75rem; }

.band { background: var(--sheet); }

.steps {
  position: relative;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.75rem;
}

.steps::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0.72rem;
  height: 1px;
  background: rgba(22, 20, 16, 0.45);
  transform-origin: left center;
}

.step-num {
  position: relative;
  z-index: 1;
  display: inline-block;
  background: var(--sheet);
  padding-right: 0.75rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 520;
  font-size: 1.2rem;
}

.steps h3 {
  margin-top: 1.1rem;
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(1.35rem, 1.8vw, 1.7rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.steps p {
  margin-top: 0.55rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(1.5rem, 4vw, 4.5rem);
  align-items: start;
}

.portrait {
  position: relative;
  margin: 0;
}

.portrait::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--brass-ink);
}

.portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 18%;
  filter: saturate(0.88) contrast(1.04);
}

.about-copy p + p { margin-top: 1rem; }

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

.creds {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 1.75rem;
}

.creds li {
  padding: 0.8rem 0.75rem 0.8rem 0;
  border-top: 1px solid var(--rule);
}

.contact {
  background: var(--pine);
  color: var(--cream);
  padding: clamp(4.5rem, 9vw, 7.5rem) 0 clamp(3.5rem, 7vw, 5.5rem);
}

.contact .eyebrow::before { background: var(--brass); }

.contact h2 {
  margin-top: 0.75rem;
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(3.2rem, 7vw, 6.4rem);
  line-height: 0.88;
  letter-spacing: -0.045em;
  max-width: 10ch;
  font-variation-settings: "opsz" 144, "SOFT" 30, "wght" 560;
}

.contact .dek {
  margin-top: 1.25rem;
  color: var(--cream);
  max-width: 34rem;
}

.email-link {
  display: inline-block;
  margin-top: 1.6rem;
  color: var(--cream);
  font-family: var(--display);
  font-weight: 520;
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  letter-spacing: -0.03em;
  text-decoration-color: var(--brass);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.16em;
  overflow-wrap: anywhere;
}

.contact .btn { margin-top: 1.5rem; }

.site-footer {
  background: var(--pine-deep);
  color: var(--cream);
  padding: 1.35rem 0 1.6rem;
}

.footer-inner {
  width: min(1120px, calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem 1.5rem;
}

.footer-name {
  font-family: var(--display);
  font-weight: 560;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.footer-role {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}

.site-footer a { text-underline-offset: 0.18em; }

.footer-copy { font-size: 0.92rem; }

/* Motion */

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes rose-in { to { opacity: 1; transform: scale(1); } }
@keyframes settle {
  0% { transform: rotate(-28deg); }
  70% { transform: rotate(4deg); }
  100% { transform: rotate(0deg); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes rule { to { transform: scaleX(1); } }

.motion .ring {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: draw 1.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.motion .ticks {
  opacity: 0;
  animation: fade 0.9s 0.12s ease forwards;
}

.motion .rose,
.motion .hub {
  opacity: 0;
  transform: scale(0.9);
  animation: rose-in 1.05s 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.motion .hub { transform: none; animation-name: fade; }

.motion .cardinals {
  opacity: 0;
  animation: fade 0.55s 0.75s ease forwards;
}

.motion .north-arc {
  stroke-dasharray: 180;
  stroke-dashoffset: 180;
  animation: draw 0.85s 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.motion .needle {
  transform: rotate(-28deg);
  animation: settle 1.5s 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.motion .mark.is-live .needle {
  animation: none;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.motion .rise {
  opacity: 0;
  animation: rise 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.motion .rise-2 { animation-delay: 0.08s; }
.motion .rise-3 { animation-delay: 0.16s; }
.motion .rise-4 { animation-delay: 0.26s; }

.motion .hero h1 em::after {
  transform: scaleX(0);
  animation: rule 0.7s 0.48s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.motion .steps::before { transform: scaleX(0); }

.motion .steps.is-in::before {
  transform: scaleX(1);
  transition: transform 1.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) and (pointer: fine) {
  .service h3 { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
  .service:hover::before,
  .service:focus-within::before { transform: scaleY(1); transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
  .service:hover h3 { transform: translateX(0.35rem); }
  .motion .btn .btn-icon { transition: transform 0.25s ease; }
  .motion .btn:hover .btn-icon { transform: translateX(4px); }
}

/* Layout */

@media (max-width: 980px) {
  .hero h1 { font-size: clamp(3.6rem, 8vw, 5.4rem); }
  .service { grid-template-columns: 3.25rem minmax(0, 1fr); }
  .service p { grid-column: 2; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { min-height: 0; justify-content: flex-start; padding-top: 1.75rem; padding-bottom: 1.15rem; }
  .hero h1 { font-size: clamp(2.7rem, 11vw, 3.4rem); }
  .lead { margin-top: 0.9rem; font-size: 1.05rem; }
  .hero-actions { margin-top: 1.2rem; }
  .hero-index { position: static; margin-top: 1.75rem; }
  .hero-plate { min-height: 0; padding: 1.15rem 0.75rem 2.5rem; }
  .mark { width: min(62vw, 280px); }
  .section-head,
  .about-grid,
  .steps { grid-template-columns: 1fr; }
  .steps::before {
    left: 0.35rem;
    right: auto;
    top: 0;
    bottom: 0;
    width: 1px;
    height: auto;
  }
  .motion .steps::before { transform: scaleY(0); }
  .motion .steps.is-in::before { transform: scaleY(1); }
  .step-num { padding-left: 1rem; }
  .creds { grid-template-columns: 1fr; }
  .portrait { max-width: 26rem; }
}

@media (max-width: 760px) {
  .nav-toggle { display: none; }
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.4rem var(--gutter) 1.2rem;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
  }
  .js .site-nav.open { display: flex; }
  .js .site-nav a {
    font-family: var(--display);
    font-size: 2rem;
    font-weight: 540;
    letter-spacing: -0.03em;
    padding: 0.2rem 0;
  }
  .js .nav-email {
    font-family: var(--sans);
    font-size: 1rem;
    letter-spacing: 0;
    margin-top: 0.55rem;
  }
}

@media (max-width: 520px) {
  .brand-name span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .ring,
  .north-arc { stroke-dashoffset: 0 !important; }
  .rose,
  .hub,
  .needle,
  .ticks,
  .cardinals,
  .rise,
  .hero h1 em::after {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media print {
  .site-header,
  .nav-toggle,
  .hero-plate,
  .btn { display: none !important; }
  .hero,
  .hero-copy { min-height: 0; display: block; }
  body { background: #fff; }
  .contact,
  .site-footer { background: #fff; color: #000; }
}
