/* =====================================================================
   The Quiet Few Collective — styles
   Deep black + warm cream. Editorial, premium, motion-safe.
   Sections: tokens · base · header/nav · hero · marquee · mission ·
             apps hub · drops · waitlist · footer · motion · responsive
   ===================================================================== */

:root {
  --black:  #050504;
  --ink:    #0c0b09;
  --cream:  #f3ecd9;
  --muted:  rgba(243, 236, 217, .68);
  --faint:  rgba(243, 236, 217, .46);
  --line:   rgba(243, 236, 217, .16);
  --line-2: rgba(243, 236, 217, .28);
  --glass:  rgba(243, 236, 217, .055);
  --shadow: 0 30px 80px rgba(0, 0, 0, .55);

  --font-display: "Hoefler Text", "Iowan Old Style", "Apple Garamond",
                  Baskerville, "Georgia", "Times New Roman", serif;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, sans-serif;

  --maxw: 92rem;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--cream);
  background:
    radial-gradient(circle at 72% 14%, rgba(243, 236, 217, .12), transparent 26rem),
    radial-gradient(circle at 8% 8%, rgba(243, 236, 217, .06), transparent 20rem),
    linear-gradient(180deg, #070705 0%, #0b0a08 52%, #030302 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- ambient layers ---------- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  z-index: 60;
}
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 34rem; height: 34rem;
  margin: -17rem 0 0 -17rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(243, 236, 217, .10), transparent 62%);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity .4s ease;
  will-change: transform;
}
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px; width: 0;
  background: linear-gradient(90deg, transparent, var(--cream));
  z-index: 70;
  transition: width .1s linear;
}

/* ---------- utilities ---------- */
.visually-hidden, .hp-field {
  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: fixed;
  top: -100%; left: 1rem;
  z-index: 100;
  background: var(--cream); color: var(--black);
  padding: .6rem 1rem; border-radius: .6rem;
  font-weight: 700; text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 1rem; }

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

/* ---------- typography ---------- */
h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: .95;
  letter-spacing: -.03em;
}
h1 { font-size: clamp(3rem, 7.5vw, 8.4rem); max-width: 13ch; }
h2 { font-size: clamp(2.4rem, 5.4vw, 5.6rem); max-width: 15ch; }
h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -.02em; }

.eyebrow, .section-kicker {
  margin: 0 0 1.1rem;
  text-transform: uppercase;
  letter-spacing: .28em;
  font-weight: 700;
  color: var(--faint);
  font-size: .72rem;
}

/* ---------- layout ---------- */
.section {
  padding: clamp(4.5rem, 9vw, 9rem) clamp(1.25rem, 5vw, 6rem);
  max-width: var(--maxw);
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

/* ============================ HEADER ============================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem clamp(1rem, 4vw, 4rem);
  background: rgba(5, 5, 4, .55);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease;
}
.site-header.scrolled {
  background: rgba(5, 5, 4, .82);
  border-bottom-color: var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--cream);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.02em;
  font-size: 1.02rem;
}
.brand img { width: 42px; height: 42px; object-fit: contain; border-radius: 8px; }
.brand-sub { color: var(--faint); font-weight: 700; }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem); }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
  transition: color .2s ease;
}
.nav a:hover { color: var(--cream); }
.nav a.active { color: var(--cream); }
.nav-cta {
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: .6rem 1.2rem;
  color: var(--cream) !important;
  will-change: transform;
}
.nav-cta:hover { background: var(--glass); border-color: var(--cream); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: .6rem;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--cream);
  transition: transform .3s var(--ease), opacity .3s ease;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 35;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: 5.5rem 1.5rem 2rem;
  background: rgba(5, 5, 4, .96);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-100%);
  transition: transform .4s var(--ease);
}
.mobile-nav.open { transform: translateY(0); }
.mobile-nav a {
  color: var(--cream);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.8rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--line);
}
.mobile-nav .mobile-cta { color: var(--cream); border-bottom: 0; }

/* ============================ HERO ============================ */
.hero {
  min-height: min(92vh, 60rem);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding-top: clamp(3rem, 6vw, 5rem);
}
.hero-sub {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.4vw, 1.28rem);
  line-height: 1.7;
  max-width: 42rem;
  margin: 1.6rem 0 0;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.2rem; }
.hero-meta {
  margin: 1.8rem 0 0;
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--faint);
}

.btn {
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: .95rem 1.5rem;
  font-weight: 700;
  font-size: .98rem;
  letter-spacing: .01em;
  transition: transform .3s var(--ease), background .25s ease,
              border-color .25s ease, box-shadow .3s ease;
  will-change: transform;
}
.btn.primary {
  color: var(--black);
  background: var(--cream);
  box-shadow: 0 12px 40px rgba(243, 236, 217, .12);
}
.btn.primary:hover { box-shadow: 0 18px 55px rgba(243, 236, 217, .22); }
.btn.secondary { color: var(--cream); background: transparent; border: 1px solid var(--line-2); }
.btn.secondary:hover { border-color: var(--cream); background: var(--glass); }
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); }

/* logo stage */
.hero-art {
  display: grid;
  place-items: center;
  min-height: 32rem;
  position: relative;
  perspective: 1000px;
}
.orb {
  position: absolute;
  width: min(48vw, 40rem);
  aspect-ratio: 1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(243, 236, 217, .16), transparent 66%);
  animation: breathe 6s ease-in-out infinite;
  pointer-events: none;
}
.logo-stage {
  position: relative;
  width: min(78vw, 32rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(243, 236, 217, .03);
  box-shadow: var(--shadow), inset 0 0 60px rgba(243, 236, 217, .03);
  transform-style: preserve-3d;
  transition: transform .35s var(--ease);
}
.logo-stage img {
  width: 88%; height: 88%;
  object-fit: contain;
  border-radius: 999px;
  filter: drop-shadow(0 30px 45px rgba(0, 0, 0, .6));
  transform: translateZ(40px);
}
.breathe { animation: breathe-soft 6s ease-in-out infinite; }
.pulse-ring {
  position: absolute;
  inset: -1.5rem;
  border: 1px solid rgba(243, 236, 217, .18);
  border-radius: 999px;
  animation: pulse 3.8s ease-out infinite;
  pointer-events: none;
}
.pulse-ring.two { animation-delay: 1.9s; }

/* ============================ MARQUEE ============================ */
.marquee {
  border-block: 1px solid var(--line);
  overflow: hidden;
  background: rgba(243, 236, 217, .03);
  padding: 1.1rem 0;
  max-width: 100%;
}
.marquee-track {
  display: flex;
  gap: 2.4rem;
  white-space: nowrap;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span {
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--muted);
  font-weight: 800;
  font-size: .92rem;
}
.marquee span[aria-hidden] { color: var(--faint); }

/* ============================ MISSION ============================ */
.manifesto { display: grid; gap: 1.3rem; }
.manifesto p {
  color: var(--muted);
  font-size: clamp(1.1rem, 1.6vw, 1.45rem);
  line-height: 1.7;
  max-width: 52rem;
}

/* ============================ APPS HUB ============================ */
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-lead, .waitlist-lead {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.3vw, 1.2rem);
  line-height: 1.65;
  margin: 1.2rem 0 0;
}

.value-row {
  list-style: none;
  margin: 0 0 clamp(2rem, 4vw, 3.5rem);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.value {
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  padding: 1.3rem 1.4rem;
  background: var(--glass);
  display: grid;
  gap: .35rem;
}
.value strong { font-size: 1.02rem; letter-spacing: -.01em; }
.value span { color: var(--muted); font-size: .92rem; line-height: 1.5; }

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
.app-card {
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(243, 236, 217, .075), rgba(243, 236, 217, .02));
  border-radius: 1.6rem;
  padding: 1.9rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: .55rem;
  min-height: 20rem;
  transition: transform .35s var(--ease), border-color .35s ease;
  transform-style: preserve-3d;
}
.app-card:hover { border-color: var(--line-2); }
.app-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .6rem;
}
.app-index {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--faint);
  letter-spacing: .05em;
}
.badge {
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 800;
  padding: .35rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  white-space: nowrap;
}
.badge-live { color: var(--black); background: var(--cream); border-color: var(--cream); }
.badge-soon { color: var(--cream); background: rgba(243, 236, 217, .08); }
.badge-quiet { color: var(--faint); }
.app-card h3 { margin-top: .2rem; }
.app-cat {
  color: var(--cream);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 600;
  opacity: .8;
  margin: 0;
}
.app-desc { color: var(--muted); line-height: 1.6; font-size: .96rem; margin: .3rem 0 0; }
.app-link {
  margin-top: auto;
  padding-top: 1.1rem;
  color: var(--cream);
  text-decoration: none;
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: .02em;
  transition: opacity .2s ease, letter-spacing .3s var(--ease);
}
.app-link:hover { letter-spacing: .06em; }
.app-card--placeholder {
  background: repeating-linear-gradient(135deg, rgba(243, 236, 217, .03) 0 12px, transparent 12px 24px);
  border-style: dashed;
}

/* ============================ DROPS ============================ */
.drop-zone {
  display: grid;
  grid-template-columns: 1.1fr .8fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
}
.drop-copy p {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  line-height: 1.7;
  max-width: 40rem;
  margin: 1.4rem 0 0;
}
.drop-points {
  margin: 1.8rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .7rem;
}
.drop-points li {
  color: var(--muted);
  padding-left: 1.4rem;
  position: relative;
  font-size: .98rem;
}
.drop-points li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--cream);
  opacity: .7;
}
.drop-card {
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(243, 236, 217, .08), rgba(243, 236, 217, .02));
  border-radius: 1.8rem;
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
  min-height: 26rem;
  display: grid;
  place-items: center;
  align-content: center;
  gap: .6rem;
  text-align: center;
}
.drop-card img { max-width: 74%; filter: drop-shadow(0 28px 40px rgba(0, 0, 0, .6)); }
.drop-status {
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .74rem;
  font-weight: 700;
  margin: 1rem 0 0;
}
.drop-card strong {
  font-family: var(--font-display);
  font-size: 1.9rem;
  letter-spacing: -.02em;
  font-weight: 600;
}

/* ============================ WAITLIST ============================ */
.waitlist { padding-top: clamp(1rem, 3vw, 3rem); }
.waitlist-panel {
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(243, 236, 217, .09), rgba(243, 236, 217, .025));
  border-radius: 2rem;
  padding: clamp(2.2rem, 5vw, 4rem);
  box-shadow: var(--shadow);
  max-width: 62rem;
  margin: 0 auto;
  text-align: center;
}
.waitlist-panel h2 { margin-inline: auto; }
.waitlist-lead { margin-inline: auto; max-width: 40rem; }
#waitlistForm {
  display: flex;
  gap: .6rem;
  max-width: 38rem;
  margin: 2rem auto 1.2rem;
  padding: .45rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(0, 0, 0, .28);
  transition: border-color .25s ease;
}
#waitlistForm:focus-within { border-color: var(--cream); }
#waitlistForm input[type="email"] {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--cream);
  padding: 0 1.1rem;
  font-size: 1rem;
  font-family: var(--font-sans);
}
#waitlistForm input::placeholder { color: var(--faint); }
.micro { color: var(--muted); font-size: .92rem; min-height: 1.4em; }
.micro.success { color: var(--cream); }
.micro.error { color: #e7b7a3; }

/* ============================ FOOTER ============================ */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 2rem 3.5rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  text-align: center;
}
.footer-brand img { width: 120px; max-width: 60vw; opacity: .9; }
.footer-copy { font-size: .88rem; letter-spacing: .02em; margin: 0; }

/* ============================ MOTION / REVEAL ============================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes breathe {
  0%, 100% { transform: scale(.94); opacity: .65; }
  50%      { transform: scale(1.05); opacity: 1; }
}
@keyframes breathe-soft {
  0%, 100% { transform: translateZ(40px) scale(1); }
  50%      { transform: translateZ(40px) scale(1.035); }
}
@keyframes pulse {
  0%   { transform: scale(.92); opacity: .8; }
  100% { transform: scale(1.2); opacity: 0; }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================ RESPONSIVE ============================ */
@media (max-width: 960px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .hero { grid-template-columns: 1fr; min-height: auto; gap: 2.5rem; }
  .hero-art { min-height: 24rem; order: -1; }
  .value-row { grid-template-columns: 1fr; }
  .app-grid { grid-template-columns: 1fr 1fr; }
  .drop-zone { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .app-grid { grid-template-columns: 1fr; }
  #waitlistForm { flex-direction: column; border-radius: 1.4rem; padding: .7rem; }
  #waitlistForm input[type="email"] { min-height: 3.2rem; text-align: center; }
  #waitlistForm .btn { width: 100%; }
  .brand-sub { display: none; }
}

/* ============================ REDUCED MOTION ============================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .cursor-glow { display: none; }
  .marquee-track { animation: none; }
}
