/* True Bearing — page styles.
   Every value here comes from the Nocturne tokens in nocturne.css (the design
   system stylesheet, vendored verbatim). This file only lays the page out. */

:root {
  /* The design uses --space-5 and --space-7, which the system sheet does not
     define. Its scale is a flat 2.8px step (0.7 density x 4px):
     1:2.8  2:5.6  3:8.4  4:11.2  6:16.8  8:22.4 — so 5 and 7 fill in here. */
  --space-5: 14px;
  --space-7: 19.6px;
}

body { margin: 0; background: var(--color-bg); }

a { color: var(--color-accent-300); text-decoration: none; }
a:hover { color: var(--color-accent); text-decoration: underline; }

/* — page shell —
   Accent bloom off the top-right, shade falling away to the lower-left. */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 720px at 82% -160px,
      color-mix(in srgb, var(--color-accent-900) 75%, transparent), transparent 60%),
    radial-gradient(1100px 800px at -10% 100%,
      color-mix(in srgb, black 30%, transparent), transparent 55%),
    var(--color-bg);
  font-family: var(--font-body);
  color: var(--color-text);
}

/* — header lockup — */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--space-8);
}
.brand { display: flex; align-items: center; gap: var(--space-4); }
.brand-mark { flex-shrink: 0; }
.brand-wordmark { display: flex; flex-direction: column; gap: 2px; }
.brand-line-1,
.brand-line-2 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
}
.brand-line-1 { letter-spacing: 0.32em; }
.brand-line-2 { letter-spacing: 0.115em; color: var(--color-accent-300); }

/* — hero — */
.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-8);
  position: relative;
  overflow: hidden;
}
.hero-copy {
  max-width: 560px;
  padding: var(--space-8) 0;
  position: relative;
  z-index: 1;
}
.hero-kicker {
  width: 44px;
  height: 1px;
  background: var(--color-accent);
  margin-bottom: var(--space-7);
}
.hero-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(44px, 5vw, 64px);
  line-height: 1.11;
  letter-spacing: -0.015em;
  /* optical flush-left: pull the cap back off the measure */
  margin: 0 0 0 -0.06em;
}
.hero-title span { display: block; }
.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin-top: var(--space-8);
}
.hero-cta { white-space: nowrap; }

/* — bearing dial —
   Bleeds off the right edge; the hero's overflow: hidden clips it. */
.bearing-dial {
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 0;
}

/* — footer — */
.site-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: var(--space-6) var(--space-8);
}
/* Fades at both ends over 48px — the system's rule treatment. */
.site-footer-rule {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right,
    transparent, var(--color-neutral-800) 48px,
    var(--color-neutral-800) calc(100% - 48px), transparent);
}
.site-footer-note { font-size: 12px; color: var(--color-neutral-400); }

/* — contact dialog — */
.contact-backdrop {
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-backdrop[hidden] { display: none; }
.contact-dialog {
  width: 400px;
  max-width: calc(100vw - 48px);
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.contact-form[hidden] { display: none; }
.contact-lede { color: var(--color-neutral-300); margin-top: var(--space-2); }
.contact-message { resize: vertical; min-height: 84px; }
.contact-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}
.contact-submit { white-space: nowrap; }
.contact-error {
  margin: 0;
  font-size: 12px;
  color: var(--color-accent-300);
}
.contact-sent {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  text-align: left;
}
.contact-sent[hidden] { display: none; }
.contact-sent-body { color: var(--color-neutral-300); }

@media (prefers-reduced-motion: no-preference) {
  .contact-backdrop { animation: tb-fade 120ms ease-out; }
  @keyframes tb-fade { from { opacity: 0; } to { opacity: 1; } }
}

/* — narrow viewports —
   The dial keeps its role as the ground graphic: it scales down, slides
   further off the right edge and drops back so the headline stays legible. */
@media (max-width: 980px) {
  .bearing-dial { width: 460px; height: 460px; right: -150px; opacity: 0.6; }
}

@media (max-width: 700px) {
  .site-header,
  .site-footer { padding: var(--space-6); }
  .hero { padding: 0 var(--space-6); }
  .hero-title { font-size: clamp(26px, 7.6vw, 44px); }
  .bearing-dial { width: 400px; height: 400px; right: -170px; opacity: 0.4; }
}
