/* ==========================================================================
   Vivid Universe — company site
   Ported from the Claude Design source `Company Site.dc.html`.
   Theme tokens below mirror the design's editable props (see main.js CONFIG).
   ========================================================================== */

:root {
  --accent: #1F44FF;
  /* Same hue at zero alpha. Fading a radial-gradient to `transparent` renders a
     grey haze in some engines, so the stop colour is spelled out. main.js keeps
     this in sync when --accent changes. */
  --accent-fade: rgba(31, 68, 255, 0);
  --bg: #F7F7F5;

  --ink: #111111;
  --ink-muted: #55554F;
  --ink-soft: #6B6B65;
  --ink-faint: #8A8A85;
  --ink-fainter: #9A9A94;

  --hairline: rgba(17, 17, 17, 0.08);
  --hairline-strong: rgba(17, 17, 17, 0.12);

  --gutter: clamp(20px, 4.5vw, 64px);
  --max-width: 1360px;
  --header-h: clamp(60px, 7vw, 76px);

  --ease-out: cubic-bezier(.22, .61, .36, 1);
}

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

html {
  scroll-behavior: smooth;
  /* Sticky header would otherwise cover the top of each anchored section. */
  scroll-padding-top: var(--header-h);
}

body {
  font-family: "Space Grotesk", "PingFang SC", "HarmonyOS Sans SC",
    "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }

::selection { background: var(--accent); color: #ffffff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  max-width: var(--max-width);
  margin-inline: auto;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* --------------------------------------------------------------------------
   Product legal pages
   -------------------------------------------------------------------------- */

.legal-main {
  padding: clamp(64px, 9vw, 120px) var(--gutter) clamp(96px, 12vw, 160px);
}

.legal-document {
  max-width: 840px;
  margin-inline: auto;
}

.legal-kicker {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--accent);
}

.legal-title {
  margin-top: 18px;
  font-size: clamp(40px, 6.5vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.legal-meta {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.legal-language-nav {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.legal-language-nav a {
  padding: 9px 14px;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.legal-language-nav a:hover {
  border-color: var(--accent);
}

.legal-section {
  margin-top: clamp(48px, 7vw, 76px);
  padding-top: clamp(40px, 5vw, 60px);
  border-top: 1px solid var(--hairline-strong);
}

.legal-section h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 600;
}

.legal-section h3 {
  margin-top: 32px;
  font-size: 20px;
  line-height: 1.35;
}

.legal-section p,
.legal-section li {
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 1.8;
}

.legal-section p { margin-top: 16px; }

.legal-section ul {
  margin-top: 14px;
  padding-left: 1.25em;
}

.legal-section li + li { margin-top: 9px; }

.legal-section a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Scroll reveal
   Elements start hidden and are shown by main.js (IntersectionObserver).
   `--rd` duration, `--rdelay` delay, `--ry` travel — set per element inline.
   The `no-js` guard keeps content visible when scripting is unavailable.
   -------------------------------------------------------------------------- */

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(var(--ry, 20px));
  transition:
    opacity var(--rd, 700ms) var(--ease-out) var(--rdelay, 0ms),
    transform var(--rd, 700ms) var(--ease-out) var(--rdelay, 0ms);
}

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

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid rgba(17, 17, 17, 0.07);
}

.nav {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand:hover { color: var(--ink); }

.brand-dot {
  display: block;
  width: 11px;
  height: 11px;
  background: var(--accent);
  border-radius: 2px;
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
}

.nav-links a {
  font-size: 14px;
  letter-spacing: 0.02em;
  color: #444444;
  transition: color 300ms ease;
}

.nav-links a:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
}

.mobile-menu {
  border-top: 1px solid rgba(17, 17, 17, 0.07);
  padding: 20px var(--gutter) 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: color-mix(in srgb, var(--bg) 98%, transparent);
}

.mobile-menu[hidden] { display: none; }

.mobile-menu a {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* The design switches layout at a 860px viewport width. */
@media (max-width: 859px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

@media (min-width: 860px) {
  .mobile-menu { display: none; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  min-height: calc(100vh - 76px);
  min-height: calc(100svh - var(--header-h));
}

.hero-blobs {
  position: absolute;
  inset: -20% -10%;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(30px);
}

.blob-a {
  top: -10%;
  right: 2%;
  width: 62vw;
  height: 62vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle at 50% 50%, var(--accent) 0%, var(--accent-fade) 68%);
  opacity: 0.13;
  animation: driftA 26s ease-in-out infinite alternate;
}

.blob-b {
  bottom: -18%;
  left: -6%;
  width: 52vw;
  height: 52vw;
  max-width: 760px;
  max-height: 760px;
  background: radial-gradient(circle at 50% 50%, #111111 0%, rgba(17, 17, 17, 0) 66%);
  opacity: 0.07;
  animation: driftB 34s ease-in-out infinite alternate;
}

@keyframes driftA {
  0%   { transform: translate3d(-4%, -2%, 0) scale(1); }
  100% { transform: translate3d(6%, 4%, 0) scale(1.12); }
}

@keyframes driftB {
  0%   { transform: translate3d(4%, 3%, 0) scale(1.08); }
  100% { transform: translate3d(-5%, -3%, 0) scale(0.96); }
}

.hero-inner {
  position: relative;
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding: clamp(80px, 12vw, 150px) var(--gutter) clamp(64px, 9vw, 120px);
}

.eyebrow {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.hero-title {
  margin-top: clamp(20px, 3vw, 34px);
  font-size: clamp(44px, 8.6vw, 118px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.hero-row {
  margin-top: clamp(32px, 5vw, 56px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 6vw, 96px);
  align-items: flex-end;
  justify-content: space-between;
}

.hero-copy {
  max-width: 30em;
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.75;
  color: var(--ink-muted);
  text-wrap: pretty;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 15px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background 320ms ease, transform 320ms ease, gap 320ms ease;
}

.btn-pill:hover {
  background: var(--accent);
  color: #FFFFFF;
  gap: 16px;
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Sections (shared)
   -------------------------------------------------------------------------- */

.section {
  padding: clamp(96px, 15vw, 210px) var(--gutter);
}

.section-bordered { border-top: 1px solid var(--hairline); }

.section-label {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.26em;
  color: var(--accent);
}

.section-title {
  font-size: clamp(34px, 5.4vw, 74px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.about-title {
  margin-top: clamp(28px, 4vw, 48px);
  max-width: 22em;
}

.about-grid {
  margin-top: clamp(48px, 7vw, 96px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(28px, 4vw, 72px);
}

.about-lead {
  font-size: clamp(19px, 1.9vw, 27px);
  line-height: 1.6;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: var(--ink-muted);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.8;
}

.about-body p { text-wrap: pretty; }

/* --------------------------------------------------------------------------
   Products
   -------------------------------------------------------------------------- */

.products-head {
  margin-top: clamp(28px, 4vw, 48px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: clamp(28px, 4vw, 72px);
  align-items: end;
}

.products-head-body {
  display: flex;
  flex-direction: column;
  gap: 22px;
  color: var(--ink-muted);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.8;
}

.products-head-body p { text-wrap: pretty; }

.product-list {
  margin-top: clamp(56px, 8vw, 120px);
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3vw, 40px);
}

.product-card {
  position: relative;
  overflow: hidden;
  border-radius: clamp(20px, 2.4vw, 32px);
  background: #FFFFFF;
  border: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(32px, 4vw, 64px);
  padding: clamp(32px, 5vw, 88px);
}

.product-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(20px, 2.4vw, 32px);
  min-width: 0;
}

.product-index {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--ink-fainter);
}

.product-name {
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.product-desc {
  max-width: 20em;
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.7;
  color: var(--ink-muted);
  text-wrap: pretty;
}

.link-underline {
  align-self: flex-start;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid rgba(17, 17, 17, 0.22);
  transition: color 300ms ease, gap 300ms ease, border-color 300ms ease;
}

.link-underline:hover {
  color: var(--accent);
  border-color: var(--accent);
  gap: 16px;
}

.product-visual {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: clamp(320px, 40vw, 520px);
}

.phone-mock {
  width: clamp(220px, 24vw, 300px);
  aspect-ratio: 0.485;
  border-radius: clamp(28px, 3vw, 44px);
  border: 1px solid var(--hairline-strong);
  background: repeating-linear-gradient(135deg, #F0F0EE 0 9px, #F7F7F5 9px 18px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 20px;
  will-change: transform;
}

.phone-mock span {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #A3A39C;
  text-align: center;
  line-height: 1.7;
}

.phone-mock img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* --------------------------------------------------------------------------
   Culture
   -------------------------------------------------------------------------- */

.culture-head {
  margin-top: clamp(28px, 4vw, 48px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(24px, 4vw, 72px);
  align-items: end;
}

.culture-head-copy {
  max-width: 24em;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.8;
  color: var(--ink-muted);
  text-wrap: pretty;
}

.value-list {
  margin-top: clamp(64px, 10vw, 140px);
  display: flex;
  flex-direction: column;
}

.value-row {
  border-top: 1px solid var(--hairline-strong);
  padding: clamp(40px, 6vw, 96px) 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

.value-list-end { border-top: 1px solid var(--hairline-strong); }

.value-heading {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 28px);
}

.value-num {
  font-size: clamp(48px, 7vw, 104px);
  line-height: 0.8;
  letter-spacing: -0.05em;
  font-weight: 500;
  color: rgba(17, 17, 17, 0.14);
}

.value-title {
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 600;
}

.value-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 26em;
  padding-top: clamp(4px, 1.5vw, 22px);
}

.value-lead {
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.7;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.value-text {
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.8;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding: clamp(72px, 10vw, 130px) var(--gutter) clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--hairline);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(40px, 6vw, 80px);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 32px);
}

.footer-tagline {
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: clamp(40px, 6vw, 80px);
  justify-content: flex-start;
}

.footer-links > div {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-links a {
  font-size: 14px;
  color: var(--ink-muted);
  transition: color 300ms ease;
}

.footer-links a:hover { color: var(--ink); }

.footer-legal {
  margin-top: clamp(56px, 8vw, 110px);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-fainter);
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

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

  .blob-a,
  .blob-b { animation: none; }

  html.js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

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