/* Gliss — landing page
   Palette: ink glass, ivory keys, aurora light (light is color; UI stays quiet). */

:root {
  --ink: #0B0D13;
  --ink-raised: #11141C;
  --ivory: #EFEAE0;
  --fog: #8E94A3;
  --hairline: rgba(239, 234, 224, 0.09);
  --rose: #FF9DA5;
  --violet: #A98BFF;
  --teal: #67E0CF;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Instrument Sans", -apple-system, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(169, 139, 255, 0.35); }

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

/* ---------- type ---------- */

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 8.5vw, 6.25rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.08;
  margin-bottom: 2.75rem;
}

h1 em, h2 em, .wordmark { font-style: italic; }

h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  margin-bottom: 0.5rem;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fog);
  margin-bottom: 1.1rem;
}

.mono { font-family: var(--mono); font-size: 0.92em; }

.prose { max-width: 620px; color: var(--fog); }
.prose--large {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  line-height: 1.4;
  color: var(--ivory);
  max-width: 780px;
}

.footnote { margin-top: 1.75rem; font-size: 0.85rem; color: var(--fog); }

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1rem 1.75rem;
  background: linear-gradient(rgba(11, 13, 19, 0.85), rgba(11, 13, 19, 0));
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
  font-size: 0.88rem;
  color: var(--fog);
}

.nav-links a:hover { color: var(--ivory); }

/* ---------- buttons: ivory piano keys ---------- */

.key-button {
  display: inline-block;
  background: var(--ivory);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.3s ease;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 8px 28px rgba(0, 0, 0, 0.45);
}

.key-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset,
              0 10px 34px rgba(169, 139, 255, 0.28),
              0 10px 34px rgba(103, 224, 207, 0.18);
}

.key-button:active { transform: translateY(1px); }

.key-button--small { padding: 0.5rem 1rem; font-size: 0.85rem; border-radius: 8px; }

.ghost-button {
  display: inline-block;
  color: var(--ivory);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: rgba(239, 234, 224, 0.04);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ghost-button:hover { border-color: rgba(239, 234, 224, 0.3); background: rgba(239, 234, 224, 0.07); }
.ghost-button--small { padding: 0.5rem 1rem; font-size: 0.85rem; }

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

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

#glass {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: 7rem 1.75rem 5rem;
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
  pointer-events: none; /* touches pass through to the glass… */
}

.hero-inner a, .hero-inner button { pointer-events: auto; } /* …except the controls */

.hero-sub {
  max-width: 520px;
  margin-top: 1.5rem;
  color: var(--fog);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.25rem;
}

.sound-chip {
  position: absolute;
  z-index: 3;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--fog);
  background: rgba(17, 20, 28, 0.75);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
  white-space: nowrap;
}

.sound-chip.is-on { color: var(--ivory); }

.sound-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--fog);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.sound-chip.is-on .sound-dot {
  background: var(--teal);
  box-shadow: 0 0 10px var(--teal);
}

.hero-hint {
  position: absolute;
  z-index: 2;
  bottom: 1.85rem;
  right: 1.75rem;
  font-size: 0.72rem;
  color: rgba(142, 148, 163, 0.7);
}

/* ---------- spec strip ---------- */

.spec-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 2.5rem;
  padding: 1.4rem 1.75rem;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--fog);
}

/* ---------- sections ---------- */

.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 7rem 1.75rem;
}

.section--narrow { max-width: 880px; }

.rule {
  border: none;
  border-top: 1px solid var(--hairline);
  max-width: 1080px;
  margin: 0 auto;
}

/* ---------- gestures ---------- */

.gestures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3.5rem 2.5rem;
}

.gesture p { color: var(--fog); font-size: 0.95rem; }

.gesture-glow {
  height: 120px;
  border-radius: 14px;
  margin-bottom: 1.4rem;
  background: var(--ink-raised);
  border: 1px solid var(--hairline);
  position: relative;
  overflow: hidden;
}

.gesture-glow::after {
  content: "";
  position: absolute;
  width: 90px; height: 90px;
  border-radius: 50%;
  filter: blur(26px);
  opacity: 0.85;
}

.gesture-glow--rest::after {
  background: radial-gradient(circle, var(--rose), transparent 70%);
  left: calc(50% - 45px); top: 16px;
  animation: breathe 5s ease-in-out infinite;
}

.gesture-glow--slide::after {
  background: radial-gradient(circle, var(--teal), transparent 70%);
  top: 16px;
  animation: drift 7s ease-in-out infinite;
}

.gesture-glow--press::after {
  background: radial-gradient(circle, var(--violet), transparent 70%);
  left: calc(50% - 45px); top: 16px;
  animation: press 4.5s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(0.85); opacity: 0.55; }
  50% { transform: scale(1.05); opacity: 0.9; }
}

@keyframes drift {
  0%, 100% { left: 8%; }
  50% { left: calc(92% - 90px); }
}

@keyframes press {
  0%, 100% { transform: scale(0.7); opacity: 0.5; }
  45%, 60% { transform: scale(1.25); opacity: 1; }
}

/* ---------- timbres ---------- */

.timbre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}

.timbre {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  text-align: left;
  background: var(--ink-raised);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 1.4rem 1.3rem 1.2rem;
  color: var(--ivory);
  font-family: var(--sans);
  cursor: pointer;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.4s ease;
}

.timbre:hover, .timbre.is-playing {
  border-color: rgba(239, 234, 224, 0.25);
  transform: translateY(-2px);
}

.timbre.is-playing { box-shadow: 0 14px 44px -12px var(--hue1, rgba(169, 139, 255, 0.5)); }

.timbre-dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--hue1), var(--hue2) 75%);
  filter: saturate(1.1);
  box-shadow: 0 0 22px -2px var(--hue2);
}

.timbre-name { font-weight: 600; font-size: 1.02rem; }

.timbre-desc { font-size: 0.84rem; color: var(--fog); line-height: 1.5; }

.timbre-play {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--fog);
}

.timbre:hover .timbre-play { color: var(--ivory); }

/* ---------- tune strip ---------- */

.tune-strip {
  position: relative;
  height: 200px;
  border-radius: 16px;
  background:
    radial-gradient(120% 140% at 50% 120%, rgba(169, 139, 255, 0.10), transparent 60%),
    var(--ink-raised);
  border: 1px solid var(--hairline);
  margin: 2.5rem 0 1rem;
  cursor: pointer;
  overflow: hidden;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.tune-strip-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fog);
  font-size: 0.95rem;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.tune-strip.is-started .tune-strip-hint { opacity: 0; }

.tune-readout {
  position: absolute;
  left: 1.2rem;
  bottom: 1rem;
  display: flex;
  gap: 1.25rem;
  align-items: baseline;
  pointer-events: none;
}

#tuneNote { font-size: 1.3rem; color: var(--ivory); }

.tune-progress { font-size: 0.75rem; color: var(--fog); letter-spacing: 0.12em; }

.tune-pulse {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: tunePulse 1.1s ease-out forwards;
}

@keyframes tunePulse {
  from { box-shadow: 0 0 0 0 currentColor; opacity: 0.9; transform: translate(-50%, -50%) scale(1); }
  to { box-shadow: 0 0 60px 34px transparent; opacity: 0; transform: translate(-50%, -50%) scale(2.4); }
}

/* ---------- app / popover mock ---------- */

.app-row {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 4rem;
  align-items: start;
}

.popover-mock { filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.55)); }

.mock-menubar {
  height: 30px;
  background: rgba(239, 234, 224, 0.06);
  border: 1px solid var(--hairline);
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 12px;
}

.mock-wave { color: var(--ivory); font-size: 0.95rem; }

.mock-panel {
  background: #171B24;
  border: 1px solid var(--hairline);
  border-top: none;
  border-radius: 0 0 14px 14px;
  padding: 1.1rem 1.15rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.mock-title { font-family: var(--serif); font-style: italic; font-size: 1.15rem; }

.mock-row { display: flex; justify-content: space-between; align-items: center; color: var(--ivory); }

.mock-value { color: var(--fog); }

.mock-switch {
  width: 34px; height: 20px;
  border-radius: 999px;
  background: var(--teal);
  position: relative;
  opacity: 0.9;
}

.mock-switch::after {
  content: "";
  position: absolute;
  right: 2px; top: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: white;
}

.mock-status {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--fog);
}

.mock-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); }

.mock-seg {
  display: flex;
  background: rgba(11, 13, 19, 0.6);
  border-radius: 7px;
  padding: 2px;
  font-size: 0.68rem;
  color: var(--fog);
}

.mock-seg span { flex: 1; text-align: center; padding: 4px 0; border-radius: 5px; }

.mock-seg .on { background: rgba(239, 234, 224, 0.14); color: var(--ivory); }

.mock-slider {
  height: 4px;
  border-radius: 999px;
  background: rgba(239, 234, 224, 0.12);
  position: relative;
  margin-top: 0.4rem;
}

.mock-slider span {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 72%;
  border-radius: 999px;
  background: var(--ivory);
}

.mock-slider--reverb span { width: 85%; background: var(--violet); }

.app-points { list-style: none; display: flex; flex-direction: column; gap: 1.1rem; color: var(--fog); max-width: 520px; }

.app-points strong { color: var(--ivory); font-weight: 600; }

/* ---------- price ---------- */

.price-card {
  background: var(--ink-raised);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  padding: 2.75rem;
  max-width: 620px;
  position: relative;
  overflow: hidden;
}

.price-card::before {
  content: "";
  position: absolute;
  top: -70px; right: -70px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(169, 139, 255, 0.22), transparent 65%);
  pointer-events: none;
}

.price-line { display: flex; align-items: baseline; gap: 1.25rem; flex-wrap: wrap; }

.price-big { font-family: var(--serif); font-size: 3.4rem; }

.price-badge {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink);
  background: var(--teal);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-weight: 600;
}

.price-sub { color: var(--fog); margin-top: 0.4rem; }

.price-list {
  list-style: none;
  margin: 1.75rem 0 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: var(--fog);
  font-size: 0.95rem;
}

.price-list li::before { content: "·  "; color: var(--violet); font-weight: 700; }

/* ---------- faq ---------- */

.faq { display: flex; flex-direction: column; }

.faq details { border-bottom: 1px solid var(--hairline); }

.faq summary {
  cursor: pointer;
  padding: 1.15rem 0;
  font-weight: 500;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.faq summary::after { content: "+"; color: var(--fog); font-family: var(--mono); }

.faq details[open] summary::after { content: "–"; }

.faq details p { color: var(--fog); padding: 0 0 1.3rem; max-width: 640px; font-size: 0.95rem; }

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

.footer {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2.5rem 1.75rem 3rem;
  border-top: 1px solid var(--hairline);
  max-width: 1080px;
  margin: 0 auto;
}

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

.footer-links { display: flex; gap: 1.5rem; margin-left: auto; font-size: 0.85rem; color: var(--fog); }

.footer-links a:hover { color: var(--ivory); }

.footer-copy { font-size: 0.8rem; color: rgba(142, 148, 163, 0.6); }

/* ---------- reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.7s ease, transform 0.7s ease; }

.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- focus, motion, small screens ---------- */

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .gesture-glow::after, .tune-pulse { animation: none; }
  .gesture-glow--slide::after { left: calc(50% - 45px); }
}

@media (max-width: 880px) {
  .nav-links { display: none; }
  .gestures { grid-template-columns: 1fr; gap: 2.5rem; }
  .app-row { grid-template-columns: 1fr; gap: 3rem; }
  .popover-mock { max-width: 340px; }
  .section { padding: 5rem 1.4rem; }
  .hero-hint { display: none; }
  .price-card { padding: 2rem 1.5rem; }
}
