/* NyxGoodbye styles. Quiet luxury: warm ivory, sage, dusty rose, and gold.
   Two first class themes. Light is a sunlit room; dark is the same room by
   candlelight: deep warm charcoal, ivory text, softer glows, firefly motes.
   Motion is gentle everywhere, and fully off under reduced motion. */

:root {
  --bg: #faf6ef;
  --surface: #fffdf8;
  --surface-soft: #f4ecdd;
  --ink: #40382e;
  --ink-soft: #776a59;
  --line: #e6dac4;
  --line-gold: #d9c48a;
  --accent: #7d8c6f;
  --accent-deep: #5c6e50;
  --accent-soft: #e9eee0;
  --rose: #c9a29a;
  --gold: #c9a84c;
  --gold-deep: #9a7b2d;
  --gold-light: #e5c878;
  --danger: #a8543f;
  --radius: 18px;
  --shadow: 0 2px 6px rgba(120, 96, 50, 0.05), 0 14px 34px rgba(120, 96, 50, 0.09);
  --shadow-lift: 0 4px 10px rgba(120, 96, 50, 0.07), 0 22px 44px rgba(120, 96, 50, 0.13);
  --wash-1: rgba(233, 214, 178, 0.55);
  --wash-2: rgba(217, 188, 180, 0.38);
  --wash-3: rgba(196, 208, 182, 0.42);
  --mote: rgba(201, 168, 76, 0.5);
  --glow: rgba(201, 168, 76, 0.16);
  --input-bg: #fffefa;
}

html[data-theme="dark"] {
  --bg: #241f1a;
  --surface: #2e2822;
  --surface-soft: #38312a;
  --ink: #f0e8da;
  --ink-soft: #bfb098;
  --line: #4d4335;
  --line-gold: #8a713f;
  --accent: #a9bd97;
  --accent-deep: #c6d6b2;
  --accent-soft: #39412f;
  --rose: #c9a29a;
  --gold: #d9ba63;
  --gold-deep: #e5c878;
  --gold-light: #e5c878;
  --danger: #d99a86;
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 14px 34px rgba(0, 0, 0, 0.38);
  --shadow-lift: 0 4px 10px rgba(0, 0, 0, 0.34), 0 22px 44px rgba(0, 0, 0, 0.46);
  --wash-1: rgba(201, 168, 76, 0.13);
  --wash-2: rgba(160, 110, 96, 0.12);
  --wash-3: rgba(110, 128, 92, 0.14);
  --mote: rgba(229, 200, 120, 0.65);
  --glow: rgba(217, 186, 99, 0.13);
  --input-bg: #282219;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 19px;
  line-height: 1.65;
  position: relative;
  min-height: 100vh;
}

/* Slow drifting washes of ivory, blush, and sage behind everything. */
body::before {
  content: "";
  position: fixed;
  inset: -12%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(closest-side, var(--wash-1), transparent 72%) 12% 8% / 55vmax 55vmax no-repeat,
    radial-gradient(closest-side, var(--wash-2), transparent 72%) 88% 22% / 48vmax 48vmax no-repeat,
    radial-gradient(closest-side, var(--wash-3), transparent 72%) 55% 92% / 60vmax 60vmax no-repeat;
  animation: drift 46s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  to { transform: translate3d(1.5%, 1.2%, 0) scale(1.04); }
}

.topbar, .wrap, footer { position: relative; z-index: 1; }

/* Floating light motes in light theme; quiet fireflies in dark. */
.motes {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.motes span {
  position: absolute;
  bottom: -4vh;
  border-radius: 50%;
  background: radial-gradient(circle, var(--mote) 0%, transparent 68%);
  animation: rise linear infinite;
}

.motes span:nth-child(1) { left: 6%; width: 13px; height: 13px; animation-duration: 34s; animation-delay: -6s; }
.motes span:nth-child(2) { left: 16%; width: 8px; height: 8px; animation-duration: 27s; animation-delay: -18s; }
.motes span:nth-child(3) { left: 27%; width: 16px; height: 16px; animation-duration: 41s; animation-delay: -11s; }
.motes span:nth-child(4) { left: 38%; width: 9px; height: 9px; animation-duration: 30s; animation-delay: -24s; }
.motes span:nth-child(5) { left: 49%; width: 12px; height: 12px; animation-duration: 37s; animation-delay: -3s; }
.motes span:nth-child(6) { left: 58%; width: 7px; height: 7px; animation-duration: 25s; animation-delay: -15s; }
.motes span:nth-child(7) { left: 67%; width: 15px; height: 15px; animation-duration: 44s; animation-delay: -28s; }
.motes span:nth-child(8) { left: 76%; width: 9px; height: 9px; animation-duration: 29s; animation-delay: -8s; }
.motes span:nth-child(9) { left: 84%; width: 12px; height: 12px; animation-duration: 36s; animation-delay: -20s; }
.motes span:nth-child(10) { left: 92%; width: 8px; height: 8px; animation-duration: 26s; animation-delay: -13s; }
.motes span:nth-child(11) { left: 33%; width: 6px; height: 6px; animation-duration: 23s; animation-delay: -30s; }
.motes span:nth-child(12) { left: 71%; width: 6px; height: 6px; animation-duration: 24s; animation-delay: -2s; }

@keyframes rise {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  12% { opacity: 0.85; }
  55% { transform: translate3d(2.2vw, -55vh, 0); opacity: 0.6; }
  88% { opacity: 0.7; }
  100% { transform: translate3d(-1.4vw, -108vh, 0); opacity: 0; }
}

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 26px 20px 52px;
}

h1, h2, h3 {
  font-weight: normal;
  line-height: 1.28;
  margin: 0 0 12px;
  letter-spacing: 0.01em;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.55rem; margin-top: 30px; }
h3 { font-size: 1.22rem; }

p { margin: 0 0 14px; }

a { color: var(--accent-deep); }

/* Small caps gold labels: the luxury signature. */
.eyebrow, .card-label, .field-label {
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 8px;
}

.field-label { margin-top: 20px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  max-width: 780px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line-gold);
}

.brand {
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink);
}

.brand .tm { font-size: 0.62em; vertical-align: super; color: var(--gold-deep); }

.topbar nav {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  position: relative;
  overflow: hidden;
  display: inline-block;
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid var(--gold-deep);
  background: linear-gradient(160deg, var(--gold-light), var(--gold) 55%, var(--gold-deep));
  color: #2e2410;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.35s ease, box-shadow 0.35s ease, opacity 0.3s ease;
  box-shadow: 0 4px 14px var(--glow);
}

.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -70%;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 252, 240, 0.55), transparent);
  transform: skewX(-18deg);
  transition: left 0.7s ease;
  pointer-events: none;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px var(--glow); }
.btn:hover::after { left: 125%; }
.btn:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; }

.btn.quiet {
  background: transparent;
  color: var(--gold-deep);
  border-color: var(--line-gold);
  box-shadow: none;
}

.btn.quiet::after { display: none; }
.btn.quiet:hover { border-color: var(--gold); box-shadow: 0 6px 16px var(--glow); }

.btn.small { padding: 8px 17px; font-size: 0.95rem; }

.btn.danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
  box-shadow: none;
}

.btn.danger::after { display: none; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 22px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }

.card h2, .card h3 { margin-bottom: 8px; }

.danger-card { border-color: var(--danger); }

.muted { color: var(--ink-soft); }
.small-text { font-size: 0.9rem; }
.gold-note { color: var(--gold-deep) !important; }

.hero { text-align: center; padding: 44px 0 12px; }
.hero h1 { font-size: 2.55rem; }
.hero .promise { font-size: 1.25rem; color: var(--ink-soft); max-width: 580px; margin: 0 auto 22px; }

.price-line { font-size: 1.12rem; margin-bottom: 6px; color: var(--gold-deep); }
.privacy-line { color: var(--ink-soft); margin-bottom: 26px; }

.section-grid { display: grid; gap: 16px; margin-bottom: 22px; }

.section-card {
  display: block;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 1.05rem;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.section-card:hover, .section-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  border-color: var(--line-gold);
  outline: none;
}

.section-card .card-title { font-size: 1.18rem; }

.section-card .status {
  display: block;
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-top: 4px;
}

.section-card .lock-note {
  color: var(--gold-deep);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.bloom {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
  margin: 12px 0 6px;
}

.bloom-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-light), var(--gold) 60%, var(--gold-deep));
  border-radius: 999px;
  box-shadow: 0 0 14px var(--glow), 0 0 4px var(--glow);
  transition: width 1.4s ease;
}

label {
  display: block;
  font-size: 1.02rem;
  margin: 18px 0 6px;
}

label .help {
  display: block;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 2px;
}

.check-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 16px 0;
  cursor: pointer;
  font-size: 1rem;
}

.check-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 3px;
  accent-color: var(--gold-deep);
  flex: none;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
textarea,
select {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

textarea { min-height: 84px; resize: vertical; }
textarea.tall { min-height: 220px; }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--glow);
}

/* Grouped subsections: calm accordions with gold small caps summaries. */
.group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  overflow: hidden;
}

.group summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 24px;
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease;
}

.group summary::-webkit-details-marker { display: none; }

.group summary::after {
  content: "+";
  float: right;
  font-size: 1rem;
  letter-spacing: 0;
  color: var(--gold);
}

.group[open ] summary { border-bottom: 1px solid var(--line-gold); }
.group[open ] summary::after { content: "-"; }
.group summary:hover { background: var(--surface-soft); }

.group-body { padding: 6px 24px 22px; }
.group-body label:first-child { margin-top: 10px; }
.group-intro { color: var(--ink-soft); font-size: 0.96rem; margin-top: 12px; }

.line-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.line-row input { flex: 1; }

.warning {
  background: var(--accent-soft);
  border: 1px solid var(--line-gold);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.98rem;
  margin: 16px 0;
}

.notice {
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 16px 0;
  font-size: 0.98rem;
  background: var(--surface);
}

.error { color: var(--danger); min-height: 1.4em; }
.saved-note { color: var(--gold-deep); font-size: 0.92rem; min-height: 1.4em; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.space { justify-content: space-between; }

.list-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.list-item:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.list-item .meta { color: var(--ink-soft); font-size: 0.92rem; }
.list-item .row { margin-top: 10px; }
.letter-preview { white-space: pre-wrap; margin-top: 6px; }
.letter-body { white-space: pre-wrap; }

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.toggle-row:last-child { border-bottom: none; }

footer {
  border-top: 1px solid var(--line-gold);
  margin-top: 44px;
  padding: 24px 20px 32px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.fade-in { animation: fadeIn 0.7s ease both; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.view { display: none; }
.view.active { display: block; animation: viewIn 0.7s ease both; }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* First 48 Hours sheet and full plan: a calm candle glow on screen only. */
.sheet {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow), 0 0 46px var(--glow), inset 0 0 32px var(--glow);
}

.sheet::before {
  content: "";
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  pointer-events: none;
}

.sheet h2 { border-bottom: 2px solid var(--gold); padding-bottom: 10px; }
.sheet h3 {
  margin-top: 22px;
  color: var(--gold-deep);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.sheet .kind-prompt { color: var(--ink-soft); font-style: italic; }

/* Reduced motion: the in app setting, and the system preference, both win. */
html[data-motion="reduced"] *,
html[data-motion="reduced"] *::before,
html[data-motion="reduced"] *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

html[data-motion="reduced"] .motes { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .motes { display: none; }
}

@media print {
  body { background: #fff; font-size: 12pt; }
  body::before, .motes { display: none !important; }
  .topbar, footer, .no-print { display: none !important; }
  .view { display: none !important; }
  .view.active { display: block !important; animation: none !important; }
  .sheet { border: none; box-shadow: none; padding: 0; }
  .sheet::before { display: none; }
  .sheet h3 { color: #333; }
  .wrap { max-width: none; padding: 0; }
}
