/* 369 Journal site. Colours come from the app's JournalTheme. */
:root {
  --paper: #faf6f0;
  --paper-deep: #f3e9dc;
  --surface: #fffdf9;
  --ink: #1c1814;
  --muted: #6e6052;
  --clay: #b05933;
  --clay-ink: #974622;
  --gold: #c7943f;
  --blush: #edb8a8;
  --line: rgba(28, 24, 20, 0.1);
  --serif: "New York", ui-serif, "Iowan Old Style", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  --shadow: 0 18px 40px -18px rgba(72, 43, 24, 0.35), 0 2px 6px rgba(72, 43, 24, 0.08);
  --measure: 68ch;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(176, 89, 51, 0.22); color: var(--ink); }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 6px; }
input, textarea { caret-color: var(--clay); }
html { scrollbar-color: rgba(176, 89, 51, 0.45) var(--paper); }

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

a { color: var(--clay-ink); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(var(--measure), 100% - 2.5rem); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 246, 240, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); font-family: var(--serif); font-weight: 700; font-size: 1.15rem; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; gap: 1.25rem; margin-left: auto; font-size: 0.95rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.site-header .btn { padding: 0.55rem 1rem; font-size: 0.9rem; }
@media (max-width: 760px) {
  .nav { display: none; }
  .site-header .btn { margin-left: auto; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.85rem 1.4rem;
  line-height: 1.1;
  transition: background-color 180ms cubic-bezier(0.16, 1, 0.3, 1), transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:hover { background: #3a3029; color: #fff; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn small { display: block; font-weight: 500; font-size: 0.72rem; letter-spacing: 0.01em; }
.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; }
.btn .two-line { display: flex; flex-direction: column; text-align: left; gap: 0.15rem; }
.btn.clay { background: var(--clay-ink); }
.btn.clay:hover { background: #7d3a1c; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid rgba(28, 24, 20, 0.25); }
.btn.ghost:hover { background: rgba(28, 24, 20, 0.05); }

/* Hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { max-width: 13ch; }
.hero h1 em { font-style: normal; color: var(--clay); }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 46ch; margin-top: 1.4rem; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 2rem; }
.cta-note { color: var(--muted); font-size: 0.92rem; margin-top: 0.9rem; }
.phones { position: relative; height: clamp(420px, 52vw, 600px); }
.phone {
  position: absolute;
  width: clamp(190px, 21vw, 260px);
  border-radius: 34px;
  padding: 7px;
  background: #15110e;
  box-shadow: var(--shadow);
}
.phone img { border-radius: 28px; aspect-ratio: 552 / 1200; object-fit: cover; }
.phone.back { left: 4%; top: 8%; transform: rotate(-5deg); opacity: 0.96; }
.phone.front { right: 6%; top: 0; transform: rotate(3deg); }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { max-width: 16ch; }
  .phones { height: 430px; max-width: 420px; margin-inline: auto; width: 100%; }
  .phone { width: 200px; }
}

/* Rhythm: the three daily moments */
.rhythm { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.rhythm .wrap { display: grid; grid-template-columns: repeat(3, 1fr); }
.moment { padding: 2.4rem 1.6rem 2.6rem; }
.moment + .moment { border-left: 1px solid var(--line); }
.moment .num { font-family: var(--serif); font-size: clamp(3.2rem, 6vw, 4.5rem); line-height: 1; color: var(--clay); font-weight: 700; letter-spacing: -0.03em; }
.moment h3 { margin-top: 0.6rem; }
.moment p { color: var(--muted); margin-top: 0.4rem; max-width: 30ch; }
@media (max-width: 760px) {
  .rhythm .wrap { grid-template-columns: 1fr; }
  .moment + .moment { border-left: 0; border-top: 1px solid var(--line); }
  .moment { padding: 1.8rem 0.25rem; display: grid; grid-template-columns: 4.5rem 1fr; column-gap: 1rem; align-items: baseline; }
  .moment .num { grid-row: span 2; font-size: 3rem; }
  .moment h3 { margin-top: 0; }
}

/* Feature rows */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-head { max-width: 40ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--muted); margin-top: 0.9rem; font-size: 1.1rem; }
.feature { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.feature + .feature { margin-top: clamp(3rem, 7vw, 5.5rem); }
.feature.flip .shot { order: 2; }
.feature .shot { justify-self: center; width: min(232px, 70%); }
.feature .shot .phone { position: static; width: 100%; transform: none; }
.feature h3 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); }
.feature p { color: var(--muted); margin-top: 0.8rem; max-width: 46ch; }
.feature ul { margin: 1rem 0 0; padding-left: 1.1rem; color: var(--ink); }
.feature li { margin: 0.35rem 0; }
.feature li::marker { color: var(--clay); }
@media (max-width: 760px) {
  .feature { grid-template-columns: 1fr; }
  .feature.flip .shot { order: 0; }
}

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.98rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-weight: 600; font-size: 0.85rem; color: var(--muted); background: var(--paper); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 600; }
.yes { color: var(--clay-ink); font-weight: 600; }
caption { text-align: left; color: var(--muted); font-size: 0.9rem; padding: 0.8rem 1rem; caption-side: bottom; }

/* Closing band */
.band { background: var(--ink); color: #f6efe6; }
.band .wrap { padding: clamp(3rem, 7vw, 5rem) 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; }
.band h2 { color: #fffaf3; max-width: 18ch; }
.band p { color: rgba(246, 239, 230, 0.75); margin-top: 0.8rem; max-width: 46ch; }
.band .btn { background: #fffaf3; color: var(--ink); }
.band .btn:hover { background: #fff; }

/* Article (Read mode) */
.article-head { padding: clamp(3rem, 7vw, 5rem) 0 2rem; }
.article-head p { color: var(--muted); font-size: 1.15rem; margin-top: 1rem; }
.meta { color: var(--muted); font-size: 0.9rem; margin-top: 1.2rem; }
.prose { padding-bottom: clamp(3rem, 7vw, 5rem); }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 { margin-top: 3rem; font-size: clamp(1.55rem, 2.6vw, 2rem); }
.prose h3 { margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin: 0.4rem 0; }
.prose li::marker { color: var(--clay); font-weight: 600; }
.prose blockquote { margin: 1.5rem 0; padding: 0.2rem 0 0.2rem 1.2rem; border-left: 1px solid var(--clay); font-family: var(--serif); font-size: 1.2rem; color: var(--ink); }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; }
.toc strong { font-family: var(--serif); }
.toc ol { margin: 0.5rem 0 0; }
.aside { background: var(--paper-deep); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.aside p + p { margin-top: 0.6rem; }
.app-plug { display: grid; grid-template-columns: auto 1fr; gap: 1rem 1.2rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.app-plug img { width: 64px; height: 64px; border-radius: 15px; }
.app-plug p { color: var(--muted); margin-top: 0.25rem; }
.app-plug .btn { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 640px) {
  .app-plug { grid-template-columns: auto 1fr auto; }
  .app-plug .btn { grid-column: auto; }
}

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--clay); font-family: var(--sans); font-weight: 400; font-size: 1.4rem; line-height: 1; transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1); }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); margin-top: 0.7rem; max-width: var(--measure); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; color: var(--muted); font-size: 0.92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

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