:root {
  --navy: #172845;
  --deep: #0f1d32;
  --ink: #263443;
  --muted: #6b7379;
  --coral: #ee7068;
  --mint: #78b7a7;
  --cream: #f8f2e8;
  --paper: #fffdf8;
  --line: rgba(23, 40, 69, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  color: var(--ink);
  background: var(--paper);
  font-family: "Hiragino Sans", "Yu Gothic", Meiryo, system-ui, sans-serif;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
}

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

.story-header {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 40px));
  transform: translateX(-50%);
  border: 1px solid rgba(255, 253, 248, 0.24);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.58);
  box-shadow: 0 12px 36px rgba(15, 29, 50, 0.08);
  color: var(--deep);
  padding: 12px 18px 12px 22px;
  backdrop-filter: blur(16px);
}

.story-logo {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  letter-spacing: 0.22em;
}

.story-header nav {
  display: flex;
  gap: clamp(16px, 3vw, 36px);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.story-opening {
  position: relative;
  min-height: 245svh;
  isolation: isolate;
}

.story-bg {
  position: sticky;
  top: 0;
  z-index: -1;
  height: 100svh;
  background:
    linear-gradient(90deg, rgba(15, 29, 50, 0.38), rgba(15, 29, 50, 0.08) 44%, rgba(255, 253, 248, 0.28)),
    url("../images/tomion/story/story_main_visual.jpg") center / cover no-repeat;
  overflow: hidden;
}

.story-bg::after {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 72%, rgba(238, 112, 104, 0.18), transparent 18rem),
    linear-gradient(180deg, transparent 66%, var(--paper) 100%);
  content: "";
}

.story-bg::before {
  position: absolute;
  inset: -1%;
  background: inherit;
  transform: scale(var(--story-scale, 1));
  transform-origin: center;
  transition: transform 80ms linear;
  content: "";
}

.story-panel {
  min-height: 100svh;
  display: grid;
  align-content: center;
  width: min(980px, calc(100% - 48px));
  margin: -100svh auto 0;
  color: #fff;
  padding: 120px 0;
  text-shadow: 0 2px 26px rgba(15, 29, 50, 0.34);
}

.story-panel + .story-panel {
  margin-top: 0;
}

.story-panel p,
.label {
  margin: 0 0 18px;
  color: var(--mint);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.story-panel h1,
.story-panel h2,
.section-block h2,
.message-section h2,
.story-cta h2 {
  margin: 0;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.55;
  word-break: keep-all;
}

.story-panel h1 span,
.story-panel h2 span {
  display: block;
  white-space: nowrap;
}

.story-panel h1,
.story-panel h2 {
  max-width: 820px;
  font-size: clamp(42px, 5.6vw, 78px);
}

.story-intro {
  justify-content: end;
  padding-bottom: 20svh;
}

.story-intro span {
  display: block;
  margin-top: 24px;
  max-width: 34em;
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 2.1;
}

.section-block {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(34px, 8vw, 120px);
  align-items: center;
  min-height: 100svh;
  padding: clamp(80px, 12vw, 160px) clamp(22px, 8vw, 128px);
}

.section-copy {
  max-width: 560px;
}

.section-copy.narrow {
  justify-self: center;
}

.section-block h2 {
  color: var(--navy);
  font-size: clamp(30px, 3.35vw, 48px);
  max-width: 11em;
}

.message-section h2,
.story-cta h2 {
  color: var(--navy);
  font-size: clamp(32px, 4.5vw, 62px);
}

.section-copy p:not(.label),
.message-section p:not(.label),
.story-cta p:not(.label) {
  color: var(--muted);
  font-size: 16px;
  line-height: 2.2;
}

.large-photo,
.wide-photo {
  margin: 0;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(23, 40, 69, 0.14);
}

.large-photo img,
.wide-photo img {
  display: block;
  width: 100%;
  height: min(68svh, 680px);
  object-fit: cover;
}

.value-section {
  display: block;
  background: var(--cream);
}

.value-section > h2,
.works-section > h2,
.faq-section > h2 {
  max-width: 820px;
}

.value-grid,
.work-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 62px;
}

.value-grid article,
.work-list article,
.faq-section details {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 253, 248, 0.78);
  padding: clamp(24px, 3vw, 36px);
}

.value-grid span,
.work-list span {
  color: var(--coral);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
}

.value-grid h3,
.work-list h3 {
  margin: 18px 0 14px;
  color: var(--navy);
  font-size: 20px;
}

.value-grid p,
.work-list p {
  margin: 0;
  color: var(--muted);
  line-height: 2;
}

.people-section {
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
}

.wide-photo img {
  height: min(76svh, 760px);
}

.works-section {
  display: block;
}

.message-section {
  min-height: 100svh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.92), rgba(255, 253, 248, 0.72)),
    url("../images/tomion/story/story_message_bg.jpg") center / cover no-repeat;
  padding: clamp(80px, 12vw, 150px) 24px;
}

.message-section > div {
  width: min(820px, 100%);
}

.faq-section {
  display: block;
  min-height: auto;
  background: var(--paper);
}

.faq-section details {
  margin-top: 14px;
}

.faq-section summary {
  color: var(--navy);
  cursor: pointer;
  font-weight: 900;
}

.faq-section details p {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 2;
}

.story-cta {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--navy);
  text-align: center;
  padding: 80px 24px;
}

.cta-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.74), rgba(255, 253, 248, 0.9)),
    url("../images/tomion/story/story_cta_bg.jpg") center / cover no-repeat;
}

.cta-copy {
  width: min(760px, 100%);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 40px;
}

.cta-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  border-radius: 999px;
  font-weight: 900;
  padding: 0 26px;
  transition: background 220ms ease, transform 220ms ease;
}

.cta-actions a:first-child {
  background: var(--coral);
  color: #fff;
}

.cta-actions a:last-child {
  border: 1px solid rgba(23, 40, 69, 0.24);
  background: rgba(255, 253, 248, 0.62);
}

.cta-actions a:hover {
  transform: translateY(-2px);
}

.story-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--deep);
  color: #fff;
  padding: 38px clamp(22px, 7vw, 96px);
}

.story-footer span {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.2em;
}

.story-footer nav {
  display: flex;
  gap: 24px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 900ms ease, transform 900ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .story-header {
    position: absolute;
    top: 16px;
    width: calc(100% - 28px);
  }

  .story-header nav {
    display: none;
  }

  .story-opening {
    min-height: 220svh;
  }

  .story-bg {
    background-position: 42% center;
  }

  .story-panel {
    width: calc(100% - 36px);
    padding: 96px 0;
  }

  .story-panel h1,
  .story-panel h2 {
    font-size: clamp(28px, 7.8vw, 40px);
    letter-spacing: 0.02em;
    line-height: 1.72;
  }

  .section-block,
  .people-section {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 84px 20px;
  }

  .section-block h2,
  .message-section h2,
  .story-cta h2 {
    font-size: clamp(30px, 8vw, 42px);
  }

  .large-photo img,
  .wide-photo img {
    height: auto;
    max-height: 62svh;
  }

  .value-grid,
  .work-list {
    grid-template-columns: 1fr;
    margin-top: 36px;
  }

  .story-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .story-panel {
    text-align: left;
  }

  .story-intro {
    padding-bottom: 14svh;
  }

  .story-panel h1,
  .story-panel h2,
  .section-block h2,
  .message-section h2,
  .story-cta h2 {
    letter-spacing: 0.02em;
  }

  .cta-actions {
    display: grid;
  }

  .cta-actions a {
    width: 100%;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
