:root {
  --oulan-ink: #142033;
  --oulan-muted: #5d6b7f;
  --oulan-line: rgba(28, 42, 65, 0.14);
  --oulan-teal: #0f766e;
  --oulan-blue: #2563eb;
  --oulan-green: #16a34a;
  --oulan-amber: #f59e0b;
  --oulan-white: #ffffff;
  --oulan-panel: rgba(255, 255, 255, 0.84);
  --oulan-shadow: 0 30px 90px rgba(16, 24, 40, 0.16);
}

.page-home {
  background:
    radial-gradient(circle at 12% 10%, rgba(15, 118, 110, 0.13), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(37, 99, 235, 0.13), transparent 28%),
    linear-gradient(180deg, #f8fbfd 0%, #eef5f8 46%, #ffffff 100%);
  color: var(--oulan-ink);
}

.page-home .topbar {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
}

.page-home .container {
  max-width: none;
  padding: 0;
  overflow: hidden;
}

.page-home .footer {
  background: rgba(255, 255, 255, 0.92);
}

.oulan-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 0.86fr) minmax(480px, 1.14fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: center;
  min-height: calc(100vh - 64px);
  padding: clamp(58px, 9vw, 112px) clamp(22px, 6vw, 88px) clamp(76px, 8vw, 116px);
  isolation: isolate;
}

.oulan-hero::before {
  content: "";
  position: absolute;
  inset: 8% 5% auto;
  height: 48%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.8), rgba(232, 245, 242, 0.34), rgba(219, 234, 254, 0.34));
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  transform: skewY(-3deg);
  filter: blur(0.2px);
  z-index: -2;
}

.hero-orbit {
  position: absolute;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  z-index: -1;
  pointer-events: none;
  animation: orbit-drift 12s ease-in-out infinite alternate;
}

.hero-orbit-a {
  width: 280px;
  height: 280px;
  right: 9%;
  top: 12%;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.12), transparent 62%);
}

.hero-orbit-b {
  width: 190px;
  height: 190px;
  left: 8%;
  bottom: 11%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.12), transparent 66%);
  animation-delay: -4s;
}

.oulan-hero-copy {
  max-width: 660px;
  min-width: 0;
  z-index: 2;
}

.motion-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.08);
}

.oulan-hero h1 {
  margin: 16px 0 18px;
  max-width: 760px;
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: 0;
  color: #101828;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.oulan-hero h1 span {
  display: block;
}

.oulan-hero p {
  max-width: 620px;
  margin: 0;
  color: var(--oulan-muted);
  font-size: clamp(16px, 1.25vw, 20px);
  line-height: 1.9;
}

.hero-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.hero-proof-grid div {
  min-height: 86px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 14px 38px rgba(16, 24, 40, 0.07);
}

.hero-proof-grid strong {
  display: block;
  margin-bottom: 7px;
  color: #0f766e;
  font-size: 15px;
}

.hero-proof-grid span {
  color: var(--oulan-muted);
  font-size: 13px;
  line-height: 1.5;
}

.hero-stage {
  position: relative;
  min-height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.24);
  transform-style: preserve-3d;
  perspective: 1200px;
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: 11% 0 0 8%;
  background: linear-gradient(120deg, rgba(15, 118, 110, 0.18), rgba(37, 99, 235, 0.14));
  border-radius: 8px;
  filter: blur(30px);
  opacity: 0.86;
  z-index: -1;
}

.hero-stage-glow {
  position: absolute;
  inset: -28px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 22% 22%, rgba(255, 255, 255, 0.95), transparent 25%),
    radial-gradient(circle at 76% 18%, rgba(37, 99, 235, 0.16), transparent 38%),
    radial-gradient(circle at 50% 86%, rgba(15, 118, 110, 0.16), transparent 38%);
  animation: stage-glow 8s ease-in-out infinite alternate;
}

.hero-stage img {
  position: absolute;
  inset: 13% 4% auto;
  width: min(92%, 880px);
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: var(--oulan-shadow);
  transform: rotateX(4deg) rotateY(-5deg) rotateZ(0.8deg) translateZ(16px);
  transform-origin: center;
  transition: transform 220ms ease, filter 220ms ease;
}

.hero-stage.is-tilting img {
  transform: rotateX(7deg) rotateY(-8deg) rotateZ(1.2deg) translateZ(16px);
  filter: saturate(1.05) contrast(1.02);
}

.floating-card {
  position: absolute;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  width: 220px;
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 48px rgba(16, 24, 40, 0.13);
  backdrop-filter: blur(14px);
  animation: card-float 5s ease-in-out infinite;
}

.floating-card i {
  grid-row: span 2;
  color: var(--oulan-teal);
  font-size: 24px;
}

.floating-card strong {
  color: #172033;
  font-size: 14px;
}

.floating-card span {
  color: var(--oulan-muted);
  font-size: 12px;
}

.float-ai {
  top: 8%;
  right: 7%;
}

.float-license {
  left: 1%;
  bottom: 16%;
  animation-delay: -1.4s;
}

.float-profit {
  right: 11%;
  bottom: 6%;
  animation-delay: -2.7s;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 26px;
  height: 42px;
  border: 1px solid rgba(20, 32, 51, 0.24);
  border-radius: 999px;
  transform: translateX(-50%);
}

.scroll-hint span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: #0f766e;
  transform: translateX(-50%);
  animation: scroll-dot 1.8s ease-in-out infinite;
}

.cinematic-band,
.story-strip,
.flow-showcase,
.device-section,
.admin-preview-section,
.launch-panel {
  width: min(1180px, calc(100% - 44px));
  margin-inline: auto;
}

.cinematic-band {
  transform: translateY(-36px);
}

.page-home .metric-band div {
  position: relative;
  overflow: hidden;
}

.page-home .metric-band div::after {
  content: "";
  position: absolute;
  inset: auto 16px 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(15, 118, 110, 0.65), transparent);
  transform: translateX(-120%);
  animation: scan-line 4.2s ease-in-out infinite;
}

.section-kicker {
  color: #0f766e;
  font-size: 13px;
  font-weight: 800;
}

.story-strip {
  padding: 68px 0 76px;
}

.story-strip > h2,
.flow-copy h2,
.device-copy h2,
.admin-preview-copy h2,
.launch-panel h2 {
  max-width: 840px;
  margin: 10px 0 24px;
  font-size: clamp(28px, 3.6vw, 52px);
  line-height: 1.13;
  font-weight: 900;
  letter-spacing: 0;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.story-card {
  min-height: 250px;
  padding: 24px;
  border: 1px solid rgba(28, 42, 65, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 20px 60px rgba(16, 24, 40, 0.08);
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}

.story-card:hover {
  transform: translateY(-8px);
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 28px 78px rgba(16, 24, 40, 0.13);
}

.story-card i {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 40px;
  border-radius: 8px;
  background: #e8f5f2;
  color: #0f766e;
  font-size: 28px;
}

.story-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.story-card p,
.flow-copy p,
.device-copy p,
.admin-preview-copy p {
  margin: 0;
  color: var(--oulan-muted);
  font-size: 16px;
  line-height: 1.85;
}

.flow-showcase,
.device-section,
.admin-preview-section,
.launch-panel {
  display: grid;
  gap: clamp(24px, 4vw, 58px);
  align-items: center;
  padding: clamp(56px, 8vw, 98px) clamp(22px, 4vw, 54px);
  border: 1px solid rgba(28, 42, 65, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 26px 80px rgba(16, 24, 40, 0.09);
}

.flow-showcase,
.admin-preview-section {
  grid-template-columns: minmax(0, 0.84fr) minmax(480px, 1.16fr);
}

.relay-map {
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(80px, 1fr) 180px minmax(80px, 1fr) 190px;
  align-items: center;
  min-height: 360px;
}

.relay-node,
.relay-stack > div {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 146px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 250, 252, 0.9));
  box-shadow: 0 18px 50px rgba(16, 24, 40, 0.11);
}

.relay-node i,
.relay-stack i {
  color: #0f766e;
  font-size: 32px;
}

.relay-node span,
.relay-stack span {
  color: #243044;
  font-weight: 800;
}

.node-server {
  min-height: 180px;
  background: linear-gradient(180deg, rgba(232, 245, 242, 0.95), rgba(255, 255, 255, 0.92));
  animation: server-pulse 3.8s ease-in-out infinite;
}

.relay-line {
  position: relative;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.14);
}

.relay-line span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 44%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #0f766e, #2563eb);
  animation: relay-run 2.4s linear infinite;
}

.line-b span {
  animation-delay: -1.1s;
}

.relay-stack {
  display: grid;
  gap: 10px;
}

.relay-stack > div {
  grid-template-columns: 32px 1fr;
  min-height: 90px;
  justify-items: start;
  padding: 0 18px;
}

.device-section {
  grid-template-columns: minmax(460px, 1.04fr) minmax(0, 0.96fr);
  margin-top: 28px;
}

.device-visual {
  position: relative;
  min-height: 430px;
}

.device-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(78%, 420px);
  aspect-ratio: 1;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  animation: ring-spin 18s linear infinite;
}

.device-ring::before,
.device-ring::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #0f766e;
  box-shadow: 0 0 0 10px rgba(15, 118, 110, 0.1);
}

.device-ring::before {
  left: 12%;
  top: 12%;
}

.device-ring::after {
  right: 14%;
  bottom: 10%;
  background: #2563eb;
  box-shadow: 0 0 0 10px rgba(37, 99, 235, 0.1);
}

.device-card,
.backup-ticket {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 50px rgba(16, 24, 40, 0.12);
  color: #172033;
  font-weight: 800;
}

.device-card {
  min-width: 220px;
  min-height: 92px;
  padding: 18px;
}

.device-card i,
.backup-ticket i {
  color: #0f766e;
  font-size: 28px;
}

.active-device {
  left: 9%;
  top: 23%;
  animation: card-float 5.4s ease-in-out infinite;
}

.blocked-device {
  right: 4%;
  top: 38%;
  animation: card-float 5.8s ease-in-out infinite reverse;
}

.blocked-device i {
  color: #b42318;
}

.backup-ticket {
  left: 14%;
  right: 7%;
  bottom: 14%;
  min-height: 80px;
  padding: 18px;
  font-weight: 700;
  line-height: 1.5;
}

.admin-preview-section {
  margin-top: 28px;
}

.admin-browser {
  overflow: hidden;
  min-height: 370px;
  border: 1px solid rgba(28, 42, 65, 0.12);
  border-radius: 8px;
  background: #f8fbfd;
  box-shadow: 0 26px 80px rgba(16, 24, 40, 0.12);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(28, 42, 65, 0.1);
  background: #ffffff;
}

.browser-bar span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #ef4444;
}

.browser-bar span:nth-child(2) {
  background: #f59e0b;
}

.browser-bar span:nth-child(3) {
  background: #16a34a;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
}

.admin-tabs span {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 8px;
  background: rgba(232, 245, 242, 0.72);
  color: #0f766e;
  font-weight: 800;
}

.admin-table {
  margin: 0 16px 18px;
  overflow: hidden;
  border: 1px solid rgba(28, 42, 65, 0.1);
  border-radius: 8px;
  background: #ffffff;
}

.admin-table > div {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 0.7fr;
  min-height: 54px;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(28, 42, 65, 0.08);
}

.admin-table > div:first-child {
  color: var(--oulan-muted);
  font-size: 13px;
  font-weight: 800;
  background: #f3f7fa;
}

.admin-table > div:last-child {
  border-bottom: 0;
}

.ok,
.warn,
.info {
  display: inline-flex;
  justify-content: center;
  max-width: 76px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.ok {
  color: #047857;
  background: #d1fae5;
}

.warn {
  color: #92400e;
  background: #fef3c7;
}

.info {
  color: #1d4ed8;
  background: #dbeafe;
}

.launch-panel {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.5fr);
  margin-block: 28px 84px;
  background:
    radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.11), transparent 28%),
    radial-gradient(circle at 14% 80%, rgba(15, 118, 110, 0.12), transparent 30%),
    rgba(255, 255, 255, 0.88);
}

.launch-panel .hero-actions {
  grid-column: 1 / -1;
  margin-top: 0;
}

.launch-kv {
  align-self: stretch;
  padding: 18px;
  border: 1px solid rgba(28, 42, 65, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 80ms;
}

.reveal-delay-2 {
  transition-delay: 160ms;
}

.reveal-delay-3 {
  transition-delay: 240ms;
}

@keyframes orbit-drift {
  from {
    transform: translate3d(-12px, 0, 0) scale(1);
  }
  to {
    transform: translate3d(18px, 22px, 0) scale(1.04);
  }
}

@keyframes stage-glow {
  from {
    opacity: 0.68;
    transform: translate3d(-8px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(10px, -10px, 0);
  }
}

@keyframes card-float {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -12px, 0);
  }
}

@keyframes scroll-dot {
  0% {
    opacity: 0;
    transform: translate(-50%, 0);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 18px);
  }
}

@keyframes scan-line {
  0%, 18% {
    transform: translateX(-120%);
  }
  48%, 100% {
    transform: translateX(120%);
  }
}

@keyframes relay-run {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(260%);
  }
}

@keyframes server-pulse {
  0%, 100% {
    box-shadow: 0 18px 50px rgba(16, 24, 40, 0.11), 0 0 0 0 rgba(15, 118, 110, 0.18);
  }
  50% {
    box-shadow: 0 22px 64px rgba(16, 24, 40, 0.15), 0 0 0 16px rgba(15, 118, 110, 0);
  }
}

@keyframes ring-spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1080px) {
  .oulan-hero,
  .flow-showcase,
  .device-section,
  .admin-preview-section,
  .launch-panel {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 470px;
  }

  .relay-map {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .relay-line {
    width: 4px;
    height: 70px;
    justify-self: center;
  }

  .relay-line span {
    width: 100%;
    height: 44%;
    animation-name: relay-run-vertical;
  }

  @keyframes relay-run-vertical {
    from {
      transform: translateY(-120%);
    }
    to {
      transform: translateY(260%);
    }
  }
}

@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
  }

  .page-home .topbar {
    overflow: hidden;
  }

  .oulan-hero {
    width: 100%;
    max-width: 100vw;
    min-height: auto;
    padding: 38px 14px 68px;
    overflow: hidden;
  }

  .oulan-hero-copy {
    width: 100%;
    max-width: calc(100vw - 28px);
  }

  .oulan-hero h1 {
    max-width: calc(100vw - 28px);
    font-size: clamp(31px, 9.2vw, 38px);
    line-height: 1.08;
    word-break: keep-all;
  }

  .oulan-hero h1 span {
    display: block;
    max-width: 100%;
  }

  .hero-proof-grid,
  .story-grid {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    width: 100%;
    max-width: calc(100vw - 28px);
    min-height: 390px;
  }

  .hero-stage img {
    inset: 14% -10% auto;
    width: 122%;
    transform: rotateX(3deg) rotateY(-4deg) rotateZ(0.6deg) translateZ(16px);
  }

  .floating-card {
    width: 190px;
  }

  .float-ai {
    right: 0;
    top: 3%;
  }

  .float-license {
    left: 0;
    bottom: 20%;
  }

  .float-profit {
    right: 4%;
    bottom: 1%;
  }

  .cinematic-band,
  .story-strip,
  .flow-showcase,
  .device-section,
  .admin-preview-section,
  .launch-panel {
    width: calc(100% - 28px);
  }

  .story-strip {
    padding: 42px 0 50px;
  }

  .flow-showcase,
  .device-section,
  .admin-preview-section,
  .launch-panel {
    padding: 38px 16px;
  }

  .device-visual {
    min-height: 370px;
  }

  .device-card {
    min-width: 190px;
  }

  .active-device {
    left: 0;
  }

  .blocked-device {
    right: 0;
  }

  .backup-ticket {
    left: 0;
    right: 0;
  }

  .admin-tabs,
  .admin-table > div {
    grid-template-columns: 1fr;
  }

  .admin-tabs span {
    min-height: 38px;
  }
}
