/* ferdie.co holding page */

@font-face {
  font-family: "Fraunces Display";
  font-style: normal;
  font-weight: 340;
  font-display: swap;
  src: url("/fonts/fraunces-display-v1.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces Text";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/fraunces-italic-text-v1.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/space-grotesk-v1.woff2") format("woff2");
}

:root {
  --ink: #0e1a2f;
  --deep: #172846;
  --paper: #ede6d6;
  --mist: #9dabc2;
  --brass: #c8a35a;
  --brass-hi: #d9b871;
  --gutter: clamp(16px, 4vw, 56px);
  --serif: "Fraunces Display", Georgia, "Times New Roman", serif;
  --serif-italic: "Fraunces Text", Georgia, "Times New Roman", serif;
  --sans: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--ink);
  background-image: radial-gradient(1100px 820px at 72% 38%, var(--deep) 0%, var(--ink) 62%);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

a { color: inherit; }

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

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 0 var(--gutter);
  max-width: 1480px;
  margin: 0 auto;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  padding: clamp(40px, 7vh, 72px) 0 clamp(24px, 4vh, 48px);
}

.name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(3.5rem, 8.4vw, 8.5rem);
  line-height: 0.9;
  letter-spacing: -0.025em;
  color: var(--paper);
}
.name span { display: block; }

.role {
  margin: 1.75rem 0 0;
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.45;
  color: var(--paper);
  max-width: 30em;
}
.role a {
  text-decoration: underline;
  text-decoration-color: var(--brass);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.role a:hover { color: var(--brass-hi); }

.story {
  margin: 1rem 0 0;
  text-wrap: pretty;
  color: var(--mist);
  max-width: 34em;
}

.ask {
  margin: 1rem 0 0;
  text-wrap: balance;
  color: var(--paper);
  max-width: 34em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 3px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.btn-primary { background: var(--brass); color: var(--ink); }
.btn-primary:hover { background: var(--brass-hi); }
.btn-quiet { border: 1px solid rgba(237, 230, 214, 0.45); color: var(--paper); }
.btn-quiet:hover { border-color: var(--paper); }

/* Chart */
.chart-wrap { margin: 0; }

.chart {
  display: block;
  width: 100%;
  height: auto;
  max-height: 78vh;
  overflow: visible;
}

.stars { fill: var(--paper); }
.graticule path { fill: none; stroke: var(--paper); stroke-width: 1; opacity: 0.07; }
.ticks line { stroke: var(--paper); stroke-width: 1; opacity: 0.22; }

.leg {
  fill: none;
  stroke: var(--brass);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 760ms linear forwards;
}
.leg-1 { animation-delay: 500ms; }
.leg-2 { animation-delay: 1260ms; }
.leg-3 { animation-delay: 2020ms; }

.ahead {
  fill: none;
  stroke: var(--brass);
  stroke-width: 1.5;
  stroke-dasharray: 2 8;
  stroke-linecap: round;
  opacity: 0;
  animation: ahead 900ms ease-out 2850ms forwards;
}

.mark { fill: var(--ink); stroke: var(--paper); stroke-width: 1.5; }
.halo { fill: var(--brass); opacity: 0.1; }
.ring { fill: none; stroke: var(--brass); stroke-width: 1.5; }
.now { fill: var(--brass); }

.wp { opacity: 0; animation: appear 500ms ease-out forwards; }
.wp-0 { animation-delay: 250ms; }
.wp-1 { animation-delay: 1200ms; }
.wp-2 { animation-delay: 1960ms; }
.wp-3 { animation-delay: 2720ms; }

.wp-name {
  font-family: var(--serif-italic);
  font-style: italic;
  font-weight: 400;
  font-size: 21px;
  fill: var(--paper);
}
.wp-name-now { fill: var(--brass-hi); }
.wp-note {
  font-family: var(--sans);
  font-size: 15px;
  letter-spacing: 0.01em;
  fill: var(--mist);
}
.fix {
  font-family: var(--serif-italic);
  font-style: italic;
  font-size: 15px;
  fill: var(--mist);
  opacity: 0.8;
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes ahead { to { opacity: 0.65; } }
@keyframes appear { to { opacity: 1; } }

/* Footer */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(237, 230, 214, 0.1);
  font-size: 0.875rem;
  color: var(--mist);
}
.foot p { margin: 0; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 4px; }

/* 404 */
.page-404 { grid-template-rows: 1fr; }
.lost { align-self: center; padding: 48px 0; }
.lost .name { font-size: clamp(3rem, 7vw, 6rem); }
.lost .story { margin-top: 1.5rem; }

/* Mid widths: chart is narrower, so labels need more size in chart units */
@media (max-width: 1200px) {
  .wp-name { font-size: 25px; }
  .wp-note, .fix { font-size: 19px; }
}

/* Small screens: chart first, then the introduction */
@media (max-width: 880px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    padding-top: 40px;
  }
  .chart-wrap { margin: 24px calc(var(--gutter) * -0.5) 0; }
  .chart { max-height: none; }
  .wp-name { font-size: 32px; }
  .wp-note, .fix { font-size: 26px; }
  .role { margin-top: 1.25rem; font-size: 1.0625rem; }
  .story { font-size: 1rem; }
  .btn { flex: 1 1 140px; }
}

@media (prefers-reduced-motion: reduce) {
  .leg { animation: none; stroke-dashoffset: 0; }
  .ahead { animation: none; opacity: 0.65; }
  .wp { animation: none; opacity: 1; }
  .btn { transition: none; }
}

.nowrap { white-space: nowrap; }
