/* app/web/styles.css */

:root {
  color-scheme: dark;
  --bg-color: #050812;
  --surface-color: #0b1220;
  --surface-raised: #101a2a;
  --text-color: #c8d4e3;
  --muted-color: #8fa1b7;
  --heading-color: #f5f9ff;
  --accent-color: #69d8ff;
  --accent-strong: #32bff6;
  --accent-violet: #8c7bff;
  --accent-hover: #a8eaff;
  --border-color: #23334a;
  --border-strong: #365371;
  --warning-color: #f4c76b;
  --danger-color: #ff8a84;
  --focus-ring: #8de5ff;
  --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.28);
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% -8%, rgba(50, 191, 246, 0.14), transparent 34rem),
    radial-gradient(circle at 92% 4%, rgba(140, 123, 255, 0.12), transparent 30rem),
    var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.65;
}

::selection {
  background: rgba(105, 216, 255, 0.28);
  color: var(--heading-color);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.container {
  width: min(100% - 40px, 1180px);
  margin: 0 auto;
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: clamp(48px, 8vw, 110px);
  align-items: center;
  min-height: 650px;
  padding: 96px 0 88px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.hero::before {
  position: absolute;
  z-index: -1;
  inset: 42px -5vw;
  content: "";
  border: 1px solid rgba(105, 216, 255, 0.08);
  background-image:
    linear-gradient(rgba(105, 216, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105, 216, 255, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  box-shadow: inset 0 0 100px rgba(5, 8, 18, 0.92);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--heading-color);
  line-height: 1.12;
}

h1 {
  max-width: 780px;
  margin-bottom: 20px;
  font-size: clamp(3.25rem, 6.5vw, 5.6rem);
  font-weight: 700;
  letter-spacing: -0.065em;
  overflow-wrap: anywhere;
}

h2 {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.025em;
}

h2::before {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border: 2px solid var(--accent-color);
  content: "";
  transform: rotate(45deg);
  box-shadow: 0 0 18px rgba(105, 216, 255, 0.42);
}

h3 {
  margin-bottom: 14px;
  font-size: 1.22rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.subtitle {
  margin-bottom: 22px;
  color: var(--accent-color);
  font-family: var(--font-mono);
  font-size: clamp(0.88rem, 1.5vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.description {
  max-width: 660px;
  margin: 0 0 34px;
  color: var(--text-color);
  font-size: clamp(1.05rem, 2vw, 1.24rem);
  line-height: 1.7;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid rgba(105, 216, 255, 0.42);
  border-radius: 999px;
  background: rgba(50, 191, 246, 0.08);
  color: var(--accent-color);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.badge::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 0 0 12px rgba(105, 216, 255, 0.8);
  content: "";
}

.n3bula-emblem {
  position: relative;
  justify-self: end;
  width: min(100%, 380px);
  aspect-ratio: 1;
  border: 1px solid rgba(105, 216, 255, 0.24);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(105, 216, 255, 0.13) 0 2%, transparent 3% 20%, rgba(105, 216, 255, 0.05) 21%, transparent 22%),
    radial-gradient(circle at center, rgba(140, 123, 255, 0.12), transparent 58%);
  box-shadow:
    inset 0 0 70px rgba(105, 216, 255, 0.08),
    0 0 100px rgba(50, 191, 246, 0.09),
    var(--shadow-soft);
}

.n3bula-emblem::before,
.n3bula-emblem::after {
  position: absolute;
  top: 50%;
  left: 50%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(105, 216, 255, 0.38), transparent);
  transform: translate(-50%, -50%);
}

.n3bula-emblem::before {
  width: 82%;
  height: 1px;
}

.n3bula-emblem::after {
  width: 1px;
  height: 82%;
  background: linear-gradient(transparent, rgba(140, 123, 255, 0.38), transparent);
}

.orbit,
.emblem-core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  transform: translate(-50%, -50%);
}

.orbit {
  border: 1px solid rgba(105, 216, 255, 0.48);
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(105, 216, 255, 0.08);
}

.orbit::after {
  position: absolute;
  top: 50%;
  right: -5px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--bg-color);
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 0 0 16px rgba(105, 216, 255, 0.8);
  content: "";
}

.orbit-one {
  width: 88%;
  height: 34%;
  transform: translate(-50%, -50%) rotate(18deg);
}

.orbit-two {
  width: 34%;
  height: 88%;
  border-color: rgba(140, 123, 255, 0.52);
  transform: translate(-50%, -50%) rotate(36deg);
}

.orbit-two::after {
  background: var(--accent-violet);
  box-shadow: 0 0 16px rgba(140, 123, 255, 0.8);
}

.orbit-three {
  width: 60%;
  height: 60%;
  border-style: dashed;
  border-color: rgba(105, 216, 255, 0.22);
}

.emblem-core {
  z-index: 2;
  width: 78px;
  height: 78px;
  border: 1px solid rgba(168, 234, 255, 0.85);
  border-radius: 22px 50% 22px 50%;
  background:
    linear-gradient(135deg, rgba(105, 216, 255, 0.95), rgba(140, 123, 255, 0.55) 54%, rgba(5, 8, 18, 0.95) 55%);
  box-shadow:
    0 0 28px rgba(105, 216, 255, 0.45),
    inset 0 0 22px rgba(255, 255, 255, 0.16);
  transform: translate(-50%, -50%) rotate(45deg);
}

main {
  position: relative;
}

section {
  padding: clamp(64px, 8vw, 96px) 0;
  border-bottom: 1px solid rgba(35, 51, 74, 0.65);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 22px;
}

.card {
  position: relative;
  display: grid;
  min-height: 190px;
  height: 100%;
  align-content: center;
  padding: clamp(26px, 4vw, 36px);
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(105, 216, 255, 0.045), transparent 44%),
    var(--surface-color);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.14);
  transition: border-color 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.card::after {
  position: absolute;
  top: 0;
  left: 0;
  width: 58px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-color), transparent);
  content: "";
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.card h3 {
  color: var(--accent-color);
}

.card p {
  max-width: 48ch;
  margin: 0;
  color: var(--muted-color);
}

.architecture-flow {
  padding: clamp(26px, 4vw, 44px);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(105, 216, 255, 0.035), transparent 42%),
    var(--surface-color);
  box-shadow: var(--shadow-soft);
}

.flow-sequence {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-step {
  position: relative;
  display: grid;
  min-height: 116px;
  place-items: center;
  padding: 18px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(5, 8, 18, 0.62);
  color: var(--heading-color);
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 1.15vw, 0.86rem);
  font-weight: 650;
  line-height: 1.45;
  text-align: center;
}

.flow-step::before {
  position: absolute;
  top: -1px;
  left: 20%;
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  content: "";
}

.flow-step:not(:last-child)::after {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -18px;
  color: var(--accent-color);
  content: "→";
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1;
  transform: translate(50%, -50%);
}

.isolation-notice {
  margin-top: 32px;
  padding: 20px 22px;
  border: 1px solid rgba(255, 138, 132, 0.5);
  border-left: 4px solid var(--danger-color);
  border-radius: 10px;
  background: rgba(255, 138, 132, 0.085);
  color: #ffc2bf;
  font-size: 0.96rem;
}

.isolation-notice strong {
  color: #ffe2e0;
}

.security-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.security-list li {
  position: relative;
  display: flex;
  min-height: 86px;
  align-items: center;
  padding: 20px 20px 20px 48px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(11, 18, 32, 0.74);
  color: var(--heading-color);
  font-weight: 600;
}

.security-list li::before {
  position: absolute;
  left: 21px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--accent-color);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(105, 216, 255, 0.35);
  content: "";
}

.status-box {
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(140, 123, 255, 0.07), transparent 44%),
    var(--surface-color);
}

.status-box ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-box li {
  position: relative;
  padding-left: 24px;
}

.status-box li::before {
  position: absolute;
  top: 0.75em;
  left: 0;
  width: 11px;
  height: 1px;
  background: var(--accent-violet);
  content: "";
}

.notice-box {
  padding: clamp(26px, 4vw, 38px);
  border: 1px solid rgba(244, 199, 107, 0.48);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(244, 199, 107, 0.1), transparent 50%),
    var(--surface-color);
}

.notice-box h2 {
  border-bottom-color: rgba(244, 199, 107, 0.3);
  color: #ffe0a0;
}

.notice-box h2::before {
  border-color: var(--warning-color);
  box-shadow: 0 0 18px rgba(244, 199, 107, 0.3);
}

.notice-box p {
  max-width: 82ch;
  margin: 0;
  color: #e5d5b3;
  font-size: 1.02rem;
}

.contact-box {
  position: relative;
  padding: clamp(38px, 6vw, 60px) 24px;
  overflow: hidden;
  border: 1px solid rgba(105, 216, 255, 0.42);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 0, rgba(105, 216, 255, 0.12), transparent 58%),
    var(--surface-color);
  text-align: center;
}

.contact-box p {
  margin: 0 0 12px;
  color: var(--muted-color);
}

.contact-link {
  display: inline-block;
  max-width: 100%;
  padding: 8px 10px;
  color: var(--accent-color);
  font-size: clamp(1.05rem, 3vw, 1.42rem);
  font-weight: 700;
  letter-spacing: 0.015em;
  overflow-wrap: anywhere;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color 180ms ease;
}

.contact-link:hover,
.contact-link:focus-visible {
  color: var(--accent-hover);
}

footer {
  padding: 44px 20px 52px;
  color: var(--muted-color);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-align: center;
}

footer p {
  margin: 0;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.65fr);
    gap: 36px;
    min-height: 580px;
  }

  .n3bula-emblem {
    width: min(100%, 300px);
  }

  .flow-sequence {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    max-width: 620px;
    margin: 0 auto;
  }

  .flow-step {
    min-height: 78px;
    font-size: 0.88rem;
  }

  .flow-step:not(:last-child)::after {
    top: auto;
    right: auto;
    bottom: -22px;
    left: 50%;
    content: "↓";
    transform: translate(-50%, 50%);
  }

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

@media (max-width: 720px) {
  .container {
    width: min(100% - 32px, 1180px);
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
    padding: 72px 0 64px;
    text-align: center;
  }

  .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .description {
    margin-right: auto;
    margin-left: auto;
  }

  .n3bula-emblem {
    order: -1;
    justify-self: center;
    width: min(72vw, 270px);
  }

  .grid,
  .status-box ul {
    grid-template-columns: minmax(0, 1fr);
  }

  .card {
    min-height: 170px;
  }

  .security-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .container {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    gap: 34px;
    padding-top: 54px;
  }

  .hero::before {
    inset: 18px -12px;
    background-size: 28px 28px;
  }

  h1 {
    font-size: clamp(2.35rem, 13vw, 3.15rem);
  }

  .subtitle {
    letter-spacing: 0.11em;
  }

  .architecture-flow {
    padding: 20px;
  }

  .isolation-notice {
    padding: 18px;
  }

  .security-list li {
    min-height: 74px;
  }
}
