/* ============================================================
   Ground — Website Styles
   Warm, candlelit. Lora everywhere. No sharp edges.
   ============================================================ */

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

:root {
  --bg:        #1a1714;
  --text:      #ede8df;
  --muted:     #9e9690;
  --amber:     #d1ad6b;
  --overlay-bg: #161412;
  --transition-respond: 0.2s ease-out;
  --ease-out-strong: cubic-bezier(0.23, 1, 0.32, 1);
}

html, body {
  height: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Lora', Georgia, serif;
  font-size: 18px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--transition-respond);
}

a:hover {
  color: var(--text);
}

/* ============================================================
   Landing Page
   ============================================================ */

.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 32px;
}

.landing-content {
  max-width: 560px;
  width: 100%;
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
  gap: 40px;
  animation: fadeUp 1.8s var(--ease-out-strong) both;
}

.tagline {
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.5;
  font-weight: 400;
  color: var(--text);
}

.description {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.8;
}

/* ============================================================
   Sound Selector
   ============================================================ */

.sound-selector {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
}

.sound-icon {
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.4s ease;
  width: 52px;
  height: 52px;
  background: none;
  border: none;
  padding: 4px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}

@media (hover: hover) and (pointer: fine) {
  .sound-icon:hover {
    opacity: 0.8;
  }
  .sound-icon.selected:hover {
    opacity: 1;
  }
}

.sound-icon.selected {
  opacity: 1;
}

.sound-icon:focus-visible {
  opacity: 1;
  outline: 1px solid rgba(209, 173, 107, 0.5);
  outline-offset: 4px;
}

/* Icon rendering — CSS filter for tinting */
.sound-icon img {
  width: 44px;
  height: 44px;
  filter: invert(1) sepia(0.35) saturate(1.2) brightness(0.96);
  transition: filter 0.4s ease;
}

.sound-icon.selected img {
  filter: invert(1) sepia(1) saturate(3) hue-rotate(355deg) brightness(0.80);
}

.sound-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.sound-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  opacity: 0.5;
}

/* ============================================================
   Actions
   ============================================================ */

.btn-try {
  font-family: 'Lora', Georgia, serif;
  font-size: 15px;
  line-height: 1;
  color: var(--bg);
  background-color: var(--amber);
  border: none;
  padding: 12px 28px;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity var(--transition-respond), transform var(--transition-respond);
  letter-spacing: 0.02em;
}

@media (hover: hover) and (pointer: fine) {
  .btn-try:hover {
    opacity: 0.88;
    transform: translateY(-1px);
  }
}

.btn-try:active {
  transform: translateY(0) scale(0.97);
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.dot {
  color: rgba(255, 255, 255, 0.2);
}

.landing-logo {
  width: 120px;
  height: 120px;
  opacity: 0.18;
  border-radius: 24px;
}

/* ============================================================
   Try Ground Overlay
   ============================================================ */

.ground-overlay {
  position: fixed;
  inset: 0;
  background-color: var(--overlay-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  z-index: 100;

  opacity: 0;
  pointer-events: none;
}

.ground-overlay.visible {
  opacity: 1;
  pointer-events: auto;
  cursor: none;
}

.overlay-prompt {
  max-width: 560px;
  text-align: center;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.65;
  color: var(--text);
  font-style: italic;
  font-weight: 400;
  white-space: pre-wrap;

  opacity: 0;
}

.overlay-source {
  display: block;
  margin-top: 20px;
  font-size: 13px;
  font-style: normal;
  color: var(--muted);
  opacity: 0;
}

.overlay-hint {
  position: absolute;
  bottom: 40px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: lowercase;
  opacity: 0;
  transition: opacity 1.5s ease-in;
}

.overlay-hint.visible {
  opacity: 0.45;
}

/* ============================================================
   Story Page
   ============================================================ */

.story {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 80px 32px 120px;
}

.story article {
  max-width: 560px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
  animation: fadeUp 1.8s var(--ease-out-strong) both;
}

.story-header {
  margin-bottom: 24px;
}

.story-header .back {
  font-size: 14px;
  color: var(--amber);
  letter-spacing: 0.04em;
}

.story-header .back:hover {
  color: var(--text);
}

.story h1 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 400;
  font-style: italic;
  color: var(--text);
  margin-bottom: 12px;
}

.story p {
  font-size: 17px;
  line-height: 1.85;
  color: var(--muted);
}

.story p.closing-name {
  color: var(--text);
  font-size: 19px;
}

/* Story — Sampled prompts */
.story-prompts {
  margin: 48px 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.story-prompts blockquote {
  border: none;
  padding: 0;
  margin: 0;
}

.story-prompts blockquote p {
  font-style: italic;
  font-size: 19px;
  color: var(--text);
  opacity: 0.85;
}

.story-prompts blockquote cite {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-style: normal;
  color: var(--muted);
  opacity: 0.6;
}

/* Story — Acknowledgements */
.story-acknowledgements {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ack-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  opacity: 0.5;
  margin-bottom: 12px;
}

.ack-list {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.9;
  opacity: 0.7;
}

.story-footer {
  margin-top: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

/* ============================================================
   Shared animations
   ============================================================ */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   Reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .landing-content {
    animation: none;
    opacity: 1;
  }
  .story article {
    animation: none;
    opacity: 1;
  }
  .ground-overlay,
  .overlay-prompt,
  .overlay-source,
  .overlay-hint {
    transition: none !important;
  }
}

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

@media (max-width: 480px) {
  .btn-try {
    width: 100%;
    text-align: center;
  }

  .sound-selector {
    gap: 18px;
  }

  .sound-icon {
    width: 44px;
    height: 44px;
    padding: 4px;
  }

  .sound-icon img {
    width: 36px;
    height: 36px;
  }

  .landing-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .story {
    padding: 48px 24px 80px;
  }

  .story article {
    gap: 20px;
  }

  .story-footer {
    flex-wrap: wrap;
    justify-content: center;
  }
}
