/* =========================================================================
   COVE — visual system
   A dusk-lit inlet holding a constellation of connected thoughts.
   Ink-teal ground, one warm spark accent, an editorial serif for voice,
   a mono face for structure. The 3D field (assets/js/constellation.js)
   is the signature; everything else stays quiet around it.
   ========================================================================= */

:root {
  /* ground */
  --ink: #060f0f;
  --ink-2: #0a1a19;
  --panel: rgba(238, 246, 243, 0.035);
  --panel-hover: rgba(238, 246, 243, 0.065);
  --line: rgba(238, 246, 243, 0.12);
  --line-soft: rgba(238, 246, 243, 0.07);

  /* ink foreground */
  --foam: #eef6f3;
  --muted: rgba(238, 246, 243, 0.58);
  --faint: rgba(238, 246, 243, 0.36);

  /* signal — one spark, shared across every page as the "home" accent */
  --signal: #ff5d40;
  --signal-soft: rgba(255, 93, 64, 0.14);

  /* per-project accents (kept as the original variable names so markup
     using data-color="red|blue|purple|green|orange|cyan" needs no changes) */
  --accent-red: #ff5d40;      /* Thoughts Cove */
  --accent-blue: #4fb8e0;     /* Truth Serum */
  --accent-purple: #c792ea;   /* UDecide */
  --accent-green: #2bdb9e;    /* Yojna */
  --accent-orange: #ffb454;   /* Hassify */
  --accent-cyan: #66d9e8;     /* Code */

  --page-accent: var(--accent-red);

  /* type */
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;

  --radius: 10px;
}

/* per-page accent — set via body[data-page] */
body[data-page="thoughtscove"] { --page-accent: var(--accent-red); }
body[data-page="truthserum"]   { --page-accent: var(--accent-blue); }
body[data-page="udecide"]      { --page-accent: var(--accent-purple); }
body[data-page="yojna"]        { --page-accent: var(--accent-green); }
body[data-page="hassify"]      { --page-accent: var(--accent-orange); }

/* ===== Base ===== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--foam);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

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

a { color: inherit; }

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

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

/* faint vignette so the constellation has somewhere to fade to at the edges —
   no gradient blobs, no orbs */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--ink);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0, 0, 0, 0), var(--ink) 92%);
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); }
::-webkit-scrollbar-thumb { background: rgba(238, 246, 243, 0.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(238, 246, 243, 0.28); }

/* ===== Constellation canvas (assets/js/constellation.js) ===== */

.constellation-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.constellation-canvas.is-ready {
  opacity: 1;
}

/* ===== Navigation ===== */

.glass-nav {
  background: rgba(6, 15, 15, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.nav-link {
  position: relative;
  padding: 0.5rem 0.9rem;
  transition: color 0.25s ease;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link i { font-size: 0.85rem; opacity: 0.85; }

.nav-link:hover { color: var(--foam); }

.nav-link.active { color: var(--foam); }

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0.9rem;
  right: 0.9rem;
  height: 1px;
}

.nav-link[data-color="red"].active,    .nav-link[data-color="red"]:hover    { color: var(--accent-red); }
.nav-link[data-color="red"].active::after    { background: var(--accent-red); }
.nav-link[data-color="blue"].active,   .nav-link[data-color="blue"]:hover   { color: var(--accent-blue); }
.nav-link[data-color="blue"].active::after   { background: var(--accent-blue); }
.nav-link[data-color="purple"].active, .nav-link[data-color="purple"]:hover { color: var(--accent-purple); }
.nav-link[data-color="purple"].active::after { background: var(--accent-purple); }
.nav-link[data-color="green"].active,  .nav-link[data-color="green"]:hover  { color: var(--accent-green); }
.nav-link[data-color="green"].active::after  { background: var(--accent-green); }
.nav-link[data-color="orange"].active, .nav-link[data-color="orange"]:hover { color: var(--accent-orange); }
.nav-link[data-color="orange"].active::after { background: var(--accent-orange); }
.nav-link[data-color="cyan"].active,   .nav-link[data-color="cyan"]:hover   { color: var(--accent-cyan); }
.nav-link[data-color="cyan"].active::after   { background: var(--accent-cyan); }

/* logo mark */
.glass-nav a.font-bold {
  font-family: var(--font-mono);
  font-weight: 600 !important;
  font-size: 0.8rem !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ===== Buttons ===== */

.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.5rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--foam);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
  cursor: pointer;
}

.btn-glass:hover {
  border-color: var(--page-accent);
  background: color-mix(in srgb, var(--page-accent) 12%, transparent);
  transform: translateY(-2px);
}

.btn-glass-primary {
  background: var(--page-accent);
  border-color: var(--page-accent);
  color: var(--ink);
  font-weight: 600;
}

.btn-glass-primary:hover {
  background: var(--page-accent);
  opacity: 0.88;
  color: var(--ink);
}

/* ===== Hero ===== */

.hero-section {
  position: relative;
}

.hero-content {
  max-width: 640px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--page-accent);
  box-shadow: 0 0 12px var(--page-accent);
  flex-shrink: 0;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 480;
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--foam);
  margin-bottom: 1.5rem;
}

.hero-title em {
  font-style: italic;
  font-weight: 380;
  color: var(--page-accent);
}

.hero-lede {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--foam);
  opacity: 0.82;
  margin-bottom: 1.25rem;
  max-width: 34rem;
}

.hero-body {
  color: var(--muted);
  line-height: 1.75;
  max-width: 38rem;
  margin-bottom: 2.25rem;
  font-size: 0.98rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* legacy wrapper still present on a couple of pages — neutralize the old
   "floating glass card" chrome so it reads as plain content */
.glass-hero {
  background: transparent;
  border: none;
  border-radius: 0;
}

.glass-section {
  background: var(--panel);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

/* ===== Cards ===== */

.glass-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 18px;
  height: 18px;
  border-top: 1px solid var(--page-accent);
  border-left: 1px solid var(--page-accent);
  border-top-left-radius: var(--radius);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.glass-card:hover {
  border-color: var(--line);
  background: var(--panel-hover);
}

.glass-card:hover::before {
  opacity: 1;
}

/* ===== Feature Icon ===== */

.feature-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 1.1rem;
  margin-bottom: 1.1rem;
  background: transparent;
  border: 1px solid currentColor;
  opacity: 0.9;
}

.feature-icon.red    { color: var(--accent-red); }
.feature-icon.blue   { color: var(--accent-blue); }
.feature-icon.purple { color: var(--accent-purple); }
.feature-icon.green  { color: var(--accent-green); }
.feature-icon.orange { color: var(--accent-orange); }
.feature-icon.cyan   { color: var(--accent-cyan); }

/* ===== Animations =====
   Entrance choreography and scroll reveals live in assets/js/motion.js
   (GSAP + ScrollTrigger). This layer only sets the pre-JS resting state
   so there's no flash of fully-visible content before it runs. */

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.hero-content .hero-eyebrow,
.hero-content .hero-title,
.hero-content .hero-lede,
.hero-content .hero-body,
.hero-content .hero-actions {
  opacity: 0;
}

.animate-on-scroll {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .hero-content .hero-eyebrow,
  .hero-content .hero-title,
  .hero-content .hero-lede,
  .hero-content .hero-body,
  .hero-content .hero-actions,
  .animate-on-scroll, .scroll-arrow, .next-page-arrow {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ===== Video Embed ===== */

.video-glass {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.video-glass iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
}

/* ===== Accordion / Details ===== */

details.glass-accordion {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

details.glass-accordion[open] {
  border-color: var(--page-accent);
}

details.glass-accordion summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  list-style: none;
  transition: background 0.3s ease;
}

details.glass-accordion summary::-webkit-details-marker { display: none; }

details.glass-accordion summary::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-left: auto;
  transition: transform 0.3s ease;
  font-size: 0.75rem;
  opacity: 0.5;
}

details.glass-accordion[open] summary::after { transform: rotate(180deg); }

details.glass-accordion summary:hover { background: var(--panel-hover); }

details.glass-accordion .accordion-content {
  padding: 0 1.25rem 1.25rem;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.92rem;
}

/* ===== CTA Banner ===== */

.cta-banner {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 2px solid var(--page-accent);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

/* ===== Gradient / accent text —
   solid, italic display-serif rather than a rainbow clip */

.gradient-text, .gradient-text-warm, .gradient-text-cool {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 480;
  color: var(--page-accent);
  -webkit-text-fill-color: currentColor;
  background: none;
}

/* ===== Mobile Menu ===== */

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 15, 15, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.mobile-menu.open { display: flex; }

.mobile-menu .nav-link {
  font-size: 1rem;
  padding: 0.85rem 2rem;
}

/* ===== Separator ===== */

.separator {
  width: 40px;
  height: 1px;
  background: var(--page-accent);
  margin: 1.1rem auto;
  opacity: 0.7;
}

/* ===== Responsive ===== */

@media (max-width: 768px) {
  .glass-card { border-radius: 8px; }
}

/* ===== Stat Cards ===== */

.stat-item { text-align: center; padding: 1.5rem; }

.stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: var(--page-accent);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ===== Screenshot Images ===== */

.glass-card img { transition: transform 0.5s ease; }
.glass-card:hover img { transform: scale(1.015); }

.screenshot-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border-radius: 6px;
}

/* ===== Image Modal / Lightbox ===== */

.img-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(2, 6, 6, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.img-modal.open { display: flex; opacity: 1; }

.img-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 2rem;
  cursor: pointer;
  z-index: 210;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.2s ease, background 0.2s ease;
}

.img-modal-close:hover { color: var(--foam); background: var(--panel-hover); }

.img-modal-body {
  max-width: 90vw;
  max-height: 80vh;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.img-modal-body img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s ease;
  cursor: grab;
}

.img-modal-controls { display: flex; gap: 0.5rem; margin-top: 1rem; }

.img-modal-controls button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.img-modal-controls button:hover {
  background: var(--panel-hover);
  color: var(--foam);
  border-color: var(--page-accent);
}

/* ===== Next Page Teaser ===== */

.next-page-teaser {
  text-align: center;
  padding: 3rem 1rem 1.5rem;
  cursor: pointer;
  text-decoration: none;
  display: block;
  transition: opacity 0.3s ease;
}

.next-page-teaser:hover .next-page-label { color: var(--muted); }
.next-page-teaser:hover .next-page-title { opacity: 1; }

.next-page-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--faint);
  font-weight: 500;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.next-page-title {
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--foam);
  opacity: 0.72;
  transition: opacity 0.3s ease;
  margin-bottom: 0.75rem;
}

.next-page-arrow {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  color: var(--faint);
  font-size: 1rem;
  animation: bounceDown 1.6s ease infinite;
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* ===== Footer ===== */

.glass-footer {
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid var(--line-soft);
}

.glass-footer p {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--faint);
}

/* ===== Scroll Arrow ===== */

.scroll-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--faint);
  font-size: 1.1rem;
  cursor: pointer;
  text-decoration: none;
  opacity: 0;
  animation: scrollArrowIn 0.8s ease 1s forwards, bounce 2.2s ease 1.8s infinite;
  transition: color 0.3s ease;
}

.scroll-arrow:hover { color: var(--page-accent); }

.scroll-arrow span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 500;
}

@keyframes scrollArrowIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}
