:root {
  --ink: #16140F;
  --accent: #A6382C;
  --stripe-a: #F1EEE6;
  --stripe-b: #F4F1E9;
  --field: #FDFBF6;
  --content: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: repeating-linear-gradient(
    to bottom,
    var(--stripe-a) 0,
    var(--stripe-a) 2px,
    var(--stripe-b) 2px,
    var(--stripe-b) 4px
  );
  font-family: "PT Serif", Georgia, serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  width: min(calc(100% - 48px), var(--content));
  margin: 0 auto;
}

.site-header {
  padding: 55px 0 24px;
  text-align: center;
  border-bottom: 2px solid var(--ink);
}
.brand {
  font-family: "Rethink Sans", sans-serif;
  font-size: 100px;
  font-weight: 700;
  line-height: .82;
  letter-spacing: -5px;
}
.tagline {
  margin-top: 11px;
  font-family: "PT Sans", sans-serif;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  align-items: center;
  gap: 45px;
  padding: 92px 0 72px;
}
.hero h1,
.hero-subtitle {
  margin: 0;
  font-family: "PT Serif", Georgia, serif;
  font-size: 76px;
  line-height: .98;
  font-weight: 400;
  letter-spacing: -2px;
}
.hero-subtitle { font-style: italic; margin-top: 7px; }
.hero-text {
  margin-top: 54px;
  font-size: 25px;
  line-height: 1.32;
  font-style: italic;
}
.hero-text p { margin: 0 0 25px; }
.hero-text p:last-child { margin-bottom: 0; }
.hero-art-wrap { display: flex; justify-content: center; align-items: center; }
.hero-art { width: min(100%, 460px); height: auto; display: block; }

.section-rule { border-top: 2px solid var(--ink); }
.why { padding: 38px 0 56px; }
h2, h3 { font-weight: 700; }
.why h2,
.calculator h2,
.game h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.25;
}
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 65px;
  row-gap: 28px;
  margin-top: 31px;
  font-size: 20px;
  line-height: 1.24;
}

.calculator { padding: 47px 0 57px; }
.input-row {
  display: flex;
  gap: 45px;
  margin-top: 30px;
}
.input-row label { width: 235px; }
.input-row label > span {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
  font-style: italic;
}
.input-wrap input {
  width: 100%;
  height: 56px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  font: 400 20px "PT Serif", Georgia, serif;
  padding: 0 14px;
  outline: none;
}
.input-wrap input:focus { box-shadow: 0 0 0 2px rgba(22,20,15,.10); }

.input-hint {
  margin-top: 8px;
  font-family: "PT Serif", Georgia, serif;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.3;
  font-style: normal;
  opacity: .62;
}

.calculation-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(-8px);
  transition: grid-template-rows .7s cubic-bezier(.22,1,.36,1), opacity .5s ease, transform .7s cubic-bezier(.22,1,.36,1), margin-top .7s ease;
  margin-top: 0;
  overflow: hidden;
}
.calculation-panel.is-visible {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateY(0);
  margin-top: 31px;
}
.calculation-inner { min-height: 0; overflow: hidden; font-size: 20px; line-height: 1.25; }
.cost-amount { font-weight: 700; margin-bottom: 25px; color: var(--accent); }
.calculation-inner p { margin: 0 0 22px; }
.calculation-inner h3 { margin: 28px 0 25px; font-size: 20px; line-height: 1.2; }
.calculation-inner strong { color: var(--accent); }
.period-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 55px;
}
.period-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font: 700 20px "PT Serif", Georgia, serif;
  transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease;
}
.period-button:hover { background: var(--accent); transform: translateY(-3px); box-shadow: 0 7px 0 rgba(22,20,15,.16); }
.period-button:active { background: var(--accent); transform: translateY(0); box-shadow: none; }

.game { padding: 47px 0 58px; font-size: 20px; line-height: 1.35; }
.game h2 { margin-bottom: 28px; }
.game p { margin: 0 0 18px; }

.site-footer { padding: 52px 0 45px; text-align: center; font-size: 20px; }
.site-footer p { margin: 0 0 22px; }
.socials { display: flex; justify-content: center; align-items: center; gap: 19px; margin: 0 0 25px; }
.socials a { display: inline-flex; width: 24px; height: 24px; color: var(--ink); transition: transform .2s ease, color .2s ease; }
.socials a:hover { color: var(--accent); transform: translateY(-2px); }
.socials svg { width: 100%; height: 100%; display: block; }
.copyright { font-weight: 400; font-size: 14px; }

@media (max-width: 1000px) {
  .page { width: min(calc(100% - 40px), 760px); }
  .site-header { padding-top: 40px; }
  .brand { font-size: 76px; }
  .hero { grid-template-columns: 1fr; padding: 62px 0 55px; gap: 35px; }
  .hero-art-wrap { order: -1; justify-content: flex-end; }
  .hero-art { width: 300px; }
  .hero h1, .hero-subtitle { font-size: 58px; }
  .hero-text { margin-top: 38px; font-size: 22px; }
  .why-grid { column-gap: 35px; font-size: 18px; }
  .period-buttons { gap: 18px; }
}

@media (max-width: 680px) {
  .page { width: min(calc(100% - 28px), 560px); }
  .site-header { padding: 29px 0 18px; }
  .brand { font-size: 54px; letter-spacing: -3px; }
  .tagline { font-size: 9px; line-height: 1.2; }
  .hero { padding: 43px 0 40px; gap: 20px; }
  .hero-art-wrap { justify-content: center; }
  .hero-art { width: min(75vw, 280px); }
  .hero h1, .hero-subtitle { font-size: clamp(39px, 11vw, 52px); letter-spacing: -1.3px; }
  .hero-text { margin-top: 29px; font-size: 19px; line-height: 1.35; }
  .hero-text p { margin-bottom: 18px; }
  .why, .calculator, .game { padding-top: 30px; padding-bottom: 38px; }
  .why h2, .calculator h2, .game h2 { font-size: 21px; }
  .why-grid { grid-template-columns: 1fr; gap: 21px; margin-top: 22px; font-size: 17px; }
  .input-row { flex-direction: column; gap: 20px; margin-top: 25px; }
  .input-row label { width: 100%; }
  .input-row label > span { font-size: 18px; }
  .input-wrap input { height: 52px; }
  .input-hint { font-size: 12px; }
  .calculation-panel.is-visible { margin-top: 25px; }
  .calculation-inner, .calculation-inner h3, .period-button, .game, .site-footer { font-size: 18px; }
  .period-buttons { grid-template-columns: 1fr 1fr; gap: 12px; }
  .period-button { min-height: 50px; }
  .site-footer { padding-top: 38px; padding-bottom: 30px; }
}
