/* =============================================================
   LawLinkers · v2 minimal hero
   Tokens carry over from DESIGN.md — only what this page uses.
   ============================================================= */

:root {
  --c-canvas: #0a0a0a;
  --c-ink: #ffffff;
  --c-on-primary: #0a0a0a;
  --c-body: #dadbdf;
  --c-body-mid: #7d8187;
  --c-hairline: #212327;
  --c-sunset: #ff7a17;
  --c-sunset-soft: #ffc285;
  --c-twilight: #c4b5fd;
  --c-breeze: #a0c3ec;
  --border-translucent: rgba(255, 255, 255, 0.18);
  --border-translucent-strong: rgba(255, 255, 255, 0.32);

  --ff-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ff-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html,
body {
  margin: 0;
  padding: 0;
  background: var(--c-canvas);
  color: var(--c-ink);
  font-family: var(--ff-sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--c-sunset);
  color: var(--c-on-primary);
}

/* =============================================================
   stage — bg picture + veil + grain
   ============================================================= */
.stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.stage__image {
  position: absolute;
  inset: -4%;
  background-image: url("/static/assets/lawlinkers-hero-bg.png");
  background-size: cover;
  background-position: 70% 50%;
  background-repeat: no-repeat;
  transform: scale(1.04);
  transform-origin: 72% 50%;
  animation: ken-burns 32s var(--ease-in-out) infinite alternate;
  will-change: transform;
  transition: transform 600ms var(--ease-out);
}

@keyframes ken-burns {
  0%   { transform: scale(1.04) translate3d(0, 0, 0) rotate(0deg); }
  100% { transform: scale(1.12) translate3d(-1.2%, -0.8%, 0) rotate(0.6deg); }
}

/* gradient veil — keeps left side dark for legible text overlay */
.stage__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(10, 10, 10, 0.94) 0%,
      rgba(10, 10, 10, 0.78) 32%,
      rgba(10, 10, 10, 0.4) 60%,
      rgba(10, 10, 10, 0.05) 100%
    ),
    linear-gradient(
      to top,
      rgba(10, 10, 10, 0.65) 0%,
      transparent 35%,
      transparent 65%,
      rgba(10, 10, 10, 0.5) 100%
    );
}

/* fine grain — almost invisible, but kills banding on the gradient */
.stage__grain {
  position: absolute;
  inset: -100%;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  animation: grain-drift 8s steps(8) infinite;
  pointer-events: none;
}

@keyframes grain-drift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-1%, 3%); }
  80%  { transform: translate(3%, 1%); }
  100% { transform: translate(0, 0); }
}

/* =============================================================
   topbar mark
   ============================================================= */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  color: var(--c-ink);
  opacity: 0;
  animation: rise 900ms 200ms var(--ease-out) forwards;
}
.mark__glyph {
  width: 26px;
  height: 26px;
  transition: transform 600ms var(--ease-out);
}
.mark:hover .mark__glyph {
  transform: rotate(-12deg);
}
.mark__word {
  font-size: 15px;
  letter-spacing: -0.01em;
}
.mark__flag {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  opacity: 0.8;
  flex-shrink: 0;
}

/* =============================================================
   hero
   ============================================================= */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  padding: 96px 32px 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  gap: 28px;
}

/* eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-body);
}
.eyebrow__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-sunset);
  box-shadow: 0 0 14px var(--c-sunset);
  animation: pulse 1.8s var(--ease-in-out) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.85); }
  50%      { opacity: 1;    transform: scale(1.15); }
}

/* title — letter-by-letter reveal */
.title {
  margin: 0;
  font-weight: 400;
  font-size: clamp(56px, 11vw, 144px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: var(--c-ink);
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
}
.title__char {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px) rotateX(-25deg);
  transform-origin: bottom;
  animation: char-rise 700ms var(--ease-out) forwards;
  /* per-letter delay set via nth-child below */
}
.title__char--accent {
  background: linear-gradient(
    100deg,
    #e8c9a8 0%,
    #f0dcc8 18%,
    #d8d9dd 38%,
    #9a9da3 55%,
    #d8d9dd 72%,
    #f0dcc8 86%,
    #e8c9a8 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 220% 100%;
  background-position: 0% 50%;
}
.title__char:nth-child(1) { animation-delay: 320ms; }
.title__char:nth-child(2) { animation-delay: 380ms; }
.title__char:nth-child(3) { animation-delay: 440ms; }
.title__char:nth-child(4) { animation-delay: 520ms; }
.title__char:nth-child(5) { animation-delay: 560ms; }
.title__char:nth-child(6) { animation-delay: 600ms; }
.title__char:nth-child(7) { animation-delay: 640ms; }
.title__char:nth-child(8) { animation-delay: 680ms; }
.title__char:nth-child(9) { animation-delay: 720ms; }
.title__char:nth-child(10){ animation-delay: 760ms; }

@keyframes char-rise {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

/* once title is visible, drift the gradient on the accent half */
.title__char--accent {
  animation:
    char-rise 700ms var(--ease-out) forwards,
    gradient-drift 24s var(--ease-in-out) infinite;
}
@keyframes gradient-drift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}


/* motto */
.motto {
  margin: 0;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.55;
  color: var(--c-body);
  max-width: 540px;
  letter-spacing: -0.005em;
}
.motto__sub {
  font-size: clamp(14px, 1.2vw, 17px);
  color: var(--c-body-mid);
  letter-spacing: -0.003em;
}

.quote {
  margin: 0;
  max-width: 540px;
  border-left: 1px solid var(--c-hairline);
  padding-left: 16px;
}
.quote__text {
  margin: 0;
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.6;
  color: var(--c-body-mid);
  font-style: italic;
}
.quote__author {
  margin-top: 8px;
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-body-mid);
}

/* fade-up reveal helper */
[data-fade] {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 800ms var(--ease-out) forwards;
  animation-delay: var(--fade-delay, 0ms);
}
@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================================
   login button — pill, with sweep + halo + arrow
   ============================================================= */
.btn-login {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px 14px 24px;
  margin-top: 8px;
  border-radius: 9999px;
  border: 1px solid var(--border-translucent-strong);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--c-ink);
  font-family: var(--ff-sans);
  font-size: 15px;
  letter-spacing: -0.005em;
  cursor: pointer;
  overflow: hidden;
  transition: background 320ms var(--ease-out),
    border-color 320ms var(--ease-out),
    transform 320ms var(--ease-out),
    color 320ms var(--ease-out);
  isolation: isolate;
}

/* the sweep — a moving gradient stripe that travels through the pill on hover */
.btn-login::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 35%,
    rgba(255, 122, 23, 0.55) 50%,
    transparent 65%
  );
  transform: translateX(-110%);
  transition: transform 900ms var(--ease-out);
  z-index: -1;
}

.btn-login:hover {
  background: var(--c-ink);
  color: var(--c-on-primary);
  border-color: var(--c-ink);
  transform: translateY(-1px);
}
.btn-login:hover::before {
  transform: translateX(110%);
}
.btn-login:active {
  transform: translateY(0);
}

.btn-login__icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid currentColor;
  transition: transform 320ms var(--ease-out);
}
.btn-login__icon svg {
  width: 12px;
  height: 12px;
  transition: transform 320ms var(--ease-out);
}
.btn-login:hover .btn-login__icon svg {
  transform: translateX(2px);
}

/* outer pulsing halo, soft sunset ring, idle */
.btn-login__halo {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid rgba(255, 122, 23, 0.45);
  opacity: 0;
  animation: halo 2.4s var(--ease-in-out) infinite;
  pointer-events: none;
}
@keyframes halo {
  0%   { opacity: 0;     transform: scale(1); }
  40%  { opacity: 0.35;  transform: scale(1.06); }
  100% { opacity: 0;     transform: scale(1.16); }
}

/* =============================================================
   scrolling text ticker — runs once, then hides completely
   ============================================================= */
.ticker {
  --ticker-duration: 40s;

  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
  border-top: 1px solid var(--c-hairline);
  padding: 14px 0;
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* shown and hidden entirely via JS inline styles */
  opacity: 0;
  display: none;
  transition: opacity 400ms ease;
}

.ticker__track {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
  /* animation injected by JS after measuring text width */
}

.ticker__text {
  display: inline-block;
  font-size: clamp(14px, 1.4vw, 18px);
  color: var(--c-body);
  letter-spacing: -0.005em;
  padding: 0 24px;
}

.ticker__sep {
  display: inline-block;
  color: var(--c-sunset);
  font-size: 10px;
  opacity: 0.55;
  padding: 0 8px;
  vertical-align: middle;
}

/* ticker-run keyframe is injected by JS after measuring text width */

/* =============================================================
   responsive
   ============================================================= */
@media (max-width: 640px) {
  .topbar { padding: 18px 20px; }
  .hero {
    padding: 88px 20px 100px;
    gap: 22px;
  }
  .stage__veil {
    background:
      linear-gradient(
        180deg,
        rgba(10, 10, 10, 0.85) 0%,
        rgba(10, 10, 10, 0.55) 40%,
        rgba(10, 10, 10, 0.55) 60%,
        rgba(10, 10, 10, 0.95) 100%
      );
  }
}

/* =============================================================
   reduced motion
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .title__char,
  [data-fade],
  .mark {
    opacity: 1 !important;
    transform: none !important;
  }
  .ticker,
  .ticker.ticker--done {
    display: none !important;
    visibility: hidden !important;
    animation: none !important;
  }
  .ticker__track {
    animation: none !important;
  }
  .stage__image {
    transform: scale(1.06);
  }
}
