/* ----------------------------------------
   tonemana — style.css
   Aesthetic: brutally minimal. no decoration.
   Font: Fragment Mono (EN) / system JP (JA)
   Palette: #000 / #fff / #666 (muted)
---------------------------------------- */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #000;
  --fg: #fff;
  --muted: #666;
  --font: 'Fragment Mono', monospace;
  --font-ja: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Meiryo', sans-serif;
  --size-sm: 0.75rem;
  --size-base: 0.875rem;
  --size-lg: 1.125rem;
  --gap: clamp(3rem, 8vw, 7rem);
}

html {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--size-base);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 6vw, 5rem);
}

/* Home page overrides body padding — sections handle their own */
body.home {
  padding: 0;
  display: block;
}

/* ---- HEADER ---- */

header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: var(--gap);
}

/* ---- HERO ---- */

.hero {
  background-color: #000;
  background-image: url('bg.svg');
  background-size: cover;
  background-position: center bottom;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.hero-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 6vw, 5rem);
}

.hero-inner header {
  padding-bottom: 0;
  margin-bottom: auto;
}

.hero-text {
  padding-top: clamp(6rem, 15vw, 12rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

.headline {
  font-size: clamp(2.2rem, 7vw, 5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 1.25rem;
  line-height: 1.05;
}

/* ---- SECTIONS ---- */

.section {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.section-inner {
  padding: clamp(3rem, 8vw, 6rem) clamp(1.5rem, 6vw, 5rem);
}

.section-title {
  font-size: var(--size-sm);
  letter-spacing: 0.15em;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-body {
  max-width: 52ch;
}

.section-body p + p {
  margin-top: 1.25rem;
}

.section-sub {
  font-size: var(--size-sm);
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: 2.5rem;
  margin-top: -1rem;
}

/* ---- YOUTUBE ---- */

.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 800px;
  background: #0a0a0a;
  border: 1px solid rgba(255,255,255,0.06);
}

.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.caption {
  margin-top: 1rem;
  font-size: var(--size-sm);
  color: var(--muted);
}

.caption a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.caption a:hover {
  color: var(--fg);
}

/* ---- PDF ---- */

.pdf-block {
  max-width: 62ch;
}

.pdf-price {
  font-size: clamp(1.75rem, 5vw, 3rem);
  color: var(--fg);
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

.pdf-price-unit {
  font-size: clamp(0.9rem, 2vw, 1.25rem);
  color: var(--muted);
  letter-spacing: 0.05em;
}

.pdf-desc {
  margin-bottom: 3rem;
  max-width: 52ch;
}

.pdf-desc p + p {
  margin-top: 1rem;
}

.pdf-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
  margin-bottom: 3rem;
}

.pdf-list-title {
  font-size: var(--size-sm);
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 1rem;
}

.pdf-list ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pdf-list ul li {
  font-size: var(--size-sm);
  color: var(--fg);
  line-height: 1.5;
  padding-left: 1.5em;
  text-indent: -1.5em;
}

.pdf-list ul li::before {
  content: '— ';
  color: var(--muted);
}

.buy-btn {
  display: inline-block;
  font-family: var(--font);
  font-size: var(--size-sm);
  letter-spacing: 0.12em;
  color: var(--bg);
  background: var(--fg);
  padding: 0.85rem 2.25rem;
  text-decoration: none;
  transition: opacity 0.15s;
}

.buy-btn:hover {
  opacity: 0.82;
}

.buy-note {
  margin-top: 0.75rem;
  font-size: var(--size-sm);
  color: var(--muted);
}

/* ---- BILINGUAL ---- */

/* Japanese companion text — block under English, lighter weight */
.ja {
  display: block;
  font-family: var(--font-ja);
  font-size: 0.82em;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: 0.04em;
  line-height: 1.85;
  margin-top: 0.45em;
}

/* Slightly more visible in key descriptive contexts */
.pdf-desc .ja,
.section-sub .ja {
  color: rgba(255, 255, 255, 0.32);
}

.lede .ja {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.78em;
}

/* ---- NEWSLETTER ---- */

.newsletter-form {
  margin-top: 0;
}

.form-row {
  display: flex;
  gap: 0;
  max-width: 480px;
}

.email-input {
  flex: 1;
  font-family: var(--font);
  font-size: var(--size-sm);
  letter-spacing: 0.06em;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-right: none;
  color: var(--fg);
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
}

.email-input::placeholder {
  color: var(--muted);
}

.email-input:focus {
  border-color: rgba(255, 255, 255, 0.5);
}

.form-btn {
  font-family: var(--font);
  font-size: var(--size-sm);
  letter-spacing: 0.12em;
  background: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.form-btn:hover {
  opacity: 0.82;
}

/* ---- KO-FI ---- */

.kofi-wrap {
  max-width: 620px;
}

.kofi-wrap iframe {
  width: 100%;
  height: 712px;
  border: none;
}

/* ---- FOOTER (HOME) ---- */

.home-footer {
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem !important;
  padding-bottom: 2rem !important;
}

.footer-nav {
  display: flex;
  gap: 2.5rem;
}

.footer-nav a {
  font-size: var(--size-sm);
  letter-spacing: 0.12em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-nav a:hover {
  color: var(--fg);
}

.wordmark {
  font-size: var(--size-base);
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--fg);
}

nav {
  display: flex;
  gap: 2.5rem;
}

nav a {
  font-size: var(--size-sm);
  letter-spacing: 0.12em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

nav a:hover,
nav a.active {
  color: var(--fg);
}

/* ---- MAIN ---- */

main {
  flex: 1;
}

/* INDEX */

.lede {
  font-size: clamp(var(--size-base), 2vw, var(--size-lg));
  max-width: 44ch;
  line-height: 1.6;
  margin-bottom: var(--gap);
  color: var(--fg);
}

.links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.links a {
  font-size: var(--size-sm);
  letter-spacing: 0.12em;
  color: var(--muted);
  text-decoration: none;
  width: fit-content;
  transition: color 0.15s;
}

.links a:hover {
  color: var(--fg);
}

/* Q&A */

main.qa {
  max-width: 60ch;
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 5vw, 4rem);
}

.qa-item .q {
  font-size: var(--size-sm);
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.qa-item .a {
  font-size: var(--size-base);
  line-height: 1.75;
  color: var(--fg);
}

/* TEXT INDEX */

main.text-index {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.text-entry {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1.5rem;
  align-items: baseline;
}

.text-entry .date {
  font-size: var(--size-sm);
  color: var(--muted);
  white-space: nowrap;
}

.text-entry .title {
  color: var(--fg);
  text-decoration: none;
  line-height: 1.5;
  transition: color 0.15s;
}

.text-entry .title:hover {
  color: var(--muted);
}

.empty-state {
  color: var(--muted);
  font-size: var(--size-sm);
  letter-spacing: 0.08em;
}

/* ---- FOOTER ---- */

footer {
  padding-top: var(--gap);
  font-size: var(--size-sm);
  color: var(--muted);
}

/* ---- RESPONSIVE ---- */

@media (max-width: 640px) {
  .pdf-lists {
    grid-template-columns: 1fr;
  }

  .headline {
    font-size: clamp(1.8rem, 10vw, 2.8rem);
  }
}

@media (max-width: 480px) {
  nav {
    gap: 1rem;
  }

  .text-entry {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .hero-inner header nav {
    gap: 0.8rem;
  }

  .form-row {
    flex-direction: column;
  }

  .email-input {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: none;
  }

  .email-input:focus {
    border-right: 1px solid rgba(255, 255, 255, 0.5);
  }

  .form-btn {
    text-align: center;
  }
}
