:root {
  --ink: #392922;
  --muted: #75645c;
  --wine: #8b3f2f;
  --wine-dark: #5d291f;
  --gold: #f0b85a;
  --green: #277b59;
  --cream: #fff8eb;
  --line: #ead8c7;
  --shadow: 0 22px 55px rgba(83, 45, 31, .16);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 8% 8%, rgba(242, 190, 105, .24), transparent 24rem),
    radial-gradient(circle at 92% 3%, rgba(190, 102, 72, .18), transparent 27rem),
    linear-gradient(180deg, #fffaf2 0%, #fff 52%, #f9f1e8 100%);
  color: var(--ink);
  font-family: "Trebuchet MS", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; }

a:focus-visible {
  outline: 4px solid rgba(139, 63, 47, .24);
  outline-offset: 4px;
}

.stage-header {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
  padding: 22px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 900;
}

.back-link small,
.back-link strong { display: block; }
.back-link small { color: var(--muted); font-size: 11px; }
.back-link strong { margin-top: 2px; }

.back-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(139, 63, 47, .18);
  border-radius: 14px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 8px 20px rgba(83, 45, 31, .09);
  color: var(--wine);
  font-size: 21px;
}

.stage-count {
  padding: 9px 14px;
  border: 1px solid #ead4c0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .84);
  color: var(--wine-dark);
  font-size: 12px;
  font-weight: 900;
}

main {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
  padding-bottom: max(38px, env(safe-area-inset-bottom));
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .82fr);
  align-items: center;
  gap: 34px;
  margin-top: 14px;
  padding: clamp(30px, 5vw, 58px);
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: 34px;
  background: linear-gradient(125deg, #5d291f 0%, #8b3f2f 58%, #b76146 100%);
  box-shadow: var(--shadow);
  color: white;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  pointer-events: none;
}

.hero::before { width: 330px; height: 330px; right: -110px; top: -180px; }
.hero::after { width: 210px; height: 210px; left: 46%; bottom: -150px; }
.hero-copy, .flow { position: relative; z-index: 1; }

.kicker {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  color: #ffe5b9;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: .1em;
  text-transform: uppercase;
}

h1 {
  max-width: 660px;
  margin: 13px 0 12px;
  font-size: clamp(35px, 5.6vw, 64px);
  line-height: .98;
  letter-spacing: -.045em;
}

h1 em { color: #ffd287; font-style: normal; }

.hero-copy > p {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, .87);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.6;
}

.flow {
  margin: 0;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  list-style: none;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 24px;
  background: rgba(55, 21, 15, .22);
  backdrop-filter: blur(7px);
}

.flow li {
  min-height: 92px;
  padding: 14px;
  border-radius: 17px;
  background: rgba(255, 255, 255, .11);
}

.flow b {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 50%;
  background: #ffd287;
  color: #5d291f;
  font-size: 12px;
}

.flow strong, .flow small { display: block; }
.flow strong { font-size: 15px; }
.flow small { margin-top: 3px; color: rgba(255, 255, 255, .72); font-size: 11px; }

.cards-section { margin-top: 30px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 0 3px 15px; }
.section-heading span { color: var(--wine); font-size: 11px; font-weight: 1000; letter-spacing: .1em; text-transform: uppercase; }
.section-heading h2 { margin: 4px 0 0; font-size: clamp(24px, 3vw, 34px); }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; }

.story-card {
  display: grid;
  grid-template-columns: minmax(300px, .9fr) minmax(0, 1.1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: white;
  box-shadow: 0 16px 42px rgba(83, 45, 31, .12);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.story-card:hover { transform: translateY(-4px); border-color: #d7b593; box-shadow: 0 22px 54px rgba(83, 45, 31, .18); }
.card-visual { position: relative; min-height: 310px; overflow: hidden; background: #efe0ce; }
.card-visual img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.story-card:hover .card-visual img { transform: scale(1.025); }
.card-number, .card-status { position: absolute; top: 16px; padding: 7px 10px; border-radius: 999px; color: white; font-size: 10px; font-style: normal; font-weight: 1000; letter-spacing: .08em; }
.card-number { left: 16px; background: rgba(49, 22, 16, .82); }
.card-status { right: 16px; background: rgba(139, 63, 47, .92); }
.card-body { padding: clamp(25px, 4vw, 42px); display: flex; flex-direction: column; justify-content: center; }
.card-body > small { color: var(--wine); font-size: 11px; font-weight: 1000; letter-spacing: .08em; text-transform: uppercase; }
.card-body h3 { margin: 8px 0 2px; font-size: clamp(29px, 4vw, 43px); line-height: 1.03; }
.english-title { color: var(--muted); font-size: 15px; font-weight: 800; }
.card-description { max-width: 630px; margin: 17px 0 19px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.card-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.card-meta span { padding: 7px 10px; border-radius: 999px; background: #fff3df; color: #744533; font-size: 11px; font-weight: 900; }
.card-action { align-self: flex-start; margin-top: 24px; padding: 12px 18px; border-radius: 999px; background: linear-gradient(135deg, var(--wine), var(--wine-dark)); color: white; font-weight: 1000; }
.story-card.is-complete .card-status { background: var(--green); }
.story-card.is-complete .card-action { background: linear-gradient(135deg, var(--green), #18553c); }
.coming-note { margin: 15px 3px 0; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }

@media (max-width: 780px) {
  .stage-header, main { width: min(100% - 24px, 620px); }
  .stage-header { padding-top: max(14px, env(safe-area-inset-top)); }
  .hero { grid-template-columns: 1fr; gap: 23px; padding: 28px 22px; border-radius: 27px; }
  .flow { padding: 11px; }
  .flow li { min-height: 82px; padding: 12px; }
  .story-card { grid-template-columns: 1fr; }
  .card-visual { min-height: 230px; aspect-ratio: 16 / 9; }
  .card-body { padding: 25px 22px 27px; }
  .section-heading { align-items: start; flex-direction: column; gap: 4px; }
}

@media (max-width: 430px) {
  .back-link small { display: none; }
  .stage-count { padding: 8px 10px; font-size: 11px; }
  h1 { font-size: 39px; }
  .flow strong { font-size: 14px; }
  .card-visual { min-height: 205px; }
  .card-description { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
