/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V4
 * macrostructure: single-section landing page (validation-stage — deliberately stripped of
 *   product mockups / feature claims per user request; not a full Marquee/multi-section build)
 * nav: minimal wordmark + single CTA (no logomark, per user request) · footer: Ft2-style
 *   inline single line
 * theme: studied-DNA (source: image, coasty.ai) · studied: yes
 * paper: oklch(9% 0.006 258) · ink: oklch(97% 0.004 258) · accent: none — true monochrome
 * display/body: General Sans · outlier: JetBrains Mono
 * axes: dark / grotesk-sans / neutral
 * enrichment: Tier A/B hand-built animated wireframe globe (SVG + CSS transform only,
 *   no video/WebGL) — explicit user request for a "slick, interconnected, animated" visual;
 *   continuous loop is an intentional exception to the usual no-infinite-loop default,
 *   gated behind prefers-reduced-motion: no-preference throughout
 */

@import url("tokens.css");

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink-2);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-ink);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }

/* Prose links get a real underline rather than a border-bottom in a rule token.
 * text-decoration inherits the link's own colour, so the affordance carries the
 * link's contrast (~10:1) instead of the rule token's, and satisfies WCAG 1.4.1
 * by not signalling "this is a link" through colour alone. */
.book__fallback a,
.book__panel-fallback a,
.foot-simple__links a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}
img, svg { max-width: 100%; display: block; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  line-height: 1;
  padding: 0.8rem 1.375rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out),
              border-color var(--dur-short) var(--ease-out),
              transform 100ms var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.btn--accent { background: var(--color-accent); color: var(--color-accent-ink); border-color: var(--color-accent); }
@media (hover: hover) and (pointer: fine) {
  .btn--accent:hover { background: var(--color-ink-2); border-color: var(--color-ink-2); }
}
.btn--lg { padding: 0.95rem 1.75rem; font-size: var(--text-md); }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out);
}
.nav.is-scrolled {
  background: color-mix(in oklch, var(--color-paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--color-rule);
}
.nav__inner {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
  height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-md);
  letter-spacing: -0.02em;
  color: var(--color-ink);
}

/* ---------- hero ---------- */
.hero {
  padding-top: clamp(3.5rem, 9vw, var(--space-4xl));
  padding-inline: var(--page-gutter);
  padding-bottom: var(--space-2xl);
  text-align: center;
}
.hero__inner { max-width: 42rem; margin-inline: auto; }
.hero h1 { font-size: var(--text-display); overflow-wrap: anywhere; min-width: 0; }
.hero__weak { color: var(--color-muted); font-weight: 400; }
.hero__strong { color: var(--color-ink); font-weight: 700; }
.hero__lede {
  margin: var(--space-lg) auto 0;
  max-width: 40rem;
  color: var(--color-ink-2);
  font-size: var(--text-lg);
  font-weight: 400;
  line-height: 1.5;
}
.hero__ctas { margin-top: var(--space-xl); display: flex; justify-content: center; }

/* ---------- animated wireframe globe (drag to rotate) ---------- */
.globe {
  position: relative;
  width: min(60rem, 98vw);
  aspect-ratio: 1 / 1;
  margin: clamp(2.5rem, 7vw, var(--space-3xl)) auto 0;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}
.globe.is-dragging { cursor: grabbing; }
.globe__glow {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklch, var(--color-ink) 24%, transparent), transparent 70%);
  filter: blur(60px);
}
.globe__svg { position: relative; width: 100%; height: 100%; }
.globe__outline { opacity: 0.6; }
.globe__latitudes { opacity: 0.5; }
.globe__meridian {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0.55;
}
.globe__link { stroke-dasharray: 3 7; transition: opacity 200ms var(--ease-out); }
.globe__node { transition: r 180ms var(--ease-out), opacity 200ms var(--ease-out); }
.globe__continents circle { pointer-events: none; }
.globe__hub {
  transform-box: fill-box;
  transform-origin: center;
}

@media (prefers-reduced-motion: no-preference) {
  .globe__link { animation: globe-flow 3.4s linear infinite; }
  .globe__hub { animation: globe-pulse 3.2s ease-in-out infinite; }
}

@keyframes globe-flow {
  to { stroke-dashoffset: -20; }
}
@keyframes globe-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(1.2); }
}

/* ---------- globe extras (ambient dots, orbit ring, satellite, pings, hub glow, labels) ---------- */
.globe__ambient circle { opacity: 0.6; }
.globe__orbit { opacity: 0.5; }
.globe__hub-glow { opacity: 0.18; filter: blur(7px); }
.globe__labels--hub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  fill: var(--color-ink);
  opacity: 0.9;
}
/* transform-box must stay view-box (the SVG default) here: the satellite orbits the
 * globe centre at viewBox 260,260, not its own centre. With fill-box the origin
 * resolved against the 5.2px satellite bbox and threw the orbit off-canvas entirely.
 * .globe__hub / .globe__ping below are the opposite case and correctly use fill-box. */
.globe__satellite-orbit {
  transform-box: view-box;
  transform-origin: 260px 260px;
}
.globe__ping {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
@media (prefers-reduced-motion: no-preference) {
  .globe__orbit {
    transform-box: fill-box;
    transform-origin: center;
    animation: globe-orbit 90s linear infinite;
  }
  .globe__satellite-orbit { animation: globe-orbit 14s linear infinite; }
  .globe__ping {
    animation: globe-ping 3.2s var(--ease-out) infinite;
    animation-delay: var(--d, 0s);
  }
}
@keyframes globe-orbit { to { transform: rotate(360deg); } }
@keyframes globe-ping {
  0%   { transform: scale(0.7); opacity: 0.5; }
  70%  { transform: scale(2.1); opacity: 0; }
  100% { transform: scale(2.1); opacity: 0; }
}

/* ---------- booking ---------- */
.book {
  padding-block: var(--space-3xl);
  padding-inline: var(--page-gutter);
  border-top: 1px solid var(--color-rule);
  text-align: center;
  scroll-margin-top: 4.5rem;
}
.book__pitch {
  max-width: 40rem;
  margin-inline: auto;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.book__panel {
  max-width: 40rem;
  margin: var(--space-2xl) auto 0;
  border: 1px solid var(--color-rule-2);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-paper-2);
}
/* Shown until Calendly's widget.js replaces the container's children. Doubles as the
 * loading state and as the failure state if the third-party script never arrives. */
.book__panel-fallback {
  padding: var(--space-2xl) var(--space-lg);
  color: var(--color-muted);
  font-size: var(--text-sm);
}
.book__fallback {
  margin-top: var(--space-xl);
  color: var(--color-muted);
  font-size: var(--text-sm);
}
.book__fallback a { color: var(--color-ink-2); }
@media (hover: hover) and (pointer: fine) {
  .book__fallback a:hover { color: var(--color-ink); }
}

/* ---------- footer ---------- */
.foot-simple {
  border-top: 1px solid var(--color-rule);
  padding: var(--space-2xl) var(--page-gutter) var(--space-xl);
  text-align: center;
}
.foot-simple__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-ink);
}
.foot-simple__tagline { margin-top: var(--space-sm); color: var(--color-muted); font-size: var(--text-sm); }
.foot-simple__links { margin-top: var(--space-lg); font-size: var(--text-sm); }
.foot-simple__links a { color: var(--color-ink-2); }
@media (hover: hover) and (pointer: fine) {
  .foot-simple__links a:hover { color: var(--color-ink); }
}
.foot-simple__meta {
  margin-top: var(--space-lg);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-muted);
}

/* ---------- responsive floor ---------- */
@media (max-width: 26rem) {
  .hero h1 { font-size: clamp(2rem, 9vw, 2.6rem); }
}

@media (max-width: 40rem) {
  .hero__lede { font-size: var(--text-base); }
  .book__pitch { font-size: var(--text-lg); }
  .globe {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
}
