:root {
  --bg: #070b18;
  --surface: rgba(12, 20, 42, 0.72);
  --surface-soft: rgba(255, 255, 255, 0.04);
  --text: #eaf0ff;
  --muted: #a7b3d4;
  --line: rgba(255, 255, 255, 0.14);
  --brand: #3a4bff;
  --brand-soft: #6d79ff;
  --max: 1180px;
  --radius: 18px;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: radial-gradient(circle at 20% 15%, #1c2d7a 0%, transparent 40%),
    radial-gradient(circle at 80% 5%, #2439af 0%, transparent 35%), var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.07;
  z-index: -1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: min(var(--max), calc(100% - 3rem));
  margin: 1rem auto 0;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 999px;
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  background: rgba(7, 11, 24, 0.76);
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-wordmark {
  font-size: 1.1rem;
}

.site-nav {
  display: flex;
  gap: 1.2rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
}

.site-nav a:hover {
  color: var(--text);
}

.section {
  width: min(var(--max), calc(100% - 3rem));
  margin: 0 auto;
  padding: 6.2rem 0;
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.4rem;
  align-items: center;
  padding-top: 5rem;
}

.eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 6vw, 4.2rem);
  max-width: 12ch;
}

h1 span {
  display: block;
  color: #7e8cff;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}

.lead {
  max-width: 62ch;
  color: var(--muted);
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.cta,
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0.74rem 1.5rem;
  font-weight: 600;
  text-decoration: none;
}

.cta {
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-soft) 100%);
  color: white;
  box-shadow: 0 8px 24px rgba(58, 75, 255, 0.34);
}

.cta.small {
  min-height: 38px;
  padding: 0.52rem 1rem;
  font-size: 0.9rem;
}

.ghost {
  border: 1px solid var(--line);
  color: var(--text);
}

.hero-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.3rem;
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.25);
}

.logo-lockup {
  background: linear-gradient(160deg, #f7f9ff 0%, #ebefff 100%);
  border-radius: calc(var(--radius) - 6px);
  padding: 0.8rem;
}

.logo-lockup img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.card-grid {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
}

.card p {
  color: var(--muted);
  margin: 0.75rem 0 0;
}

.card-link {
  display: inline-flex;
  margin-top: 1rem;
  color: #aab7ff;
  text-decoration: none;
  font-weight: 600;
}

.card-link:hover {
  color: #c8d0ff;
}

.timeline {
  margin-top: 1.4rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.timeline article {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.timeline span {
  display: inline-flex;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  margin-bottom: 0.7rem;
  color: #8ea0ff;
  border: 1px solid rgba(142, 160, 255, 0.5);
}

.about-grid {
  margin-top: 1.8rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.about-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 1rem;
}

.about-item h3 {
  font-size: 1rem;
  color: #8ea0ff;
  margin-bottom: 0.45rem;
}

.about-item p {
  margin: 0;
  color: var(--muted);
}

.contact {
  padding-bottom: 7rem;
}

.contact p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.contact-form {
  max-width: 840px;
  margin: 0 auto;
  text-align: left;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 0.8rem 0.9rem;
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(126, 140, 255, 0.75);
  outline-offset: 1px;
}

.contact-form .full {
  margin-top: 0.9rem;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form .cf-turnstile {
  margin: 1.2rem 0 1rem;
}

.status {
  min-height: 1.4rem;
  margin-top: 0.9rem;
  color: var(--muted);
}

.status.ok {
  color: #87e2b4;
}

.status.error {
  color: #ff9c9c;
}

.contact-mail {
  margin-top: 1rem;
  text-align: center;
}

.contact-mail a {
  color: #9fb0ff;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.subpage {
  width: min(var(--max), calc(100% - 3rem));
  margin: 2rem auto 0;
  position: relative;
  z-index: 3;
}

.back-link {
  display: inline-flex;
  margin-bottom: 1.2rem;
  color: #aab7ff;
  text-decoration: none;
  font-weight: 600;
}

.sub-hero {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.4rem;
}

.sub-hero p {
  color: var(--muted);
}

.pill-list {
  margin-top: 1.1rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.pill-list span {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  color: #c8d0ff;
  font-size: 0.86rem;
}

.petal-transition-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 9999;
  background: #ffffff;
  opacity: 1;
}

.petal-transition-layer.is-arrival {
  animation: arrivalOverlayFade 3600ms ease forwards;
}

.route-whiteout {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #ffffff;
  opacity: 0;
  transition: opacity 620ms ease;
}

.route-whiteout.active {
  opacity: 1;
}

.petal {
  position: absolute;
  top: -18vh;
  left: 0;
  display: block;
  width: var(--size);
  height: calc(var(--size) * 1.24);
  opacity: var(--opacity);
  animation: petalDrop var(--duration) linear forwards;
  animation-delay: var(--delay);
}

.petal-sway {
  display: block;
  width: 100%;
  height: 100%;
  animation: petalSway var(--sway-duration) ease-in-out infinite alternate;
}

.petal-core {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--color);
  clip-path: polygon(50% 100%, 76% 70%, 90% 42%, 82% 16%, 58% 8%, 50% 18%, 42% 8%, 18% 16%, 10% 42%, 24% 70%);
  box-shadow: inset -1px -2px 0 rgba(255, 255, 255, 0.26);
  animation: petalSpin var(--spin-duration) linear infinite;
}

@keyframes petalDrop {
  from {
    transform: translate3d(var(--x-start), -10vh, 0);
    opacity: 0;
  }
  12% {
    opacity: var(--opacity);
  }
  to {
    transform: translate3d(var(--x-end), 116vh, 0);
    opacity: 0;
  }
}

@keyframes petalSway {
  from {
    transform: translateX(calc(var(--sway) * -1)) rotate(-14deg);
  }
  to {
    transform: translateX(var(--sway)) rotate(14deg);
  }
}

@keyframes petalSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(var(--spin-angle));
  }
}

@keyframes arrivalOverlayFade {
  0% {
    opacity: 1;
  }
  66% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.page-hanaya {
  background: radial-gradient(circle at 20% 14%, rgba(255, 198, 218, 0.34) 0%, transparent 42%),
    radial-gradient(circle at 82% 11%, rgba(255, 224, 186, 0.26) 0%, transparent 38%),
    radial-gradient(circle at 50% 100%, rgba(125, 61, 103, 0.2) 0%, transparent 44%),
    #101931;
}

.page-hanaya .bg-grid {
  opacity: 0.038;
}

.page-hanaya .sub-hero {
  background: linear-gradient(140deg, rgba(57, 30, 79, 0.76), rgba(84, 34, 82, 0.58));
  border: 1px solid rgba(255, 204, 223, 0.34);
  box-shadow: 0 20px 48px rgba(27, 18, 39, 0.22);
}

.page-hanaya .sub-hero h1 {
  max-width: 18ch;
}

.page-hanaya .sub-hero h1,
.page-hanaya .section h2 {
  background: linear-gradient(120deg, #ffe7f2, #f8c9db);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-hanaya .card {
  border: 1px solid rgba(255, 213, 230, 0.3);
  background: linear-gradient(150deg, rgba(255, 216, 232, 0.14), rgba(255, 245, 232, 0.06));
}

.page-hanaya .sub-hero p,
.page-hanaya .card p,
.page-hanaya .contact p {
  color: #efd6e3;
}

.page-hanaya .pill-list span {
  border-color: rgba(255, 213, 229, 0.44);
  color: #ffe1ee;
  background: rgba(255, 216, 233, 0.14);
}

.page-mori {
  position: relative;
  background: radial-gradient(circle at 14% 14%, rgba(171, 255, 188, 0.14) 0%, transparent 40%),
    radial-gradient(circle at 86% 7%, rgba(146, 211, 172, 0.12) 0%, transparent 34%),
    radial-gradient(circle at 50% 100%, rgba(20, 70, 49, 0.3) 0%, transparent 42%),
    #071015;
}

.page-mori::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background: radial-gradient(circle at 18% 26%, rgba(97, 143, 92, 0.2) 0%, transparent 28%),
    radial-gradient(circle at 82% 32%, rgba(85, 133, 90, 0.18) 0%, transparent 30%),
    radial-gradient(circle at 42% 78%, rgba(46, 90, 63, 0.3) 0%, transparent 38%);
}

.page-mori::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(106deg, rgba(197, 236, 169, 0.12) 12%, transparent 30%),
    linear-gradient(82deg, rgba(150, 210, 164, 0.1) 18%, transparent 34%);
  mix-blend-mode: screen;
  opacity: 0.6;
}

.page-mori .bg-grid {
  opacity: 0.032;
}

.page-mori .sub-hero {
  background: linear-gradient(140deg, rgba(18, 49, 37, 0.9), rgba(28, 74, 58, 0.72));
  border: 1px solid rgba(161, 230, 177, 0.28);
  box-shadow: 0 24px 54px rgba(4, 20, 14, 0.4);
  backdrop-filter: blur(4px);
}

.page-mori .sub-hero h1,
.page-mori .section h2 {
  background: linear-gradient(120deg, #ebffef, #c8f5d1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-mori .card {
  border: 1px solid rgba(156, 224, 176, 0.26);
  background: linear-gradient(154deg, rgba(67, 121, 84, 0.25), rgba(20, 50, 39, 0.2));
}

.page-mori .pill-list span {
  border-color: rgba(179, 239, 193, 0.38);
  color: #e7ffe8;
  background: rgba(120, 191, 139, 0.2);
}

.page-mori .sub-hero p,
.page-mori .card p,
.page-mori .contact p,
.page-mori .lead {
  color: #d3e9d9;
}

.page-mori .back-link {
  color: #b8f0c7;
}

.page-mori .cta {
  background: linear-gradient(120deg, #3f9c63 0%, #74c983 100%);
  box-shadow: 0 10px 28px rgba(63, 156, 99, 0.34);
}

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

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 960px) {
  .hero,
  .card-grid,
  .timeline,
  .about-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    border-radius: 20px;
    width: min(var(--max), calc(100% - 1.6rem));
  }

  .site-nav {
    display: none;
  }

  .section {
    width: min(var(--max), calc(100% - 1.6rem));
    padding: 4.6rem 0;
  }

  .subpage {
    width: min(var(--max), calc(100% - 1.6rem));
  }

}
