/* ============================================================
   Nex Romance — Spätnacht Design System
   ============================================================ */

:root {
  /* Night surfaces */
  --night0:#14100F;
  --night1:#1C1614;   /* page background */
  --night2:#261E1B;   /* cards */
  --night3:#332925;   /* raised */
  --night4:#433631;   /* outlines / dividers */

  /* Ivory text */
  --ivory:#F3E9DC;      /* primary */
  --ivory-dim:#C9BBAC;  /* secondary */
  --ivory-muted:#8E8073;/* tertiary / timestamps */

  /* Ember accent */
  --ember:#D9704A;
  --ember-deep:#B4532F;
  --ember-soft:#3A2620;
  --ember-glow:#F0A07C;

  /* Quiet warmth & signals */
  --blush:#4A2F30;
  --moss:#8FA37E;
  --honey:#D8A657;

  --maxw: 1120px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 18px;
  --radius-sm: 12px;

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

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--night1);
  color: var(--ivory);
  font-family: "Instrument Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--ember-soft); color: var(--ivory); }

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

/* ---------- Typography ---------- */
.display {
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
}
.display-2 {
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--gutter);
  background: color-mix(in srgb, var(--night1) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--night4) 60%, transparent);
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--ember-glow) 0 22%, var(--ember) 23% 55%, var(--ember-soft) 56% 100%);
  box-shadow: 0 0 14px -2px var(--ember-deep);
  flex: none;
}
.brand-name {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.lang-switch { display: inline-flex; align-items: center; gap: 4px; }
.lang-btn {
  appearance: none; border: 0; background: none; cursor: pointer;
  font-family: inherit; font-size: 0.86rem; font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ivory-muted);
  padding: 6px 8px; border-radius: 8px;
  transition: color .25s var(--ease), background .25s var(--ease);
}
.lang-btn:hover { color: var(--ivory-dim); }
.lang-btn.is-active { color: var(--ember-glow); }
.lang-sep { color: var(--night4); font-size: 0.8rem; }

/* ---------- Layout ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 12vw, 140px) var(--gutter);
}
.section-head { max-width: 680px; margin-bottom: clamp(40px, 6vw, 72px); }
.kicker {
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ember); margin: 0 0 16px;
}
.section-sub {
  color: var(--ivory-dim);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  margin: 18px 0 0;
  max-width: 60ch;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 9vw, 110px) var(--gutter) clamp(40px, 8vw, 90px);
  overflow: clip;
}
.hero-glow {
  position: absolute; inset: -20% 30% 40% -10%;
  background: radial-gradient(50% 50% at 30% 30%, color-mix(in srgb, var(--ember) 26%, transparent) 0%, transparent 70%);
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.eyebrow {
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ivory-muted);
  margin: 0 0 22px;
}
.hero h1 { margin-bottom: 24px; }
.lede {
  font-size: clamp(1.08rem, 1.9vw, 1.32rem);
  color: var(--ivory-dim);
  max-width: 46ch;
  margin: 0 0 36px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-weight: 600; font-size: 0.98rem;
  padding: 14px 26px; border-radius: 999px;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
  cursor: pointer; border: 1px solid transparent;
}
.btn-primary {
  background: var(--ember); color: #1a0f0a;
  box-shadow: 0 10px 30px -10px var(--ember-deep);
}
.btn-primary:hover {
  background: var(--ember-glow);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -12px var(--ember-deep);
}
.btn-ghost {
  color: var(--ivory-dim);
  border-color: var(--night4);
  background: color-mix(in srgb, var(--night2) 50%, transparent);
}
.btn-ghost:hover { color: var(--ivory); border-color: var(--ember-deep); transform: translateY(-2px); }

/* Hero visual */
.hero-visual { display: flex; justify-content: center; }
.portrait-frame {
  position: relative;
  width: min(360px, 82vw);
  border-radius: 24px;
  padding: 10px;
  background: linear-gradient(160deg, var(--night3), var(--night2));
  border: 1px solid var(--night4);
  box-shadow: 0 40px 80px -40px #000, 0 0 60px -30px var(--ember-deep);
}
.portrait-img {
  width: 100%; height: auto;
  border-radius: 16px;
  aspect-ratio: 1792 / 2400;
  object-fit: cover;
}
.chat-float {
  position: absolute;
  right: -18px; bottom: 26px;
  width: min(280px, 74%);
  display: flex; flex-direction: column; gap: 8px;
}
.bubble {
  font-size: 0.9rem; line-height: 1.42;
  padding: 11px 15px; border-radius: 16px;
  box-shadow: 0 12px 30px -14px #000;
  backdrop-filter: blur(4px);
}
.bubble-them {
  align-self: flex-start;
  background: color-mix(in srgb, var(--night3) 92%, transparent);
  border: 1px solid var(--night4);
  border-bottom-left-radius: 6px;
  color: var(--ivory);
}
.bubble-you {
  align-self: flex-end;
  background: var(--blush);
  border: 1px solid color-mix(in srgb, var(--ember-deep) 40%, var(--blush));
  border-bottom-right-radius: 6px;
  color: var(--ivory);
  font-weight: 500;
}

/* ---------- Pillars ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.card {
  background: var(--night2);
  border: 1px solid var(--night4);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 34px);
  transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--ember-deep) 55%, var(--night4));
  background: color-mix(in srgb, var(--night2) 88%, var(--ember-soft));
}
.card-no {
  font-family: "Fraunces", Georgia, serif;
  font-size: 0.95rem; font-weight: 600;
  color: var(--ember); letter-spacing: 0.05em;
}
.card h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600; font-size: 1.32rem;
  margin: 12px 0 10px; letter-spacing: -0.01em;
}
.card p { color: var(--ivory-dim); margin: 0; font-size: 0.98rem; }
.card-wide { grid-column: 1 / -1; }

/* ---------- Companions ---------- */
.companions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.companion {
  margin: 0;
  background: var(--night2);
  border: 1px solid var(--night4);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.companion:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--ember-deep) 55%, var(--night4));
  box-shadow: 0 30px 60px -34px #000;
}
.companion-img-wrap {
  position: relative;
  aspect-ratio: 1792 / 2400;
  overflow: hidden;
  background: var(--night3);
}
.companion-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
  filter: saturate(0.98);
}
.companion:hover .companion-img { transform: scale(1.04); }
.companion-img-wrap::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, color-mix(in srgb, var(--night1) 80%, transparent) 0%, transparent 42%);
  pointer-events: none;
}
.companion figcaption {
  display: flex; flex-direction: column; gap: 5px;
  padding: 18px 20px 22px;
}
.companion-name {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600; font-size: 1.3rem;
  color: var(--ember-glow);
  letter-spacing: -0.01em;
}
.companion-line { color: var(--ivory-dim); font-size: 0.92rem; }

/* ---------- Intimacy ---------- */
.section-intimacy {
  text-align: center;
}
.intimacy-inner {
  max-width: 720px; margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) clamp(24px, 4vw, 56px);
  background:
    radial-gradient(120% 140% at 50% 0%, color-mix(in srgb, var(--ember-soft) 60%, transparent) 0%, transparent 60%),
    var(--night2);
  border: 1px solid var(--night4);
  border-radius: var(--radius);
}
.intimacy-mark {
  display: inline-block;
  width: 34px; height: 34px; border-radius: 50%;
  margin-bottom: 24px;
  background: radial-gradient(circle, var(--ember-glow) 0 24%, var(--ember) 25% 58%, var(--ember-soft) 59% 100%);
  box-shadow: 0 0 24px -4px var(--ember-deep);
}
.intimacy-text {
  color: var(--ivory-dim);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.7;
  margin: 20px auto 0;
  max-width: 56ch;
}

/* ---------- Notify ---------- */
.section-notify { text-align: center; }
.notify-inner { max-width: 620px; margin: 0 auto; }
.section-notify .section-sub { margin-left: auto; margin-right: auto; }
.badge-soon {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 32px;
  padding: 13px 24px; border-radius: 999px;
  background: var(--night2);
  border: 1px solid var(--night4);
  color: var(--ivory-dim);
  font-weight: 600; font-size: 0.96rem;
  cursor: default;
}
.badge-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--honey);
  box-shadow: 0 0 10px 0 color-mix(in srgb, var(--honey) 70%, transparent);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--night4);
  padding: 44px var(--gutter);
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 20px;
}
.footer-heart {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--ivory-dim); font-size: 0.95rem;
}
.footer-heart .heart { color: var(--ember); font-size: 1.05rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a {
  color: var(--ivory-muted); font-size: 0.9rem;
  transition: color .25s var(--ease);
}
.footer-links a:hover { color: var(--ember-glow); }
.footer-copy { color: var(--ivory-muted); font-size: 0.86rem; margin: 0; }

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .badge-dot, .companion-img, .btn { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-copy .lede { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-visual { margin-top: 8px; }
  .companions { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .pillars { grid-template-columns: 1fr; }
  .card-wide { grid-column: auto; }
  .companions { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .chat-float { right: 0; left: 0; margin: 0 auto; width: 88%; bottom: 14px; }
  .footer-links { order: 3; width: 100%; }
}
@media (max-width: 400px) {
  .companions { grid-template-columns: 1fr; }
}
