/* Love Notes — marketing site styles.
   No framework, no build step. Mobile-first; desktop max-width 1100px. */

/* ── Fonts (self-hosted Outfit, OFL) ─────────────────────────────── */
@font-face {
  font-family: "Outfit";
  src: url("/fonts/Outfit-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("/fonts/Outfit-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("/fonts/Outfit-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("/fonts/Outfit-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── Design tokens ───────────────────────────────────────────────── */
:root {
  --coral: #e08e79;
  --coral-end: #e69d8b;
  --coral-pressed: #d97d66;
  /* CTA gradient: darkened vs the app's brand coral so white bold labels sit
     ≥3:1 at EVERY point of the gradient (computed: #c96a52 = 3.71:1,
     #d17257 = 3.36:1 vs white). Decorative coral (phone-mic) keeps brand hues. */
  --cta-grad-a: #c96a52;
  --cta-grad-b: #d17257;
  --cta-grad-active-a: #be6049;
  --cta-grad-active-b: #c96a52;
  /* Darkened coral for small text on light backgrounds (≥ 4.5:1). */
  --coral-ink: #a94e36;
  --love: #ff4f6f;
  --peach-1: #ffe4e1;
  --peach-2: #fee2d5;
  --ink: #2b211e;
  --ink-soft: rgba(43, 33, 30, 0.72);
  /* 0.66 keeps small text ≥ 4.5:1 even on the deepest peach wash. */
  --ink-faint: rgba(43, 33, 30, 0.66);
  --shadow-warm: 200, 180, 170; /* #C8B4AA as rgb triplet */
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.75);
  --radius-card: 24px;
  --container: 1100px;
  --font: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Soft diagonal peach wash + floating blobs, all CSS (no image cost). */
.bg-wash {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42rem 42rem at 88% -8%, rgba(255, 214, 209, 0.55), transparent 62%),
    radial-gradient(36rem 36rem at -12% 32%, rgba(254, 226, 213, 0.6), transparent 60%),
    radial-gradient(44rem 44rem at 96% 88%, rgba(255, 228, 225, 0.5), transparent 62%),
    linear-gradient(135deg, var(--peach-1) 0%, #fff 42%, var(--peach-2) 100%);
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--coral-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--coral-pressed);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

:focus-visible {
  outline: 3px solid var(--coral-ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  color: var(--ink);
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 12px 0;
}

.skip-link:focus {
  left: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 3.5rem 0;
}

.section-title {
  font-size: clamp(1.65rem, 4.5vw, 2.25rem);
  text-align: center;
  margin-bottom: 2rem;
}

/* ── Glass card ──────────────────────────────────────────────────── */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  box-shadow: 0 12px 32px rgba(var(--shadow-warm), 0.28);
}

/* ── Pill buttons ────────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 99px;
  padding: 0.85rem 1.75rem;
  background: linear-gradient(135deg, var(--cta-grad-a) 0%, var(--cta-grad-b) 100%);
  color: #fff;
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(var(--shadow-warm), 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  position: relative;
}

.pill:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(var(--shadow-warm), 0.6);
}

.pill:active {
  background: linear-gradient(135deg, var(--cta-grad-active-a) 0%, var(--cta-grad-active-b) 100%);
  transform: translateY(0);
}

.pill--lg {
  padding: 1rem 2.1rem;
  font-size: 1.125rem;
}

/* "Beta invites open soon" tooltip (shown when TESTFLIGHT_URL is TBD). */
.cta-tip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cta-tip.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Header ──────────────────────────────────────────────────────── */
.site-header {
  padding: 1.1rem 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.wordmark-text {
  display: inline-flex;
  flex-direction: column;
  font-size: 0.82rem;
  line-height: 1.18;
  letter-spacing: 0.01em;
}

/* Mid-sentence uses of the app name — italic reads as a work's title and
   prevents the phrase from garden-pathing into the surrounding sentence. */
.brand-name {
  font-style: italic;
}

.wordmark img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: 0 4px 10px rgba(var(--shadow-warm), 0.5);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-nav a:not(.pill) {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.header-nav a:not(.pill):hover {
  color: var(--ink);
}

.header-nav .pill {
  padding: 0.5rem 1.1rem;
  font-size: 0.95rem;
  box-shadow: 0 6px 14px rgba(var(--shadow-warm), 0.4);
}

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  padding: 2.5rem 0 3.5rem;
}

.hero .container {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.35rem, 7vw, 3.6rem);
}

.hero-sub {
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 34em;
  margin-bottom: 1.75rem;
}

.hero-cta-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
}

.hero-micro {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-faint);
  margin: 0;
}

/* ── Phone mock ──────────────────────────────────────────────────── */
.hero-visual {
  display: flex;
  justify-content: center;
}

.phone {
  width: min(300px, 78vw);
  aspect-ratio: 9 / 19;
  background: #241c19;
  border-radius: 52px;
  padding: 10px;
  box-shadow:
    0 30px 60px rgba(var(--shadow-warm), 0.55),
    0 8px 20px rgba(var(--shadow-warm), 0.4);
  position: relative;
}

@keyframes phone-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.phone {
  animation: phone-float 7s ease-in-out infinite;
}

.phone-screen {
  position: relative;
  height: 100%;
  border-radius: 43px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4.2rem 1.1rem 2.2rem;
  /* The app's real record-screen blob texture (white fallback underneath). */
  background-color: #fff;
  background-image: url("/assets/img/record-bg.webp");
  background-size: cover;
  background-position: center;
}

.phone-island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 86px;
  height: 24px;
  border-radius: 13px;
  background: #241c19;
}

.phone-kicker {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral-ink);
  margin-bottom: 0.7rem;
}

.phone-card {
  padding: 1.1rem 1.15rem;
  text-align: center;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  border-radius: 20px;
}

.phone-mic-wrap {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.phone-mic {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--coral) 0%, var(--coral-end) 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 26px rgba(var(--shadow-warm), 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-mic svg {
  width: 34px;
  height: 34px;
  fill: #fff;
}

.phone-hint {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-faint);
  margin: 0;
}

/* ── How it works ────────────────────────────────────────────────── */
.steps {
  display: grid;
  gap: 1.25rem;
}

.step-card {
  padding: 1.75rem 1.6rem;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  /* step digits are white text → same contrast-safe gradient as CTAs */
  background: linear-gradient(135deg, var(--cta-grad-a) 0%, var(--cta-grad-b) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.step-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.step-card p {
  color: var(--ink-soft);
  margin: 0;
}

/* ── Styles strip ────────────────────────────────────────────────── */
.styles-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 15rem;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 0.5rem 1.25rem 1.5rem;
  margin: 0 -1.25rem;
  scrollbar-width: thin;
}

.style-card {
  scroll-snap-align: center;
  margin: 0;
  padding: 0.6rem;
}

.style-card img {
  width: 100%;
  border-radius: 16px;
}

.style-card figcaption {
  padding: 0.65rem 0.35rem 0.35rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-align: center;
}

/* ── Privacy blurb ───────────────────────────────────────────────── */
.privacy-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.25rem 1.75rem;
  text-align: center;
}

.privacy-card h2 {
  font-size: clamp(1.5rem, 4vw, 1.9rem);
}

.privacy-card p {
  color: var(--ink-soft);
}

/* ── FAQ ─────────────────────────────────────────────────────────── */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  gap: 0.9rem;
}

.faq-item {
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 1.4rem;
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--coral-ink);
  line-height: 1;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 1.4rem 1.2rem;
  margin: 0;
  color: var(--ink-soft);
}

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer {
  padding: 3rem 0 2.5rem;
  text-align: center;
}

.footer-tagline {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding: 0;
  list-style: none;
}

.footer-links a {
  font-weight: 500;
  font-size: 0.95rem;
}

.footer-copy {
  font-size: 0.88rem;
  color: var(--ink-faint);
  margin: 0;
}

/* ── Prose pages (privacy policy) ────────────────────────────────── */
.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.prose h1 {
  font-size: clamp(2rem, 6vw, 2.6rem);
  margin-bottom: 0.3em;
}

.prose .updated {
  color: var(--ink-faint);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}

.prose h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 2.2em 0 0.6em;
}

.prose p,
.prose li {
  color: var(--ink-soft);
}

.prose ul {
  padding-left: 1.3rem;
  margin: 0 0 1em;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

/* ── Join page ───────────────────────────────────────────────────── */
.join-main {
  padding: 2rem 0 4rem;
}

.join-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 2.25rem 1.6rem;
  text-align: center;
}

.join-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral-ink);
  margin-bottom: 0.9rem;
}

.join-code {
  font-size: clamp(1.55rem, 6.5vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  overflow-wrap: break-word;
  margin-bottom: 1.4rem;
}

.join-expiry {
  font-size: 0.92rem;
  color: var(--ink-faint);
  max-width: 30em;
  margin: 1.1rem auto 0;
}

.join-steps {
  max-width: 560px;
  margin: 2.5rem auto 0;
  padding: 0;
  list-style: none;
  counter-reset: join-step;
  display: grid;
  gap: 0.9rem;
  text-align: left;
}

.join-steps li {
  counter-increment: join-step;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 1.3rem;
}

.join-steps li::before {
  content: counter(join-step);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  /* white digits → same contrast-safe gradient as CTAs/.step-num */
  background: linear-gradient(135deg, var(--cta-grad-a) 0%, var(--cta-grad-b) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}

.join-steps .step-body {
  align-self: center;
}

.join-steps .step-body p {
  margin: 0 0 0.6rem;
  font-weight: 500;
}

.join-steps .step-body p:last-child {
  margin-bottom: 0;
}

.join-invalid h1 {
  font-size: clamp(1.9rem, 6vw, 2.6rem);
}

.join-invalid {
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
  padding: 2rem 0;
}

.join-invalid .hero-sub {
  margin-left: auto;
  margin-right: auto;
}

.join-invalid .hero-cta-row {
  align-items: center;
}

[hidden] {
  display: none !important;
}

/* ── Desktop ─────────────────────────────────────────────────────── */
@media (min-width: 720px) {
  .section {
    padding: 4.5rem 0;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .join-card {
    padding: 2.75rem 2.5rem;
  }
}

@media (min-width: 960px) {
  .hero {
    padding: 3.5rem 0 4.5rem;
  }

  .hero .container {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .phone {
    width: 320px;
  }

  .styles-track {
    grid-auto-flow: row;
    grid-template-columns: repeat(5, 1fr);
    grid-auto-columns: unset;
    overflow-x: visible;
    margin: 0;
    padding: 0.5rem 0 1rem;
  }
}

/* ── Reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .phone {
    animation: none;
  }
}
