/* =========================================================
   Strilar — Coming Soon
   Design tokens lifted from /design.md with Strilar accent
   ========================================================= */

:root {
  /* Brand */
  --strilar-accent: #0000ee;            /* electric blue from logo */
  --strilar-accent-rgb: 0 0 238;
  --strilar-accent-fg: #ffffff;

  /* Neutrals */
  --background: #ffffff;
  --foreground: #060606;
  --muted: #f5f5f5;
  --muted-foreground: #484848;
  --primary: #171717;
  --primary-foreground: #fafafa;

  /* Borders / structure */
  --border: #c7c7c7;
  --border-soft: #ececec;
  --ring: #a1a1a1;
  --radius-xs: 2px;
  --radius-sm: 6px;
  --radius-md: 10px;

  /* Type — Geist + Geist Mono (Vercel, free) as the closest open analogs
     of Studio Apply's commercial apkGaleria + apkMonogami pair. */
  --font-sans: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Motion */
  --ease-out-expo: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out:   cubic-bezier(.4, 0, .2, 1);
  --dur-micro:     .2s;
  --dur-component: .4s;
  --dur-entrance:  .8s;
  --stagger-step:  80ms;
  --reveal-translate: 24px;

  /* Layout */
  --container-max: 1152px;
  --container-px: 24px;
  --container-px-md: 48px;
  --nav-height: 64px;
}

/* =========================================================
   Reset / base
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  font-feature-settings: "ss01", "cv11";
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
button, input { font: inherit; color: inherit; }

::selection { background: var(--strilar-accent); color: var(--strilar-accent-fg); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px;
  background: var(--foreground); color: var(--background);
  padding: 8px 12px; border-radius: var(--radius-xs);
  font-family: var(--font-mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: .05em; z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

/* =========================================================
   Container
   ========================================================= */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}
@media (min-width: 768px) {
  .container { padding-left: var(--container-px-md); padding-right: var(--container-px-md); }
}

/* =========================================================
   Header
   ========================================================= */

.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-height);
  display: flex; align-items: center;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 100%;
}
.header-left {
  display: flex; align-items: center; gap: 16px;
  min-width: 0;
}
.logo { display: inline-flex; align-items: center; flex: 0 0 auto; }
.logo img { width: 108px; height: auto; }

.divider {
  width: 1px; height: 28px;
  background: var(--border);
  display: inline-block;
}

/* ---- Clock + date next to logo ---- */
.clock {
  display: inline-flex; flex-direction: column;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.1;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.clock-date { color: var(--muted-foreground); }
.clock-time { color: var(--foreground); font-weight: 500; }

@media (max-width: 640px) {
  .divider { display: none; }
  .clock { display: none; }
}

/* ---- Book a call pill (header right) ---- */
.pill {
  display: inline-flex; align-items: center;
  height: 44px;
  padding: 4px 4px 4px 4px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--foreground);
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition:
    background-color var(--dur-micro) var(--ease-in-out),
    box-shadow var(--dur-micro) var(--ease-in-out),
    transform var(--dur-micro) var(--ease-in-out);
}
.pill:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.10);
  transform: translateY(-1px);
}
.pill:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--strilar-accent-rgb), 0.35);
}
.pill-mark,
.pill-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 9999px;
  flex: 0 0 auto;
}
.pill-mark {
  background: var(--foreground);
}
.pill-mark img { width: 16px; height: 16px; display: block; }
.pill-arrow {
  background: var(--strilar-accent);
  color: #ffffff;
  margin-left: 2px;
}
.pill-label {
  padding: 0 14px 0 12px;
  color: var(--foreground);
}

@media (max-width: 520px) {
  .pill-label { display: none; }
  .pill { padding: 4px; gap: 2px; }
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  display: flex; align-items: center;
  padding-top: 40px;
  padding-bottom: 40px;
  overflow: visible;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; }
}

.hero-copy { display: flex; flex-direction: column; gap: 24px; max-width: 560px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 400;     /* matches Studio Apply mono labels */
  line-height: 16px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted-foreground);
}
.pulse {
  width: 7px; height: 7px;
  background: var(--strilar-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(var(--strilar-accent-rgb), 0.6);
  animation: pulse 2.2s var(--ease-out-expo) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0    rgba(var(--strilar-accent-rgb), 0.55); }
  70%  { box-shadow: 0 0 0 12px rgba(var(--strilar-accent-rgb), 0); }
  100% { box-shadow: 0 0 0 0    rgba(var(--strilar-accent-rgb), 0); }
}

.display {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  /* Mirrors Studio Apply's restraint: text-3xl → text-4xl (30→36px), capped. */
  font-size: clamp(30px, 3.4vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--foreground);
}

.lead {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.625;       /* matches Studio Apply lead: 29.25px / 18px */
  color: var(--muted-foreground);
  max-width: 480px;
}

/* =========================================================
   Sign-up form
   ========================================================= */

.signup { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.signup-field {
  display: flex; align-items: stretch; gap: 8px;
  max-width: 480px;
}
#email {
  flex: 1 1 auto; min-width: 0;
  height: 44px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 14px;
  color: var(--foreground);
  transition: border-color var(--dur-micro) var(--ease-in-out),
              box-shadow var(--dur-micro) var(--ease-in-out);
}
#email::placeholder { color: #9c9c9c; }
#email:focus {
  outline: none;
  border-color: var(--foreground);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}
#email:invalid:not(:placeholder-shown) { border-color: #e40014; }

.signup-help, .signup-status {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted-foreground);
  min-height: 16px;
}
.signup-status { color: var(--strilar-accent); }
.signup-status.is-error { color: #e40014; }

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  background: var(--foreground);
  color: var(--background);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .12em;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color var(--dur-micro) var(--ease-in-out),
    color var(--dur-micro) var(--ease-in-out),
    transform var(--dur-micro) var(--ease-in-out),
    border-color var(--dur-micro) var(--ease-in-out);
}
.btn:hover { background: #1a1a1a; }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--strilar-accent-rgb), 0.35);
}
.btn:active { transform: translateY(1px); }
.btn-icon { transition: transform var(--dur-micro) var(--ease-in-out); }
.btn:hover .btn-icon { transform: translateX(2px); }

.btn-accent {
  background: var(--strilar-accent);
  color: var(--strilar-accent-fg);
  border-color: var(--strilar-accent);
}
.btn-accent:hover { background: #0000c8; border-color: #0000c8; }

.btn-outline {
  background: #fff;
  color: var(--foreground);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--foreground); }

/* =========================================================
   Meta row (Studio · Status · Where)
   ========================================================= */

.meta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}
.meta-row li { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.meta-key {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.meta-val { font-size: 14px; color: var(--foreground); font-weight: 500; }

/* =========================================================
   Globe
   ========================================================= */

.hero-visual {
  display: flex; align-items: center; justify-content: center;
  position: relative;
  min-height: 320px;
  overflow: visible;
}
.globe-frame {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1 / 1;
  overflow: visible;
}
.globe-stage {
  /* Three.js mount: holds the auto-injected <canvas> at full bleed. */
  position: absolute; inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
  outline: none;
}
.globe-stage:active { cursor: grabbing; }
.globe-stage canvas {
  display: block;
  width: 100%   !important;
  height: 100%  !important;
}

.globe-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.globe-tick {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--muted-foreground);
  text-transform: uppercase;
}
.globe-tick:nth-child(1) { top: 0; left: 0; }
.globe-tick:nth-child(2) { bottom: 0; right: 0; }
.globe-hint {
  position: absolute;
  left: 50%; bottom: 6px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--muted-foreground);
  text-transform: uppercase;
  opacity: 0;
  transition: opacity var(--dur-component) var(--ease-in-out);
}
.globe-frame:hover .globe-hint { opacity: 1; }

@media (min-width: 900px) {
  /* Lock the desktop landing to exactly 100 vh: body becomes a flex
     column so header + hero + footer fill the viewport without a
     scroll. */
  body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-height: 100vh;
    overflow-y: hidden;
  }
  .site-header,
  .site-footer { flex: 0 0 auto; }
  .hero {
    flex: 1 1 auto;
    min-height: 0;
  }

  /* Same original size (600 px), but absolutely positioned inside the
     visual slot so it isn't constrained by the grid column. Centred in
     place — no overflow past the viewport, no growth — just unboxed. */
  .hero-visual {
    min-height: 560px;
  }
  .globe-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 580px;
    height: 580px;
    max-width: none;
  }
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 20px 0;
}
.footer-inner {
  display: flex; flex-direction: column; gap: 20px;
  justify-content: space-between; align-items: flex-start;
}
@media (min-width: 768px) {
  .footer-inner { flex-direction: row; align-items: center; }
}
.footer-credit {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--muted-foreground);
}
.footer-credit .dim { color: var(--ring); }
.footer-links {
  display: flex; flex-wrap: wrap; gap: 20px 28px;
}
.link {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted-foreground);
  transition: color var(--dur-micro) var(--ease-in-out);
}
.link:hover { color: var(--foreground); }
.link-val { color: var(--foreground); }

/* =========================================================
   Reveal animation (entrance)
   ========================================================= */

.reveal [data-reveal],
[data-reveal] {
  opacity: 0;
  transform: translateY(var(--reveal-translate));
  transition:
    opacity var(--dur-entrance) var(--ease-out-expo),
    transform var(--dur-entrance) var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .pulse { animation: none; }
}

/* =========================================================
   Dark mode (auto)
   ========================================================= */

@media (prefers-color-scheme: dark) {
  :root {
    --background: #060606;
    --foreground: #f4f4f4;
    --muted-foreground: #9a9a9a;
    --border: #2b2b2b;
    --border-soft: #1a1a1a;
    --primary: #f4f4f4;
    --primary-foreground: #060606;
  }
  body { background: var(--background); color: var(--foreground); }
  .site-header { background: rgba(6,6,6,0.7); }
  .logo img { content: url("/assets/logo-dark.svg"); }
  .divider { background: var(--border); }
  .pill { background: #0d0d0d; }
  .pill-mark { background: #f4f4f4; }
  .pill-mark img { content: url("/assets/favicon.svg"); }   /* black mark on white circle */
  #email { background: #0d0d0d; }
  #email::placeholder { color: #6a6a6a; }
  #email:focus { box-shadow: 0 0 0 3px rgba(255,255,255,0.06); }
  .btn { background: #f4f4f4; color: #060606; }
  .btn:hover { background: #ffffff; }
  .btn-accent { background: var(--strilar-accent); color: #fff; border-color: var(--strilar-accent); }
  .btn-accent:hover { background: #1a1aff; border-color: #1a1aff; }
  .globe-frame::before { border-color: rgba(255,255,255,0.08); }
  .globe-frame::after {
    background:
      linear-gradient(to right, transparent calc(50% - 1px), rgba(255,255,255,0.05) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
      linear-gradient(to bottom, transparent calc(50% - 1px), rgba(255,255,255,0.05) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
  }
}
