/* Journal Lock — shared design system
   Storybook garden: deep forest green ink on butter-cream paper,
   Fraunces display serif (echoes the App Store screenshot captions), Karla body. */

:root {
  --green-deep: #2c6e49;
  --green-dark: #1e4d33;
  --green-ink: #17402a;
  --green-mid: #429155;
  --green-soft: #6fae83;
  --pale: #d9ecc2;
  --pale-dim: #b7d6a4;
  --cream: #f6f2df;
  --cream-warm: #efe9c8;
  --cream-card: #fbf9ef;
  --ink: #1c3527;
  --ink-soft: #47614f;
  --flame: #e8863c;
  --radius: 20px;
  --shadow-soft: 0 2px 24px rgba(23, 64, 42, 0.09);
  --shadow-lift: 0 12px 40px rgba(23, 64, 42, 0.16);
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Karla", -apple-system, "Segoe UI", sans-serif;
  --max: 1160px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  font-size: 1.0625rem;
  overflow-x: hidden;
}

/* paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--pale); color: var(--green-ink); }

:focus-visible {
  outline: 3px solid var(--flame);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--green-deep);
  color: var(--cream);
  padding: 0.7rem 1.2rem;
  border-radius: 0 0 12px 0;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
  color: var(--cream);
}

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

a { color: var(--green-deep); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--green-mid); }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--green-ink);
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(44, 110, 73, 0.14);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--green-ink);
  text-decoration: none;
}
.nav-logo img { width: 34px; height: 34px; border-radius: 9px; }
.nav-links {
  display: flex;
  gap: 1.4rem;
  margin-left: auto;
  align-items: center;
}
.nav-links a:not(.nav-cta) {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.6rem 0.2rem;
}
.nav-links a:hover { color: var(--green-deep); }
.nav-cta {
  text-decoration: none;
  font-size: 0.95rem;
  background: var(--green-deep);
  color: var(--cream) !important;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  font-weight: 700 !important;
  transition: background 0.25s ease, transform 0.25s ease;
}
.nav-cta:hover { background: var(--green-mid); transform: translateY(-1px); }
@media (max-width: 720px) {
  .nav-links { gap: 0.9rem; }
  .nav-links a:not(.nav-cta):not(.nav-guides) { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 4.5rem 0 3.5rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  margin: 1.2rem 0 1.3rem;
}
.hero h1 em {
  font-style: italic;
  color: var(--green-deep);
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--pale);
  color: var(--green-ink);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
}
.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 34rem;
  margin-bottom: 2rem;
}
.hero-video {
  padding: 1.5rem 0;
}
.hero-video video {
  width: 100%;
  max-width: 380px;
  max-height: 68vh;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 24px 48px rgba(23, 64, 42, 0.22));
}
.hero-meta {
  margin-top: 1.4rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}
.hero-meta span::before { content: "✦ "; color: var(--flame); }
.store-badge img { height: 56px; width: auto; display: block; }
.store-badge { display: inline-block; transition: transform 0.25s ease; }
.store-badge:hover { transform: translateY(-2px) scale(1.02); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-subtitle { margin-inline: auto; }
  .hero-meta { justify-content: center; }
  .store-badge { margin-inline: auto; }
  .hero { padding-top: 3rem; }
}

/* staggered entrance */
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}
.rise { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.rise-2 { animation-delay: 0.12s; }
.rise-3 { animation-delay: 0.24s; }
.rise-4 { animation-delay: 0.36s; }

/* ---------- sections ---------- */
section { padding: 4.5rem 0; }
.section-kicker {
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-mid);
  margin-bottom: 0.6rem;
}
.section-title {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  margin-bottom: 0.8rem;
}
.section-lede {
  color: var(--ink-soft);
  max-width: 44rem;
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
}

/* dark green band */
.band {
  background: var(--green-deep);
  border-radius: calc(var(--radius) * 1.6);
  color: var(--pale);
  position: relative;
  overflow: hidden;
}
.band .section-title, .band h3 { color: var(--cream-warm); }
.band .section-kicker { color: var(--pale-dim); }
.band .section-lede { color: var(--pale-dim); }

/* ---------- how it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.step {
  background: rgba(246, 242, 223, 0.07);
  border: 1px solid rgba(217, 236, 194, 0.22);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem;
}
.step-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 600;
  color: var(--flame);
  line-height: 1;
}
.step h3 { font-size: 1.35rem; margin: 0.8rem 0 0.5rem; }
.step p { color: var(--pale-dim); font-size: 0.98rem; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* ---------- screenshots ---------- */
.shots {
  display: flex;
  gap: 1.4rem;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 1.5rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--green-soft) transparent;
}
.shot {
  flex: 0 0 auto;
  width: min(250px, 68vw);
  scroll-snap-align: center;
}
.shot img {
  width: 100%;
  border-radius: 26px;
  box-shadow: var(--shadow-lift);
  border: 1px solid rgba(44, 110, 73, 0.15);
  transition: transform 0.35s ease;
}
.shot:hover img { transform: translateY(-6px) rotate(-0.5deg); }
.shot figcaption {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--green-deep);
  margin-top: 0.8rem;
}

/* ---------- features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.2rem 2.4rem;
}
.feature {
  border-top: 2px solid rgba(44, 110, 73, 0.28);
  padding-top: 1.2rem;
}
.feature .emoji { font-size: 1.55rem; display: block; }
.feature h3 { font-size: 1.18rem; margin: 0.55rem 0 0.4rem; }
.feature p { color: var(--ink-soft); font-size: 0.96rem; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* ---------- guides ---------- */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.3rem;
}
.guide-card {
  display: block;
  background: var(--cream-card);
  border: 1px solid rgba(44, 110, 73, 0.14);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  text-decoration: none;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
.guide-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--green-soft);
}
.guide-card h3 {
  font-size: 1.22rem;
  margin-bottom: 0.45rem;
}
.guide-card p { color: var(--ink-soft); font-size: 0.95rem; }
.guide-card .go {
  display: inline-block;
  margin-top: 0.8rem;
  font-weight: 700;
  color: var(--green-deep);
  font-size: 0.92rem;
}
@media (max-width: 720px) { .guides-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-list { max-width: 46rem; }
.faq-item {
  border-bottom: 1px solid rgba(44, 110, 73, 0.18);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.15rem 2.2rem 1.15rem 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--green-ink);
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0.3rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-size: 1.5rem;
  color: var(--green-mid);
  transition: transform 0.25s ease;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item .faq-body { padding: 0 0 1.3rem; color: var(--ink-soft); max-width: 42rem; }
.faq-body a { font-weight: 700; }

/* ---------- CTA ---------- */
.cta-panel {
  text-align: center;
  padding: 4rem 1.5rem;
}
.cta-panel img.cta-icon {
  width: 96px;
  border-radius: 24px;
  box-shadow: var(--shadow-lift);
  margin-bottom: 1.4rem;
}
.cta-panel .section-title { margin-bottom: 0.6rem; }
.cta-panel .store-badge { margin-top: 1.6rem; }

/* ---------- footer ---------- */
footer {
  background: var(--green-dark);
  color: var(--pale-dim);
  padding: 3.5rem 0 2.5rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
}
.footer-grid h4 {
  font-family: var(--font-display);
  color: var(--cream-warm);
  font-size: 1rem;
  margin-bottom: 0.9rem;
}
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 0.55rem; }
.footer-grid a {
  color: var(--pale-dim);
  text-decoration: none;
  font-size: 0.93rem;
  display: inline-block;
  padding: 0.2rem 0;
}
.footer-grid a:hover { color: var(--cream-warm); }
.footer-brand p { font-size: 0.93rem; max-width: 18rem; margin-top: 0.7rem; }
.footer-brand img { width: 44px; border-radius: 11px; }
.footer-bottom {
  margin-top: 2.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(217, 236, 194, 0.18);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- guide article pages ---------- */
.crumbs {
  font-size: 0.88rem;
  color: var(--ink-soft);
  padding: 1.4rem 0 0;
}
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--green-deep); }
.crumbs span { margin: 0 0.4rem; color: var(--green-soft); }

.article-head { padding: 1.6rem 0 0.6rem; max-width: 46rem; }
.article-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin-bottom: 1rem; }
.article-head .meta { color: var(--ink-soft); font-size: 0.92rem; }

.prose { max-width: 46rem; padding-bottom: 1rem; }
.prose h2 {
  font-size: 1.65rem;
  margin: 2.6rem 0 0.9rem;
}
.prose h3 { font-size: 1.25rem; margin: 1.9rem 0 0.6rem; }
.prose p { margin-bottom: 1.1rem; }
.prose ul, .prose ol { margin: 0 0 1.2rem 1.4rem; }
.prose li { margin-bottom: 0.5rem; }
.prose strong { color: var(--green-ink); }
.prose blockquote {
  border-left: 3px solid var(--flame);
  padding: 0.4rem 0 0.4rem 1.2rem;
  margin: 1.6rem 0;
  color: var(--ink-soft);
  font-style: italic;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.95rem;
}
.prose th, .prose td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid rgba(44, 110, 73, 0.16);
}
.prose th { font-family: var(--font-display); color: var(--green-ink); }
@media (max-width: 760px) {
  .prose table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: normal;
  }
}

/* callout: how Journal Lock does it */
.jl-callout {
  background: var(--green-deep);
  color: var(--pale);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  margin: 1.8rem 0;
}
.jl-callout h3, .jl-callout h4 {
  font-family: var(--font-display);
  color: var(--cream-warm);
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}
.jl-callout p { color: var(--pale-dim); margin-bottom: 0.7rem; }
.jl-callout a { color: var(--cream-warm); }
.jl-callout .store-badge img { height: 46px; }

/* further reading */
.further {
  max-width: 46rem;
  margin: 2.5rem 0;
}
.further h2 { font-size: 1.5rem; margin-bottom: 1.1rem; }
.further-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .further-grid { grid-template-columns: 1fr; } }

/* small screens */
@media (max-width: 640px) {
  section { padding: 3.2rem 0; }
  .band { border-radius: var(--radius); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
