/* Spiced Kopi — /v2 home page. Page-specific composition only; tokens, masthead,
   buttons, play control, and footer live in theme.css. */

/* ---------- The fold ---------- */

.fold {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, .82fr);
  gap: clamp(30px, 5vw, 76px);
  align-items: start;
  padding: clamp(38px, 6vw, 78px) 0 clamp(34px, 5vw, 62px);
}

h1 {
  margin: 0 0 20px;
  max-width: 15ch;
  font-family: var(--display);
  font-size: clamp(2.55rem, 6.2vw, 4.35rem);
  font-weight: 700;
  line-height: .97;
  letter-spacing: -.03em;
  text-wrap: balance;
  hyphens: none;
}

.fold__dek {
  margin: 0;
  max-width: 47ch;
  font-size: clamp(1.04rem, 1.5vw, 1.17rem);
  line-height: 1.62;
  color: var(--ink-soft);
}

.fold__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 22px;
}

.fold__fine {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  max-width: 46ch;
  font-size: .84rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---------- Live card ---------- */

.live { position: relative; padding-top: 10px; }

.live__stamp {
  position: absolute;
  top: -4px;
  right: 10px;
  z-index: 2;
  margin: 0;
  padding: 5px 11px;
  border: 1.5px solid var(--chilli);
  border-radius: 3px;
  background: rgba(244, 234, 216, .94);
  color: var(--chilli);
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  transform: rotate(-5deg);
}

html[data-mode="retro"] .live__stamp { background: var(--paper-lift); }

.card {
  display: grid;
  gap: 11px;
  padding: 13px 13px 15px;
  border: 1px solid var(--rule-strong);
  border-radius: 14px;
  background: var(--paper-lift);
  box-shadow: 0 1px 0 rgba(24, 17, 13, .05), 0 34px 54px -38px rgba(24, 17, 13, .5);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}

.card__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 9px;
  background: #e2d4bb;
}

html[data-mode="retro"] .card__frame { background: #ddd; }

.card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .5s var(--ease);
}

.card.is-loaded .card__image { opacity: 1; }

.card__skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, #e2d4bb 24%, #eee1cb 38%, #e2d4bb 62%);
  background-size: 300% 100%;
  animation: shimmer 1.5s linear infinite;
}

html[data-mode="retro"] .card__skeleton { background: #ddd; }

.card.is-loaded .card__skeleton { display: none; }

@keyframes shimmer {
  from { background-position: 130% 0; }
  to { background-position: -30% 0; }
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  color: var(--teal);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.card h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.32rem, 2vw, 1.6rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}

.card__summary {
  margin: 0;
  color: var(--ink-soft);
  font-size: .93rem;
  line-height: 1.55;
}

.card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}

.card__open {
  font-size: .84rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card__open:hover { color: var(--ink); }

/* ---------- Publisher line ---------- */

.sources {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: rgba(255, 255, 255, .2);
}

.sources__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(14px, 3vw, 40px);
  align-items: baseline;
  padding: 18px 0;
}

.sources__label {
  margin: 0;
  color: var(--ink-soft);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sources__list {
  margin: 0;
  color: var(--ink-soft);
  font-size: .84rem;
  line-height: 1.75;
}

/* ---------- How it works ---------- */

.how { padding: clamp(46px, 7vw, 96px) 0; }

.how__head,
.editions__head,
.archive__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .72fr);
  gap: clamp(20px, 4vw, 64px);
  align-items: end;
  margin-bottom: clamp(26px, 4vw, 46px);
}

.how__head h2 { max-width: 17ch; }

.how__head p,
.editions__head p,
.archive__head p {
  margin: 0;
  max-width: 45ch;
  color: var(--ink-soft);
  font-size: .96rem;
  line-height: 1.6;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 34px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--rule-strong);
}

.step__shot {
  overflow: hidden;
  border-radius: 14px;
  background: var(--espresso);
  box-shadow: 0 34px 54px -42px rgba(24, 17, 13, .6);
}

.step__shot img { display: block; width: 100%; height: auto; }

.step__text h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.step__text h3 span {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .14em;
}

.step__text p {
  margin: 0;
  max-width: 35ch;
  color: var(--ink-soft);
  font-size: .93rem;
  line-height: 1.55;
}

/* ---------- Listen band ---------- */

.listen { background: var(--espresso); color: #f4ead8; }

.listen__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(30px, 5vw, 72px);
  align-items: center;
  padding: clamp(46px, 7vw, 88px) 0;
}

.listen h2 { margin-bottom: 16px; max-width: 16ch; color: #f8f0df; }

.listen p { margin: 0; max-width: 46ch; color: rgba(244, 234, 216, .8); }

.languages {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.languages li {
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(139, 220, 63, .5);
  color: #f4ead8;
  font-size: .9rem;
}

.listen__player {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(244, 234, 216, .22);
  border-radius: 14px;
  background: rgba(244, 234, 216, .04);
}

.listen__now {
  margin: 0;
  color: var(--lime);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 62px;
}

.waveform i {
  flex: 1;
  height: 34%;
  border-radius: 2px;
  background: rgba(244, 234, 216, .3);
  transform-origin: center;
  transition: background-color .2s var(--ease);
}

.waveform i:nth-child(2n) { height: 58%; }
.waveform i:nth-child(3n) { height: 82%; }
.waveform i:nth-child(4n) { height: 44%; }
.waveform i:nth-child(5n) { height: 96%; }
.waveform i:nth-child(7n) { height: 24%; }

.waveform.is-playing i {
  background: var(--lime);
  animation: bar .78s ease-in-out infinite alternate;
}

.waveform.is-playing i:nth-child(3n) { animation-delay: -.18s; }
.waveform.is-playing i:nth-child(4n) { animation-delay: -.36s; }
.waveform.is-playing i:nth-child(5n) { animation-delay: -.52s; }
.waveform.is-playing i:nth-child(7n) { animation-delay: -.64s; }

@keyframes bar {
  from { transform: scaleY(.5); }
  to { transform: scaleY(1.12); }
}

.listen .play--band {
  justify-self: start;
  border-color: rgba(244, 234, 216, .42);
  color: #f4ead8;
  background: transparent;
}

.listen .play--band:hover { background: rgba(244, 234, 216, .1); }

.listen .play--band[aria-pressed="true"] {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--lime-ink);
}

.listen__note { margin: 0; color: rgba(244, 234, 216, .66); font-size: .8rem; }

/* ---------- Editions ---------- */

.editions { padding: clamp(46px, 7vw, 96px) 0; }

.editions__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 34px);
}

.edition {
  padding-top: 16px;
  border-top: 3px solid var(--rule-strong);
}

.edition--sg { border-top-color: var(--teal); }
.edition--in { border-top-color: var(--turmeric); }
.edition--us { border-top-color: var(--chilli); }

.edition h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.edition p { margin: 0; color: var(--ink-soft); font-size: .93rem; line-height: 1.6; }

/* ---------- Credit ---------- */

.credit {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-lift);
}

.credit__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .75fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(44px, 6vw, 82px) 0;
}

.credit__copy { display: grid; gap: 16px; max-width: 58ch; }

.credit__copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.65;
}

.credit__copy a {
  width: fit-content;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.credit__copy a:hover { color: var(--teal); }

.stamp-card {
  display: grid;
  gap: 6px;
  padding: 20px 22px;
  border: 1px solid var(--rule-strong);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 26px 44px -38px rgba(24, 17, 13, .5);
}

.stamp-card__label {
  margin: 0;
  color: var(--ink-soft);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.stamp-card__source {
  margin: 0;
  color: var(--teal);
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.stamp-card__line {
  margin: 0;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.stamp-card__note {
  margin: 4px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: .82rem;
  line-height: 1.5;
}

/* ---------- Archive ---------- */

.archive { padding: clamp(46px, 6vw, 88px) 0; }

.archive__head { margin-bottom: clamp(22px, 3vw, 36px); }
.archive__head h2 { max-width: 14ch; }

.archive__strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 22px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.archive__strip li { display: grid; gap: 8px; }

.archive__strip img {
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: #e8dcc4;
  filter: saturate(.9) contrast(1.03);
}

html[data-mode="retro"] .archive__strip img { filter: grayscale(1) contrast(1.08); }

.archive__strip span {
  color: var(--ink-soft);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

/* ---------- FAQ ---------- */

.faq { padding: clamp(44px, 6vw, 88px) 0 clamp(52px, 7vw, 96px); }
.faq h2 { margin-bottom: clamp(20px, 3vw, 32px); }

.faq__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(28px, 5vw, 64px);
  border-top: 1px solid var(--rule-strong);
}

details { border-bottom: 1px solid var(--rule); padding: 18px 0; }

summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

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

summary::after {
  content: "+";
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1;
}

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

details p {
  margin: 12px 0 0;
  max-width: 50ch;
  color: var(--ink-soft);
  font-size: .94rem;
  line-height: 1.62;
}

details a { color: var(--ink); text-underline-offset: 3px; }

/* ---------- Close ---------- */

.close { background: var(--espresso); color: #f4ead8; }

.close__inner {
  display: grid;
  justify-items: start;
  gap: 16px;
  padding: clamp(52px, 7vw, 96px) 0;
}

.close h2 { max-width: 15ch; color: #f8f0df; }
.close p { margin: 0; color: rgba(244, 234, 216, .8); }

.close__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .fold { grid-template-columns: minmax(0, 1fr); }
  .live { max-width: 460px; }
  .how__head,
  .editions__head,
  .archive__head { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .step {
    grid-template-columns: minmax(0, 150px) minmax(0, 1fr);
    align-items: start;
    gap: 20px;
    padding-top: 20px;
  }
  .listen__inner { grid-template-columns: minmax(0, 1fr); }
  .credit__inner { grid-template-columns: minmax(0, 1fr); }
  .editions__grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .faq__grid { grid-template-columns: minmax(0, 1fr); }
  .archive__strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  h1 { max-width: 18ch; }
  .sources__inner { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .sources__list { font-size: .8rem; }
  .step { grid-template-columns: minmax(0, 1fr); }
  .step__shot { max-width: 300px; }
}

@media (max-width: 480px) {
  .fold__actions .button,
  .close__actions .button { flex: 1 1 auto; }
  .live__stamp { right: 4px; }
}
