/* ---------------------------------------------------------------------------
   Attunica — coming-soon landing page
   Calm, clinical, human. Warm off-white base, soft slate-blues, one quiet
   accent. All motion is transform/opacity only.
--------------------------------------------------------------------------- */

:root {
  --bg: #faf9f6;
  --bg-soft: #f2f2ee;
  --surface: rgba(255, 255, 255, 0.6);

  --ink: #2e3d4f;
  --ink-soft: #55677a;
  --ink-faint: #7f8fa0;

  --accent: #3e6e96;
  --accent-deep: #32587a;
  --accent-tint: #dde8f0;
  --accent-glow: rgba(62, 110, 150, 0.28);

  --line: rgba(62, 110, 150, 0.16);

  --font-serif: "Fraunces", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 16px;
  --radius-pill: 999px;

  --section-pad: clamp(4rem, 9vw, 6.5rem);
  --ease-soft: cubic-bezier(0.25, 0.6, 0.3, 1);
}

/* ---- base ---------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-soft);
  background-color: var(--bg);
  background-image: linear-gradient(180deg, var(--bg) 0%, #f4f4f0 55%, #eef0ee 100%);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  min-height: 100vh;
}

::selection {
  background: var(--accent-tint);
  color: var(--accent-deep);
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: min(100% - 3rem, 1060px);
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 3rem, 680px);
}

/* ---- motion gating --------------------------------------------------------
   The inline <head> script adds .motion to <html> only when the user allows
   motion. Hidden initial states live behind that class, so no-JS, blocked-CDN,
   and reduced-motion visitors always see the full page. */

.motion [data-hero],
.motion [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
}

.motion [data-hero] {
  transform: translateY(18px);
}

/* ---- ambient background ---------------------------------------------------
   Three large, blurred, low-opacity orbs. Blur is static CSS; only transform
   and opacity ever animate (GSAP). */

.ambient {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  will-change: transform;
}

.orb--1 {
  width: 58vmax;
  height: 58vmax;
  top: -22vmax;
  right: -16vmax;
  background: radial-gradient(circle at 35% 35%, rgba(110, 150, 185, 0.32), rgba(110, 150, 185, 0) 68%);
}

.orb--2 {
  width: 46vmax;
  height: 46vmax;
  top: 34%;
  left: -20vmax;
  background: radial-gradient(circle at 60% 40%, rgba(140, 165, 175, 0.26), rgba(140, 165, 175, 0) 70%);
}

.orb--3 {
  width: 52vmax;
  height: 52vmax;
  bottom: -24vmax;
  right: -10vmax;
  background: radial-gradient(circle at 40% 45%, rgba(93, 128, 160, 0.22), rgba(93, 128, 160, 0) 70%);
}

main,
.site-header,
.site-footer {
  position: relative;
  z-index: 1;
}

/* ---- header ---------------------------------------------------------------- */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.75rem 0;
  display: flex;
  justify-content: center;
}

.wordmark {
  font-family: var(--font-serif);
  font-weight: 550;
  font-size: 1.3rem;
  letter-spacing: 0.015em;
  color: var(--ink);
}

.wordmark__dot {
  color: var(--accent);
}

/* ---- hero ------------------------------------------------------------------ */

.hero {
  position: relative;
  min-height: 92svh;
  display: grid;
  align-items: center;
  padding: clamp(6.5rem, 14vh, 8.5rem) 0 calc(var(--section-pad) + 3rem);
}

.hero__inner {
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.eyebrow__pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
}

.eyebrow__pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0.5;
  animation: pulse-ring 3.2s var(--ease-soft) infinite;
}

@keyframes pulse-ring {
  0%   { transform: scale(0.6); opacity: 0.55; }
  70%  { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

.hero__title {
  font-family: var(--font-serif);
  font-weight: 480;
  font-size: clamp(2.5rem, 7.2vw, 4.4rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
  max-width: 24ch;
  margin-inline: auto;
  text-wrap: balance;
}

.hero__title em {
  font-style: italic;
  font-weight: 440;
  color: var(--accent-deep);
}

.hero__sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.7;
  max-width: 44ch;
  margin: clamp(1.25rem, 2.5vw, 1.75rem) auto 0;
  color: var(--ink-soft);
  text-wrap: balance;
}

.hero__cta {
  margin-top: clamp(2rem, 4vw, 2.75rem);
}

/* Scroll cue: label + hairline track with a slowly dropping dot. Under
   reduced motion the keyframe is killed globally, leaving a static cue. */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  transition: opacity 0.5s var(--ease-soft);
}

.has-scrolled .scroll-cue {
  opacity: 0;
}

.scroll-cue__label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.scroll-cue__track {
  position: relative;
  width: 1px;
  height: 44px;
  background: var(--line);
}

.scroll-cue__dot {
  position: absolute;
  top: 0;
  left: -1.5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  animation: cue-drop 2.6s var(--ease-soft) infinite;
}

@keyframes cue-drop {
  0%   { transform: translateY(-4px); opacity: 0; }
  25%  { opacity: 1; }
  75%  { opacity: 1; }
  100% { transform: translateY(44px); opacity: 0; }
}

/* On small screens the peeking pillar cards already invite scrolling, and the
   cue crowds the CTA — drop it. */
@media (max-width: 640px) {
  .scroll-cue {
    display: none;
  }
}

/* ---- buttons ---------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-pill);
  padding: 0.95rem 2.1rem;
  transition: transform 0.35s var(--ease-soft), box-shadow 0.35s var(--ease-soft),
              background-color 0.35s var(--ease-soft);
}

.btn--primary {
  position: relative;
  color: #fdfdfb;
  background: linear-gradient(180deg, #4a7ba4 0%, var(--accent) 55%, var(--accent-deep) 100%);
  box-shadow: 0 1px 2px rgba(46, 61, 79, 0.18), 0 10px 28px -12px var(--accent-glow);
}

/* Slow breathing glow — animates opacity only, on a blurred pseudo-element. */
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  box-shadow: 0 6px 30px 2px var(--accent-glow);
  opacity: 0.35;
  z-index: -1;
  animation: breathe 5.5s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 0.75; }
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 3px rgba(46, 61, 79, 0.16), 0 16px 34px -12px var(--accent-glow);
}

.btn--primary:active {
  transform: translateY(0);
}

/* ---- pillars ----------------------------------------------------------------- */

.pillars {
  padding: 0 0 var(--section-pad);
}

.pillars__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.pillar {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 3vw, 2.5rem) clamp(1.5rem, 2.5vw, 2rem);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.pillar__num {
  position: absolute;
  top: 1.4rem;
  right: 1.6rem;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--ink-faint);
  opacity: 0.55;
}

.pillar__icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  color: var(--accent);
  background: var(--accent-tint);
  margin-bottom: 1.5rem;
}

.pillar__icon svg {
  width: 26px;
  height: 26px;
}

.pillar__title {
  font-family: var(--font-serif);
  font-weight: 520;
  font-size: 1.4rem;
  color: var(--ink);
  margin-bottom: 0.6rem;
}

.pillar__body {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

@media (max-width: 720px) {
  .pillars__grid {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin-inline: auto;
  }
}

/* ---- mission ------------------------------------------------------------------ */

.mission {
  padding: var(--section-pad) 0;
  min-height: 48vh;
  display: grid;
  align-items: center;
  text-align: center;
}

.mission__line {
  font-family: var(--font-serif);
  font-weight: 450;
  font-size: clamp(1.6rem, 4.2vw, 2.6rem);
  line-height: 1.35;
  color: var(--ink);
  text-wrap: balance;
}

.mission__punch {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 460;
  font-size: clamp(1.45rem, 3.4vw, 2.1rem);
  color: var(--accent-deep);
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
}

/* ---- signup --------------------------------------------------------------------- */

.signup {
  padding: 0 0 var(--section-pad);
}

.signup__panel {
  position: relative;
  text-align: center;
  background:
    radial-gradient(120% 140% at 50% -20%, rgba(221, 232, 240, 0.55), rgba(255, 255, 255, 0) 60%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 5vw, 3.5rem);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.signup__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--ink);
  margin-bottom: 1rem;
}

.signup__note {
  max-width: 46ch;
  margin: 0 auto clamp(1.75rem, 4vw, 2.5rem);
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* Form and confirmation share one grid cell so they can crossfade in place. */
.signup__box {
  display: grid;
}

.signup__box > * {
  grid-area: 1 / 1;
}

.signup__form {
  transition: opacity 0.45s var(--ease-soft), transform 0.45s var(--ease-soft);
}

.signup__box.is-done .signup__form {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.signup__row {
  display: flex;
  gap: 0.75rem;
  max-width: 480px;
  margin-inline: auto;
}

.signup__input {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: var(--ink);
  background: #fdfdfb;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.95rem 1.4rem;
  transition: border-color 0.3s var(--ease-soft), box-shadow 0.3s var(--ease-soft);
}

.signup__input::placeholder {
  color: var(--ink-faint);
}

.signup__input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(62, 110, 150, 0.14);
}

.signup__submit {
  flex-shrink: 0;
}

.signup__submit[disabled] {
  opacity: 0.65;
  cursor: default;
  transform: none;
}

.form-error {
  font-size: 0.9rem;
  color: #8a5a4e;
  margin-top: 1rem;
}

@media (max-width: 540px) {
  .signup__row {
    flex-direction: column;
  }

  .signup__submit {
    width: 100%;
  }
}

/* Confirmation state */
.signup__confirm[hidden] {
  display: none;
}

.signup__confirm {
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s var(--ease-soft) 0.25s, transform 0.6s var(--ease-soft) 0.25s;
}

.signup__box.is-done .signup__confirm {
  opacity: 1;
  transform: translateY(0);
}

.signup__check {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-tint);
  transform: scale(0.6);
  transition: transform 0.55s cubic-bezier(0.3, 1.4, 0.5, 1) 0.35s;
}

.signup__box.is-done .signup__check {
  transform: scale(1);
}

.signup__check svg {
  width: 24px;
  height: 24px;
}

.signup__confirm-text {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--ink);
}

/* ---- footer ----------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;
  text-align: center;
}

.wordmark--footer {
  font-size: 1.15rem;
}

.site-footer__tagline {
  font-size: 0.9rem;
  color: var(--ink-faint);
  margin-top: 0.6rem;
}

/* ---- scroll progress bar (motion-gated; GSAP scrubs scaleX) ------------------ */

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #6e96b9);
  opacity: 0.55;
  transform: scaleX(0);
  transform-origin: left;
  z-index: 10;
  pointer-events: none;
  display: none;
  will-change: transform;
}

.motion .progress-bar {
  display: block;
}

/* ---- cursor system (added by JS only for fine pointers + motion OK) ----------
   Halo sits above the orbs but below content, so it reads as light in the room.
   Dot + ring ride on top. GSAP drives all transform/opacity; no CSS transitions
   on these elements so tweens never fight the stylesheet. */

.cursor-on body,
.cursor-on a,
.cursor-on button {
  cursor: none;
}

.cursor-on input {
  cursor: text;
}

/* Magnetic buttons own their transform via GSAP; hover feedback becomes
   shadow/glow only so CSS never animates transform underneath the tween. */
.cursor-on .btn {
  transition: box-shadow 0.35s var(--ease-soft), background-color 0.35s var(--ease-soft);
}

.cursor-on .btn--primary:hover {
  transform: none;
}

.cursor-halo,
.cursor-ring,
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
}

.cursor-halo {
  width: 360px;
  height: 360px;
  margin: -180px 0 0 -180px;
  background: radial-gradient(circle, rgba(110, 150, 185, 0.16), rgba(110, 150, 185, 0) 65%);
  filter: blur(30px);
  z-index: 0;
}

.cursor-ring {
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 1px solid var(--accent);
  z-index: 9999;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--accent-deep);
  z-index: 9999;
}

/* ---- honeypot (kept fillable for bots, invisible and untabbable for people) ---- */

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- reduced motion ---------------------------------------------------------------
   Non-negotiable for this audience: no ambient drift, no parallax, no breathing,
   reveals resolve instantly. GSAP is separately gated via gsap.matchMedia(). */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
