/* ============================================================
   Daily Metta — Production stylesheet (web)
   ------------------------------------------------------------
   Single source of truth for dailymetta.app. Drop this file at
   the root of the repo alongside index.html / privacy.html /
   terms.html. The fonts/ folder must be a sibling.

   Sections in order:
     1. Webfonts (self-hosted Newsreader + Inter)
     2. Design tokens (colors, type scale, motion)
     3. Brand lockup primitive (.dm-lockup)
     4. Page reset + scroll behavior
     5. Landing page (index.html)
     6. Privacy + terms pages
     7. Responsive
   ============================================================ */

/* ── 1. Webfonts ─────────────────────────────────────────── */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/Newsreader-VariableFont_opsz_wght.ttf") format("truetype-variations"),
       url("fonts/Newsreader-VariableFont_opsz_wght.ttf") format("truetype");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/Newsreader-Italic-VariableFont_opsz_wght.ttf") format("truetype-variations"),
       url("fonts/Newsreader-Italic-VariableFont_opsz_wght.ttf") format("truetype");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/Inter-VariableFont_opsz_wght.ttf") format("truetype-variations"),
       url("fonts/Inter-VariableFont_opsz_wght.ttf") format("truetype");
  font-variation-settings: "opsz" 14;
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/Inter-Italic-VariableFont_opsz_wght.ttf") format("truetype-variations"),
       url("fonts/Inter-Italic-VariableFont_opsz_wght.ttf") format("truetype");
  font-variation-settings: "opsz" 14;
}

/* ── 2. Design tokens ────────────────────────────────────── */
:root {
  /* Pink scale */
  --p1: #d44475; --p2: #d44475; --p3: #e07498; --p4: #eb90b0;
  --p5: #f2aac3; --p6: #f6c2d5; --p7: #fad6e5; --p8: #fce8f1; --p9: #fef3f7;

  /* Accent semantics */
  --accent:        #d44475;
  --accent-mid:    #e07498;
  --accent-soft:   #f6c2d5;
  --accent-label:  #9e3158;

  /* Surfaces (light) */
  --cream:   #f5f2ed;
  --white:   #ffffff;
  --surface: #ede9e3;
  --bg-light: #f5f2ed;
  --s1-light: #ffffff;
  --s2-light: #e8e4de;
  --s3-light: #d8d4cd;

  /* Text (light) */
  --tx:  #2c2c2e;
  --tx2: #52504a;
  --tx3: #706c66;

  --border:        rgba(0, 0, 0, 0.06);
  --border-strong: rgba(0, 0, 0, 0.10);

  /* Fonts — Apple devices fall through to native New York / SF Pro;
     everyone else gets Newsreader / Inter. See @supports below. */
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans:  "Inter", system-ui, "Helvetica Neue", Arial, sans-serif;
}
@supports (font: -apple-system-body) {
  :root {
    --serif: -apple-system-ui-serif, "Newsreader", "Iowan Old Style", Georgia, serif;
    --sans:  -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  }
}

/* ── 3. Brand lockup primitive ───────────────────────────── */
/* Drive every lockup from ONE css variable: --mark (the mark
   diameter in px). Every other dimension is derived.

   Ratios — re-derived May 2026:
     Stacked:    gap 0.150  ·  name cap 0.300  ·  tag gap 0.080  ·  tag cap 0.140
     Horizontal: gap 0.250  ·  name cap 0.600                                    */
.dm-lockup {
  display: inline-flex;
  align-items: center;
  color: var(--tx);
}
.dm-lockup__mark {
  display: block; flex: none;
  width: var(--mark); height: var(--mark);
}
.dm-lockup__name {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  color: inherit;
}
.dm-lockup__tagline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.2;
  color: var(--tx3);
}
.dm-lockup--stacked {
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.dm-lockup--stacked .dm-lockup__name {
  font-size: calc(var(--mark) * 0.4286);
  margin-top: calc(var(--mark) * 0.15);
}
.dm-lockup--stacked .dm-lockup__tagline {
  font-size: calc(var(--mark) * 0.20);
  margin-top: calc(var(--mark) * 0.08);
}
.dm-lockup--horizontal { flex-direction: row; align-items: center; }
.dm-lockup--horizontal .dm-lockup__name {
  font-size: calc(var(--mark) * 0.8571);
  margin-left: calc(var(--mark) * 0.25);
  transform: translateY(0.06em); /* optical centering on caps */
}
.dm-lockup--horizontal .dm-lockup__tagline { display: none; }

/* ── 4. Page reset ───────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--tx);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3 { text-wrap: balance; }
.hero-body, .section-body, .stories-body, .sharing-body,
.practice-step-desc, .summary-body, .trust-desc,
.revisit-time-desc, .imessage-bubble-incoming, .isc-text,
.legal p {
  text-wrap: pretty;
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: .1s } .d2 { transition-delay: .2s }
.d3 { transition-delay: .3s } .d4 { transition-delay: .4s }
.d5 { transition-delay: .5s }
@keyframes breathe { 0%,100% { transform: scale(1) } 50% { transform: scale(1.12) } }
@keyframes fadeUp  { from { opacity: 0; transform: translateY(24px) } to { opacity: 1; transform: translateY(0) } }
@keyframes float   { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-10px) } }

/* ════════════════════════════════════════════════════════
   5. Landing page (index.html)
   ════════════════════════════════════════════════════════ */

/* ─── Top Bar ──────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1rem 1.5rem;
  display: flex; align-items: center;
  background: rgba(246, 194, 213, .90);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(180, 100, 130, .10);
  transition: transform .3s ease;
}
.topbar.hidden { transform: translateY(-100%); }

/* ─── Hero ─────────────────────────────────────────────── */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding: 6rem 2rem 4rem;
  background: var(--accent-soft);
  position: relative; overflow: hidden;
}
.hero-bg-mark {
  position: absolute;
  width: min(70vw, 700px); height: min(70vw, 700px);
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  opacity: .15; animation: breathe 8s ease-in-out infinite;
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 4rem;
  max-width: 840px; width: 100%;
}
.hero-copy { flex: 1; max-width: 520px; }
.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5.5vw, 4.2rem);
  font-weight: 550; letter-spacing: -.03em; line-height: 1.1;
  color: var(--tx); margin-bottom: 1rem;
  opacity: 0; animation: fadeUp .8s ease forwards .2s;
}
.hero-body {
  font-size: 1.05rem; color: var(--tx2); line-height: 1.75;
  margin-bottom: 2.5rem; max-width: 440px;
  opacity: 0; animation: fadeUp .8s ease forwards .55s;
}
.hero-badge { opacity: 0; animation: fadeUp .8s ease forwards .7s; }
.hero-badge a { display: inline-block; transition: transform .2s; }
.hero-badge a:hover { transform: scale(1.04); }
.hero-badge svg { height: 48px; width: auto; }
.hero-scroll {
  position: absolute; bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  opacity: 0; animation: fadeUp .8s ease forwards 1.2s;
  text-align: center;
}
.hero-scroll-text {
  font-size: .7rem; color: var(--tx2);
  text-transform: uppercase; letter-spacing: .1em;
}
.hero-scroll-line {
  width: 1px; height: 24px;
  background: var(--tx2); opacity: .4;
  margin: .5rem auto 0;
}

/* CSS phone — splash mockup in the hero */
.hero-phone-wrap {
  flex-shrink: 0; position: relative; opacity: 0;
  animation: fadeUp .9s ease forwards .5s,
             float 6s ease-in-out infinite 1.5s;
}
.css-phone {
  width: 280px; height: 572px;
  background: #1a1a1a; border-radius: 40px;
  padding: 4px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, .22);
  position: relative; z-index: 2;
}
.css-phone-notch {
  position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 28px;
  background: #1a1a1a; border-radius: 0 0 18px 18px; z-index: 10;
}
.css-phone-screen {
  width: 100%; height: 100%;
  background: var(--cream); border-radius: 36px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}

/* ─── Metta Origin ─────────────────────────────────────── */
.metta-origin {
  padding: 6rem 2rem;
  background: var(--white); text-align: center;
}
.metta-origin-inner { max-width: 640px; margin: 0 auto; }
.metta-origin-text {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 400; font-style: italic;
  line-height: 1.7; color: var(--tx2);
}
.metta-word { font-style: normal; color: var(--accent); font-weight: 550; }

/* ─── The Practice ─────────────────────────────────────── */
.practice { padding: 7rem 2rem; background: var(--cream); }
.practice-inner { max-width: 840px; margin: 0 auto; }
.section-label, .stories-label {
  font-size: .7rem; font-weight: 600;
  color: var(--accent-label);
  text-transform: uppercase; letter-spacing: .1em;
  margin-bottom: 1.25rem;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 550; line-height: 1.3; letter-spacing: -.02em;
  margin-bottom: 1rem; color: var(--tx);
}
.section-body {
  font-size: 1.05rem; line-height: 1.8; color: var(--tx2);
}
.section-body p { margin-bottom: 1rem; }

.practice-steps {
  margin-top: 3rem;
  display: flex; flex-direction: column; align-items: center;
  max-width: 480px; margin-left: auto; margin-right: auto;
}
.practice-step {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 0 1rem;
}
.practice-step-ring {
  display: flex; align-items: flex-end; justify-content: center;
  width: 190px; height: 190px; position: relative;
  margin-bottom: 1.25rem;
}
.practice-step-ring::before {
  content: ''; position: absolute;
  bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 120px;
  background: var(--accent-soft); border-radius: 50%; z-index: 0;
}
.practice-step-ring img {
  position: relative; z-index: 1;
  height: 170px; width: auto; object-fit: contain;
}
.practice-step-name {
  font-family: var(--serif);
  font-size: 1.3rem; font-weight: 550;
  color: var(--tx); letter-spacing: -.02em;
  margin-bottom: .4rem;
}
.practice-step-desc {
  font-size: .95rem; color: var(--tx2); line-height: 1.7;
  max-width: 380px; margin: 0 auto;
}
.practice-connector {
  width: 1.5px; height: 40px;
  background: var(--accent-mid); opacity: .25;
  margin: 1.25rem 0;
}

/* ─── Moments Become Stories ───────────────────────────── */
.stories { padding: 7rem 2rem; background: var(--white); }
.stories-inner { max-width: 840px; margin: 0 auto; }
.stories-body {
  font-size: 1.05rem; color: var(--tx2);
  line-height: 1.8; margin-bottom: 3rem;
}
.entry-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-bottom: 1rem;
}
.entry-card {
  background: var(--cream); border-radius: 12px;
  padding: 1.1rem 1.25rem;
  border: .5px solid rgba(0, 0, 0, .06);
}
.entry-date { font-size: .65rem; color: var(--tx3); margin-bottom: .35rem; }
.entry-text {
  font-family: var(--serif);
  font-size: .9rem; line-height: 1.65; color: var(--tx);
  font-weight: 400; font-style: italic;
}
.becomes { text-align: center; padding: 1rem 0 2.5rem; }
.becomes-pill {
  display: inline-block;
  font-size: .72rem; font-weight: 600; color: var(--tx);
  text-transform: uppercase; letter-spacing: .1em;
  padding: .4rem 1rem;
  background: var(--accent-soft); border: none; border-radius: 20px;
}
.summary-card {
  background: var(--cream); border-radius: 16px;
  padding: 2rem;
  border: .5px solid rgba(0, 0, 0, .06);
}
.summary-label {
  font-size: .65rem; font-weight: 600; color: var(--tx3);
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: .6rem;
}
.summary-headline {
  font-family: var(--serif);
  font-size: 1.2rem; font-weight: 550; line-height: 1.4;
  margin-bottom: .75rem; color: var(--tx);
}
.summary-body {
  font-family: var(--serif);
  font-size: .9rem; line-height: 1.85; color: var(--tx2);
  font-weight: 400; font-style: italic;
}
.timeline-section { margin-top: 6rem; text-align: center; }
.timeline-title {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 400; font-style: italic;
  line-height: 1.7; color: var(--tx2);
  margin-bottom: 1.25rem;
}
.revisit-timeline {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  padding-top: 2rem;
}
.revisit-time-item { text-align: center; }
.revisit-time-icon { margin: 0 auto .6rem; }
.revisit-time-name {
  font-family: var(--serif);
  font-size: 1.3rem; font-weight: 550;
  margin-bottom: .3rem; color: var(--tx);
}
.revisit-time-desc {
  font-size: .95rem; color: var(--tx3); line-height: 1.7;
}

/* ─── Share Your Words ─────────────────────────────────── */
.sharing { padding: 7rem 2rem; background: var(--cream); }
.sharing-inner {
  max-width: 840px; margin: 0 auto;
  display: flex; gap: 4rem; align-items: center;
}
.sharing-copy { flex: 1; }
.sharing-title {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 550; line-height: 1.3; letter-spacing: -.02em;
  margin-bottom: 1.25rem; color: var(--tx);
}
.sharing-body {
  font-size: 1.05rem; line-height: 1.8; color: var(--tx2);
}
.sharing-body p { margin-bottom: 1rem; }
.imessage-frame {
  flex-shrink: 0; width: 320px;
  background: #fff; border-radius: 24px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .1);
  overflow: hidden; position: relative;
}
.imessage-header {
  padding: 12px 16px 10px;
  background: #f8f8f8; border-bottom: 1px solid #eee;
  display: flex; align-items: center; gap: 10px;
}
.imessage-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: var(--tx3);
}
.imessage-name { font-size: 13px; font-weight: 600; color: var(--tx); }
.imessage-body { padding: 16px; }
.imessage-bubble-incoming {
  background: #e9e9eb; border-radius: 18px;
  padding: 10px 14px; font-size: .85rem; color: #1c1c1e;
  line-height: 1.45; max-width: 85%;
  margin-bottom: 12px; border-bottom-left-radius: 4px;
}
.imessage-share-card {
  width: 240px; aspect-ratio: 1;
  background: var(--accent-soft); border-radius: 16px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  padding: 1.25rem 1.25rem 1rem;
  margin-left: auto; border-bottom-right-radius: 4px;
}
.isc-date { font-size: .55rem; color: rgba(0, 0, 0, .35); letter-spacing: .03em; }
.isc-text {
  font-family: var(--serif);
  font-size: .78rem; font-weight: 400; font-style: italic;
  color: rgba(0, 0, 0, .8); text-align: center;
  line-height: 1.5; flex: 1;
  display: flex; align-items: center; padding: 0 .25rem;
}
.isc-lockup .dm-lockup__name { color: rgba(0, 0, 0, .55); }
.imessage-delivered {
  font-size: .6rem; color: #8e8e93;
  text-align: right; margin-top: 6px; padding-right: 4px;
}

/* ─── Trust ────────────────────────────────────────────── */
.trust { padding: 7rem 2rem; background: var(--white); }
.trust-inner { max-width: 840px; margin: 0 auto; }
.trust-title {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 550; line-height: 1.3; letter-spacing: -.02em;
  margin-bottom: 3rem; color: var(--tx);
}
.trust-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem 3rem;
}
.trust-icon { width: 36px; height: 36px; margin-bottom: .75rem; }
.trust-icon svg {
  width: 36px; height: 36px;
  stroke: var(--accent-mid); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.trust-name {
  font-family: var(--serif);
  font-size: 1.3rem; font-weight: 550;
  margin-bottom: .4rem; color: var(--tx);
}
.trust-desc {
  font-size: .95rem; color: var(--tx2); line-height: 1.7;
}

/* ─── Footer ───────────────────────────────────────────── */
.footer {
  padding: 5rem 2rem 2.5rem;
  text-align: center; background: var(--cream);
  border-top: 1px solid rgba(0, 0, 0, .04);
}
.footer-lockup { display: flex; margin: 0 auto 3rem; }
.footer-badge { margin-bottom: 3rem; }
.footer-badge a { display: inline-block; transition: transform .2s; }
.footer-badge a:hover { transform: scale(1.04); }
.footer-badge svg { height: 42px; width: auto; }
.footer-links {
  display: flex; justify-content: center; gap: 1.5rem;
  font-size: .88rem; margin-bottom: 2rem;
}
.footer-links a {
  color: var(--tx3); text-decoration: none;
  transition: color .2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-copyright { font-size: .75rem; color: var(--tx3); }

/* ════════════════════════════════════════════════════════
   6. Privacy + Terms pages
   ════════════════════════════════════════════════════════ */
.legal {
  padding: 3rem 1.5rem 4rem;
  max-width: 640px; margin: 0 auto;
  line-height: 1.8;
}
.legal .back {
  display: inline-block; margin-bottom: 2rem;
  font-size: .85rem; color: var(--accent); text-decoration: none;
}
.legal .back:hover { text-decoration: underline; }
.legal h1 {
  font-family: var(--serif);
  font-size: 2rem; font-weight: 550;
  line-height: 1.3; letter-spacing: -.02em;
  color: var(--tx); margin-bottom: .5rem;
}
.legal h2 {
  font-family: var(--serif);
  font-size: 1.15rem; font-weight: 550;
  line-height: 1.4; color: var(--tx);
  margin-top: 2.5rem; margin-bottom: .75rem;
}
.legal p {
  font-size: .95rem; color: var(--tx2);
  margin-bottom: 1rem;
}
.legal .updated {
  font-size: .85rem; color: var(--tx3);
  margin-bottom: 2.5rem;
}
.legal .contact {
  margin-top: 2.5rem; padding-top: 2rem;
  border-top: 1px solid var(--s2-light);
}
.legal .contact a {
  color: var(--accent); text-decoration: none;
}
.legal .contact a:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════════════
   7. Responsive
   ════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .hero { padding-top: 6rem; }
  .hero-content { flex-direction: column; text-align: center; gap: 2.5rem; }
  .hero-copy { text-align: center; max-width: 100%; }
  .hero-body { margin-left: auto; margin-right: auto; }
  .hero-badge { display: flex; justify-content: center; }
  .practice-steps { max-width: 100%; }
  .practice-step-ring { width: 160px; height: 160px; margin-bottom: 1rem; }
  .practice-step-ring::before { width: 105px; height: 105px; bottom: 6px; }
  .practice-step-ring img { height: 145px; }
  .practice-step-name { font-size: 1.2rem; }
  .practice-step-desc { font-size: .9rem; max-width: 100%; line-height: 1.7; }
  .practice-connector { height: 32px; margin: 1rem 0; }
  .revisit-timeline { grid-template-columns: 1fr; gap: 1.25rem; }
  .entry-grid { grid-template-columns: 1fr; }
  .sharing-inner { flex-direction: column; gap: 2.5rem; }
  .imessage-frame { width: 100%; max-width: 320px; margin: 0 auto; }
  .trust-grid { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 480px) {
  .css-phone { width: 240px; height: 490px; }
  .practice-step-ring { width: 150px; height: 150px; }
  .practice-step-ring::before { width: 96px; height: 96px; bottom: 5px; }
  .practice-step-ring img { height: 135px; }
}
