/* ============================================================
   Viki — landing
   Midnight estate: deep navy, hairline gold, large serif type.
   No external requests. System font stacks only.
   ============================================================ */

:root {
  --bg: #0a0f1c;
  --bg-raise: #0d1426;
  --panel: rgba(255, 255, 255, 0.025);
  --ink: #e9e4d8;
  --muted: #9aa1b2;
  --faint: #6b7280;
  --gold: #d4af6e;
  --gold-bright: #eed9a6;
  --gold-deep: #b08d4f;
  --hairline: rgba(212, 175, 110, 0.16);
  --hairline-strong: rgba(212, 175, 110, 0.34);
  --serif: "Didot", "Bodoni 72", "Bodoni MT", "Playfair Display", "Georgia",
    "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    "Helvetica Neue", Roboto, Arial, sans-serif;
  --max: 1120px;
  --pad: clamp(1.25rem, 5vw, 2.5rem);
}

/* ---------- reset / base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4rem;
}

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 700px at 78% -12%, rgba(34, 48, 84, 0.55) 0%, transparent 62%),
    radial-gradient(900px 640px at -12% 108%, rgba(28, 40, 70, 0.5) 0%, transparent 58%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* film grain, generated inline — no network */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: rgba(212, 175, 110, 0.35);
  color: #fff8ea;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--gold-bright);
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- type helpers ---------- */

.kicker {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1rem;
}

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: 0.005em;
  color: var(--ink);
  text-wrap: balance;
}

.section-sub {
  margin-top: 1.1rem;
  max-width: 38em;
  color: var(--muted);
  text-wrap: pretty;
}

/* ---------- header ---------- */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.4rem;
}

.brand {
  font-family: var(--serif);
  font-size: 1.45rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.brand .dot {
  color: var(--gold);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.header-link {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s ease;
}

.header-link:hover {
  color: var(--gold-bright);
}

.header-cta {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-bright);
  border: 1px solid var(--hairline-strong);
  padding: 0.55em 1.2em;
  border-radius: 999px;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.header-cta:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 110, 0.08);
}

@media (max-width: 540px) {
  .header-link {
    display: none;
  }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 7.5rem 4rem;
  overflow: hidden;
}

/* faint star field */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 22%, rgba(238, 217, 166, 0.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 31% 9%, rgba(233, 228, 216, 0.4) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 67% 14%, rgba(238, 217, 166, 0.42) 50%, transparent 51%),
    radial-gradient(1px 1px at 84% 31%, rgba(233, 228, 216, 0.34) 50%, transparent 51%),
    radial-gradient(1px 1px at 49% 6%, rgba(233, 228, 216, 0.3) 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 92% 8%, rgba(238, 217, 166, 0.38) 50%, transparent 51%),
    radial-gradient(1px 1px at 7% 56%, rgba(233, 228, 216, 0.22) 50%, transparent 51%),
    radial-gradient(1.1px 1.1px at 58% 27%, rgba(238, 217, 166, 0.3) 50%, transparent 51%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: center;
}

@media (min-width: 920px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2rem;
  }
}

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

/* status pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-bright);
  border: 1px solid var(--hairline-strong);
  background: rgba(212, 175, 110, 0.07);
  border-radius: 999px;
  padding: 0.5em 1.1em;
  margin-bottom: 2.2rem;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(212, 175, 110, 0.55);
  animation: pill-pulse 2.6s ease-out infinite;
}

@keyframes pill-pulse {
  0% { box-shadow: 0 0 0 0 rgba(212, 175, 110, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(212, 175, 110, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 175, 110, 0); }
}

.wordmark {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(4.6rem, 13vw, 8.2rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.wordmark .dot {
  color: var(--gold);
}

.tagline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.45rem, 3.6vw, 2.15rem);
  line-height: 1.25;
  margin-top: 1.4rem;
  color: var(--gold-bright);
  text-wrap: balance;
}

.subline {
  margin-top: 1.4rem;
  max-width: 33em;
  color: var(--muted);
  text-wrap: pretty;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 2.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 1em 1.9em;
  border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease, background 0.25s ease;
}

.btn-primary {
  color: #221a09;
  background: linear-gradient(180deg, var(--gold-bright) 0%, var(--gold) 55%, var(--gold-deep) 100%);
  box-shadow:
    0 1px 0 rgba(255, 244, 214, 0.55) inset,
    0 10px 32px -10px rgba(212, 175, 110, 0.45);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 244, 214, 0.55) inset,
    0 16px 42px -10px rgba(212, 175, 110, 0.6);
}

.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
}

.btn-ghost:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 110, 0.07);
  transform: translateY(-2px);
}

.btn .arrow {
  font-family: var(--sans);
  transition: transform 0.25s ease;
}

.btn:hover .arrow {
  transform: translateY(2px);
}

/* hero load-in */
.hero-copy > * {
  animation: rise-in 0.9s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.15s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.25s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.35s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.45s; }

.hero-art {
  animation: rise-in 1.1s cubic-bezier(0.22, 0.8, 0.3, 1) 0.3s both;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- hero house illustration ---------- */

.hero-art {
  position: relative;
  margin-inline: auto;
  width: min(100%, 460px);
}

@media (min-width: 920px) {
  .hero-art {
    width: 100%;
    max-width: 560px;
  }
}

.house {
  width: 100%;
  height: auto;
}

.h-face {
  fill: rgba(233, 228, 216, 0.028);
  stroke: var(--hairline-strong);
  stroke-width: 1.1;
  stroke-linejoin: round;
}

.h-face.roof {
  fill: rgba(212, 175, 110, 0.06);
}

.h-edge {
  fill: none;
  stroke: rgba(212, 175, 110, 0.14);
  stroke-width: 1;
  stroke-linejoin: round;
}

.h-detail {
  fill: rgba(238, 217, 166, 0.07);
  stroke: var(--hairline-strong);
  stroke-width: 1;
  stroke-linejoin: round;
}

.h-pool {
  fill: rgba(116, 168, 212, 0.13);
  stroke: rgba(150, 190, 220, 0.4);
  stroke-width: 1;
}

.h-ripple {
  fill: none;
  stroke: rgba(170, 205, 230, 0.4);
  stroke-width: 1;
  stroke-linecap: round;
}

.h-fence {
  fill: none;
  stroke: var(--hairline-strong);
  stroke-width: 1.1;
  stroke-linecap: round;
}

.link {
  fill: none;
  stroke: var(--gold);
  stroke-width: 0.9;
  opacity: 0.22;
  stroke-dasharray: 3 7;
  stroke-linecap: round;
  animation: dash-drift 26s linear infinite;
}

@keyframes dash-drift {
  to { stroke-dashoffset: -500; }
}

.node-halo {
  fill: none;
  stroke: rgba(212, 175, 110, 0.35);
  stroke-width: 1;
  animation: halo-breathe 3.2s ease-in-out var(--d, 0s) infinite;
  transform-origin: center;
  transform-box: fill-box;
}

.node-core {
  fill: var(--gold-bright);
  animation: core-glow 3.2s ease-in-out var(--d, 0s) infinite;
}

@keyframes halo-breathe {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.35); }
}

@keyframes core-glow {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

.hub-ring {
  fill: none;
  stroke: rgba(212, 175, 110, 0.4);
  stroke-width: 1;
  transform-origin: center;
  transform-box: fill-box;
}

.hub-ring.r1 { animation: halo-breathe 4s ease-in-out infinite; }
.hub-ring.r2 { opacity: 0.5; animation: halo-breathe 4s ease-in-out 1s infinite; }

.hub-core {
  fill: var(--gold);
  animation: core-glow 4s ease-in-out infinite;
}

/* ---------- sections ---------- */

.section {
  padding-block: clamp(4.5rem, 11vw, 8.5rem);
}

.section-head {
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

/* feature cards */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

@media (min-width: 680px) {
  .cards {
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem;
  }
}

.card {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(238, 217, 166, 0.035) 0%, rgba(238, 217, 166, 0) 45%),
    var(--panel);
  padding: clamp(1.6rem, 3.5vw, 2.2rem);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

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

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  background: rgba(212, 175, 110, 0.05);
}

.card-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-icon .ic-fill {
  fill: var(--gold);
  stroke: none;
}

.chip {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid rgba(154, 161, 178, 0.3);
  border-radius: 999px;
  padding: 0.45em 1em;
  white-space: nowrap;
}

.chip.live {
  color: var(--gold-bright);
  border-color: var(--hairline-strong);
  background: rgba(212, 175, 110, 0.07);
}

.card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 0.7rem;
}

.card p {
  color: var(--muted);
  font-size: 0.98rem;
  text-wrap: pretty;
}

/* ---------- automations strip ---------- */

.automations {
  position: relative;
  border-block: 1px solid var(--hairline);
  background:
    radial-gradient(700px 360px at 85% 0%, rgba(212, 175, 110, 0.05) 0%, transparent 60%),
    var(--bg-raise);
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  max-width: 720px;
}

.chat-row {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: 34em;
}

.chat-row.right {
  align-self: flex-end;
  align-items: flex-end;
}

.bubble {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  line-height: 1.45;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(212, 175, 110, 0.16) 0%, rgba(212, 175, 110, 0.07) 100%);
  border: 1px solid rgba(212, 175, 110, 0.3);
  border-radius: 20px 20px 20px 5px;
  padding: 1.05rem 1.5rem;
  text-wrap: pretty;
}

.chat-row.right .bubble {
  border-radius: 20px 20px 5px 20px;
  background: linear-gradient(180deg, rgba(233, 228, 216, 0.07) 0%, rgba(233, 228, 216, 0.03) 100%);
  border-color: rgba(233, 228, 216, 0.16);
}

.chat-meta {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--faint);
  padding-inline: 0.4rem;
}

.chat-meta .tick {
  color: var(--gold);
}

.chat-note {
  margin-top: 3rem;
  max-width: 44em;
  color: var(--muted);
  font-size: 0.95rem;
  border-left: 2px solid var(--hairline-strong);
  padding-left: 1.2rem;
  text-wrap: pretty;
}

/* ---------- open core ---------- */

.opencore {
  text-align: center;
}

.opencore .section-title {
  margin-inline: auto;
}

.opencore .section-sub {
  margin-inline: auto;
  max-width: 42em;
}

.opencore .pricing-line {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--gold-bright);
}

.opencore-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 2.4rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-bright);
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  padding: 0.7em 1.4em;
  background: rgba(212, 175, 110, 0.05);
}

.badge svg {
  width: 15px;
  height: 15px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* hairline flourish */
.flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 2.2rem;
  color: var(--gold);
}

.flourish::before,
.flourish::after {
  content: "";
  height: 1px;
  width: clamp(40px, 10vw, 110px);
  background: linear-gradient(90deg, transparent, var(--hairline-strong));
}

.flourish::after {
  background: linear-gradient(90deg, var(--hairline-strong), transparent);
}

.flourish svg {
  width: 14px;
  height: 14px;
  fill: var(--gold);
}

/* ---------- for developers ---------- */

.dev-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 860px) {
  .dev-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2.4rem;
  }
}

.dev-item {
  border-top: 1px solid var(--hairline-strong);
  padding-top: 1.3rem;
}

.dev-item h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

.dev-item p {
  color: var(--muted);
  font-size: 0.95rem;
  text-wrap: pretty;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: 3rem 3.5rem;
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

@media (min-width: 680px) {
  .footer-grid {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.footer-brand {
  font-family: var(--serif);
  font-size: 1.5rem;
}

.footer-honesty {
  margin-top: 0.5rem;
  font-style: italic;
  font-family: var(--serif);
  color: var(--muted);
  max-width: 36em;
  text-wrap: pretty;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--faint);
}

@media (min-width: 680px) {
  .footer-meta {
    text-align: right;
    align-items: flex-end;
  }
}

.footer-link {
  color: var(--gold-bright);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.footer-link:hover {
  color: var(--gold);
}

/* ---------- scroll reveal (JS-gated; visible without JS) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 0.8, 0.3, 1);
}

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

.js .reveal:nth-child(2) { transition-delay: 0.08s; }
.js .reveal:nth-child(3) { transition-delay: 0.16s; }
.js .reveal:nth-child(4) { transition-delay: 0.24s; }

/* ---------- reduced motion ---------- */

@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;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
