/* ─────────────────────────────────────────────────────────────
   TinyAtelier — Field Notes
   Shared editorial styles for /journal/* long-form articles.
   Component blocks below are designed to be copy-pasted into
   future Field Notes articles. Add new components here, not
   inline in article pages.
   ───────────────────────────────────────────────────────────── */

/* ── design tokens ─────────────────────────────────── */
:root {
  /* surfaces — warm cream throughout, no dark backgrounds */
  --bg:           #FFFBF5;
  --bg-deeper:    #F5F0E8;

  /* ink */
  --ink:          #2A2018;
  --ink-body:     #5A4A3D;
  --ink-muted:    #9B8975;
  --ink-faint:    #D4C8B5;

  /* accents — scarce. terracotta is the only accent on this surface */
  --terracotta:        #C4652A;
  --terracotta-deep:   #A85420;

  /* typography */
  --display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --body:    'DM Sans', -apple-system, system-ui, sans-serif;

  /* reading column */
  --measure: 36rem;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink-body);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

::selection {
  background: var(--terracotta);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}

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

/* ── SiteNav — magazine masthead ─────────────────── */
.site-nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.8rem 3rem;
  border-bottom: 1px solid var(--ink-faint);
}

.site-nav .brand {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.6rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.005em;
}

.site-nav nav {
  display: flex;
  gap: 2.2rem;
}

.site-nav nav a {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink-body);
  text-decoration: none;
  transition: color 0.3s ease;
  padding-bottom: 2px;
}

.site-nav nav a:hover,
.site-nav nav a.active {
  color: var(--terracotta);
}

/* ── main ─────────────────────────────────────────── */
main {
  padding: 5rem 2rem 4rem;
}

article {
  max-width: 920px;
  margin: 0 auto;
}

/* ── ArticleHeader ───────────────────────────────── */
.article-header {
  text-align: center;
  margin-bottom: 4rem;
}

.eyebrow {
  font-family: var(--body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 2rem;
}

.article-title {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0 auto 1.2rem;
  max-width: 22ch;
}

.article-subtitle {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.15rem, 2.3vw, 1.55rem);
  line-height: 1.35;
  color: var(--ink-muted);
  margin: 0 auto 2rem;
  max-width: 32ch;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.article-meta .sep {
  color: var(--terracotta);
  font-family: var(--display);
  font-style: italic;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
  position: relative;
  top: -1px;
}

/* ── HeroFigure ──────────────────────────────────── */
.hero {
  margin: 0 auto 4rem;
}

.hero .frame {
  aspect-ratio: 16 / 10;
  background: var(--bg-deeper);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border: 1px solid var(--ink-faint);
  overflow: hidden;
}

.hero .frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero .frame .label {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.1rem;
  color: var(--ink-muted);
  text-align: center;
  max-width: 55%;
  line-height: 1.4;
}

.hero .frame .meta {
  font-family: var(--body);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.hero figcaption {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 0.98rem;
  color: var(--ink-muted);
  text-align: center;
  margin: 1.2rem auto 0;
  max-width: 32rem;
  line-height: 1.5;
}

/* ── article body — Lead, paragraphs, links, lists ── */
.body {
  max-width: var(--measure);
  margin: 0 auto;
  font-size: 17.5px;
  line-height: 1.78;
  color: var(--ink-body);
}

.body p {
  margin-bottom: 1.4em;
}

.body p.lead {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.5rem;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 2rem;
  text-align: center;
}

.body strong { color: var(--ink); font-weight: 600; }
.body em { font-style: italic; }

.body a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--terracotta);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-thickness 0.2s ease;
}

.body a:hover {
  text-decoration-thickness: 2px;
}

.body ol, .body ul {
  margin: 0 0 1.6em 1.5em;
  padding-left: 0.6rem;
}

.body li {
  margin-bottom: 0.65em;
  padding-left: 0.4em;
}

.body ol li::marker {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  color: var(--terracotta);
}

.body ul li::marker {
  color: var(--terracotta);
}

/* ── body H2 — quiet, italic, whitespace-led ────── */
.body h2 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.75rem, 3.5vw, 2.3rem);
  line-height: 1.2;
  color: var(--ink);
  margin: 4rem 0 1.6rem;
  letter-spacing: -0.008em;
}

/* ── StepHeading ─────────────────────────────────── */
.step {
  margin-top: 3rem;
  margin-bottom: 1.2rem;
}

.step .step-num {
  display: block;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.55rem;
}

.step h3 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.65rem;
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.step h3 .duration {
  color: var(--ink-muted);
}

/* ── PullQuote ───────────────────────────────────── */
.pull-quote {
  margin: 3.5rem 0;
  padding-left: 1.8rem;
  border-left: 1px solid var(--terracotta);
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: -0.005em;
}

/* ── Callout ────────────────────────────────────── */
.callout {
  margin: 2.2rem 0;
  padding: 1.4rem 1.6rem;
  background: var(--bg-deeper);
  border-left: 2px solid var(--terracotta);
  border-radius: 0 4px 4px 0;
  font-size: 0.97rem;
  line-height: 1.65;
  color: var(--ink-body);
}

.callout strong {
  font-family: var(--body);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--terracotta);
  display: block;
  margin-bottom: 0.4em;
}

/* ── KidQuote — wall-label inset ─────────────────── */
.kid-quote {
  margin: 3.2rem 0;
  padding: 2.4rem 0;
  text-align: center;
  border-top: 1px solid var(--terracotta);
  border-bottom: 1px solid var(--terracotta);
}

.kid-quote .text {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.55rem, 3.5vw, 2.05rem);
  line-height: 1.35;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.kid-quote .attr {
  margin-top: 1rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

/* ── SectionBreak — three terracotta asterisks ──── */
.break {
  margin: 3.5rem 0;
  text-align: center;
  color: var(--terracotta);
  font-family: var(--display);
  font-style: italic;
  font-size: 1.4rem;
  letter-spacing: 0.6em;
  padding-left: 0.6em;
  line-height: 1;
}

/* ── InlineFigure ────────────────────────────────── */
.inline-figure {
  margin: 2.6rem 0;
}

.inline-figure .frame {
  aspect-ratio: 4 / 3;
  background: var(--bg-deeper);
  border: 1px solid var(--ink-faint);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  overflow: hidden;
}

.inline-figure .frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Composite variant: two phone screenshots side by side on a cream-deeper wall */
.inline-figure .frame.composite {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.5rem;
}

.inline-figure .frame.composite img {
  width: auto;
  height: 100%;
  max-width: 45%;
  object-fit: contain;
  border-radius: 22px;
}

.inline-figure .frame .label {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 0.98rem;
  color: var(--ink-muted);
  text-align: center;
  max-width: 75%;
  padding: 0 1rem;
  line-height: 1.4;
}

.inline-figure .frame .meta {
  font-family: var(--body);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.inline-figure figcaption {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 0.9rem;
  color: var(--ink-muted);
  text-align: center;
  margin-top: 0.9rem;
}

/* ── CTACard ─────────────────────────────────────── */
.cta {
  margin: 4.5rem auto 3rem;
  max-width: 34rem;
  padding: 2.6rem 2.2rem;
  background: var(--bg-deeper);
  border-radius: 4px;
  text-align: center;
}

.cta .eyebrow {
  margin-bottom: 1rem;
}

.cta-title {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.5rem, 3vw, 1.95rem);
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 1rem;
  max-width: 18ch;
  margin-left: auto;
  margin-right: auto;
}

.cta-body {
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--ink-body);
  margin: 0 auto 1.6rem;
  max-width: 26em;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--terracotta);
  color: var(--bg);
  padding: 0.9rem 1.7rem;
  font-family: var(--body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.cta-button:hover {
  background: var(--terracotta-deep);
}

.cta-button .arrow {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0;
}

.cta-subtext {
  margin-top: 1rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

/* ── ShareRow — quiet text links between CTA and byline ── */
.share-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 2.5rem auto 0;
  max-width: var(--measure);
}

.share-row a,
.share-row button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-body);
  text-decoration: none;
  transition: color 0.3s ease;
}

.share-row a:hover,
.share-row button:hover {
  color: var(--terracotta);
}

/* ── Byline ──────────────────────────────────────── */
.byline {
  max-width: var(--measure);
  margin: 4rem auto 0;
  padding-top: 2.5rem;
  border-top: 1px solid var(--ink-faint);
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink-body);
}

.byline strong {
  font-weight: 400;
  color: var(--ink);
  font-style: italic;
}

/* ── SiteFooter ──────────────────────────────────── */
footer {
  padding: 4rem 2rem 3rem;
  text-align: center;
  border-top: 1px solid var(--ink-faint);
  margin-top: 5rem;
}

footer .footer-brand {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.7rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

footer .footer-tag {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 0.98rem;
  color: var(--ink-muted);
  margin-bottom: 1.8rem;
}

footer .footer-links {
  display: flex;
  gap: 1.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

footer .footer-links a {
  font-family: var(--body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--ink-body);
  text-decoration: none;
  transition: color 0.3s ease;
}

footer .footer-links a:hover {
  color: var(--terracotta);
}

footer .copyright {
  margin-top: 1.6rem;
  font-family: var(--body);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--ink-muted);
}

/* ── responsive ──────────────────────────────────── */
@media (max-width: 720px) {
  main { padding: 3rem 1.5rem 3rem; }
  .site-nav { padding: 1.4rem 1.5rem; }
  .site-nav .brand { font-size: 1.3rem; }
  .site-nav nav { gap: 1.3rem; }
  .site-nav nav a { font-size: 11px; }
  .article-header { margin-bottom: 3rem; }
  .hero { margin-bottom: 3rem; }
  .body { font-size: 16.5px; }
  .body p.lead { font-size: 1.3rem; }
  .body h2 { margin-top: 3rem; }
  .step h3 { font-size: 1.45rem; }
  .cta { margin: 3.5rem auto 2rem; padding: 2.2rem 1.6rem; }
  .share-row { gap: 1.4rem; }
  footer { padding: 3rem 1.5rem 2.4rem; margin-top: 4rem; }
}

@media (max-width: 420px) {
  .site-nav { padding: 1.2rem 1rem; }
  .site-nav .brand { font-size: 1.2rem; }
  .article-meta { gap: 0.5rem; font-size: 10px; }
}

/* ── 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;
  }
}
