/* =============================================================================
 * Escuchar — main.css
 * Marketing site for https://escuchar.app
 * Palette sampled from the app's hero artwork and icon: wooden mannequins in
 * headphones on a honey-oak stage, in front of mid-century wallpaper — dusty
 * sky blue fading to seafoam, cream shapes, walnut outlines. Courier Prime as
 * the display face — Escuchar renders its transcripts as screenplay pages.
 * ========================================================================== */

:root {
  /* Sampled from the artwork */
  --ink:        #3a2a1c;   /* walnut outlines */
  --paper:      #f7eed8;   /* cream wallpaper shapes */
  --paper-alt:  #efe1c2;   /* deeper cream */
  --sky:        #7f9fb0;   /* dusty blue, top of the wall */
  --seafoam:    #a1c2ac;   /* seafoam, bottom of the wall */
  --oak:        #d19853;   /* stage floor */
  --wood:       #bd8347;   /* mannequin wood */
  --walnut:     #8a5a2e;   /* stool / floor grain */
  --steel:      #5b6468;   /* headphone band */
  --wall-teal:  #3f6f72;   /* the wall's shadowed seams */

  --color-primary:        var(--wall-teal);
  --color-primary-dark:   #2d5457;
  --color-secondary:      #b86a2c;   /* oak, deepened for text contrast */
  --color-accent:         var(--oak);
  --color-bg:             var(--paper);
  --color-bg-alt:         var(--paper-alt);
  --color-surface:        #fdf8ea;
  --color-text:           var(--ink);
  --color-text-muted:     #6b5a47;
  --color-border:         #dccaa4;

  --font-body:    system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Courier Prime', 'Courier New', monospace;

  --container-max: 900px;
  --container-pad: 1.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* House lights down: a walnut stage */
    --color-bg:         #241c15;
    --color-bg-alt:     #2d241b;
    --color-surface:    #342a20;
    --color-text:       #efe3c8;
    --color-text-muted: #b6a78f;
    --color-border:     #4a3c2e;
    --color-primary:    #93c1b8;
    --color-primary-dark: #74a79d;
    --color-secondary:  #e0a466;
    --color-accent:     #d9a35f;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.site-main { flex: 1; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; }
a { color: var(--color-primary); }
a:hover { color: var(--color-secondary); }

/* Header — slim, wordmark + nav */
.site-header {
  padding: 1.1rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: block;
}

.header-nav {
  display: flex;
  gap: 1.5rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.header-nav a { text-decoration: none; }

/* Hero — the artwork carries it */
.hero {
  padding: 4rem 0 5rem;
  text-align: center;
}

.hero-wordmark {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

/* A level meter beside the wordmark */
.hero-wordmark .meter {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.07em;
  height: 0.8em;
  margin-left: 0.12em;
  vertical-align: baseline;
}

.hero-wordmark .meter i {
  display: block;
  width: 0.11em;
  height: 100%;
  background: var(--color-secondary);
  border-radius: 0.03em;
  transform-origin: bottom;
  animation: level 1.2s ease-in-out infinite alternate;
}

.hero-wordmark .meter i:nth-child(1) { animation-delay: -0.2s; }
.hero-wordmark .meter i:nth-child(2) { animation-delay: -0.9s; background: var(--color-primary); }
.hero-wordmark .meter i:nth-child(3) { animation-delay: -0.5s; }
.hero-wordmark .meter i:nth-child(4) { animation-delay: -1.1s; background: var(--color-primary); }

@keyframes level {
  0%   { transform: scaleY(0.25); }
  40%  { transform: scaleY(0.9); }
  70%  { transform: scaleY(0.45); }
  100% { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-wordmark .meter i { animation: none; }
  .hero-wordmark .meter i:nth-child(odd) { transform: scaleY(0.6); }
}

.hero-tagline {
  font-size: 1.35rem;
  color: var(--color-text-muted);
  max-width: 34em;
  margin: 1.25rem auto 0;
}

.hero-art {
  margin: 3rem auto 0;
  max-width: 860px;
}

.hero-art img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 3px solid var(--ink);
  box-shadow: 0.5rem 0.5rem 0 var(--oak);
}

@media (prefers-color-scheme: dark) {
  .hero-art img {
    border-color: #120d09;
    box-shadow: 0.5rem 0.5rem 0 rgba(209, 152, 83, 0.4);
  }
}

.hero-soon {
  display: inline-block;
  margin-top: 3rem;
  padding: 0.5rem 1.25rem;
  border: 2px solid var(--color-accent);
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-secondary);
  transform: rotate(-2deg);
}

.hero-store {
  margin-top: 3rem;
}

.hero-store .store-badge {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: var(--color-primary);
  color: var(--paper);
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  border: 2px solid var(--color-primary-dark);
  box-shadow: 0.25rem 0.25rem 0 var(--color-accent);
}

.hero-store .store-badge:hover {
  background: var(--color-primary-dark);
  color: var(--paper);
}

.hero-platforms {
  margin-top: 1.75rem;
  color: var(--color-text-muted);
  font-size: 1rem;
  font-family: var(--font-display);
}

.section-title {
  text-align: center;
  font-size: 1.75rem;
  margin: 0 0 2rem;
}

/* Features — rounded "wallpaper square" cards, echoing the artwork's motif */
.features {
  padding: 1rem 0 5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.feature-card {
  background: var(--color-surface);
  border: 2.5px solid var(--color-border);
  border-radius: 18px;
  padding: 1.4rem 1.5rem;
}

.feature-card:nth-child(3n+1) { border-color: var(--color-primary); }
.feature-card:nth-child(3n+2) { border-color: var(--color-secondary); }
.feature-card:nth-child(3n+3) { border-color: var(--seafoam); }

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.feature-card code,
.hero-tagline code {
  font-family: var(--font-display);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.05em 0.35em;
  font-size: 0.95em;
}

.feature-card kbd {
  font-family: var(--font-display);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0.05em 0.4em;
  font-size: 0.9em;
}

/* Inner pages (support, privacy, terms) */
.page {
  padding: 4rem 0;
}

.page .container { max-width: 780px; }

.page h1 { font-size: 2.25rem; }
.page h2 { font-size: 1.5rem; margin-top: 2.5rem; }

.page table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5rem 0;
}

.page th, .page td {
  border: 1px solid var(--color-border);
  padding: 0.6rem 0.9rem;
  text-align: left;
}

.page th { background: var(--color-bg-alt); font-family: var(--font-display); }

/* Footer */
.site-footer {
  border-top: 2px solid var(--color-border);
  background: var(--color-bg-alt);
  padding: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
}

.footer-brand { font-family: var(--font-display); font-weight: 700; margin: 0; }
.footer-nav { display: flex; gap: 1.25rem; }
.footer-legal { margin: 0; }
.footer-legal a { color: inherit; }

@media (prefers-color-scheme: dark) {
  .hero-store .store-badge,
  .hero-store .store-badge:hover { color: var(--color-bg); }
}
