/* ===========================================================================
   RankWave AI — shared styles
   Aesthetic: deep ink, flowing signal-waves, expressive serif display.
   =========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..700;1,9..144,300..600&family=Hanken+Grotesk:wght@300..800&display=swap');

:root {
  --ink:        #070b12;
  --ink-2:      #0b1019;
  --surface:    #0f1620;
  --line:       rgba(255, 255, 255, 0.08);
  --line-soft:  rgba(255, 255, 255, 0.05);

  --text:       #e8edf4;
  --text-dim:   #9aa7b8;
  --text-faint: #5d6b7e;

  --teal:       #2fd3c4;
  --cyan:       #36b4e0;
  --deep:       #1b6fa8;
  --amber:      #f5b544;

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body:    'Hanken Grotesk', system-ui, sans-serif;

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--body);
  background: var(--ink);
  color: var(--text);
  line-height: 1.6;
  font-weight: 350;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* grain overlay ---------------------------------------------------------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

::selection { background: var(--teal); color: var(--ink); }

/* ====================  COMING SOON (index)  ============================= */

.stage {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

/* aurora glow behind everything */
.stage::before {
  content: "";
  position: absolute;
  top: -20%;
  left: 50%;
  width: 130vw;
  height: 80vh;
  transform: translateX(-50%);
  background:
    radial-gradient(50% 55% at 50% 40%, rgba(47, 211, 196, 0.18), transparent 70%),
    radial-gradient(40% 45% at 30% 30%, rgba(54, 180, 224, 0.14), transparent 70%),
    radial-gradient(35% 40% at 72% 35%, rgba(245, 181, 68, 0.10), transparent 70%);
  filter: blur(20px);
  z-index: -2;
  animation: drift 18s var(--ease) infinite alternate;
}

@keyframes drift {
  0%   { transform: translateX(-52%) translateY(0)    scale(1); }
  100% { transform: translateX(-48%) translateY(2rem) scale(1.08); }
}

/* nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem clamp(1.5rem, 5vw, 4rem);
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.brand .mark {
  width: 30px; height: 30px;
  flex: none;
}

.nav-tag {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
}

/* hero */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 2rem clamp(1.5rem, 5vw, 4rem) 4rem;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 1.8rem;
}
.kicker::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--teal);
  display: inline-block;
}

h1.title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.2rem, 8vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 1.6rem;
}
h1.title em {
  font-style: italic;
  background: linear-gradient(100deg, var(--teal), var(--cyan) 55%, var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lede {
  font-size: clamp(1.05rem, 2.1vw, 1.4rem);
  color: var(--text-dim);
  max-width: 40ch;
  font-weight: 350;
  margin-bottom: 2.8rem;
}

/* notify form */
.notify {
  display: flex;
  gap: 0.6rem;
  max-width: 460px;
  flex-wrap: wrap;
}
.notify input {
  flex: 1 1 240px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 0.95rem 1.4rem;
  color: var(--text);
  font-family: var(--body);
  font-size: 0.98rem;
  transition: border-color 0.3s, background 0.3s;
}
.notify input::placeholder { color: var(--text-faint); }
.notify input:focus {
  outline: none;
  border-color: var(--teal);
  background: rgba(47,211,196,0.06);
}
.notify button {
  flex: none;
  background: linear-gradient(100deg, var(--teal), var(--cyan));
  color: var(--ink);
  border: none;
  border-radius: 100px;
  padding: 0.95rem 1.9rem;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.3s;
}
.notify button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(47,211,196,0.5);
}
.notify button:active { transform: translateY(0); }

.notify-note {
  margin-top: 0.9rem;
  font-size: 0.82rem;
  color: var(--text-faint);
  min-height: 1.2em;
  transition: color 0.3s;
}
.notify-note.ok { color: var(--teal); }

/* footer */
.foot {
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 1.8rem clamp(1.5rem, 5vw, 4rem) 2.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.84rem;
  color: var(--text-faint);
  border-top: 1px solid var(--line-soft);
}
.foot a { color: var(--text-dim); transition: color 0.25s; }
.foot a:hover { color: var(--teal); }
.foot nav { display: flex; gap: 1.6rem; }

/* the waves --------------------------------------------------------------- */
.waves {
  position: fixed;
  bottom: 0; left: 0;
  width: 100%;
  height: 38vh;
  min-height: 240px;
  z-index: -1;
  pointer-events: none;
  mask-image: linear-gradient(to top, #000 30%, transparent);
  -webkit-mask-image: linear-gradient(to top, #000 30%, transparent);
}
.waves svg { width: 200%; height: 100%; }
.wave-layer { animation: roll linear infinite; transform-origin: center; }
.wave-layer.l1 { animation-duration: 22s; opacity: 0.5; }
.wave-layer.l2 { animation-duration: 30s; opacity: 0.35; animation-direction: reverse; }
.wave-layer.l3 { animation-duration: 42s; opacity: 0.22; }

@keyframes roll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* entrance animations ----------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); animation: rise 1s var(--ease) forwards; }
.d1 { animation-delay: 0.1s; }
.d2 { animation-delay: 0.25s; }
.d3 { animation-delay: 0.4s; }
.d4 { animation-delay: 0.55s; }
.d5 { animation-delay: 0.7s; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ====================  LEGAL PAGES  ===================================== */

.legal-wrap { max-width: 820px; margin: 0 auto; padding: 0 clamp(1.5rem, 5vw, 3rem); }

.legal-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2rem 0; margin-bottom: 1rem;
  border-bottom: 1px solid var(--line-soft);
}
.legal-nav .brand { font-size: 1.1rem; }
.back {
  font-size: 0.85rem; color: var(--text-dim);
  display: inline-flex; align-items: center; gap: 0.4rem;
  transition: color 0.25s;
}
.back:hover { color: var(--teal); }

.legal {
  padding: 3rem 0 5rem;
}
.legal .eyebrow {
  font-size: 0.74rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--teal); font-weight: 600; margin-bottom: 1rem;
}
.legal h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 3.8rem); line-height: 1;
  letter-spacing: -0.02em; margin-bottom: 0.8rem;
}
.legal .updated { color: var(--text-faint); font-size: 0.88rem; margin-bottom: 2.8rem; }
.legal h2 {
  font-family: var(--display); font-weight: 500;
  font-size: 1.5rem; letter-spacing: -0.01em;
  margin: 2.6rem 0 0.8rem;
  color: var(--text);
}
.legal h3 { font-size: 1.05rem; font-weight: 700; margin: 1.6rem 0 0.5rem; color: var(--text); }
.legal p, .legal li { color: var(--text-dim); font-size: 1rem; margin-bottom: 0.9rem; }
.legal ul, .legal ol { padding-left: 1.4rem; margin-bottom: 1rem; }
.legal li { margin-bottom: 0.5rem; }
.legal a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.legal strong { color: var(--text); font-weight: 700; }
.legal table {
  width: 100%; border-collapse: collapse; margin: 1rem 0 1.6rem; font-size: 0.92rem;
}
.legal th, .legal td {
  text-align: left; padding: 0.7rem 0.9rem;
  border: 1px solid var(--line); vertical-align: top;
}
.legal th { background: var(--surface); color: var(--text); font-weight: 600; }
.legal td { color: var(--text-dim); }

.callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  background: rgba(47,211,196,0.04);
  border-radius: 8px;
  padding: 1.1rem 1.3rem;
  margin: 1.6rem 0;
}
.callout p { margin: 0; color: var(--text-dim); }

.legal-foot {
  border-top: 1px solid var(--line-soft);
  padding: 2rem 0 3rem;
  font-size: 0.84rem; color: var(--text-faint);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.legal-foot nav { display: flex; gap: 1.4rem; }
.legal-foot a { color: var(--text-dim); }
.legal-foot a:hover { color: var(--teal); }
