/* =========================================================
   Earth.co.jp
   地球を救う恋物語 / A Love Story While We Save the Planet
   site.css
   ========================================================= */

:root {
  --earth-deep: #07130f;
  --earth-forest: #123326;
  --earth-moss: #496b45;
  --earth-leaf: #7f9f68;
  --earth-cream: #f5efd8;
  --earth-paper: #fffaf0;
  --earth-sand: #d8c49a;
  --earth-clay: #a8643c;
  --earth-sun: #e7b75f;
  --earth-ocean: #143f52;
  --earth-sky: #6f9db3;
  --earth-rose: #c77b69;
  --earth-ink: #182018;
  --earth-muted: #6f7569;
  --earth-line: rgba(24, 32, 24, 0.15);
  --earth-white: rgba(255, 250, 240, 0.96);
  --earth-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
  --earth-soft-shadow: 0 16px 42px rgba(7, 19, 15, 0.16);

  --font-jp: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho",
    "Noto Serif JP", "Times New Roman", serif;
  --font-sans: "Hiragino Sans", "Yu Gothic", "Meiryo",
    "Noto Sans JP", Arial, sans-serif;
}

/* ---------------------------------------------------------
   Base
   --------------------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--earth-deep);
}

body {
  margin: 0;
  color: var(--earth-ink);
  background:
    radial-gradient(circle at 18% 8%, rgba(231, 183, 95, 0.2), transparent 28%),
    radial-gradient(circle at 84% 16%, rgba(111, 157, 179, 0.16), transparent 30%),
    linear-gradient(180deg, #07130f 0%, #163323 22%, #f5efd8 48%, #fffaf0 100%);
  font-family: var(--font-jp);
  line-height: 1.9;
  letter-spacing: 0.035em;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0 0 1.35rem;
}

strong {
  font-weight: 800;
}

::selection {
  color: var(--earth-deep);
  background: var(--earth-sun);
}

/* ---------------------------------------------------------
   Layout Helpers
   --------------------------------------------------------- */

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.narrow {
  width: min(850px, calc(100% - 40px));
  margin: 0 auto;
}

.wide {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: clamp(64px, 8vw, 120px) 0;
}

.section-tight {
  padding: clamp(42px, 5vw, 72px) 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  color: var(--earth-clay);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: none;
}

.eyebrow::before {
  content: "";
  width: 36px;
  height: 1px;
  background: currentColor;
}

.lead {
  font-size: clamp(1.08rem, 2vw, 1.38rem);
  line-height: 2.05;
  color: rgba(24, 32, 24, 0.88);
}

.kicker {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: none;
}

/* ---------------------------------------------------------
   Header / Navigation
   --------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 19, 15, 0.78);
  border-bottom: 1px solid rgba(245, 239, 216, 0.16);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1380px, calc(100% - 28px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--earth-cream);
  font-family: var(--font-sans);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(231, 183, 95, 0.55);
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 28%, rgba(245, 239, 216, 0.92) 0 8%, transparent 9%),
    radial-gradient(circle at 58% 50%, rgba(111, 157, 179, 0.75) 0 21%, transparent 22%),
    radial-gradient(circle at 36% 62%, rgba(127, 159, 104, 0.9) 0 28%, transparent 29%),
    linear-gradient(135deg, #183f52, #07130f);
  box-shadow: 0 0 28px rgba(231, 183, 95, 0.22);
}

.brand small {
  display: block;
  margin-top: -0.2rem;
  color: rgba(245, 239, 216, 0.7);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav a {
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  color: rgba(245, 239, 216, 0.88);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  transition: 180ms ease;
}

.nav a:hover,
.nav a:focus {
  color: var(--earth-deep);
  background: var(--earth-sun);
}

.nav .nav-cta {
  color: var(--earth-deep);
  background: var(--earth-cream);
}

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */

.hero {
  position: relative;
  min-height: clamp(720px, 94vh, 980px);
  display: flex;
  align-items: center;
  color: var(--earth-cream);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(7, 19, 15, 0.92), rgba(7, 19, 15, 0.58) 48%, rgba(7, 19, 15, 0.32)),
    var(--hero-image, url("https://earth.co.jp/images/earth-home-hero-planet-as-main-character-solar-ocean-children.jpg")) center / cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 38%, rgba(231, 183, 95, 0.22), transparent 28%),
    linear-gradient(180deg, transparent 65%, rgba(7, 19, 15, 0.86) 100%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 180px;
  background: linear-gradient(180deg, transparent, var(--earth-cream));
  opacity: 0.92;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 120px 0 170px;
}

.hero-content {
  width: min(760px, 100%);
}

.hero .eyebrow {
  color: var(--earth-sun);
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(3.1rem, 9vw, 8.5rem);
  line-height: 0.98;
  letter-spacing: 0.02em;
  text-shadow: 0 16px 54px rgba(0, 0, 0, 0.45);
}

.hero-subtitle {
  margin: 0 0 1.6rem;
  font-size: clamp(1.18rem, 2.5vw, 2rem);
  line-height: 1.75;
  color: rgba(245, 239, 216, 0.94);
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

.hero-copy {
  width: min(640px, 100%);
  color: rgba(245, 239, 216, 0.86);
  font-size: clamp(1rem, 1.45vw, 1.18rem);
  line-height: 2;
}

.hero-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 2.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.78rem 1.25rem;
  border: 1px solid rgba(24, 32, 24, 0.18);
  border-radius: 999px;
  background: var(--earth-ink);
  color: var(--earth-cream);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  box-shadow: var(--earth-soft-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--earth-shadow);
}

.btn-primary {
  background: var(--earth-sun);
  color: var(--earth-deep);
  border-color: rgba(231, 183, 95, 0.5);
}

.btn-ghost {
  background: rgba(245, 239, 216, 0.12);
  color: var(--earth-cream);
  border-color: rgba(245, 239, 216, 0.35);
  backdrop-filter: blur(8px);
}

/* ---------------------------------------------------------
   Cinematic Intro / Thesis
   --------------------------------------------------------- */

.thesis {
  position: relative;
  margin-top: -88px;
  z-index: 5;
}

.thesis-card {
  padding: clamp(32px, 5vw, 64px);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.96), rgba(245, 239, 216, 0.94));
  box-shadow: var(--earth-shadow);
  border: 1px solid rgba(255, 255, 255, 0.52);
}

.thesis-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
}

.thesis h2 {
  margin: 0 0 1.2rem;
  font-size: clamp(2rem, 4.5vw, 4.2rem);
  line-height: 1.18;
  color: var(--earth-deep);
}

.thesis blockquote {
  margin: 0;
  padding: 1.5rem 0 0 1.35rem;
  border-left: 4px solid var(--earth-sun);
  color: var(--earth-forest);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 2;
}

.thesis-note {
  padding: 1.5rem;
  border-radius: 24px;
  background: rgba(18, 51, 38, 0.08);
  border: 1px solid rgba(18, 51, 38, 0.12);
  font-family: var(--font-sans);
  font-weight: 700;
  color: rgba(24, 32, 24, 0.76);
}

/* ---------------------------------------------------------
   Screenplay Blocks
   --------------------------------------------------------- */

.screenplay {
  background:
    linear-gradient(180deg, var(--earth-cream), var(--earth-paper));
}

.script-page {
  position: relative;
  padding: clamp(28px, 5vw, 72px);
  border-radius: 30px;
  background: rgba(255, 250, 240, 0.92);
  border: 1px solid var(--earth-line);
  box-shadow: var(--earth-soft-shadow);
}

.script-page::before {
  content: "FADE IN:";
  display: block;
  margin-bottom: 1.7rem;
  color: var(--earth-clay);
  font-family: "Courier New", monospace;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.script-scene {
  margin: 0 0 2rem;
  color: var(--earth-deep);
  font-family: "Courier New", monospace;
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  line-height: 1.85;
  letter-spacing: 0.01em;
}

/* Dialogue blocks — readable on all backgrounds */
.script-dialogue {
  display: block !important;
  width: min(900px, 100%) !important;
  margin: 2.2rem auto 0 !important;
  padding: 2rem 2.125rem !important;
  border: 2px solid rgba(20, 36, 31, 0.22) !important;
  border-left: 8px solid #b98535 !important;
  border-radius: 26px !important;
  background: #fffdf4 !important;
  color: #14241f !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18) !important;
  font-family: var(--font-jp) !important;
  opacity: 1 !important;
  text-shadow: none !important;
  filter: none !important;
  mix-blend-mode: normal !important;
}

.script-dialogue *,
.bg-forest .script-dialogue *,
.love-section .script-dialogue *,
.bg-deep .script-dialogue *,
.finale .script-dialogue * {
  color: #14241f !important;
  background: transparent !important;
  opacity: 1 !important;
  text-shadow: none !important;
  filter: none !important;
  mix-blend-mode: normal !important;
}

.script-dialogue .character-name {
  display: block !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: 1.35rem 0 0.5rem !important;
  padding: 0.38rem 0.75rem !important;
  border-radius: 999px !important;
  background: #eaf1e8 !important;
  color: #1d493c !important;
  font-family: var(--font-sans) !important;
  font-size: 0.82rem !important;
  font-weight: 950 !important;
  letter-spacing: 0.14em !important;
  line-height: 1.2 !important;
  text-align: left !important;
}

.script-dialogue .character-name:first-child {
  margin-top: 0 !important;
}

.script-dialogue p {
  color: #14241f !important;
  background: transparent !important;
  font-family: var(--font-jp) !important;
  font-size: clamp(1rem, 1.45vw, 1.16rem) !important;
  line-height: 1.95 !important;
  font-weight: 500 !important;
  letter-spacing: 0.035em !important;
  margin: 0 0 1.5rem !important;
}

.script-dialogue p.mb-0,
.script-dialogue p:last-child {
  margin-bottom: 0 !important;
}

.bg-forest .script-scene,
.bg-deep .script-scene,
.love-section .script-scene,
.finale .script-scene {
  color: rgba(255, 250, 240, 0.92) !important;
}

.script-dialogue .script-scene {
  color: #14241f !important;
}

/* ---------------------------------------------------------
   Acts
   --------------------------------------------------------- */

.acts {
  background:
    radial-gradient(circle at 20% 10%, rgba(231, 183, 95, 0.2), transparent 25%),
    linear-gradient(180deg, #fffaf0, #f5efd8);
}

.section-title {
  margin: 0 0 1.3rem;
  color: var(--earth-deep);
  font-size: clamp(2rem, 5vw, 5rem);
  line-height: 1.08;
  letter-spacing: 0.01em;
}

.section-title.center,
.center {
  text-align: center;
}

.section-intro {
  width: min(860px, 100%);
  margin: 0 auto 3rem;
  color: rgba(24, 32, 24, 0.82);
  font-size: clamp(1.04rem, 1.7vw, 1.26rem);
  line-height: 2.05;
  text-align: center;
}

.act-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.act-card {
  position: relative;
  min-height: 430px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 28px;
  background: var(--earth-deep);
  box-shadow: var(--earth-soft-shadow);
  isolation: isolate;
}

.act-card img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.76;
  transition: transform 700ms ease, opacity 300ms ease;
}

.act-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 20%, rgba(7, 19, 15, 0.88) 100%),
    radial-gradient(circle at 50% 30%, transparent 0 30%, rgba(7, 19, 15, 0.28) 100%);
  z-index: 1;
}

.act-card:hover img {
  transform: scale(1.06);
  opacity: 0.92;
}

.act-body {
  position: relative;
  z-index: 2;
  padding: 1.3rem;
  color: var(--earth-cream);
}

.act-number {
  display: inline-block;
  margin-bottom: 0.7rem;
  color: var(--earth-sun);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.act-card h3 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  line-height: 1.22;
}

.act-card p {
  margin: 0;
  color: rgba(245, 239, 216, 0.82);
  font-size: 0.94rem;
  line-height: 1.75;
}

/* ---------------------------------------------------------
   Love Story Section
   --------------------------------------------------------- */

.love-section {
  color: var(--earth-cream);
  background:
    linear-gradient(135deg, rgba(7, 19, 15, 0.93), rgba(18, 51, 38, 0.83)),
    url("https://earth.co.jp/images/earth-love-hero-two-people-blackout-solar-light-rain.jpg") center / cover fixed no-repeat;
}

.love-grid {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
}

.love-portrait {
  overflow: hidden;
  border-radius: 34px;
  box-shadow: var(--earth-shadow);
  border: 1px solid rgba(245, 239, 216, 0.24);
}

.love-portrait img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.love-copy h2 {
  margin: 0 0 1.3rem;
  color: var(--earth-cream);
  font-size: clamp(2.2rem, 5vw, 5.4rem);
  line-height: 1.04;
}

.love-copy .lead {
  color: rgba(245, 239, 216, 0.9);
}

.love-line {
  margin: 2rem 0;
  padding: 1.35rem 1.5rem;
  border-left: 4px solid var(--earth-rose);
  background: rgba(245, 239, 216, 0.08);
  border-radius: 0 18px 18px 0;
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 2;
}

/* ---------------------------------------------------------
   Characters
   --------------------------------------------------------- */

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

.character-card {
  overflow: hidden;
  border-radius: 30px;
  background: var(--earth-paper);
  border: 1px solid var(--earth-line);
  box-shadow: var(--earth-soft-shadow);
}

.character-card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.character-body {
  padding: clamp(22px, 3vw, 34px);
}

.character-body h3 {
  margin: 0 0 0.7rem;
  color: var(--earth-deep);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.18;
}

.character-role {
  display: block;
  margin-bottom: 1rem;
  color: var(--earth-clay);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: none;
}

/* ---------------------------------------------------------
   Feature Cards
   --------------------------------------------------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2vw, 28px);
}

.feature-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 250, 240, 0.94);
  border: 1px solid var(--earth-line);
  box-shadow: var(--earth-soft-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--earth-shadow);
}

.feature-card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.feature-body {
  padding: 1.35rem;
}

.feature-body h3 {
  margin: 0 0 0.8rem;
  color: var(--earth-deep);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.28;
}

.feature-body p {
  color: rgba(24, 32, 24, 0.76);
  font-size: 0.98rem;
}

.card-link {
  display: inline-flex;
  margin-top: auto;
  color: var(--earth-clay);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.card-link::after {
  content: " →";
}

/* ---------------------------------------------------------
   Planet / Solutions Split
   --------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
}

.split-image {
  overflow: hidden;
  border-radius: 34px;
  box-shadow: var(--earth-shadow);
}

.split-image img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.split-copy h2 {
  margin: 0 0 1rem;
  color: var(--earth-deep);
  font-size: clamp(2rem, 4.5vw, 4.8rem);
  line-height: 1.08;
}

.solution-list {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.solution-item {
  padding: 1.1rem 1.25rem;
  border-radius: 20px;
  background: rgba(255, 250, 240, 0.8);
  border: 1px solid var(--earth-line);
}

.solution-item h3 {
  margin: 0 0 0.35rem;
  color: var(--earth-forest);
  font-size: 1.1rem;
}

.solution-item p {
  margin: 0;
  color: rgba(24, 32, 24, 0.72);
  font-size: 0.94rem;
}

/* ---------------------------------------------------------
   Editorial Article Pages
   --------------------------------------------------------- */

.article-hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  color: var(--earth-cream);
  background:
    linear-gradient(180deg, rgba(7, 19, 15, 0.35), rgba(7, 19, 15, 0.92)),
    var(--hero-image, url("https://earth.co.jp/images/earth-screenplay-desk-map-script-solar-panels-water-lines.jpg")) center / cover no-repeat;
}

.article-hero-inner {
  width: min(1060px, calc(100% - 40px));
  margin: 0 auto;
  padding: 140px 0 80px;
}

.article-hero h1 {
  width: min(900px, 100%);
  margin: 0 0 1rem;
  font-size: clamp(2.8rem, 7vw, 7rem);
  line-height: 1.02;
}

.article-hero p {
  width: min(720px, 100%);
  color: rgba(245, 239, 216, 0.9);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.9;
}

.article {
  background: var(--earth-paper);
}

.article-body {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(56px, 8vw, 110px) 0;
}

.article-body h2 {
  margin: 3rem 0 1rem;
  color: var(--earth-deep);
  font-size: clamp(1.7rem, 3vw, 3rem);
  line-height: 1.24;
}

.article-body h3 {
  margin: 2.2rem 0 0.85rem;
  color: var(--earth-forest);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.article-body p {
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  line-height: 2.12;
}

.article-body blockquote {
  margin: 3rem 0;
  padding: 1.5rem 0 1.5rem 1.5rem;
  border-left: 5px solid var(--earth-sun);
  color: var(--earth-forest);
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 2;
}

.article-meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.44rem 0.7rem;
  border-radius: 999px;
  background: rgba(245, 239, 216, 0.14);
  border: 1px solid rgba(245, 239, 216, 0.25);
  color: rgba(245, 239, 216, 0.86);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.article-body .pill {
  background: rgba(18, 51, 38, 0.08);
  border-color: rgba(18, 51, 38, 0.12);
  color: var(--earth-forest);
}

/* ---------------------------------------------------------
   Gallery
   --------------------------------------------------------- */

.gallery-hero {
  background:
    linear-gradient(180deg, rgba(7, 19, 15, 0.28), rgba(7, 19, 15, 0.88)),
    url("https://earth.co.jp/images/earth-gallery-hero-planet-love-solar-water-food-cinema-wall.jpg") center / cover no-repeat;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: var(--earth-deep);
  box-shadow: var(--earth-soft-shadow);
}

.gallery-item img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 520ms ease, opacity 220ms ease;
}

.gallery-item:hover img {
  transform: scale(1.07);
  opacity: 0.88;
}

.gallery-caption {
  position: absolute;
  inset: auto 0 0;
  padding: 2.4rem 1rem 0.85rem;
  color: var(--earth-cream);
  background: linear-gradient(180deg, transparent, rgba(7, 19, 15, 0.86));
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

/* ---------------------------------------------------------
   Callout / Finale
   --------------------------------------------------------- */

.finale {
  color: var(--earth-cream);
  background:
    radial-gradient(circle at 20% 20%, rgba(231, 183, 95, 0.22), transparent 28%),
    linear-gradient(135deg, #07130f, #123326 55%, #143f52);
}

.finale-card {
  padding: clamp(34px, 6vw, 84px);
  border-radius: 38px;
  background: rgba(245, 239, 216, 0.08);
  border: 1px solid rgba(245, 239, 216, 0.18);
  box-shadow: var(--earth-shadow);
  backdrop-filter: blur(12px);
}

.finale h2 {
  margin: 0 0 1.25rem;
  color: var(--earth-cream);
  font-size: clamp(2.4rem, 6vw, 6.4rem);
  line-height: 1;
}

.finale p {
  color: rgba(245, 239, 216, 0.86);
  font-size: clamp(1.06rem, 1.8vw, 1.28rem);
  line-height: 2.05;
}

.finale .btn {
  margin-top: 1.2rem;
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */

.site-footer {
  color: rgba(245, 239, 216, 0.82);
  background: #07130f;
  border-top: 1px solid rgba(245, 239, 216, 0.12);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 0.8fr;
  gap: 2rem;
  padding: 56px 0;
}

.footer-title {
  margin: 0 0 0.7rem;
  color: var(--earth-cream);
  font-size: 1.35rem;
  line-height: 1.25;
}

.footer-note {
  color: rgba(245, 239, 216, 0.66);
  font-size: 0.94rem;
  line-height: 1.85;
}

.footer-links {
  display: grid;
  gap: 0.55rem;
}

.footer-links a {
  color: rgba(245, 239, 216, 0.76);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--earth-sun);
}

.footer-bottom {
  padding: 18px 0 28px;
  border-top: 1px solid rgba(245, 239, 216, 0.1);
  color: rgba(245, 239, 216, 0.55);
  font-family: var(--font-sans);
  font-size: 0.78rem;
}

/* ---------------------------------------------------------
   Utility Backgrounds
   --------------------------------------------------------- */

.bg-paper {
  background: var(--earth-paper);
}

.bg-cream {
  background: var(--earth-cream);
}

.bg-deep {
  color: var(--earth-cream);
  background: var(--earth-deep);
}

.bg-forest {
  color: var(--earth-cream);
  background: var(--earth-forest);
}

.text-light {
  color: var(--earth-cream);
}

.text-muted {
  color: var(--earth-muted);
}

.mt-0 {
  margin-top: 0;
}

.mb-0 {
  margin-bottom: 0;
}

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

@media (max-width: 1120px) {
  .act-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .act-card:first-child {
    grid-column: span 2;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

@media (max-width: 820px) {
  body {
    letter-spacing: 0.025em;
  }

  .nav-wrap {
    min-height: auto;
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .nav a {
    padding: 0.5rem 0.66rem;
    font-size: 0.76rem;
  }

  .hero {
    min-height: 760px;
    background:
      linear-gradient(180deg, rgba(7, 19, 15, 0.74), rgba(7, 19, 15, 0.88)),
      var(--hero-image, url("https://earth.co.jp/images/earth-home-hero-planet-as-main-character-solar-ocean-children.jpg")) center / cover no-repeat;
  }

  .hero-inner {
    padding: 90px 0 150px;
  }

  .thesis {
    margin-top: -58px;
  }

  .thesis-grid,
  .love-grid,
  .split,
  .character-grid {
    grid-template-columns: 1fr;
  }

  .love-section {
    background-attachment: scroll;
  }

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

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-hero {
    min-height: 560px;
  }

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

@media (max-width: 560px) {
  .container,
  .narrow,
  .wide,
  .hero-inner,
  .article-hero-inner,
  .article-body {
    width: min(100% - 28px, 1180px);
  }

  .hero h1 {
    font-size: clamp(3.2rem, 17vw, 5.6rem);
  }

  .hero-subtitle {
    font-size: 1.15rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .thesis-card,
  .script-page,
  .finale-card {
    border-radius: 24px;
  }

  .script-dialogue {
    padding: 1.35rem 1.25rem !important;
    border-radius: 20px !important;
    margin: 1.75rem auto 0 !important;
  }

  .script-dialogue p {
    font-size: 1rem !important;
    line-height: 1.9 !important;
  }

  .script-dialogue .character-name {
    font-size: 0.78rem !important;
  }

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

  .act-card,
  .act-card:first-child {
    grid-column: auto;
  }

  .act-card {
    min-height: 360px;
  }

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

  .gallery-item img {
    aspect-ratio: 4 / 3;
  }
}

/* ---------------------------------------------------------
   Print
   --------------------------------------------------------- */

@media print {
  body {
    color: #111;
    background: #fff;
  }

  .site-header,
  .hero-actions,
  .site-footer {
    display: none;
  }

  .hero,
  .article-hero,
  .love-section,
  .finale {
    min-height: auto;
    color: #111;
    background: #fff !important;
  }

  .hero-inner,
  .article-hero-inner {
    padding: 2rem 0;
  }

  .feature-card,
  .character-card,
  .script-page,
  .thesis-card {
    box-shadow: none;
  }

  .script-dialogue {
    border: 1px solid #111 !important;
    border-left: 6px solid #111 !important;
    background: #fff !important;
    color: #111 !important;
    box-shadow: none !important;
  }

  .script-dialogue *,
  .script-dialogue p,
  .script-dialogue .character-name {
    color: #111 !important;
    background: transparent !important;
  }
}

/* EMERGENCY: Earth.co.jp dialogue readability fix */

html body .script-dialogue {
  display: block !important;
  width: min(900px, 100%) !important;
  margin: 34px auto !important;
  padding: 32px 34px !important;
  background: #fffdf4 !important;
  color: #14241f !important;
  border: 2px solid rgba(20,36,31,.22) !important;
  border-left: 8px solid #b98535 !important;
  border-radius: 26px !important;
  box-shadow: 0 18px 44px rgba(0,0,0,.22) !important;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif !important;
}

html body .script-dialogue p {
  color: #14241f !important;
  background: transparent !important;
  font-size: 1.16rem !important;
  line-height: 1.95 !important;
  font-weight: 500 !important;
  margin: 0 0 24px !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

html body .script-dialogue p:last-child,
html body .script-dialogue p.mb-0 {
  margin-bottom: 0 !important;
}

html body .script-dialogue .character-name {
  display: block !important;
  width: max-content !important;
  background: #eaf1e8 !important;
  color: #1d493c !important;
  border-radius: 999px !important;
  padding: 6px 12px !important;
  margin: 22px 0 8px !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: .82rem !important;
  font-weight: 950 !important;
  letter-spacing: .14em !important;
  line-height: 1.2 !important;
  text-align: left !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

html body .script-dialogue .character-name:first-child {
  margin-top: 0 !important;
}

/* =========================================================
   Earth.co.jp — script page readability inside dark sections
   Fixes script-scene text inside .bg-forest / dark sections
   ========================================================= */

html body .bg-forest .script-page,
html body .bg-deep .script-page,
html body .love-section .script-page,
html body .finale .script-page {
  background: #fffdf4 !important;
  color: #14241f !important;
  border: 2px solid rgba(20, 36, 31, 0.22) !important;
  border-left: 8px solid #b98535 !important;
  border-radius: 30px !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22) !important;
}

html body .bg-forest .script-page::before,
html body .bg-deep .script-page::before,
html body .love-section .script-page::before,
html body .finale .script-page::before {
  color: #a8643c !important;
}

html body .bg-forest .script-page .script-scene,
html body .bg-deep .script-page .script-scene,
html body .love-section .script-page .script-scene,
html body .finale .script-page .script-scene {
  color: #14241f !important;
  background: transparent !important;
  opacity: 1 !important;
  text-shadow: none !important;
  filter: none !important;
  mix-blend-mode: normal !important;
}

html body .bg-forest .script-page p,
html body .bg-deep .script-page p,
html body .love-section .script-page p,
html body .finale .script-page p {
  color: #14241f !important;
}
