/* Encanta Studio shared styles — tokens from Encanta Digital Brand
   Guidelines v1.1 (Dec 2025): Void/Obsidian/Graphite surfaces, Spark/
   Ember/Glow accents, Space Grotesk display + Inter body, dark-first
   glassmorphism with Spark gradient orbs. */

:root {
  /* Surfaces */
  --bg: #0a0a0b;          /* Void */
  --bg-raised: #141416;   /* Obsidian */
  --bg-inset: #0c0c0e;
  --line: #1e1e21;        /* Graphite */
  --glass: rgba(20, 20, 22, 0.55);
  --glass-line: rgba(255, 255, 255, 0.10);
  --glass-line-hover: rgba(255, 255, 255, 0.24);

  /* Text */
  --text: #fafafa;
  --text-dim: #b4b4b8;
  --text-muted: #8a8a93;

  /* Brand accents */
  --accent-a: #ff6b2c;    /* Spark — CTAs, links, brand accent */
  --accent-b: #ff8f5c;    /* Ember — hover states */
  --accent-c: #ffb088;    /* Glow — highlights, badges */
  --grad: linear-gradient(120deg, var(--accent-a), var(--accent-b) 60%, var(--accent-c));

  /* Semantic */
  --valid: #22c55e;
  --alert: #ef4444;
  --info: #3b82f6;

  --radius: 14px;
  --page-pad: clamp(24px, 3.4vw, 50px);
  --font-display: "Space Grotesk", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font-body);
}

/* Spark gradient orbs (brand guideline: Spark at 0.25 opacity) behind
   the glass surfaces. Fixed so they glow through while scrolling. */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 44, 0.25), transparent 70%);
  filter: blur(90px);
  pointer-events: none;
}

body::before { top: -220px; right: -120px; }
body::after { bottom: -260px; left: -180px; opacity: 0.6; }

h1, h2, h3, h4 { font-family: var(--font-display); }

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

main { max-width: 980px; margin: 0 auto; padding: 0 24px; }

.hidden { display: none !important; }

/* Accessibility: visible keyboard focus on every interactive element
   (mouse clicks don't trigger :focus-visible, so this is keyboard-only). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-a);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip-to-content link — off-screen until focused. */
.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  background: var(--accent-a);
  color: #fff;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 8px;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; text-decoration: none; color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .brand-mark { animation: none !important; }
}

/* Nav */
.nav {
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Wordmark: uppercase Space Grotesk, Spark-accent second word */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.brand em { font-style: normal; color: var(--accent-a); }

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: conic-gradient(from 210deg, var(--accent-a), var(--accent-b), var(--accent-c), var(--accent-a));
  box-shadow: 0 0 18px rgba(255, 107, 44, 0.4);
  animation: mark-breathe 6s ease-in-out infinite alternate;
}

@keyframes mark-breathe {
  from { box-shadow: 0 0 12px rgba(255, 107, 44, 0.3); }
  to { box-shadow: 0 0 26px rgba(255, 107, 44, 0.55); }
}

.nav-link { font-size: 13px; color: var(--text-dim); }
.nav-link:hover { color: var(--text); text-decoration: none; }

/* Tool-page hero (Friction Finder, Mapper — simple heading block) */
.tool-hero { padding: 64px 0 40px; max-width: 660px; }

.tool-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tool-hero p { margin: 0 0 26px; color: var(--text-dim); font-size: 17px; }

/* ================================================================== */
/* Landing hero: full viewport, quiet ember-field background,          */
/* one-breath load-in (paused until body.is-ready)                     */
/* ================================================================== */

.hero {
  position: relative;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  background: var(--bg);
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* A whisper of a scrim — the field is already quiet. */
  background: linear-gradient(to right, rgba(8, 8, 8, 0.4) 0%, rgba(8, 8, 8, 0.1) 45%, rgba(8, 8, 8, 0) 70%);
  pointer-events: none;
}

/* Single soft fade into the page below — no blur theatrics. */
.hero__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 0%, rgba(10, 10, 11, 0.6) 55%, var(--bg) 100%);
}

/* Hero header */
.hero__nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--page-pad);
}

/* Glass nav pill — present from the first frame's settle, no theatrics */
.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: clamp(16px, 2.3vw, 33px);
  padding: clamp(8px, 0.76vw, 11px) clamp(13px, 1.4vw, 20px);
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: linear-gradient(12deg, rgba(255, 255, 255, 0.06) -43%, rgba(255, 255, 255, 0) 104%), rgba(255, 255, 255, 0.01);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

.nav-pill__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: clamp(12px, 1.05vw, 15px);
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.nav-pill__link:hover { color: var(--text); text-decoration: none; }

.nav-pill__badge {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 107, 44, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-c);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.nav-cta { white-space: nowrap; }

/* Compact mobile menu (shown ≤900px). No-JS <details> disclosure. */
.nav-menu { display: none; position: relative; }

.nav-menu__btn {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  color: var(--text);
  cursor: pointer;
}

.nav-menu__btn::-webkit-details-marker { display: none; }
.nav-menu[open] .nav-menu__btn { border-color: var(--glass-line-hover); }

.nav-menu__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 230px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--glass-line);
  background: rgba(16, 16, 18, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

.nav-menu__panel a {
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
}

.nav-menu__panel a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-decoration: none;
}

.nav-menu__panel .btn { margin-top: 6px; text-align: center; }

/* Headline: two masked lines rising once — the whole reveal */
.hero__heading {
  position: absolute;
  left: var(--page-pad);
  top: 27%;
  z-index: 5;
  margin: 0;
  width: min(90vw, 980px);
  font-size: clamp(40px, 5.6vw, 86px);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.025em;
  color: var(--text);
}

.hero__line { display: block; overflow: hidden; padding-bottom: 0.06em; }

.hero__line-inner {
  display: inline-block;
  transform: translateY(108%);
  opacity: 0;
  animation: lineRise 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero__line:nth-child(1) .hero__line-inner { animation-delay: 0.15s; }
.hero__line:nth-child(2) .hero__line-inner { animation-delay: 0.27s; }

.accent-dot { color: var(--accent-a); }

@keyframes lineRise {
  to { transform: translateY(0); opacity: 1; }
}

/* Everything else fades up together — one breath, staggered slightly */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero__nav .brand,
.nav-pill,
.nav-cta { animation: riseIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.55s both; }

.hero__label { animation: riseIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.65s both; }
.hero__desc { animation: riseIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.73s both; }
.hero__actions { animation: riseIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.81s both; }
.about-card { animation: riseIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.95s both; }

/* Bottom editorial grid */
.hero__bottom {
  position: absolute;
  left: var(--page-pad);
  right: var(--page-pad);
  bottom: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto auto;
  gap: clamp(6px, 0.7vw, 10px) clamp(20px, 2.8vw, 40px);
  padding-bottom: clamp(20px, 3vh, 36px);
  align-items: end;
}

.hero__label {
  grid-column: 1;
  grid-row: 1;
  font-family: var(--font-display);
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.hero__desc {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  max-width: 480px;
  color: rgba(255, 255, 255, 0.55);
  font-size: clamp(13px, 1.1vw, 16px);
  line-height: 1.45;
}

.hero__actions {
  grid-column: 1;
  grid-row: 3;
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.7vw, 24px);
  margin-top: 8px;
}

.btn--hero {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.btn__arrow { width: 8px; height: 8px; }

/* Scroll-down pill with looping chevron */
.scroll-down {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}

.scroll-down__text { font-size: clamp(13px, 1.1vw, 15px); font-weight: 600; color: var(--text-dim); transition: color 0.2s ease; }
.scroll-down:hover .scroll-down__text { color: var(--text); }

.scroll-down__circle {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  transition: border-color 0.2s ease;
  flex-shrink: 0;
}

.scroll-down:hover .scroll-down__circle { border-color: var(--accent-a); }

.scroll-down__circle svg {
  width: 7px;
  height: 9px;
  animation: arrowScroll 2.5s cubic-bezier(0.4, 0, 0.7, 1) infinite;
}

@keyframes arrowScroll {
  0% { transform: translateY(0); opacity: 1; }
  38% { transform: translateY(9px); opacity: 0; }
  39% { transform: translateY(-9px); opacity: 0; }
  60% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

/* About card: glass, brand mark, long arrow */
.about-card {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: end;
  display: flex;
  align-items: center;
  width: clamp(280px, 25vw, 360px);
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.about-card:hover {
  text-decoration: none;
  color: var(--text);
  border-color: var(--glass-line-hover);
  transform: translateY(-3px);
}

.about-card__mark {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  margin: 16px 4px 16px 16px;
  border-radius: 12px;
  background: conic-gradient(from 210deg, var(--accent-a), var(--accent-b), var(--accent-c), var(--accent-a));
  box-shadow: 0 0 22px rgba(255, 107, 44, 0.35);
}

.about-card__content {
  flex: 1;
  padding: 14px 14px 12px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.about-card__title { margin: 0 0 5px; font-size: 13.5px; font-weight: 700; }
.about-card__text { margin: 0 0 12px; font-size: 12px; color: var(--text-dim); line-height: 1.45; }

.about-card__arrow {
  width: clamp(52px, 5.3vw, 77px);
  height: 13px;
  align-self: flex-end;
  color: rgba(255, 255, 255, 0.25);
  transition: color 0.2s ease;
}

.about-card:hover .about-card__arrow { color: var(--accent-a); }

/* All reveals wait for the field's first frame — but ONLY when JS is
   live (html.js). Without JS, or if hero.js never loads, the animations
   run to their visible end-state normally instead of staying paused at
   opacity 0, so the hero is never stuck invisible. */
html.js body:not(.is-ready) .hero__line-inner,
html.js body:not(.is-ready) .hero__nav .brand,
html.js body:not(.is-ready) .nav-pill,
html.js body:not(.is-ready) .nav-cta,
html.js body:not(.is-ready) .hero__label,
html.js body:not(.is-ready) .hero__desc,
html.js body:not(.is-ready) .hero__actions,
html.js body:not(.is-ready) .about-card {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  .hero__line-inner, .hero__nav .brand, .nav-pill, .nav-cta,
  .hero__label, .hero__desc, .hero__actions, .about-card,
  .scroll-down__circle svg {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Buttons */
.btn {
  display: inline-block;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--glass-line);
  border-radius: 10px;
  padding: 11px 20px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, filter 0.2s;
}

.btn:hover {
  background: #1b1b1e;
  border-color: var(--glass-line-hover);
  text-decoration: none;
  color: var(--text);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent-a);
  border: none;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.btn-primary:hover { background: var(--accent-b); transform: translateY(-1px); }

/* Tools section: editorial header continuing the hero's numbering */
.tools-wrap { padding: 56px 0 8px; scroll-margin-top: 8px; }

.section-head { margin-bottom: 24px; }

.section-label {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -0.02em;
}

.section-head p { margin: 0; color: var(--text-dim); font-size: 15px; }

/* Tool grid: glass cards over the orbs */
.tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.tool {
  display: block;
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}

.tool h2 { margin: 10px 0 8px; font-size: 20px; letter-spacing: -0.01em; }

.tool p { margin: 0; font-size: 14px; color: var(--text-dim); }

.tool.live:hover {
  text-decoration: none;
  color: var(--text);
  border-color: var(--glass-line-hover);
  transform: translateY(-4px);
}

.tool.soon { opacity: 0.65; }

.tool-cta {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-a);
}

.tool.live:hover .tool-cta { color: var(--accent-b); }

.badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  background: var(--bg-inset);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}

.live-badge {
  color: #fff;
  background: var(--accent-a);
  border: none;
}

/* Updates band */
.updates {
  margin: 40px 0 8px;
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
  padding: 28px 26px;
  text-align: center;
}

.updates h2 { margin: 0 0 6px; font-size: 21px; }
.updates p { margin: 0 0 18px; color: var(--text-dim); font-size: 14px; }

.updates form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.updates input[type="email"] {
  background: var(--bg-inset);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  padding: 11px 14px;
  width: min(320px, 100%);
}

.updates input[type="email"]:focus { outline: 1px solid var(--accent-a); }

.form-note { color: var(--accent-c) !important; }

/* Footer */
footer {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 24px 48px;
  font-size: 13px;
  color: var(--text-dim);
}

footer p { margin: 0 0 6px; }

footer .promise {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text);
  font-size: 14px;
}

footer .privacy { font-size: 12px; color: var(--text-muted); }

@media (max-width: 900px) {
  .nav-pill { display: none; }
  .nav-cta { display: none; }
  .nav-menu { display: block; }
  .hero__heading { top: 22%; }
}

@media (max-width: 720px) {
  .tools { grid-template-columns: 1fr; }
  .tool-hero { padding-top: 40px; }
  .hero { min-height: 560px; }
  .hero__heading { top: 19%; font-size: clamp(34px, 9.6vw, 48px); }
  .hero__bottom { grid-template-columns: 1fr; }
  .about-card { display: none; }
  .hero__desc { max-width: none; }
}
