/*
 * Brass landing page (apex brass.build). Self-contained: this page is a
 * separate marketing surface from the dashboard SPA (app.brass.build), so
 * it carries its own copy of the brand tokens + the two self-hosted
 * variable fonts rather than importing the dashboard's bundle.
 *
 * The look is a dark, premium "brass + desert light" treatment: a warm
 * radial glow on a near-black field, with the faceted pyramid mark as the
 * single bright object.
 */

@font-face {
  font-family: 'Cinzel Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url('/fonts/cinzel-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2');
}

:root {
  --bg: #0b0e14;
  --surface: #11141b;
  --surface-2: #181c25;
  --fg: #e7eaf0;
  --fg-muted: #9aa3b2;
  --fg-subtle: #6b7484;
  --border: #232834;
  --border-strong: #323948;

  --brass: #c79a4a;
  --brass-bright: #ffe29e;
  --brass-deep: #7c5a25;

  --danger: #f0746a;
  --success: #4ecb95;

  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --content-max: 60rem;

  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.6);

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter Variable', ui-sans-serif, system-ui, -apple-system,
    'Segoe UI', Roboto, sans-serif;
  color: var(--fg);
  background:
    radial-gradient(70rem 38rem at 50% -8rem, rgba(199, 154, 74, 0.22), transparent 62%),
    radial-gradient(50rem 30rem at 50% 110%, rgba(199, 154, 74, 0.08), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--surface);
  color: var(--fg);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  z-index: 10;
}
.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
}

/* ---------- topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.lockup-mark {
  width: 1.5rem;
  height: 1.5rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}
.brand-name {
  font-family: 'Cinzel Variable', 'Trajan Pro', 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
}
.preview-pill {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--brass-bright);
  border: 1px solid rgba(199, 154, 74, 0.4);
  background: rgba(199, 154, 74, 0.08);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(2.5rem, 8vh, 6rem) 1.5rem 4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mark-stage {
  position: relative;
  z-index: 1;
  margin-bottom: 1.75rem;
}
.mark {
  width: clamp(8rem, 26vw, 12.5rem);
  height: clamp(8rem, 26vw, 12.5rem);
  overflow: visible;
  filter: drop-shadow(0 10px 26px rgba(199, 154, 74, 0.32));
}

/* The pyramid's transform box. The one-time load pivot is JS-driven;
   once it settles, the facets never move again — the only recurring
   animation is the ridge `+` flash below. */
.pyramid {
  transform-box: fill-box;
  transform-origin: center;
}

/* Ridge lines + base edge are hidden at rest so the facets read as one
   solid brass diamond (the canonical mark). They only appear as a flash
   during the periodic rebuild, which moves nothing — just the lines. */
.ridge {
  stroke-dasharray: 48;
  stroke-dashoffset: 0;
  opacity: 0;
}
.base-edge {
  opacity: 0;
}
.mark.building .ridge {
  animation: ridge-flash 1400ms ease both;
  animation-delay: 320ms;
}

/* The rebuild flash: ridge lines draw in from the apex, glow, then fade
   back out so the resting mark stays lineless. */
@keyframes ridge-flash {
  0% { opacity: 0; stroke-dashoffset: 48; }
  30% { opacity: 1; }
  55% { opacity: 1; stroke-dashoffset: 0; }
  100% { opacity: 0; stroke-dashoffset: 0; }
}

/* Periodic specular gleam sweeping across the brass. Mostly idle, with a
   quick sweep every few seconds. */
.gleam {
  opacity: 0.55;
  transform: skewX(-18deg);
  animation: gleam 7s ease-in-out infinite;
}
@keyframes gleam {
  0%, 62% { transform: translateX(0) skewX(-18deg); }
  82%, 100% { transform: translateX(190px) skewX(-18deg); }
}

/* During the load-time elevation->plan pivot (JS-driven), the gleam stays
   hidden; it resumes once the mark settles. The ridge lines + base edge
   are already hidden at rest, so they need no intro handling. The facet
   colors are interpolated frame-by-frame in JS (shaded -> flat), so they
   arrive settled with no end-of-pivot snap. */
.gleam {
  transition: opacity 0.6s ease;
}
.mark.intro .gleam {
  opacity: 0;
  transition: none;
}

.wordmark {
  font-family: 'Cinzel Variable', 'Trajan Pro', 'Cormorant Garamond', serif;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: clamp(2.4rem, 8vw, 4rem);
  margin: 0;
  line-height: 1;
  background: linear-gradient(180deg, #ffe29e, #c79a4a 60%, #a87f3b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tagline {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 500;
  margin: 1rem 0 0;
  color: var(--fg);
}
.subtag {
  max-width: 34rem;
  margin: 0.75rem auto 0;
  color: var(--fg-muted);
  font-size: 1.0625rem;
}
.hero-actions {
  margin-top: 2rem;
}
.preview-note {
  margin-top: 1.25rem;
  color: var(--fg-subtle);
  font-size: 0.9375rem;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 600;
  min-height: 2.85rem;
  padding: 0 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.btn.primary {
  background: linear-gradient(180deg, #d9b063, #c79a4a);
  color: #1c1405;
  box-shadow: 0 6px 18px rgba(199, 154, 74, 0.28);
}
.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(199, 154, 74, 0.38);
}
.btn.primary:active {
  transform: translateY(0);
}
.btn:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 2px;
}
.btn[disabled] {
  opacity: 0.6;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* ---------- contact ---------- */
.contact {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(199, 154, 74, 0.03), transparent 40%);
}
.contact-inner {
  max-width: 34rem;
  margin: 0 auto;
  padding: clamp(3rem, 8vh, 5rem) 1.5rem 4rem;
}
.contact h2 {
  font-size: clamp(1.6rem, 5vw, 2.25rem);
  margin: 0 0 0.5rem;
  font-weight: 600;
}
.contact-lede {
  color: var(--fg-muted);
  margin: 0 0 2rem;
}
.contact-form {
  display: grid;
  gap: 1.1rem;
}
.field {
  display: grid;
  gap: 0.4rem;
}
.field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-muted);
}
.field .optional {
  color: var(--fg-subtle);
  font-weight: 400;
}
input[type='text'],
input[type='email'],
textarea {
  width: 100%;
  font: inherit;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
textarea {
  resize: vertical;
  min-height: 6rem;
}
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(199, 154, 74, 0.2);
}
.contact-form .btn {
  justify-self: start;
  margin-top: 0.25rem;
}

/* Honeypot: removed from the visual + a11y tree, still in the DOM. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 0;
  font-size: 0.9375rem;
  min-height: 1.2em;
}
.form-status.error {
  color: var(--danger);
}
.form-status.success {
  color: var(--success);
}

/* ---------- footer ---------- */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 1.5rem 3rem;
  color: var(--fg-subtle);
  font-size: 0.875rem;
}
.site-footer .dot {
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .mark.building .ridge {
    animation: none;
  }
  .gleam {
    animation: none;
    opacity: 0;
  }
  .btn,
  input,
  textarea {
    transition: none;
  }
}
