:root {
  --bg: #f5efe3;
  --paper: rgba(255, 252, 246, 0.92);
  --ink: #171411;
  --muted: #6b6256;
  --line: rgba(23, 20, 17, 0.12);
  --accent: #ff7b54;
  --accent-soft: rgba(255, 123, 84, 0.18);
  --mint: #8bd3c7;
  --blue: #90caf9;
  --gold: #ffd166;
  --violet: #d7c3ff;
  --emerald: #9fe3b1;
  --orange: #ffb87c;
  --slate: #d7dbe5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 196, 115, 0.65), transparent 24rem),
    radial-gradient(circle at top right, rgba(139, 211, 199, 0.5), transparent 22rem),
    linear-gradient(180deg, #fff9ef 0%, var(--bg) 100%);
}

a {
  color: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
  gap: 1.25rem;
  align-items: stretch;
}

.hero-copy,
.papa-card,
.quote-card,
.note-card {
  border: 1px solid var(--line);
  border-radius: 1.9rem;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(64, 52, 40, 0.08);
}

.hero-copy {
  padding: 1.8rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  color: var(--muted);
}

.hero h1 {
  margin: 0;
  max-width: 16ch;
  font-family: "Fraunces", serif;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.lead {
  max-width: 56ch;
  margin: 1rem 0 0;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 1.4rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.papa-card {
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  background:
    linear-gradient(145deg, rgba(255, 123, 84, 0.18), rgba(255, 209, 102, 0.22)),
    var(--paper);
}

.papa-card::after {
  content: "";
  position: absolute;
  inset: auto -3rem -4rem auto;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  background: rgba(255, 123, 84, 0.12);
  filter: blur(12px);
}

.papa-label {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.papa-value {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.6rem;
  font-family: "Fraunces", serif;
}

.peso {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

#papa-value {
  font-size: clamp(4rem, 10vw, 7rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.papa-description {
  position: relative;
  z-index: 1;
  margin: 1rem 0 0;
  max-width: 28ch;
  color: var(--muted);
  line-height: 1.6;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0 1.15rem;
}

.refresh-button {
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  padding: 0.9rem 1.3rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease;
}

.refresh-button:hover {
  transform: translateY(-1px);
}

.refresh-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.controls-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.quotes-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.quote-card {
  padding: 1.15rem;
}

.card-top,
.card-main,
.card-foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.card-top {
  align-items: center;
}

.quote-label {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.quote-tone-pill {
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tone-blue { background: rgba(144, 202, 249, 0.24); }
.tone-violet { background: rgba(215, 195, 255, 0.34); }
.tone-emerald { background: rgba(159, 227, 177, 0.3); }
.tone-orange { background: rgba(255, 184, 124, 0.35); }
.tone-gold { background: rgba(255, 209, 102, 0.34); }
.tone-slate { background: rgba(215, 219, 229, 0.6); }
.tone-neutral { background: rgba(23, 20, 17, 0.08); }

.card-main {
  margin-top: 1.15rem;
  align-items: flex-end;
}

.metric-label {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.metric-value {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.card-foot {
  margin-top: 1rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.note-card {
  padding: 1.2rem;
}

.note-card h2 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.note-card p {
  margin: 0;
  line-height: 1.65;
  color: var(--muted);
}

@media (max-width: 1080px) {
  .quotes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .notes {
    grid-template-columns: 1fr;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 1rem, 100%);
    padding-top: 1rem;
  }

  .hero-copy,
  .papa-card,
  .quote-card,
  .note-card {
    border-radius: 1.5rem;
  }

  .quotes-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: none;
  }
}
