/* WellSkate co.jp — architectural design tokens & custom styles */

body {
  background-color: #ffffff;
  color: #141514;
  font-family: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.hero-architectural-zone {
  position: relative;
  background: linear-gradient(180deg, #dcf69a 0%, #eaf8c3 42%, rgba(255, 255, 255, 0) 100%);
}

/*
  Binary snowfall — fluid tile size / opacity / speed by viewport
  Mobile: larger tiles (sparser), quieter opacity, slower motion
  Desktop: denser columns, fuller depth layers
*/
.hero-binary-snowfall,
.hero-access-paths,
.hero-dashed-grid {
  --snow-tile-w: clamp(72px, 14vw, 112px);
  --snow-tile-h: clamp(120px, 22vw, 180px);
  --snow-tile-w-2: clamp(96px, 18vw, 148px);
  --snow-tile-h-2: clamp(150px, 28vw, 220px);
  --snow-opacity-1: 0.72;
  --snow-opacity-2: 0.45;
  --snow-duration-1: 36s;
  --snow-duration-2: 52s;
  --snow-offset-x: clamp(24px, 5vw, 56px);

  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(0, 0, 0, 0.55) 58%,
    rgba(0, 0, 0, 0) 100%
  );
  -webkit-mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(0, 0, 0, 0.55) 58%,
    rgba(0, 0, 0, 0) 100%
  );
}

.hero-binary-snowfall::before,
.hero-binary-snowfall::after,
.hero-access-paths::before,
.hero-access-paths::after,
.hero-dashed-grid::before,
.hero-dashed-grid::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -50%;
  height: 200%;
  background-repeat: repeat;
}

/* Primary snowfall layer */
.hero-binary-snowfall::before,
.hero-access-paths::before,
.hero-dashed-grid::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='160' viewBox='0 0 96 160'%3E%3Ctext x='10' y='22' font-family='ui-monospace,SFMono-Regular,Menlo,Consolas,monospace' font-size='11' fill='%231a2612' fill-opacity='0.14'%3E0%3C/text%3E%3Ctext x='42' y='48' font-family='ui-monospace,SFMono-Regular,Menlo,Consolas,monospace' font-size='11' fill='%231a2612' fill-opacity='0.11'%3E1%3C/text%3E%3Ctext x='74' y='30' font-family='ui-monospace,SFMono-Regular,Menlo,Consolas,monospace' font-size='11' fill='%231a2612' fill-opacity='0.09'%3E0%3C/text%3E%3Ctext x='10' y='78' font-family='ui-monospace,SFMono-Regular,Menlo,Consolas,monospace' font-size='11' fill='%231a2612' fill-opacity='0.10'%3E1%3C/text%3E%3Ctext x='42' y='102' font-family='ui-monospace,SFMono-Regular,Menlo,Consolas,monospace' font-size='11' fill='%231a2612' fill-opacity='0.13'%3E0%3C/text%3E%3Ctext x='74' y='88' font-family='ui-monospace,SFMono-Regular,Menlo,Consolas,monospace' font-size='11' fill='%231a2612' fill-opacity='0.08'%3E1%3C/text%3E%3Ctext x='10' y='138' font-family='ui-monospace,SFMono-Regular,Menlo,Consolas,monospace' font-size='11' fill='%231a2612' fill-opacity='0.12'%3E0%3C/text%3E%3Ctext x='42' y='154' font-family='ui-monospace,SFMono-Regular,Menlo,Consolas,monospace' font-size='11' fill='%231a2612' fill-opacity='0.09'%3E1%3C/text%3E%3Ctext x='74' y='146' font-family='ui-monospace,SFMono-Regular,Menlo,Consolas,monospace' font-size='11' fill='%231a2612' fill-opacity='0.11'%3E0%3C/text%3E%3C/svg%3E");
  background-size: var(--snow-tile-w) var(--snow-tile-h);
  opacity: var(--snow-opacity-1);
  animation: binary-snowfall var(--snow-duration-1) linear infinite;
}

/* Secondary layer — offset depth */
.hero-binary-snowfall::after,
.hero-access-paths::after,
.hero-dashed-grid::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='200' viewBox='0 0 128 200'%3E%3Ctext x='18' y='36' font-family='ui-monospace,SFMono-Regular,Menlo,Consolas,monospace' font-size='10' fill='%231a2612' fill-opacity='0.08'%3E1%3C/text%3E%3Ctext x='64' y='20' font-family='ui-monospace,SFMono-Regular,Menlo,Consolas,monospace' font-size='10' fill='%231a2612' fill-opacity='0.06'%3E0%3C/text%3E%3Ctext x='104' y='54' font-family='ui-monospace,SFMono-Regular,Menlo,Consolas,monospace' font-size='10' fill='%231a2612' fill-opacity='0.07'%3E1%3C/text%3E%3Ctext x='18' y='96' font-family='ui-monospace,SFMono-Regular,Menlo,Consolas,monospace' font-size='10' fill='%231a2612' fill-opacity='0.05'%3E0%3C/text%3E%3Ctext x='64' y='112' font-family='ui-monospace,SFMono-Regular,Menlo,Consolas,monospace' font-size='10' fill='%231a2612' fill-opacity='0.09'%3E1%3C/text%3E%3Ctext x='104' y='140' font-family='ui-monospace,SFMono-Regular,Menlo,Consolas,monospace' font-size='10' fill='%231a2612' fill-opacity='0.06'%3E0%3C/text%3E%3Ctext x='40' y='168' font-family='ui-monospace,SFMono-Regular,Menlo,Consolas,monospace' font-size='10' fill='%231a2612' fill-opacity='0.07'%3E1%3C/text%3E%3Ctext x='88' y='188' font-family='ui-monospace,SFMono-Regular,Menlo,Consolas,monospace' font-size='10' fill='%231a2612' fill-opacity='0.05'%3E0%3C/text%3E%3C/svg%3E");
  background-size: var(--snow-tile-w-2) var(--snow-tile-h-2);
  background-position: var(--snow-offset-x) 0;
  opacity: var(--snow-opacity-2);
  animation: binary-snowfall var(--snow-duration-2) linear infinite;
  animation-delay: -12s;
}

@keyframes binary-snowfall {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(0, 50%, 0);
  }
}

/* Phones — sparser, quieter, lighter GPU load */
@media (max-width: 640px) {
  .hero-binary-snowfall,
  .hero-access-paths,
  .hero-dashed-grid {
    --snow-tile-w: 88px;
    --snow-tile-h: 148px;
    --snow-tile-w-2: 112px;
    --snow-tile-h-2: 180px;
    --snow-opacity-1: 0.55;
    --snow-opacity-2: 0.28;
    --snow-duration-1: 44s;
    --snow-duration-2: 64s;
    --snow-offset-x: 28px;
  }

  /* Drop secondary layer on very small screens for clarity + battery */
  .hero-binary-snowfall::after,
  .hero-access-paths::after,
  .hero-dashed-grid::after {
    display: none;
  }
}

/* Tablets */
@media (min-width: 641px) and (max-width: 1024px) {
  .hero-binary-snowfall,
  .hero-access-paths,
  .hero-dashed-grid {
    --snow-tile-w: 92px;
    --snow-tile-h: 156px;
    --snow-tile-w-2: 120px;
    --snow-tile-h-2: 196px;
    --snow-opacity-1: 0.78;
    --snow-opacity-2: 0.55;
    --snow-duration-1: 32s;
    --snow-duration-2: 48s;
  }
}

/* Large desktops — denser field */
@media (min-width: 1280px) {
  .hero-binary-snowfall,
  .hero-access-paths,
  .hero-dashed-grid {
    --snow-tile-w: 84px;
    --snow-tile-h: 140px;
    --snow-tile-w-2: 112px;
    --snow-tile-h-2: 176px;
    --snow-opacity-1: 0.92;
    --snow-opacity-2: 0.72;
    --snow-duration-1: 26s;
    --snow-duration-2: 40s;
    will-change: transform;
  }

  .hero-binary-snowfall::before,
  .hero-binary-snowfall::after,
  .hero-access-paths::before,
  .hero-access-paths::after,
  .hero-dashed-grid::before,
  .hero-dashed-grid::after {
    will-change: transform;
  }
}

.card-chartreuse-highlight {
  background: linear-gradient(180deg, #f6f8f2 0%, #eff9ce 52%, #e5f89b 100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}

.card-neutral-architectural {
  background-color: #f3f3f5;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.28s ease,
    box-shadow 0.28s ease;
}

.card-chartreuse-highlight:hover,
.card-neutral-architectural:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -12px rgba(20, 21, 20, 0.08);
}

.ghost-underlined-btn {
  position: relative;
  padding-bottom: 6px;
}

.ghost-underlined-btn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background-color: #d8dbd8;
  transition: background-color 0.2s ease;
}

.ghost-underlined-btn:hover::after {
  background-color: #141514;
}

.page-hero-compact {
  position: relative;
  background: linear-gradient(180deg, #dcf69a 0%, #eaf8c3 55%, #ffffff 100%);
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #fafafa;
}

::-webkit-scrollbar-thumb {
  background: #d4d7d4;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .card-chartreuse-highlight,
  .card-neutral-architectural {
    transition: none;
  }

  .card-chartreuse-highlight:hover,
  .card-neutral-architectural:hover {
    transform: none;
  }

  .hero-access-paths::before,
  .hero-access-paths::after,
  .hero-binary-snowfall::before,
  .hero-binary-snowfall::after,
  .hero-dashed-grid::before,
  .hero-dashed-grid::after {
    animation: none;
  }
}
