/* ===========================================================
   FlowRec — flowrec.app
   Palette: near-black ground, record-dot red, off-white text.
   Type: Instrument Serif (headlines) + JetBrains Mono (labels).
   =========================================================== */

:root {
  --bg:        #15131A;
  --bg-2:      #1c1923;
  --bg-card:   #211d29;
  --line:      rgba(255,255,255,0.09);
  --red:       #F0415A;
  --red-bright:#FF3D5E;
  --red-soft:  rgba(240,65,90,0.14);
  --text:      #F5F2F7;
  --muted:     #9a93a6;
  --muted-2:   #6f6878;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --maxw: 1080px;
  --pad: clamp(20px, 5vw, 48px);
}

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

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

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

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

em { font-style: italic; color: var(--red); }

/* ---------- Shared typography ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
}
.eyebrow.center { text-align: center; }

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-align: center;
  margin: 0.5rem auto 0;
  max-width: 18ch;
}

.section {
  padding: clamp(64px, 11vw, 132px) var(--pad);
  max-width: var(--maxw);
  margin: 0 auto;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--pad);
  background: rgba(21,19,26,0.72);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { border-radius: 7px; }
.brand-word {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 16px;
}
.header-cta {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 8px 16px;
  border: 1px solid var(--red);
  border-radius: 999px;
  color: var(--text);
  transition: background .2s ease, color .2s ease;
}
.header-cta:hover { background: var(--red); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(72px, 13vw, 150px) var(--pad) clamp(64px, 10vw, 120px);
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }

.hero .eyebrow { margin-bottom: 1.4rem; }

.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.9rem, 9vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin-bottom: 1.4rem;
}

.hero-sub {
  font-family: var(--mono);
  font-size: clamp(0.95rem, 2.2vw, 1.12rem);
  line-height: 1.7;
  color: var(--muted);
  max-width: 56ch;
  margin: 0 auto 2.4rem;
}

/* Radiating rings motif (behind hero + final CTA) */
.rings {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(900px, 120vw);
  aspect-ratio: 1;
  z-index: 1;
  pointer-events: none;
}
.rings span {
  position: absolute;
  inset: 0;
  margin: auto;
  border-radius: 50%;
  border: 1px solid var(--red);
  opacity: 0;
  animation: ring-pulse 6s ease-out infinite;
}
.rings span:nth-child(1) { width: 14%; height: 14%; animation-delay: 0s; }
.rings span:nth-child(2) { width: 14%; height: 14%; animation-delay: 1.2s; }
.rings span:nth-child(3) { width: 14%; height: 14%; animation-delay: 2.4s; }
.rings span:nth-child(4) { width: 14%; height: 14%; animation-delay: 3.6s; }
.rings span:nth-child(5) { width: 14%; height: 14%; animation-delay: 4.8s; }
@keyframes ring-pulse {
  0%   { opacity: 0; transform: scale(1); }
  10%  { opacity: 0.5; }
  100% { opacity: 0; transform: scale(7); }
}
/* Static glow core */
.rings::after {
  content: "";
  position: absolute;
  inset: 0; margin: auto;
  width: 9%; height: 9%;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 60px 20px rgba(240,65,90,0.45);
}

/* CTA */
.cta-block { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }
.appstore-badge { display: inline-block; transition: transform .2s ease, filter .2s ease; }
.appstore-badge:hover { transform: translateY(-2px); filter: brightness(1.08); }
.cta-micro {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* Notify form */
.notify { margin-top: 2.6rem; max-width: 440px; margin-left: auto; margin-right: auto; }
.notify-label {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  margin-bottom: 0.7rem;
}
.notify-row { display: flex; gap: 8px; }
.notify input {
  flex: 1;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color .2s ease;
}
.notify input::placeholder { color: var(--muted-2); }
.notify input:focus { outline: none; border-color: var(--red); }
.notify button {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #fff;
  background: var(--red);
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s ease, transform .1s ease;
}
.notify button:hover { background: var(--red-bright); }
.notify button:active { transform: scale(0.98); }
.notify button:disabled { opacity: 0.6; cursor: default; }
.notify-msg { min-height: 1.2em; margin-top: 0.7rem; font-size: 12.5px; letter-spacing: 0.03em; }
.notify-msg.ok { color: #57d98a; }
.notify-msg.err { color: var(--red-bright); }

/* ---------- Trust strip ---------- */
.trust {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px var(--pad);
  text-align: center;
}
.trust p {
  font-family: var(--mono);
  font-size: clamp(12px, 2.4vw, 14px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.trust strong { color: var(--text); font-weight: 700; }

/* ---------- The magic ---------- */
.magic { text-align: center; }
.magic-stage {
  margin: 2.6rem auto 0;
  max-width: 760px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 80px -30px rgba(240,65,90,0.28);
}
.magic-video { width: 100%; aspect-ratio: 1242 / 2688; max-height: 70vh; object-fit: contain; background:#0c0a0f; }
.magic-line {
  margin-top: 2rem;
  font-family: var(--mono);
  font-size: clamp(0.9rem, 2.2vw, 1.05rem);
  color: var(--muted);
}
.magic-line strong { color: var(--text); font-weight: 500; }

/* ---------- How it works ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 3rem;
}
.steps li {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 26px 30px;
}
.step-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--red);
}
.steps h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.6rem;
  margin: 0.6rem 0 0.5rem;
}
.steps p { color: var(--muted); font-size: 14px; }

/* ---------- Features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 3rem;
}
.feature {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 26px 28px;
  position: relative;
}
.feature::before {
  content: "";
  position: absolute;
  top: 26px; left: 26px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 6px var(--red-soft);
}
.feature h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.55rem;
  margin: 1.6rem 0 0.4rem;
}
.feature p { color: var(--muted); font-size: 14px; }

/* ---------- Gallery ---------- */
.gallery { max-width: 100%; }
.shots {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 3rem var(--pad) 1rem;
  margin: 0 auto;
  max-width: var(--maxw);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.shots::-webkit-scrollbar { display: none; }
.shots img {
  flex: 0 0 auto;
  width: clamp(190px, 44vw, 248px);
  border-radius: 18px;
  border: 1px solid var(--line);
  scroll-snap-align: center;
}

/* ---------- Use cases ---------- */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 3rem;
}
.usecase {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 30px 34px;
}
.uc-tag {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.2rem;
}
.usecase ul { list-style: none; }
.usecase li {
  font-family: var(--serif);
  font-size: 1.45rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
}
.usecase li:last-child { border-bottom: 0; }

/* ---------- Why ---------- */
.why { text-align: center; }
.why-inner { max-width: 760px; margin: 0 auto; }
.why .eyebrow { margin-bottom: 1.6rem; }
.why-statement {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 4.2vw, 2.5rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
}

/* ---------- Pricing ---------- */
.price-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 3rem;
}
.plan {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 32px 36px;
}
.plan-pro {
  border-color: var(--red);
  background: linear-gradient(180deg, rgba(240,65,90,0.08), rgba(240,65,90,0.02));
}
.plan-name {
  font-family: var(--serif);
  font-size: 2rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.5rem;
}
.plan-badge {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  background: var(--red-soft);
  padding: 4px 9px;
  border-radius: 999px;
}
.plan-desc { color: var(--muted); font-size: 14px; margin-bottom: 1.4rem; }
.plan-list { list-style: none; }
.plan-list li {
  font-size: 14px;
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
  border-top: 1px solid var(--line);
}
.plan-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  transform: translateY(-50%);
}
.plan-price {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  margin-top: 1.5rem;
  color: var(--text);
}
.plan-price span { color: var(--muted); font-weight: 400; }
.pricing-cta { text-align: center; margin-top: 2.6rem; }
.pricing-cta .appstore-badge { display: inline-block; }

/* ---------- FAQ ---------- */
.faq-list { margin-top: 3rem; max-width: 760px; margin-left: auto; margin-right: auto; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}
.faq summary {
  font-family: var(--serif);
  font-size: 1.4rem;
  padding: 18px 40px 18px 0;
  cursor: pointer;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 1.4rem;
  color: var(--red);
  transition: transform .2s ease;
}
.faq details[open] summary::after { content: "−"; }
.faq details p {
  color: var(--muted);
  font-size: 14px;
  padding: 0 40px 20px 0;
}

/* ---------- Final CTA ---------- */
.final {
  position: relative;
  text-align: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
}
.rings-final { top: 50%; width: min(620px, 110vw); }
.rings-final::after { box-shadow: 0 0 50px 16px rgba(240,65,90,0.4); }
.final-title {
  position: relative;
  z-index: 2;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  line-height: 1.05;
}
.final .appstore-badge,
.final .cta-micro { position: relative; z-index: 2; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px var(--pad);
  max-width: var(--maxw);
  margin: 0 auto;
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.footer-nav { display: flex; gap: 26px; }
.footer-nav a {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--muted);
  transition: color .2s ease;
}
.footer-nav a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
}
.footer-family, .footer-copy {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--muted-2);
}
.footer-family a { color: var(--muted); transition: color .2s ease; }
.footer-family a:hover { color: var(--red); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .steps,
  .feature-grid,
  .usecase-grid,
  .price-grid { grid-template-columns: 1fr; }
  .notify-row { flex-direction: column; }
  .notify button { width: 100%; }
  .footer-top, .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- Legal pages ---------- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(48px, 9vw, 96px) var(--pad);
}
.legal a.back {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
}
.legal h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  margin: 1.4rem 0 0.4rem;
}
.legal .updated {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted-2);
  margin-bottom: 2.4rem;
}
.legal h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.6rem;
  margin: 2.2rem 0 0.6rem;
}
.legal p, .legal li {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}
.legal ul { margin: 0.4rem 0 0.4rem 1.2rem; }
.legal li { margin: 0.3rem 0; }
.legal a:not(.back) { color: var(--text); border-bottom: 1px solid var(--red); }
.legal strong { color: var(--text); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rings span { animation: none; opacity: 0; }
  .appstore-badge:hover { transform: none; }
  * { transition: none !important; }
}
