/* ==========================================================================
   Legacy Drawer marketing site
   Same visual language as the app (client/src/styles.scss): dark aurora
   backdrop, frosted glass panels, gold accents, serif display headings.
   One stylesheet, no web fonts, no framework.
   ========================================================================== */

:root {
  --bg-0: #070b1c;
  --bg-1: #0d1230;
  --bg-2: #141a3f;

  --glass-bg: rgba(255, 255, 255, 0.07);
  --glass-bg-strong: rgba(255, 255, 255, 0.11);
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-border-strong: rgba(255, 255, 255, 0.28);
  --glass-blur: 18px;
  --glass-shadow: 0 8px 32px rgba(3, 6, 23, 0.45);
  --glass-shadow-lg: 0 24px 60px rgba(3, 6, 23, 0.6);

  --ink: #f3f5ff;
  --ink-soft: rgba(238, 241, 255, 0.76);
  --ink-muted: rgba(226, 231, 255, 0.55);

  --gold: #f0c45c;
  --gold-deep: #d99b28;
  --violet: #8f7cff;
  --sky: #5ec8f5;
  --rose: #ff7a90;
  --mint: #6fe3b4;

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;

  --font-display: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Aurora backdrop, as in the app */
body::before, body::after {
  content: '';
  position: fixed;
  inset: -25vmax;
  z-index: -2;
  pointer-events: none;
}
body::before {
  background:
    radial-gradient(38vmax 38vmax at 12% 8%, rgba(143, 124, 255, 0.42), transparent 62%),
    radial-gradient(34vmax 34vmax at 88% 12%, rgba(94, 200, 245, 0.3), transparent 60%),
    radial-gradient(46vmax 46vmax at 74% 92%, rgba(240, 196, 92, 0.24), transparent 62%),
    radial-gradient(40vmax 40vmax at 18% 86%, rgba(122, 74, 208, 0.32), transparent 64%),
    linear-gradient(160deg, var(--bg-1) 0%, var(--bg-0) 45%, var(--bg-2) 100%);
  animation: drift 34s ease-in-out infinite alternate;
}
body::after {
  z-index: -1;
  background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.014) 0 1px, transparent 1px 3px);
  opacity: 0.9;
}
@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2%, 2%, 0) scale(1.08); }
}

/* --- Typography ----------------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.3rem); }
p { margin: 0 0 1em; color: var(--ink-soft); }
p:last-child { margin-bottom: 0; }
a { color: var(--gold); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: #ffe0a0; }
small, .muted { color: var(--ink-muted); }
ul { padding-left: 1.2rem; color: var(--ink-soft); }
li { margin-bottom: 0.35rem; }
strong { color: var(--ink); }

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.7rem;
}
.lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 62ch; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* --- Layout --------------------------------------------------------------- */
.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }
section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
section.tight { padding-top: 0; }
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

/* --- Glass primitive ------------------------------------------------------ */
.glass {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.05) 38%, rgba(255, 255, 255, 0) 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.glass-card { padding: clamp(1.2rem, 2.5vw, 1.75rem); }
.glass-hover { transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.35s ease, background 0.35s ease, border-color 0.35s ease; }
.glass-hover:hover { transform: translateY(-4px); background: var(--glass-bg-strong); border-color: var(--glass-border-strong); box-shadow: var(--glass-shadow-lg); }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink);
  font: inherit;
  font-size: 0.93rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, opacity 0.2s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); background: var(--glass-bg-strong); color: var(--ink); box-shadow: 0 12px 28px rgba(3, 6, 23, 0.5); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); border-color: rgba(255, 236, 190, 0.5); color: #2a1c02; }
.btn-gold:hover:not(:disabled) { background: linear-gradient(135deg, #ffd678, var(--gold)); color: #2a1c02; }
.btn-lg { padding: 0.9rem 1.7rem; font-size: 1rem; }
.btn-sm { padding: 0.45rem 0.95rem; font-size: 0.85rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.actions.center { justify-content: center; }

/* --- Icons and marks ------------------------------------------------------ */
.ic { width: 1em; height: 1em; flex: none; vertical-align: -0.15em; }
.ring {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 14px;
  color: var(--gold);
  background: rgba(240, 196, 92, 0.12);
  border: 1px solid rgba(240, 196, 92, 0.3);
  font-size: 1.35rem;
  margin-bottom: 0.9rem;
}
.ring-violet { color: var(--violet); background: rgba(143, 124, 255, 0.14); border-color: rgba(143, 124, 255, 0.35); }
.ring-sky { color: var(--sky); background: rgba(94, 200, 245, 0.14); border-color: rgba(94, 200, 245, 0.35); }
.ring-mint { color: var(--mint); background: rgba(111, 227, 180, 0.14); border-color: rgba(111, 227, 180, 0.35); }
.ring-rose { color: var(--rose); background: rgba(255, 122, 144, 0.14); border-color: rgba(255, 122, 144, 0.35); }
.step-no { position: absolute; top: 1.1rem; right: 1.25rem; font-family: var(--font-display); font-size: 2.4rem; line-height: 1; color: rgba(255, 255, 255, 0.1); }

/* --- Header --------------------------------------------------------------- */
.site-head { position: sticky; top: 0; z-index: 20; padding: 0.75rem 0; background: rgba(7, 11, 28, 0.72); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); border-bottom: 1px solid var(--glass-border); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-text strong { display: block; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.1; }
.brand-text small { display: block; font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); }
.mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 13px;
  color: #2a1c02;
  font-size: 1.4rem;
  background: linear-gradient(140deg, var(--gold), var(--gold-deep));
  box-shadow: 0 8px 26px rgba(217, 155, 40, 0.4);
}
.nav { display: flex; align-items: center; gap: 1.1rem; }
.nav > a:not(.btn) { color: var(--ink-soft); font-size: 0.93rem; font-weight: 500; }
.nav > a:not(.btn):hover { color: var(--ink); }
.nav .btn { margin-left: 0.2rem; }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--ink);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
  }
  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    padding: 0.75rem 1rem 1rem;
    background: rgba(7, 11, 28, 0.96);
    border-bottom: 1px solid var(--glass-border);
  }
  .nav.is-open { display: flex; }
  .nav > a:not(.btn) { padding: 0.6rem 0.25rem; }
  .nav .btn { margin: 0.3rem 0 0; }
  .brand-text small { display: none; }
}

/* --- Hero ----------------------------------------------------------------- */
.hero { padding-top: clamp(3rem, 9vw, 6.5rem); text-align: center; }
.hero h1 { max-width: 20ch; margin-inline: auto; }
.hero .lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 56ch; margin: 0 auto 1.75rem; }
.hero .foot { margin-top: 1.25rem; font-size: 0.85rem; color: var(--ink-muted); display: inline-flex; align-items: center; gap: 0.45rem; }
.hero-card { margin: 3rem auto 0; width: min(100%, 640px); text-align: left; padding: 1.25rem 1.4rem; }
.hero-card .row { display: flex; align-items: center; gap: 0.9rem; padding: 0.7rem 0; border-top: 1px solid var(--glass-border); }
.hero-card .row:first-child { border-top: 0; padding-top: 0; }
.hero-card .row:last-child { padding-bottom: 0; }
.hero-card .ring { margin: 0; width: 40px; height: 40px; font-size: 1.15rem; }
.hero-card strong { display: block; font-size: 0.95rem; }
.hero-card small { display: block; font-size: 0.82rem; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(240, 196, 92, 0.5);
  background: rgba(240, 196, 92, 0.14);
  color: var(--gold);
  margin-left: auto;
  white-space: nowrap;
}
.badge-mint { border-color: rgba(111, 227, 180, 0.5); background: rgba(111, 227, 180, 0.14); color: var(--mint); }
.badge-sky { border-color: rgba(94, 200, 245, 0.5); background: rgba(94, 200, 245, 0.14); color: var(--sky); }

/* --- Section heads and cards ---------------------------------------------- */
.sec-head { max-width: 62ch; margin-bottom: 2rem; }
.sec-head.center { margin-inline: auto; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.callout { display: flex; gap: 0.8rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: 14px; border: 1px solid rgba(240, 196, 92, 0.5); background: rgba(240, 196, 92, 0.1); color: #ffe6b3; margin-top: 1.25rem; }
.callout .ic { color: var(--gold); font-size: 1.15rem; margin-top: 0.2rem; }
.callout p { color: inherit; margin: 0; }
.callout-rose { border-color: rgba(255, 122, 144, 0.45); background: rgba(255, 122, 144, 0.1); color: #ffc4cd; }
.callout-rose .ic { color: var(--rose); }
.callout-mint { border-color: rgba(111, 227, 180, 0.45); background: rgba(111, 227, 180, 0.1); color: #c3f5df; }
.callout-mint .ic { color: var(--mint); }

.example { margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px dashed var(--glass-border); }
.example .eyebrow { margin-bottom: 0.3rem; }
.example p { margin: 0; font-size: 0.95rem; }

.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2rem; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.checks { list-style: none; padding: 0; margin: 1rem 0 0; }
.checks li { display: flex; gap: 0.6rem; align-items: flex-start; margin-bottom: 0.6rem; color: var(--ink-soft); }
.checks .ic { color: var(--mint); font-size: 1.15rem; margin-top: 0.2rem; }

.uses { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0.9rem; }
.uses li { margin: 0; padding: 1rem 1.1rem; font-size: 0.97rem; display: flex; gap: 0.7rem; align-items: flex-start; }
.uses .ic { font-size: 1.15rem; margin-top: 0.2rem; color: var(--gold); }

/* --- Questions (native details, no script needed) ------------------------ */
.faq { display: grid; gap: 0.75rem; max-width: 820px; margin-inline: auto; }
.faq details { padding: 0; overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 1rem 1.25rem; font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--font-display); font-size: 1.4rem; line-height: 1; color: var(--gold); transition: transform 0.25s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 1.25rem 1.1rem; }
.faq .answer p { font-size: 0.97rem; }

/* --- Big call to action --------------------------------------------------- */
.cta { text-align: center; padding: clamp(2rem, 5vw, 3.25rem); }
.cta h2 { margin-bottom: 0.4rem; }
.cta .lede { margin: 0 auto 1.4rem; }

/* --- Prose pages (About) -------------------------------------------------- */
.prose { max-width: 720px; margin-inline: auto; }
.prose h2 { margin-top: 1.75rem; }
.prose .glass-card + .glass-card { margin-top: 1.25rem; }
.page-head { padding-top: clamp(2.5rem, 7vw, 4.5rem); padding-bottom: 1.5rem; }
.page-head h1 { max-width: 22ch; }

/* --- Contact form --------------------------------------------------------- */
.contact { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 1.5rem; align-items: start; }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.1rem; }
.field > label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
input, textarea {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font: inherit;
  font-size: 0.97rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
textarea { min-height: 160px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-muted); }
input:focus, textarea:focus { border-color: rgba(240, 196, 92, 0.7); box-shadow: 0 0 0 4px rgba(240, 196, 92, 0.15); background: rgba(255, 255, 255, 0.09); }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 0.85rem 1.1rem; border-radius: 14px; border: 1px solid; font-size: 0.93rem; margin-bottom: 1rem; }
.alert-success { border-color: rgba(111, 227, 180, 0.45); background: rgba(111, 227, 180, 0.1); color: #c3f5df; }
.alert-error { border-color: rgba(255, 122, 144, 0.45); background: rgba(255, 122, 144, 0.1); color: #ffc4cd; }
.hidden { display: none; }
#sent:target { display: block; }
.aside p { font-size: 0.95rem; }
.aside .plain { display: block; margin-top: 0.4rem; font-size: 1.05rem; word-break: break-all; }

/* --- Footer --------------------------------------------------------------- */
.site-foot { margin-top: 2rem; padding: 2rem 0 2.5rem; border-top: 1px solid var(--glass-border); font-size: 0.88rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; align-items: center; }
.site-foot p { margin: 0; color: var(--ink-muted); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.site-foot nav a { color: var(--ink-soft); }
.site-foot nav a:hover { color: var(--ink); }

/* --- Motion --------------------------------------------------------------- */
.reveal { animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* --- Legal pages (Privacy Policy, Terms of Service) ---------------------- */
.small { font-size: 0.85rem; }
.legal { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.legal .toc { position: sticky; top: 5rem; padding: 0.75rem 0.5rem; display: flex; flex-direction: column; gap: 0.1rem; }
.legal .toc a { padding: 0.4rem 0.7rem; border-radius: 10px; color: var(--ink-soft); font-size: 0.86rem; line-height: 1.3; }
.legal .toc a:hover { background: rgba(255, 255, 255, 0.08); color: var(--ink); }
.legal .body { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.legal .card h2 { font-size: clamp(1.15rem, 2vw, 1.4rem); margin-bottom: 0.6rem; }
.legal .card ul { margin: 0; }
.legal .card li { margin-bottom: 0.5rem; }
.legal .log { list-style: none; padding: 0; }
@media (max-width: 860px) {
  .legal { grid-template-columns: 1fr; }
  .legal .toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 0.35rem; padding: 0.75rem; }
  .legal .toc a { border: 1px solid var(--glass-border); border-radius: 999px; padding: 0.3rem 0.7rem; font-size: 0.8rem; }
}
