* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #ecebe7;
  color: #f2f2f2;
  font-family:
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;
}

.legacy-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px;
}

.splitflap-clock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.2vw, 18px);
}


.digit-pair {
  display: flex;
  align-items: center;
  gap: 2px;
}

.flap {
  position: relative;
  width: clamp(90px, 12vw, 150px);
  height: clamp(132px, 18vw, 220px);
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(to bottom, #252525 0%, #1b1b1b 48%, #111111 52%, #171717 100%);
  border: 1px solid #080808;
  box-shadow:
    0 10px 22px rgba(0,0,0,0.20),
    inset 0 1px 0 rgba(255,255,255,0.05),
    inset 0 -1px 0 rgba(0,0,0,0.85);
  perspective: 800px;
}

.flap::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  background: #050505;
  box-shadow:
    0 -1px 0 rgba(255,255,255,0.05),
    0 1px 0 rgba(0,0,0,0.9);
  z-index: 5;
}

.flap::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: calc(50% - 5px);
  height: 10px;
  border-radius: 0;
  background:
    linear-gradient(to right,
      #0b0b0b 0 8%,
      transparent 8% 92%,
      #0b0b0b 92% 100%);
  opacity: 0.95;
  pointer-events: none;
}

.current,
.next {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(92px, 13vw, 168px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;

  color: #f1f1ec;
  text-shadow:
    0 1px 0 #000,
    0 0 1px rgba(255,255,255,0.18);
  user-select: none;
}

.current {
  z-index: 2;
}

.next {
  z-index: 1;
}

.flip-top,
.flip-bottom {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  overflow: hidden;
  background: #181818;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  z-index: 10;
}

.flip-top {
  top: 0;
  transform-origin: bottom;
  border-bottom: 1px solid #050505;
}

.flip-bottom {
  bottom: 0;
  transform-origin: top;
  border-top: 1px solid #2a2a2a;
  transform: rotateX(90deg);
}

.flip-top span,
.flip-bottom span {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;

  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(92px, 13vw, 168px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
  color: #f1f1ec;
}

.flip-top span {
  top: 50%;
  transform: translateY(-50%);
}

.flip-bottom span {
  bottom: 50%;
  transform: translateY(50%);
}

.flap.flipping .flip-top {
  animation: flipTop 65ms cubic-bezier(.78,.02,.96,.14) forwards;
}

.flap.flipping .flip-bottom {
  animation: flipBottom 78ms 48ms cubic-bezier(.14,.88,.22,1) forwards;
}

@keyframes flipTop {
  from {
    transform: rotateX(0deg);
  }
  to {
    transform: rotateX(-90deg);
  }
}

@keyframes flipBottom {
  from {
    transform: rotateX(90deg);
  }
  to {
    transform: rotateX(0deg);
  }
}

.colon {
  width: clamp(22px, 3vw, 40px);
  margin: 0 clamp(2px, .5vw, 8px);
  color: #222222;
  font-size: clamp(70px, 10vw, 128px);
  font-weight: 700;
  line-height: 1;
  transform: translateY(-4%);
}

@media (max-width: 720px) {
  .digit-pair {
    gap: 2px;
  }

  .page {
    padding: 16px;
  }

  .splitflap-clock {
    gap: 5px;
  }

  .flap {
    width: clamp(58px, 20vw, 88px);
    height: clamp(86px, 30vw, 132px);
  }

  .current,
  .next,
  .flip-top span,
  .flip-bottom span {
    font-size: clamp(62px, 24vw, 102px);
  }

  .colon {
    width: 14px;
    font-size: clamp(50px, 15vw, 76px);
  }
}



.seconds-wheel {
  position: relative;
  width: clamp(62px, 7vw, 88px);
  height: clamp(132px, 18vw, 220px);
  margin-left: clamp(14px, 2vw, 28px);
  overflow: hidden;
  border: 1px solid #111;
  border-radius: 8px;
  background: #111;
  box-shadow:
    inset 0 18px 24px rgba(0,0,0,.8),
    inset 0 -18px 24px rgba(0,0,0,.8),
    0 12px 24px rgba(0,0,0,.16);
}

.wheel-drum {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.wheel-mark {
  position: absolute;
  left: 0;
  width: 100%;
  height: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
  color: rgba(245,245,240,.30);
  font-size: clamp(10px, 1.2vw, 15px);
  font-weight: 700;
  line-height: 1;
}

.wheel-mark.major {
  color: rgba(245,245,240,.88);
  font-size: clamp(15px, 1.9vw, 23px);
}

.wheel-mark::after {
  content: "";
  width: 10px;
  height: 1px;
  margin-left: 7px;
  background: rgba(245,245,240,.35);
}

.wheel-mark.major::after {
  width: 17px;
  background: rgba(245,245,240,.8);
}

.seconds-wheel::before,
.seconds-wheel::after {
  content: "";
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  height: 35%;
  pointer-events: none;
}

.seconds-wheel::before {
  top: 0;
  background: linear-gradient(to bottom, #080808 0%, rgba(8,8,8,.82) 38%, transparent 100%);
}

.seconds-wheel::after {
  bottom: 0;
  background: linear-gradient(to top, #080808 0%, rgba(8,8,8,.82) 38%, transparent 100%);
}

.wheel-pointer {
  position: absolute;
  z-index: 6;
  left: 7px;
  top: 50%;
  width: 0;
  height: 0;
  transform: translateY(-50%);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid #f5f5f0;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.7));
}

@media (max-width: 720px) {
  .seconds-wheel {
    width: clamp(42px, 12vw, 56px);
    height: clamp(86px, 30vw, 132px);
    margin-left: 7px;
  }

  .wheel-mark {
    padding-right: 6px;
    font-size: 8px;
  }

  .wheel-mark.major {
    font-size: 12px;
  }

  .wheel-mark::after {
    width: 6px;
    margin-left: 4px;
  }

  .wheel-mark.major::after {
    width: 10px;
  }

  .wheel-pointer {
    left: 4px;
    border-top-width: 4px;
    border-bottom-width: 4px;
    border-left-width: 7px;
  }
}


.flap.flipping {
  box-shadow:
    0 10px 22px rgba(0,0,0,0.24),
    inset 0 1px 0 rgba(255,255,255,0.04),
    inset 0 -12px 18px rgba(0,0,0,0.22);
}

.flip-top {
  box-shadow: inset 0 -12px 16px rgba(0,0,0,0.30);
}

.flip-bottom {
  box-shadow: inset 0 12px 16px rgba(0,0,0,0.28);
}


/* SPLIT-FLAP BLACK / negative page */
body {
  background: #101010;
  color: #f2f2f2;
}

.page {
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,0.025), transparent 42%),
    #101010;
}

.splitflap-clock {
  filter: drop-shadow(0 18px 32px rgba(0,0,0,0.28));
}

.flap {
  border-color: #050505;
  background:
    linear-gradient(to bottom, #2a2a2a 0%, #1f1f1f 48%, #111111 52%, #191919 100%);
  box-shadow:
    0 12px 24px rgba(0,0,0,0.34),
    inset 0 1px 0 rgba(255,255,255,0.05),
    inset 0 -1px 0 rgba(0,0,0,0.95);
}

.colon {
  color: #e7e7e2;
  text-shadow: 0 1px 0 #000;
}

.seconds-wheel {
  background: #111111;
  border-color: #050505;
  box-shadow:
    inset 0 18px 24px rgba(0,0,0,.85),
    inset 0 -18px 24px rgba(0,0,0,.85),
    0 12px 24px rgba(0,0,0,.28);
}

.wheel-pointer {
  border-left-color: #f1f1ec;
}


/* BUNSEIDO / SPLIT-FLAP page shell */
body {
  background: #101010;
  color: #f2f2f2;
}

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

.bunseido-header {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(600px, 1.8fr);
  min-height: 98px;
  border-bottom: 1px solid #3a3a3a;
  background: #101010;
}

.bunseido-logo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 30px;
  border-right: 1px solid #3a3a3a;
}

.bunseido-logo span {
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
}

.bunseido-logo small {
  margin-top: 7px;
  font-size: 11px;
  font-weight: 600;
}

.bunseido-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.bunseido-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 98px;
  padding: 10px;
  border-right: 1px solid #3a3a3a;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.bunseido-nav a:hover,
.bunseido-nav .bunseido-contact {
  color: #101010;
  background: #60C0BD;
}

.split-main {
  padding: 72px 40px 80px;
}

.clock-heading,
.clock-about {
  width: 100%;
  max-width: 1220px;
  margin-left: auto;
  margin-right: auto;
}

.clock-heading {
  margin-bottom: 28px;
}

.clock-heading p,
.clock-about .section-label {
  margin: 0 0 8px;
  color: #60C0BD;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

.clock-heading h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
}

.clock-heading a {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.clock-stage {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 64px 28px;
  overflow: hidden;
  background: #101010;
}

.clock-stage .splitflap-clock {
  margin: 0 auto;
}

.clock-about {
  margin-top: 64px;
  padding-top: 34px;
  border-top: 1px solid #333333;
}

.clock-about h2 {
  margin: 0 0 28px;
  color: #f2f2f2;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.25;
}

.clock-about > p:not(.section-label) {
  max-width: 760px;
  margin: 0 0 20px;
  color: #bdbdbd;
  font-size: 15px;
  line-height: 1.9;
}

.bunseido-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  gap: 30px;
  padding: 55px 40px;
  border-top: 1px solid #3a3a3a;
  background: #101010;
  color: #f2f2f2;
}

.bunseido-footer-logo {
  font-size: 34px;
  font-weight: 700;
}

.bunseido-footer div p,
.bunseido-footer > p {
  margin: 0;
  font-size: 12px;
}

.bunseido-footer > p {
  text-align: right;
}

@media (max-width: 980px) {
  .bunseido-header {
    grid-template-columns: 1fr;
  }

  .bunseido-logo {
    border-right: 0;
    border-bottom: 1px solid #3a3a3a;
  }

  .bunseido-nav a {
    min-height: 65px;
  }
}

@media (max-width: 720px) {
  .bunseido-logo {
    padding: 17px 18px;
  }

  .bunseido-logo span {
    font-size: 30px;
  }

  .bunseido-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bunseido-nav a {
    min-height: 52px;
    padding: 8px 5px;
    font-size: 13px;
  }

  .split-main {
    padding: 42px 14px 56px;
  }

  .clock-stage {
    padding: 44px 4px;
  }

  .clock-about {
    margin-top: 46px;
    padding-top: 28px;
  }

  .clock-about > p:not(.section-label) {
    font-size: 14px;
  }

  .bunseido-footer {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 38px 18px;
  }

  .bunseido-footer > p {
    text-align: left;
  }
}
