/* ============================================================
   Weky — weky.app
   Clean, minimalist marketing site. Light-first, dark-aware.
   Palette mirrors the app exactly:
     ember   #C96A2B   accent (CTAs, highlights)
     charcoal#111315   ink / dark surfaces
     ivory   #F5F1E8   warm light background
   ============================================================ */

:root {
  --ember: #C96A2B;
  --ember-deep: #B05B22;
  --ember-soft: rgba(201, 106, 43, 0.10);
  --charcoal: #111315;
  --ivory: #F5F1E8;

  --bg: #F7F3EA;
  --bg-alt: #FFFFFF;
  --surface: #FFFDF7;
  --surface-deep: #ECE7DA;
  --text: #1A1C1E;
  --text-soft: #5C5A54;
  --border: #E4DECF;
  --shadow: 0 18px 50px rgba(31, 27, 20, 0.10);
  --shadow-sm: 0 8px 24px rgba(31, 27, 20, 0.08);

  --radius: 22px;
  --radius-lg: 30px;
  --maxw: 1120px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
          Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1012;
    --bg-alt: #131619;
    --surface: #1B1E21;
    --surface-deep: #0C0E0F;
    --text: #F5F1E8;
    --text-soft: #A9A69E;
    --border: #2A2D30;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---------- Liquid background (mirrors the app's LiquidBackground) ---------- */
.liquid-bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  pointer-events: none;
}
.blob { position: absolute; border-radius: 50%; filter: blur(90px); }
.blob.b1 {
  width: 520px; height: 520px; top: -140px; right: -120px;
  background: rgba(201, 106, 43, 0.16);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.blob.b2 {
  width: 460px; height: 460px; bottom: -160px; left: -140px;
  background: rgba(240, 185, 107, 0.13);
  animation: drift-b 34s ease-in-out infinite alternate;
}
.blob.b3 {
  width: 380px; height: 380px; top: 42%; left: 55%;
  background: rgba(201, 106, 43, 0.09);
  animation: drift-c 40s ease-in-out infinite alternate;
}
@media (prefers-color-scheme: dark) {
  .blob.b1 { background: rgba(201, 106, 43, 0.13); }
  .blob.b2 { background: rgba(240, 185, 107, 0.07); }
  .blob.b3 { background: rgba(201, 106, 43, 0.08); }
}
@keyframes drift-a {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-70px, 90px) scale(1.15); }
}
@keyframes drift-b {
  from { transform: translate(0, 0) scale(1.05); }
  to   { transform: translate(90px, -70px) scale(0.92); }
}
@keyframes drift-c {
  from { transform: translate(0, 0) scale(0.95); }
  to   { transform: translate(-60px, -80px) scale(1.12); }
}

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

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 1.5px; font-size: 20px; }
.brand img { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--text-soft); font-weight: 500; font-size: 15px; transition: color .18s; }
.nav-links a:hover { color: var(--ember); }
.nav-badge { display: inline-flex; transition: transform .18s; }
.nav-badge img { height: 34px; width: auto; border-radius: 8px; }
.nav-badge:hover { transform: translateY(-1px); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { padding: 84px 0 60px; position: relative; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid color-mix(in srgb, var(--ember) 30%, transparent);
  color: var(--ember);
  font-weight: 600; font-size: 13px; letter-spacing: .3px;
  padding: 7px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 62px); line-height: 1.04; letter-spacing: -1.5px;
  font-weight: 800; margin-bottom: 20px;
}
.hero h1 .accent { color: var(--ember); }
.hero p.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--text-soft); max-width: 34ch; margin-bottom: 30px; }
.cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.badge-link { transition: transform .18s; display: inline-block; }
.badge-link:hover { transform: translateY(-2px); }
.hero-note { color: var(--text-soft); font-size: 14px; }

/* Phone showcase — two screens in an "X"/crossed layout */
.hero-visual { position: relative; height: 560px; }
.phone {
  position: absolute; border-radius: 40px; overflow: hidden;
  box-shadow: var(--shadow); border: 6px solid #0b0c0d; background: #0b0c0d;
}
.phone img { border-radius: 34px; }
.phone-back {
  width: 250px; left: 8%; top: 40px; --rot: -8deg; z-index: 1;
  animation: phone-float 8s ease-in-out infinite alternate;
}
.phone-front {
  width: 260px; right: 6%; top: 90px; --rot: 7deg; z-index: 2;
  animation: phone-float 6.5s ease-in-out 1.2s infinite alternate;
}
@keyframes phone-float {
  from { transform: rotate(var(--rot)) translateY(0); }
  to   { transform: rotate(var(--rot)) translateY(-12px); }
}

/* ---------- Section scaffolding ---------- */
section { padding: 70px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-head .kicker {
  color: var(--ember); font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; font-size: 13px; margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -1px; line-height: 1.1; margin-bottom: 14px; }
.section-head p { color: var(--text-soft); font-size: 17px; }

/* ---------- How it works: 3 steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.step { text-align: center; }
.step .frame {
  border-radius: 34px; overflow: hidden; background: #0b0c0d;
  border: 6px solid #0b0c0d; box-shadow: var(--shadow-sm);
  max-width: 260px; margin: 0 auto 26px;
}
.step .frame img { border-radius: 28px; }
.step .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ember); color: #fff; font-weight: 700; font-size: 14px;
  margin-bottom: 12px;
}
.step h3 { font-size: 20px; margin-bottom: 8px; letter-spacing: -.3px; }
.step p { color: var(--text-soft); font-size: 15px; max-width: 30ch; margin: 0 auto; }

/* ---------- Feature band (frosted over the liquid blobs) ---------- */
.band {
  background: color-mix(in srgb, var(--bg-alt) 55%, transparent);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature-row.reverse { direction: rtl; }
.feature-row.reverse > * { direction: ltr; }
.feature-copy .kicker { color: var(--ember); font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; font-size: 13px; margin-bottom: 12px; }
.feature-copy h2 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.8px; line-height: 1.12; margin-bottom: 16px; }
.feature-copy p { color: var(--text-soft); font-size: 17px; margin-bottom: 14px; }
.feature-list { list-style: none; margin-top: 20px; display: grid; gap: 12px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; }
.feature-list li::before {
  content: "✓"; color: var(--ember); font-weight: 800; flex: none;
  width: 24px; height: 24px; border-radius: 50%; background: var(--ember-soft);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; margin-top: 2px;
}
.feature-visual { display: flex; justify-content: center; }
.feature-visual .frame {
  border-radius: 40px; overflow: hidden; background: #0b0c0d;
  border: 7px solid #0b0c0d; box-shadow: var(--shadow); max-width: 290px;
  animation: frame-float 9s ease-in-out infinite alternate;
}
.feature-visual .frame img { border-radius: 33px; }
@keyframes frame-float {
  from { transform: translateY(0); }
  to   { transform: translateY(-9px); }
}

/* ---------- Mission chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.chip {
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 16px; font-weight: 600; font-size: 15px;
  display: flex; align-items: center; gap: 9px; box-shadow: var(--shadow-sm);
}
.chip .emo { font-size: 18px; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 0 auto; }
.faq details {
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 18px; padding: 4px 22px; margin-bottom: 14px;
  box-shadow: var(--shadow-sm); transition: border-color .2s;
}
.faq details[open] { border-color: color-mix(in srgb, var(--ember) 45%, var(--border)); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 0; font-weight: 650;
  font-size: 17px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--ember-soft); color: var(--ember); font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .22s; font-size: 18px; line-height: 1;
}
.faq details[open] summary .plus { transform: rotate(45deg); }
.faq details p { color: var(--text-soft); padding: 0 0 20px; font-size: 16px; }

/* ---------- CTA banner — frosted glass, follows light/dark like the app ---------- */
.cta-banner { text-align: center; }
.cta-card {
  position: relative; overflow: hidden;
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-lg);
  padding: 60px 32px; box-shadow: var(--shadow);
}
/* a soft ember dawn rising inside the card */
.cta-card::before {
  content: ""; position: absolute; left: 50%; bottom: -160px;
  width: 560px; height: 340px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(201,106,43,.22), transparent 72%);
  animation: cta-glow 9s ease-in-out infinite alternate;
  pointer-events: none;
}
.cta-card > * { position: relative; }
.cta-card h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.8px; margin-bottom: 14px; }
.cta-card p { color: var(--text-soft); font-size: 18px; margin-bottom: 30px; }
@keyframes cta-glow {
  from { opacity: .65; transform: translateX(-50%) scale(1); }
  to   { opacity: 1;   transform: translateX(-50%) scale(1.18); }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 54px 0 40px; margin-top: 20px; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; }
.footer-brand { max-width: 300px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { color: var(--text-soft); font-size: 14px; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-soft); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--text); font-size: 15px; margin-bottom: 10px; transition: color .18s; }
.footer-col a:hover { color: var(--ember); }
.footer-bottom {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  color: var(--text-soft); font-size: 13px;
}

/* ---------- Legal / content pages ---------- */
.doc { padding: 60px 0 40px; }
.doc-inner { max-width: 760px; margin: 0 auto; }
.doc h1 { font-size: clamp(30px, 5vw, 44px); letter-spacing: -1px; margin-bottom: 8px; }
.doc .updated { color: var(--text-soft); font-size: 14px; margin-bottom: 40px; }
.doc h2 { font-size: 22px; margin: 34px 0 12px; letter-spacing: -.3px; }
.doc p, .doc li { color: var(--text-soft); font-size: 16px; margin-bottom: 14px; }
.doc ul, .doc ol { padding-left: 22px; margin-bottom: 14px; }
.doc a { color: var(--ember); font-weight: 500; }
.doc .callout {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--ember); border-radius: 12px;
  padding: 18px 20px; margin: 24px 0;
}
.doc .callout p { margin: 0; color: var(--text); }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ember); font-weight: 600; margin-bottom: 30px; font-size: 15px; }

/* Delete-account steps */
.steps-num { counter-reset: s; list-style: none; padding: 0; }
.steps-num li {
  counter-increment: s; position: relative; padding-left: 52px; margin-bottom: 22px;
  min-height: 36px; color: var(--text);
}
.steps-num li::before {
  content: counter(s); position: absolute; left: 0; top: -2px;
  width: 36px; height: 36px; border-radius: 50%; background: var(--ember); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}

/* ---------- Scroll reveal (elements drift up as they enter) ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Reduced motion: stillness for those who ask for it ---------- */
@media (prefers-reduced-motion: reduce) {
  .blob, .phone-back, .phone-front, .feature-visual .frame, .cta-card::before {
    animation: none !important;
  }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { padding: 56px 0 40px; }
  /* Text first, phones below it (under the App Store button). */
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { height: 400px; }
  .hero p.lead { max-width: none; }
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; direction: ltr; gap: 30px; }
  .feature-visual { order: -1; }
  .feature-visual .frame { max-width: 240px; border-width: 5px; }
  .steps { grid-template-columns: 1fr; gap: 44px; }
  .step .frame { max-width: 215px; border-width: 5px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg-alt);
    border-bottom: 1px solid var(--border); padding: 10px 24px 20px;
  }
  .nav-links.open a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--border); }
  .nav-links.open .nav-badge { justify-content: center; margin-top: 12px; border-bottom: 0; }
  .nav-toggle { display: block; }
}
@media (max-width: 560px) {
  .hero-visual { height: 330px; }
  .phone { border-radius: 28px; border-width: 4px; }
  .phone img { border-radius: 24px; }
  .phone-back { width: 150px; left: 7%; top: 16px; transform: rotate(-7deg); }
  .phone-front { width: 158px; right: 5%; top: 52px; transform: rotate(6deg); }
  .step .frame { max-width: 185px; border-radius: 28px; }
  .step .frame img { border-radius: 23px; }
  .feature-visual .frame { max-width: 205px; border-radius: 30px; }
  .feature-visual .frame img { border-radius: 24px; }
  section { padding: 52px 0; }
  .cta-card { padding: 44px 22px; }
}
