@import url("https://fonts.googleapis.com/css2?family=Train+One&display=swap");

:root {
  --ui-duration-in: 340ms;
  --ui-duration-out: 220ms;
  --ui-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --notice-height: 30px;
  --topbar-height: 72px;
}

.brand,
[data-brand="name"] {
  font-family: "Train One", sans-serif !important;
  letter-spacing: 0.06em;
  font-weight: 400;
}

html {
  scroll-behavior: smooth;
}

body {
  opacity: 0;
  transform: translateY(10px);
}

body.page-ready {
  opacity: 1;
  transform: none;
  transition: opacity var(--ui-duration-in) var(--ui-ease), transform var(--ui-duration-in) var(--ui-ease);
}

body.page-leaving {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--ui-duration-out) ease, transform var(--ui-duration-out) ease;
}

.topbar {
  position: fixed;
  top: var(--notice-height);
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(214, 203, 191, 0.8);
}

.drawer-menu-enabled .topbar {
  position: fixed;
  top: var(--notice-height);
  min-height: 72px;
  display: grid !important;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  padding: 20px 22px !important;
}

.drawer-menu-enabled .frame {
  padding-top: calc(var(--notice-height) + var(--topbar-height));
}

.site-notice {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--notice-height);
  z-index: 1105;
  background: #06c755;
  color: #ffffff;
  border-bottom: 1px solid #05a648;
}

.site-notice p,
.site-notice a {
  display: block;
  margin: 0;
  padding: 9px 16px;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #fff;
  text-decoration: none;
}

.drawer-menu-enabled .brand {
  font-size: clamp(26px, 3.6vw, 44px);
  letter-spacing: 0.12em;
  z-index: 2;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cfc1b3;
  background: rgba(255, 255, 255, 0.96);
  color: #1f1a16;
  padding: 10px 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.1em;
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
}

.menu-toggle span {
  display: block;
  width: 12px;
  height: 1px;
  background: #1f1a16;
}

.menu-toggle em {
  font-style: normal;
}

.drawer-menu-enabled .top-left,
.drawer-menu-enabled .top-right,
.drawer-menu-enabled .menu-bar,
.drawer-menu-enabled .topbar > a:not(.brand):not(.menu-toggle) {
  display: none !important;
}

.top-utility {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  z-index: 3;
}

.top-utility a {
  text-decoration: none;
  color: #1f1a16;
  font-size: 11px;
  letter-spacing: 0.06em;
  border-bottom: 1px solid transparent;
}

.top-utility a:hover {
  border-bottom-color: #1f1a16;
}

.site-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 12, 8, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  z-index: 1200;
}

.site-menu-drawer {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: min(380px, 88vw);
  background: #f7f3ed;
  border-right: 1px solid #d8ccc0;
  transform: translateX(-104%);
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1210;
  display: grid;
  grid-template-rows: auto 1fr;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #ddd0c2;
}

.drawer-head strong {
  letter-spacing: 0.08em;
  font-size: 12px;
}

.drawer-close {
  border: 0;
  background: transparent;
  color: #1f1a16;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  padding: 0;
}

.drawer-subhead {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 10px 12px;
  border-bottom: 1px solid #e6d9cb;
}

.drawer-subhead a {
  text-decoration: none;
  text-align: center;
  border: 1px solid #d6c7b7;
  padding: 8px 6px;
  font-size: 11px;
  color: #1f1a16;
  letter-spacing: 0;
}

.drawer-body {
  padding: 14px 12px 18px;
  overflow: auto;
  display: grid;
  gap: 12px;
}

.drawer-group {
  border: 1px solid #e0d4c7;
  background: #fff;
  padding: 10px;
}

.drawer-group h3 {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #5f5145;
}

.drawer-links {
  display: grid;
  gap: 6px;
}

.drawer-link {
  display: block;
  text-decoration: none;
  color: #1f1a16;
  border: 1px solid transparent;
  padding: 8px 9px;
  font-size: 13px;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.drawer-link:hover,
.drawer-link.active {
  border-color: #d8ccc0;
  background: #faf6f2;
}

.menu-open .site-menu-overlay {
  opacity: 1;
  pointer-events: auto;
}

.menu-open .site-menu-drawer {
  transform: translateX(0);
}

.line-popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 220ms ease;
  z-index: 1500;
}

.line-popup {
  width: min(560px, calc(100vw - 28px));
  background: linear-gradient(165deg, #b4eef4, #8fe3f0);
  border: 1px solid #89ced5;
  box-shadow: 0 20px 44px rgba(9, 20, 28, 0.32);
  padding: 24px 20px 18px;
  position: relative;
  text-align: center;
}

.line-popup-close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.line-popup-lead {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: #0e4e59;
}

.line-popup h3 {
  margin: 6px 0 10px;
  font-size: clamp(18px, 4.2vw, 36px);
  line-height: 1.05;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  color: #0b2f4a;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.45), 0 8px 18px rgba(7, 38, 44, 0.2);
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(87, 152, 160, 0.45);
  border-radius: 10px;
  padding: 6px 10px 8px;
}

.line-popup h3 span {
  position: relative;
  display: inline-flex;
  color: #12324a;
}

.line-popup h3 .line-popup-title-char {
  display: inline-block;
  animation: line-popup-title-char-float 1.6s ease-in-out infinite;
  animation-delay: calc(2.9s + (var(--char-index) * 0.1s));
  will-change: transform, text-shadow;
}

.line-popup h3 span::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: transparent;
  background-image: linear-gradient(
    108deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 42%,
    #fff9bf 50%,
    #ffd95e 54%,
    rgba(255, 255, 255, 0) 62%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 240% 100%;
  background-position: 140% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: line-popup-title-stroke-once 2.8s linear 1 forwards;
  filter: drop-shadow(0 0 3px rgba(255, 217, 94, 0.22));
  pointer-events: none;
}

@keyframes line-popup-title-stroke-once {
  0% {
    background-position: 140% 50%;
    opacity: 1;
  }
  92% {
    background-position: -140% 50%;
    opacity: 1;
  }
  100% {
    background-position: -140% 50%;
    opacity: 0;
  }
}

@keyframes line-popup-title-char-float {
  0% {
    transform: translateY(0) scale(1);
    text-shadow: 0 0 0 rgba(255, 217, 94, 0);
  }
  40% {
    transform: translateY(-3px) scale(1.04);
    text-shadow: 0 4px 12px rgba(255, 217, 94, 0.3);
  }
  100% {
    transform: translateY(0) scale(1);
    text-shadow: 0 0 0 rgba(255, 217, 94, 0);
  }
}

.line-popup-copy {
  margin: 0 auto 16px;
  max-width: 38ch;
  font-size: 14px;
  color: #17444b;
  line-height: 1.6;
}

.line-popup-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(420px, 100%);
  min-height: 62px;
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.03em;
  border-radius: 999px;
  border: 2px solid #18a741;
  color: #fff;
  background: linear-gradient(180deg, #2ddd61, #10b84a);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

body.line-popup-open .line-popup-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.menu-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 11px 18px 12px;
  border-bottom: 1px solid #e6ddd3;
  background: rgba(255, 255, 255, 0.94);
  position: relative;
}

.menu-group {
  position: relative;
}

.menu-trigger {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.11em;
  color: #1f1a16;
  text-transform: uppercase;
  padding: 5px 1px;
  font-family: inherit;
  line-height: 1.2;
}

.menu-trigger::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: #1f1a16;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms ease;
}

.menu-trigger:hover::after,
.menu-trigger.active::after,
.menu-group.active-group .menu-trigger::after {
  transform: scaleX(1);
}

.menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 280px;
  max-width: min(420px, 90vw);
  padding: 10px;
  border: 1px solid #d8ccc0;
  background: #fff;
  box-shadow: 0 20px 44px rgba(31, 26, 22, 0.14);
  display: grid;
  gap: 6px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms ease;
  z-index: 1010;
}

.menu-group.has-panel:hover .menu-panel,
.menu-group.has-panel:focus-within .menu-panel,
.menu-group.has-panel.open .menu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.menu-link {
  display: grid;
  gap: 2px;
  text-decoration: none;
  color: #1f1a16;
  border: 1px solid transparent;
  padding: 8px 10px;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.menu-link strong {
  font-size: 12px;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.menu-link span {
  font-size: 11px;
  color: #6c5f53;
  line-height: 1.4;
}

.menu-link:hover,
.menu-link.active {
  border-color: #d8ccc0;
  background: #faf6f2;
}

.hero {
  animation: heroAmbient 1200ms var(--ui-ease) both;
}

.hero-copy {
  animation: heroIn 700ms var(--ui-ease) both;
}

.hero-flow-wrap {
  animation: sectionIn 650ms var(--ui-ease) both;
}

#pricing-plan {
  animation: sectionIn 650ms var(--ui-ease) both;
  animation-delay: 90ms;
}

@keyframes heroAmbient {
  from {
    opacity: 0.2;
    filter: saturate(0.9) brightness(0.94);
  }
  to {
    opacity: 1;
    filter: saturate(1) brightness(1);
  }
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sectionIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  :root {
    --notice-height: 26px;
    --topbar-height: 62px;
  }

  .drawer-menu-enabled .topbar {
    min-height: 62px;
    padding: 16px 12px !important;
  }

  .site-notice p,
  .site-notice a {
    font-size: 9px;
    letter-spacing: 0.1em;
    padding: 8px 8px;
  }

  .menu-toggle {
    left: 10px;
    padding: 8px 10px;
    gap: 4px;
  }

  .menu-toggle em {
    display: none;
  }

  .top-utility {
    right: 10px;
    gap: 8px;
  }

  .top-utility a {
    font-size: 10px;
  }

  .line-popup {
    padding: 18px 14px 14px;
  }

  .line-popup-close {
    top: -12px;
    right: -8px;
    width: 34px;
    height: 34px;
    font-size: 20px;
  }

  .line-popup h3 {
    font-size: clamp(18px, 6.8vw, 30px);
    padding: 6px 8px;
  }

  .line-popup-copy {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .line-popup-cta {
    font-size: 16px;
    min-height: 52px;
  }

  .menu-bar {
    gap: 8px;
    padding: 10px 12px 12px;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: thin;
  }

  .menu-group {
    flex: 0 0 auto;
  }

  .menu-panel {
    left: 0;
    transform: translateX(0) translateY(8px);
    width: min(82vw, 320px);
  }

  .menu-group.has-panel:hover .menu-panel,
  .menu-group.has-panel:focus-within .menu-panel,
  .menu-group.has-panel.open .menu-panel {
    transform: translateX(0) translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  body {
    opacity: 1;
    transform: none;
  }
}
