/* ==========================================================================
   Dr.STONE展 特設サイト - style.css
   共通スタイル（reset / header / section common / components / footer）
   ========================================================================== */

:root {
  --color-black: #000000;
  --color-white: #ffffff;
  --color-orange: #f2660a;
  --color-orange-deep: #e2410a;
  --color-green: #8fbf9d;
  --color-green-pale: #cfe6d6;
  --color-green-table: #b7d9bf;
  --color-maroon: #55181a;
  --color-maroon-deep: #2b0a0c;
  --color-gray-band: #8c8c8c;
  --color-text: #1a1a1a;
  --font-base: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic Medium", "Yu Gothic", "Meiryo", sans-serif;
  --content-max: 1320px;
  --edge-pad: clamp(10px, 2vw, 20px);
}

/* ---------- reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-base);
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.9;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #eef0ef url(../img/common/bg/bg-white.jpg) repeat;
  background-repeat: repeat;
  background-position: top left;
  pointer-events: none;
  opacity: 0.3;

}

img {
  max-width: 100%;
  display: block;
}

ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

p {
  margin: 0;
}

dl,
dt,
dd {
  margin: 0;
  padding: 0;
}

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

/* prevent horizontal overflow introduced by absolute positioned elements */
main {
  overflow-x: hidden;
}

table {
  border-collapse: collapse;
}

button {
  font: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ib {
  display: inline-block;
}

/* ==========================================================================
   header
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: transparent;
  transition: background .25s ease, box-shadow .25s ease, backdrop-filter .25s ease;
  display: none;
}

.header.is-scrolled {
  display: block;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;

}

.header-logo {
  padding: 0 10px;
  display: none;
}

.header-logo img {
  width: clamp(120px, 18vw, 200px);
  height: auto;

  @media (max-width: 600px) {
    width: 120px;
  }
}

/* ==========================================================================
   section common
   ========================================================================== */
.nav-toggle {
  --nav-accent: #ff8a00;

  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  box-sizing: border-box;
  width: 66px;
  height: 66px;
  margin: 0;
  padding: 0;
  appearance: none;
  border: 1px solid var(--nav-accent);
  border-radius: 0;
  background: #000;
  color: #fff;
  box-shadow: 5px 5px 0 rgb(255 138 0 / 35%);
  cursor: pointer;

  &::before,
  &::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid var(--nav-accent);
    pointer-events: none;
    transition: transform 0.4s;
  }

  &::before {
    top: -4px;
    left: -4px;
    border-right: 0;
    border-bottom: 0;
  }

  &::after {
    right: -4px;
    bottom: -4px;
    border-top: 0;
    border-left: 0;
  }

  &[aria-expanded="true"] {
    &::before {
      transform: translate(-3px, -3px);
    }

    &::after {
      transform: translate(3px, 3px);
    }

    .nav-toggle-line:nth-child(1) {
      transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle-line:nth-child(2) {
      opacity: 0;
      transform: translateX(6px);
    }

    .nav-toggle-line:nth-child(3) {
      transform: translateY(-7px) rotate(-45deg);
    }
  }

  &:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 8px;
  }

  @media (max-width: 900px) {
    top: 16px;
    right: 16px;
  }

  @media (min-width: 900px) {
    width: 90px;
    height: 90px;
    box-shadow: 7px 7px 0 rgb(255 138 0 / 35%);

    &::before,
    &::after {
      width: 17px;
      height: 17px;
    }

    &::before {
      top: -5px;
      left: -5px;
    }

    &::after {
      right: -5px;
      bottom: -5px;
    }

    .nav-toggle-line {
      left: 25px;
      width: 38px;
      height: 3px;

      &:nth-child(1) {
        top: 27px;
      }

      &:nth-child(2) {
        top: 37px;
        width: 28px;
      }

      &:nth-child(3) {
        top: 47px;
      }
    }

    .nav-toggle-text {
      bottom: 14px;
      font-size: 12px;
    }

    &[aria-expanded="true"] {
      .nav-toggle-line:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
      }

      .nav-toggle-line:nth-child(3) {
        transform: translateY(-10px) rotate(-45deg);
      }
    }
  }
}

.nav-toggle-line {
  position: absolute;
  left: 18px;
  display: block;
  width: 28px;
  height: 2px;
  background: currentColor;
  transform-origin: center;
  transition:
    transform 0.35s,
    opacity 0.2s;

  &:nth-child(1) {
    top: 20px;
  }

  &:nth-child(2) {
    top: 27px;
    width: 20px;
  }

  &:nth-child(3) {
    top: 34px;
  }
}

.nav-toggle-text {
  position: absolute;
  right: 0;
  bottom: 10px;
  left: 0;
  font-family: Arial, sans-serif;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.12em;
  text-align: center;
}

.global-nav {
  --nav-accent: #ff8a00;

  position: fixed;
  inset: 0;
  z-index: 1000;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 30px 32px 60px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #000;
  color: #fff;
  clip-path: inset(var(--nav-clip-top, 20px) var(--nav-clip-right, 20px) var(--nav-clip-bottom, calc(100% - 86px)) var(--nav-clip-left, calc(100% - 86px)));

  visibility: hidden;
  pointer-events: none;

  transition:
    clip-path 0.6s cubic-bezier(0.76, 0, 0.24, 1),
    visibility 0s linear 0.6s;

  &.is-open {
    clip-path: inset(0);
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }

  @media (min-width: 900px) {
    left: calc(100% - 480px);
  }

  @media (max-width: 767px) {
    padding: 30px 28px 48px;
  }
}

.global-nav-list {
  flex-shrink: 0;
  width: 100%;
  max-width: 480px;
  margin: auto;
  padding: 0;
  list-style: none;
}

.global-nav-item {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid rgb(255 138 0 / 30%);
  opacity: 0;
  transform: translateY(16px);

  transition:
    opacity 0.2s,
    transform 0.3s;

  &:nth-child(1) {
    --nav-order: 0;
  }

  &:nth-child(2) {
    --nav-order: 1;
  }

  &:nth-child(3) {
    --nav-order: 2;
  }

  &:nth-child(4) {
    --nav-order: 3;
  }

  &:nth-child(5) {
    --nav-order: 4;
  }

  &:nth-child(6) {
    --nav-order: 5;
  }

  a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 12px 20px;
    box-sizing: border-box;
    transition:
      background-color 0.25s,
      transform 0.25s;

    @media (hover: hover) {
      &:hover {
        background: rgb(255 138 0 / 12%);
        transform: translateX(5px);
      }
    }

    &:focus-visible {
      outline: 2px solid var(--nav-accent);
      outline-offset: -2px;
    }
  }

  img {
    display: block;
    max-width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
  }
}

.global-nav-item.logo a {

  @media (hover: hover) {
    &:hover {
      background: transparent;
      transform: translateX(0);
    }
  }

  &:focus-visible {
    outline: none;
  }
}

.global-nav-item.logo img {
  filter: none;
  width: 160px;
  margin-bottom: 20px;

}

.global-nav.is-open .global-nav-item {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(0.23s + var(--nav-order, 0) * 0.055s);
}

html.is-nav-open,
html.is-nav-open body {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {

  .nav-toggle::before,
  .nav-toggle::after,
  .nav-toggle-line,
  .global-nav,
  .global-nav-item,
  .global-nav-item a {
    transition: none !important;
  }
}

/* ==========================================================================
   section common
   ========================================================================== */
main section {
  position: relative;
  isolation: isolate;
}

.section-background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.section-content {
  position: relative;
  z-index: 2;
}

.section-heading {
  margin: 0;
  line-height: 0;
  position: relative;
  z-index: 3;
}

.section-heading img {
  height: auto;
}

.sub-heading {
  display: block;
  height: auto;
}

.chemical-formula {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  width: clamp(220px, 22vw, 360px);
  height: auto;
}

.heading-arrow {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  opacity: .55;
  width: clamp(360px, 42vw, 700px);
  height: auto;
}

.js-arrow-animation {
  right: 100vw !important;
  opacity: 0;
  will-change: right, opacity;
}

.js-arrow-animation.is-visible {
  left: auto !important;
}

@media (prefers-reduced-motion: reduce) {
  .js-arrow-animation {
    transform: none;
    opacity: 1;
  }

  .js-arrow-animation.is-visible {
    animation: none;
    transform: none;
  }
}

.deco-hex {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  width: clamp(160px, 16vw, 260px);
  height: auto;
  transform-origin: center center;
  will-change: transform;
  animation: deco-rotate 30s linear infinite;

}

@keyframes deco-rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .deco-hex {
    animation: none;
  }
}

.glitch-heading {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  overflow: visible;

  >img {
    display: block;
  }

  >img.glitch-heading-copy {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    pointer-events: none;
  }

  &.is-visible {
    >img:first-child {
      animation: heading-jolt 0.65s steps(1, end) both;
    }

    >.glitch-heading-copy--1 {
      animation: heading-slice-1 0.65s steps(1, end) both;
    }

    >.glitch-heading-copy--2 {
      animation: heading-slice-2 0.65s steps(1, end) both;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    &.is-visible>img {
      animation: none;
    }
  }
}

@keyframes heading-jolt {

  0%,
  100% {
    transform: translateX(0);
  }

  12% {
    transform: translateX(-0.8%);
  }

  23% {
    transform: translateX(0.6%);
  }

  34% {
    transform: translateX(0);
  }

  48% {
    transform: translateX(-0.4%);
  }

  58% {
    transform: translateX(0);
  }
}

@keyframes heading-slice-1 {

  0%,
  100% {
    opacity: 0;
    transform: translateX(0);
    clip-path: inset(18% 0 76% 0);
  }

  8% {
    opacity: 1;
    transform: translateX(-3%);
    clip-path: inset(18% 0 76% 0);
  }

  20% {
    transform: translateX(2.5%);
    clip-path: inset(42% 0 50% 0);
  }

  33% {
    opacity: 0;
  }

  46% {
    opacity: 1;
    transform: translateX(-1.5%);
    clip-path: inset(30% 0 66% 0);
  }

  60% {
    opacity: 0;
  }
}

@keyframes heading-slice-2 {

  0%,
  100% {
    opacity: 0;
    transform: translateX(0);
    clip-path: inset(64% 0 30% 0);
  }

  13% {
    opacity: 1;
    transform: translateX(3.5%);
    clip-path: inset(64% 0 30% 0);
  }

  25% {
    transform: translateX(-2%);
    clip-path: inset(80% 0 15% 0);
  }

  38% {
    opacity: 0;
  }

  50% {
    opacity: 1;
    transform: translateX(1.5%);
    clip-path: inset(54% 0 42% 0);
  }

  65% {
    opacity: 0;
  }
}

.character-image {
  position: absolute;
  z-index: 4;
  display: block;
  background-image: var(--bg-image);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  width: auto;
  height: auto;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.8s cubic-bezier(.2, .9, .2, 1), transform 0.8s cubic-bezier(.2, .9, .2, 1);
}

.character-image.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .character-image {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* ==========================================================================
   components
   ========================================================================== */
.btn-default {
  position: relative;
  display: inline-block;
  margin: 0;
}

.btn-default a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 80px;
  border: none;
  border-radius: 999px;
  transition: transform .3s ease;

  @media (max-width: 900px) {
    padding: 8px 60px;
    min-width: 260px;
  }

  @media (max-width: 600px) {
    padding: 8px 30px;
    min-width: 260px;
    width: 340px;
  }

  @media (max-width: 500px) {
    padding: 8px 30px;
    min-width: 260px;
    width: 260px;
  }
}

.btn-default a::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: linear-gradient(0deg,
      var(--color-orange, #ff8800),
      #ffd400);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.btn-default a::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(100% - 40px);
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-orange), #ffd400);
  transform: translateY(-50%);
  pointer-events: none;

  @media (max-width: 600px) {
    left: calc(100% - 20px);
    width: 40px;
  }
}

.btn-default a {
  transition:
    transform 0.3s ease,
    box-shadow 0.4s ease;

  &::before {
    transition: filter 0.4s ease;
  }

  &::after {
    transition:
      width 0.4s ease,
      box-shadow 0.4s ease;
  }

  &:is(:hover, :focus-visible) {
    transform: translateY(-3px);
    box-shadow:
      inset 0 0 8px rgb(255 212 0 / 65%),
      inset 0 0 20px rgb(255 136 0 / 35%),
      0 0 8px rgb(255 212 0 / 90%),
      0 0 20px rgb(255 170 0 / 75%),
      0 0 40px rgb(255 136 0 / 55%),
      0 0 65px rgb(255 136 0 / 30%);

    &::before {
      filter: brightness(1.5);
    }

    &::after {
      width: 100px;
      box-shadow:
        0 0 6px rgb(255 212 0 / 95%),
        0 0 14px rgb(255 170 0 / 80%),
        0 0 28px rgb(255 136 0 / 60%);
    }
  }

  &:active {
    transform: translateY(-1px);
  }

  @media (prefers-reduced-motion: reduce) {
    transition: none;

    &::before,
    &::after {
      transition: none;
    }
  }
}

.common-notice-lists {
  max-width: 1440px;
  margin: 28px auto 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1.4;

  @media (max-width: 600px) {

    font-size: 13px;
  }
}

.common-notice-list {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;

  &::before {
    content: "※";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 14px;
    line-height: 1.4;
  }
}

.common-notice-list-column {
  display: grid;
  grid-template-columns: auto 1fr;
  flex-wrap: wrap;
  gap: 4px;
}

/* ==========================================================================
   footer
   ========================================================================== */
.footer {
  background: var(--color-black);
  color: var(--color-white);
  padding: 60px var(--edge-pad) 40px;
  text-align: center;
}

.footer-share {
  margin-bottom: 40px;
}

.footer-sns-heading {
  margin: 0 auto 20px;
}

.sns-list {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.sns-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-black);
  font-weight: 800;
  color: #000;
  font-size: 20px;
}

.sns-item-x a {
  background: #fff;
  color: #000
}

.sns-item-facebook a {
  background: #1877f2;
  color: #fff;
}

.sns-item-line a {
  background: #00c300;
  color: #fff;
  font-size: 13px;
}

.footer-banners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-bottom: 40px;

  @media (max-width: 600px) {
    flex-direction: column;
    align-items: center;
  }
}

.footer-banners img {
  width: clamp(180px, 22vw, 346px);
  height: auto;
}

.footer-copyright {
  font-size: 12px;
  color: #cfcfcf;
}