/* MindfulBlock landing — palette mirrors ios-app Assets.xcassets/Colors */
:root {
  --accent: #ff6b4a;
  --accent-strong: #f05532;
  --accent-soft: rgba(255, 107, 74, 0.12);
  --bg: #ebe4db;
  --card: #ffffff;
  --card-raised: #ffffff;
  --text: #000000;
  --text-secondary: #4a4a4a;
  --text-tertiary: #8b8680;
  --on-accent: #fff6f0;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 24px 50px rgba(0, 0, 0, 0.12);
  --radius: 14px;
  --radius-panel: 32px;

  /* Type scale: four sizes, two weights (400, 700). Hierarchy below the
     headings comes from weight and colour, not from extra sizes. */
  --text-display: clamp(2.75rem, 6vw, 4.5rem);
  --text-title: clamp(2rem, 4vw, 2.75rem);
  --text-body: 1.125rem;
  --text-small: 0.875rem;
  --weight-bold: 700;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent-soft: rgba(255, 107, 74, 0.16);
    --bg: #0a0a0a;
    --card: #141414;
    --card-raised: #1f1f1f;
    --text: #f2f2f2;
    --text-secondary: #b0b0b0;
    --text-tertiary: #a19c96;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 50px rgba(0, 0, 0, 0.6);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

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

a {
  color: var(--accent);
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header — a floating pill that stays put while scrolling */
.site-header {
  position: sticky;
  top: 12px;
  z-index: 10;
  padding: 0 12px;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
  max-width: 1052px;
  padding: 0 10px 0 16px;
  background: color-mix(in srgb, var(--card) 82%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-small);
}

.nav-links a:hover {
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  font-weight: var(--weight-bold);
  padding: 10px 22px;
  border-radius: 999px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.btn-small {
  padding: 8px 18px;
  font-size: var(--text-small);
}

/* App Store badge */
.appstore-badge {
  display: inline-block;
  line-height: 0;
  transition: transform 0.15s ease;
}

.appstore-badge:hover {
  transform: translateY(-1px);
}

.appstore-badge img {
  height: 52px;
  width: auto;
}

/* Shared type */
h1,
h2,
h3,
strong {
  font-weight: var(--weight-bold);
}

h1,
h2 {
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h2 {
  font-size: var(--text-title);
  line-height: 1.1;
  max-width: 18ch;
}

h3 {
  font-size: var(--text-body);
  letter-spacing: -0.01em;
}

.lede,
.aside {
  margin-top: 20px;
  color: var(--text-secondary);
  max-width: 42ch;
}

.center,
.closing h2 {
  text-align: center;
  margin-inline: auto;
}

/* Hero */
.hero {
  padding: 72px 0 96px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: var(--text-display);
  line-height: 1.02;
}

/* clears the tilted chip */
.hero .lede {
  margin-top: 28px;
}

/* Tilted coral chip, echoing the blocks in the app icon */
.chip {
  display: inline-block;
  margin-top: 10px;
  padding: 0 0.22em 0.06em;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 0.18em;
  transform: rotate(-2.5deg);
  box-shadow: 0 10px 24px rgba(255, 107, 74, 0.3);
}

.cta-row {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cta-note {
  color: var(--text-secondary);
  font-size: var(--text-small);
}

.hero-visual {
  position: relative;
  justify-self: center;
  padding: 24px 0;
}

.hero-block {
  position: absolute;
  inset: 12% -14% 6% -14%;
  background: var(--accent);
  border-radius: 40px;
  transform: rotate(-6deg);
}

.hero-phone {
  position: relative;
  width: min(290px, 64vw);
  height: auto;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.25));
  transform: rotate(3deg);
}

.float {
  position: absolute;
  background: var(--card-raised);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  font-size: var(--text-small);
  animation: bob 6s ease-in-out infinite;
}

.float-timer {
  right: -16%;
  top: 14%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
  animation-delay: -3s;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* The real Instagram app icon (white glyph on its radial gradient) */
.shield-icon {
  display: block;
  border-radius: 11px;
  background:
    url("../assets/instagram-glyph.svg") center / 64% no-repeat,
    radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Sections: panels are rounded cards inset from the page edge */
.panel,
.plain {
  padding: 112px 0;
}

.panel {
  margin: 0 12px;
  background: var(--card);
  border-radius: var(--radius-panel);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.split.reverse > :first-child {
  order: 0;
}

.section-head {
  margin-bottom: 40px;
}

/* Numbered steps */
.steps {
  list-style: none;
  counter-reset: step;
  margin-top: 32px;
  display: grid;
  gap: 20px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 52px;
  color: var(--text-secondary);
  max-width: 44ch;
}

.steps li strong {
  display: block;
  color: var(--text);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: var(--weight-bold);
  transform: rotate(-6deg);
}

/* Checklist */
.checks {
  list-style: none;
  margin-top: 28px;
  display: grid;
  gap: 14px;
}

.checks li {
  position: relative;
  padding-left: 34px;
  color: var(--text-secondary);
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff6f0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 15px no-repeat;
}

/* UI mockups, drawn in HTML so they stay crisp and themeable */
.mock-stage {
  position: relative;
  display: grid;
  gap: 18px;
  justify-items: center;
}

.mock-card {
  width: 100%;
  max-width: 340px;
  background: var(--bg);
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow);
}

.mock-card.shield {
  text-align: center;
  transform: rotate(-2deg) translateX(-24px);
}

.mock-card.shield .shield-icon {
  width: 56px;
  height: 56px;
  border-radius: 15px;
  margin: 0 auto 14px;
}

.mock-card p {
  margin: 6px 0 18px;
  color: var(--text-secondary);
  font-size: var(--text-small);
  line-height: 1.45;
}

.mock-btn {
  display: block;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: var(--weight-bold);
  text-align: center;
  padding: 12px;
  border-radius: 999px;
}

.mock-link {
  display: block;
  margin-top: 10px;
  color: var(--text-tertiary);
  font-size: var(--text-small);
}

.mock-card.note {
  background: var(--card-raised);
  border: 1px solid var(--border);
  transform: rotate(1.5deg) translateX(28px);
  margin-top: -40px;
}

.mock-card .note-text {
  font-size: var(--text-body);
  color: var(--text);
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.durations {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.durations span {
  min-width: 40px;
  padding: 6px 0;
  text-align: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: var(--text-small);
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
}

.durations span.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.durations em {
  font-style: normal;
  color: var(--text-tertiary);
  font-size: var(--text-small);
  margin-left: 2px;
}

/* Journal entries mock, styled like the app's journal list */
.journal-stage {
  gap: 12px;
}

.entry {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.entry:nth-child(2) {
  transform: translateX(24px);
}

.entry-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: var(--weight-bold);
}

.entry-head time {
  margin-left: auto;
  color: var(--text-tertiary);
  font-size: var(--text-small);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.entry p {
  margin-top: 6px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.badge {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--accent) center / 14px no-repeat;
}

.badge.open {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4' y='11' width='14' height='10' rx='2' fill='%23fff6f0'/%3E%3Cpath d='M15 11V7a4 4 0 0 1 7-2.5' fill='none' stroke='%23fff6f0' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.badge.stay {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='none' stroke='%23fff6f0' stroke-width='2.5'/%3E%3Cpath d='M9 15l6-6' stroke='%23fff6f0' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.badge.plus,
.plus-tag {
  width: auto;
  height: auto;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--on-accent);
  background: var(--accent);
  font-size: 0.72rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.02em;
}

.plus-tag {
  vertical-align: middle;
  margin-left: 6px;
}

.entry.insight {
  border: 1.5px solid var(--accent);
  transform: rotate(-1deg);
}

/* Feature cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--bg);
  border-radius: 24px;
  padding: 28px;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--on-accent);
  margin-bottom: 18px;
  transform: rotate(-6deg);
}

.card p {
  margin-top: 6px;
  color: var(--text-secondary);
}

/* Privacy */
.privacy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: end;
}

.privacy .checks {
  margin-top: 0;
}

/* FAQ */
.narrow {
  max-width: 760px;
}

.faq {
  margin-top: 40px;
  display: grid;
  gap: 10px;
}

.faq details {
  background: var(--bg);
  border-radius: 18px;
  padding: 0 22px;
}

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 36px 18px 0;
  font-weight: var(--weight-bold);
  position: relative;
}

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

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  translate: 0 -50%;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  transition: rotate 0.2s ease;
}

.faq details[open] summary::after {
  rotate: 45deg;
}

.faq details p {
  padding-bottom: 20px;
  color: var(--text-secondary);
  max-width: 60ch;
}

/* Closing CTA */
.closing {
  padding: 120px 0 128px;
  text-align: center;
}

.closing .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.closing-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  transform: rotate(-6deg);
  margin-bottom: 28px;
}

.closing p {
  margin: 12px 0 28px;
  color: var(--text-secondary);
}

/* Reveal on scroll — only when JS has marked the page */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

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

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .float,
  .caret {
    animation: none;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  color: var(--text-tertiary);
  font-size: var(--text-small);
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-links {
  display: flex;
  gap: 20px;
}

/* Legal pages (privacy.html, terms.html) */
main {
  flex: 1;
}

.legal {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.legal h1 {
  font-size: var(--text-title);
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 8px;
}

.legal .updated {
  color: var(--text-tertiary);
  margin-bottom: 40px;
}

.legal h2 {
  font-size: var(--text-body);
  letter-spacing: -0.01em;
  line-height: 1.3;
  max-width: none;
  margin: 36px 0 8px;
}

.legal p,
.legal li {
  color: var(--text-secondary);
}

.legal ul {
  padding-left: 22px;
}

/* Responsive */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding: 48px 0 72px;
  }

  .hero .container,
  .split,
  .privacy {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-copy {
    text-align: center;
  }

  .hero .lede {
    margin-left: auto;
    margin-right: auto;
  }

  .cta-row {
    justify-content: center;
  }

  .hero-phone {
    width: min(230px, 56vw);
  }

  .float-timer {
    right: -14%;
  }

  /* text first, mockup second, on every stacked section */
  .split.reverse > .mock-stage {
    order: 1;
  }

  .panel,
  .plain {
    padding: 80px 0;
  }

  .cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .site-header .container {
    height: 54px;
  }

  .panel {
    margin: 0 8px;
    border-radius: 26px;
  }

  .float-timer {
    right: -10%;
  }

  .mock-card.shield {
    transform: rotate(-2deg) translateX(-8px);
  }

  .mock-card.note {
    transform: rotate(1.5deg) translateX(8px);
  }

  .entry:nth-child(2) {
    transform: translateX(10px);
  }

  .durations span {
    min-width: 0;
    flex: 1;
  }
}
