/* ============================================================
   Mornistil — marketing site styles
   Palette, type, layout, components, animations.
   ============================================================ */

:root {
  --bg: #1C1C1C;
  --card: #242424;
  --border: #333333;
  --accent: #C0392B;
  --accent-dim: #1F0E0E;
  --accent-hover: #d8483a;
  --text: #F2F4F8;
  --text-secondary: #9A9A9A;
  --text-muted: #5C5C5C;
  --green: #2ECC71;
  --blue: #4A8FD4;
  --gold: #D9A441;

  --radius-card: 20px;
  --radius-btn: 16px;
  --maxw: 1160px;
  --nav-h: 68px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  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; }
ul { list-style: none; }

/* ---- Layout helpers ---- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 110px 0; position: relative; }
.section--tight { padding: 80px 0; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.section-sub {
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  max-width: 620px;
  margin-top: 18px;
}

.section-head { margin-bottom: 56px; }
.section-head--center { text-align: center; }
.section-head--center .section-sub { margin-left: auto; margin-right: auto; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  padding: 14px 26px;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease),
              border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(192, 57, 43, 0.6);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -10px rgba(192, 57, 43, 0.7);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--text-secondary); transform: translateY(-2px); }

.btn-sm { padding: 10px 18px; font-size: 0.9rem; }
.btn-block { width: 100%; }

/* ---- Navigation ---- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  background: rgba(28, 28, 28, 0.72);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(28, 28, 28, 0.9); }
.nav .container { display: flex; align-items: center; justify-content: space-between; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--accent);
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 4px 14px -4px rgba(192, 57, 43, 0.7);
}
.logo-mark svg { width: 18px; height: 18px; }

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s var(--ease);
}
.nav-links a.nav-link:hover { color: var(--text); }

.nav-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; }

/* ---- Hero ---- */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 90px) 0 90px;
  overflow: hidden;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: 0;
  pointer-events: none;
}
.hero::before {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(192,57,43,0.30), transparent 65%);
  top: -160px; right: -120px;
}
.hero::after {
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(192,57,43,0.14), transparent 65%);
  bottom: -200px; left: -150px;
}
.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 100px;
  margin-bottom: 26px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.hero h1 .accent { color: var(--accent); }
.hero-sub {
  margin-top: 24px;
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  color: var(--text-secondary);
  max-width: 540px;
}
.hero-actions { margin-top: 38px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { margin-top: 28px; display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 0.85rem; }
.hero-trust svg { width: 16px; height: 16px; color: var(--accent); }

.hero-visual { display: flex; justify-content: center; }

/* ---- Phone mockups ---- */
.phone {
  position: relative;
  width: 290px;
  aspect-ratio: 9 / 19.3;
  background: #0c0c0c;
  border-radius: 46px;
  padding: 13px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,0.85), 0 0 0 1px rgba(255,255,255,0.04) inset;
}
.phone::before {
  content: "";
  position: absolute;
  top: 24px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 26px;
  background: #0c0c0c;
  border-radius: 100px;
  z-index: 3;
}
.phone .screen {
  width: 100%; height: 100%;
  background: var(--bg);
  border-radius: 34px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.screen-pad { padding: 46px 18px 18px; flex: 1; display: flex; flex-direction: column; }

/* Hero phone screen: weekly score */
.score-screen { align-items: center; text-align: center; }
.score-screen .screen-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-secondary); }
.ring-wrap { position: relative; width: 188px; height: 188px; margin: 22px auto 18px; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: #2E2E2E; stroke-width: 14; }
.ring-progress { fill: none; stroke: var(--accent); stroke-width: 14; stroke-linecap: round; }
.ring-center { position: absolute; inset: 0; display: grid; place-items: center; }
.ring-score { font-size: 3.4rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.ring-of { font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; }
.pillar-row { display: flex; gap: 8px; width: 100%; margin-top: 6px; }
.pillar {
  flex: 1; background: var(--card); border: 1px solid var(--border);
  border-radius: 13px; padding: 11px 6px; text-align: center;
}
.pillar .pillar-val { font-weight: 700; font-size: 1.05rem; }
.pillar .pillar-name { font-size: 0.62rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
.pillar.train .pillar-val { color: var(--accent); }
.pillar.eat .pillar-val { color: var(--gold); }
.pillar.sleep .pillar-val { color: var(--blue); }

/* ---- Features grid ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 30px 28px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(192,57,43,0.5);
  box-shadow: 0 18px 40px -22px rgba(0,0,0,0.8);
}
.feature-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--accent-dim);
  display: grid; place-items: center;
  margin-bottom: 20px;
  border: 1px solid rgba(192,57,43,0.3);
}
.feature-icon svg { width: 26px; height: 26px; color: var(--accent); }
.feature-card h3 { font-size: 1.22rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 9px; }
.feature-card p { color: var(--text-secondary); font-size: 0.97rem; }

/* ---- How it works ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { position: relative; padding: 30px 26px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); }
.step-num {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 1.15rem;
  margin-bottom: 18px;
}
.step h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--text-secondary); font-size: 0.96rem; }

/* ---- Screenshots showcase ---- */
.shots {
  display: flex;
  gap: 26px;
  justify-content: center;
  flex-wrap: wrap;
}
.shot { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.shot .phone { width: 234px; }
.shot .screen-pad { padding: 42px 14px 14px; }
.shot-label { color: var(--text-secondary); font-size: 0.9rem; font-weight: 600; }

/* mini screen recreations */
.mini-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mini-title { font-weight: 800; font-size: 0.95rem; letter-spacing: -0.02em; }
.mini-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-dim); border: 1px solid rgba(192,57,43,0.4); }

/* feed shot */
.feed-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.feed-top { display: flex; align-items: center; gap: 8px; padding: 9px 10px; }
.feed-top .av { width: 22px; height: 22px; border-radius: 50%; background: var(--blue); }
.feed-top .nm { font-size: 0.62rem; font-weight: 600; }
.feed-top .nm small { display: block; color: var(--text-secondary); font-weight: 400; }
.feed-photo { height: 96px; background: linear-gradient(135deg, #2a2a2a, #1a1a1a); position: relative; }
.feed-photo::after { content: "🏋️"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.8rem; opacity: 0.5; }
.feed-actions { display: flex; gap: 12px; padding: 9px 10px; color: var(--text-secondary); font-size: 0.78rem; }
.feed-actions .liked { color: var(--accent); }

/* workout shot */
.set-row { display: flex; align-items: center; gap: 7px; padding: 7px 9px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 7px; font-size: 0.66rem; }
.set-row .setno { width: 16px; color: var(--text-secondary); font-weight: 700; }
.set-row .cell { flex: 1; background: #2E2E2E; border-radius: 6px; text-align: center; padding: 4px 0; font-weight: 600; }
.set-row .check { color: var(--green); }
.set-row.pr { border-color: rgba(192,57,43,0.5); }
.set-row.pr .setno { color: var(--accent); }
.pr-tag { font-size: 0.55rem; font-weight: 800; color: var(--accent); }

/* nutrition shot */
.min-bar { margin-bottom: 11px; }
.min-bar .lab { display: flex; justify-content: space-between; font-size: 0.62rem; margin-bottom: 4px; }
.min-bar .lab .v { color: var(--text-secondary); }
.min-track { height: 6px; border-radius: 100px; background: #2E2E2E; overflow: hidden; }
.min-fill { height: 100%; border-radius: 100px; }

/* score shot */
.shot .ring-wrap { width: 130px; height: 130px; margin: 10px auto 14px; }
.shot .ring-score { font-size: 2.2rem; }

/* ---- About ---- */
.about { text-align: center; }
.about .container { max-width: 820px; }
.about h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.18; }
.about h2 .accent { color: var(--accent); }
.about p { color: var(--text-secondary); font-size: 1.12rem; margin-top: 22px; }

/* ---- Waitlist ---- */
.waitlist {
  background: linear-gradient(180deg, #242424, #1f1f1f);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 56px clamp(24px, 5vw, 64px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.waitlist::before {
  content: ""; position: absolute; top: -120px; left: 50%; transform: translateX(-50%);
  width: 420px; height: 280px; filter: blur(80px);
  background: radial-gradient(circle, rgba(192,57,43,0.28), transparent 70%);
  pointer-events: none;
}
.waitlist > * { position: relative; z-index: 1; }
.waitlist h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; }
.waitlist p.lead { color: var(--text-secondary); margin-top: 14px; font-size: 1.08rem; }
.waitlist-form {
  margin: 32px auto 0;
  max-width: 520px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field { position: relative; }
.field input {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 15px 16px;
  transition: border-color 0.2s var(--ease);
}
.field input::placeholder { color: var(--text-muted); }
.field input:focus { outline: none; border-color: var(--accent); }
.field.invalid input { border-color: var(--accent); }
.field.full { grid-column: 1 / -1; }
.waitlist-form .btn { grid-column: 1 / -1; }
.field-error {
  display: none;
  color: var(--accent);
  font-size: 0.8rem;
  text-align: left;
  margin-top: 6px;
}
.field.invalid .field-error { display: block; }

.form-note { margin-top: 16px; color: var(--text-muted); font-size: 0.82rem; }
.form-success {
  display: none;
  margin-top: 24px;
  background: rgba(46,204,113,0.1);
  border: 1px solid rgba(46,204,113,0.4);
  color: var(--green);
  border-radius: var(--radius-btn);
  padding: 18px;
  font-weight: 600;
}
.form-success.show { display: block; animation: fadeUp 0.5s var(--ease); }
.btn .spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
.btn.loading .spinner { display: inline-block; }
.btn.loading .btn-label { opacity: 0.7; }

/* ---- FAQ ---- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--card); margin-bottom: 12px; overflow: hidden; }
.faq-q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: none; border: 0; cursor: pointer;
  color: var(--text); font-family: inherit;
  font-size: 1.05rem; font-weight: 600; text-align: left;
  padding: 22px 24px;
}
.faq-q .chev { flex-shrink: 0; transition: transform 0.3s var(--ease); color: var(--accent); }
.faq-item.open .faq-q .chev { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease); }
.faq-a-inner { padding: 0 24px 22px; color: var(--text-secondary); }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--border); padding: 60px 0 40px; }
.footer .container { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-tag { color: var(--text-secondary); margin-top: 16px; max-width: 280px; }
.footer h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 16px; }
.footer-links a { display: block; color: var(--text-secondary); padding: 6px 0; transition: color 0.2s var(--ease); }
.footer-links a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 48px; padding-top: 26px; color: var(--text-muted); font-size: 0.85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---- Legal page ---- */
.legal { padding: calc(var(--nav-h) + 70px) 0 80px; }
.legal .container { max-width: 800px; }
.legal h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.03em; }
.legal .updated { color: var(--text-muted); margin-top: 10px; margin-bottom: 40px; }
.legal h2 { font-size: 1.4rem; font-weight: 700; margin: 36px 0 12px; letter-spacing: -0.01em; }
.legal p, .legal li { color: var(--text-secondary); margin-bottom: 12px; }
.legal ul { padding-left: 22px; list-style: disc; }
.legal a { color: var(--accent); }
.legal a:hover { text-decoration: underline; }

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-fade { opacity: 0; animation: fadeUp 0.9s var(--ease) forwards; }
.hero-fade.d1 { animation-delay: 0.05s; }
.hero-fade.d2 { animation-delay: 0.18s; }
.hero-fade.d3 { animation-delay: 0.31s; }
.hero-fade.d4 { animation-delay: 0.44s; }

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions, .hero-trust { justify-content: center; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .footer .container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 80px 0; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .features-grid { grid-template-columns: 1fr; }
  .waitlist-form { grid-template-columns: 1fr; }
  .footer .container { grid-template-columns: 1fr; }
  .waitlist { padding: 44px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
