/* Pocket Quotes: warm, homey look. Cream paper, terracotta, sage, a soft serif and a handwritten touch. */
:root {
  --paper: #FBF5EC;
  --paper-2: #F4EADC;
  --card: #FFFDF8;
  --ink: #3B2E25;
  --ink-soft: #6B594B;
  --line: rgba(59, 46, 37, .14);
  --clay: #A9542F;
  --clay-dark: #8C4324;
  --clay-ink: #FFFFFF;
  --clay-soft: #F4DCCB;
  --sage: #6F8869;
  --sage-soft: #E4EBDC;
  --butter: #F7E5B8;
  --blush: #F4D9CE;
  --sky: #DCE8EE;
  --shadow: 0 18px 40px -22px rgba(74, 48, 30, .45);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Nunito', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --hand: 'Caveat', 'Bradley Hand', 'Segoe Print', cursive;
  --card-ink: #3B2E25;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.6 var(--body); overflow-x: hidden;
}
/* a faint paper grain over everything */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .35 0 0 0 0 .25 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; }
a { color: var(--clay-dark); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; margin: 0; color: var(--ink); font-optical-sizing: auto; }
h1 { font-size: clamp(40px, 6.4vw, 72px); line-height: 1.02; }
h2 { font-size: clamp(30px, 4.2vw, 44px); line-height: 1.1; }
h3 { font-size: 22px; line-height: 1.2; }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--clay); }
p { margin: 0; }
.wrap { max-width: 1140px; margin: 0 auto; padding-inline: 24px; }
@media (max-width: 520px) { .wrap { padding-inline: 16px; } }
.hand { font-family: var(--hand); }
.muted { color: var(--ink-soft); }
.small { font-size: 14px; }

/* ---------- header ---------- */
.site-head { position: relative; z-index: 5; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 600 23px/1 var(--serif); }
.logo svg { flex: none; }
.nav { display: flex; align-items: center; gap: 26px; font-weight: 700; font-size: 16px; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; }
.nav a:not(.btn):hover { color: var(--clay); }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 800 17px/1 var(--body); text-decoration: none; cursor: pointer;
  padding: 15px 26px; min-height: 50px; border-radius: 999px;
  background: var(--clay); color: var(--clay-ink); border: 2px solid var(--clay);
  box-shadow: 0 6px 0 -1px var(--clay-dark); transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { background: var(--clay-dark); border-color: var(--clay-dark); }
.btn:active { transform: translateY(3px); box-shadow: 0 3px 0 -1px var(--clay-dark); }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--ink); box-shadow: 0 6px 0 -1px rgba(59,46,37,.25); }
.btn.ghost:hover { background: var(--paper-2); }
.btn.small { font-size: 15px; padding: 10px 18px; min-height: 42px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.link-btn { background: none; border: 0; padding: 4px 0; font: 700 15px/1.3 var(--body); color: var(--clay-dark); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
:focus-visible { outline: 3px solid var(--sage); outline-offset: 3px; border-radius: 6px; }

.pill { display: inline-block; background: var(--butter); color: var(--ink); padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 800; letter-spacing: .02em; }
.practice { background: #FFF1C9; color: #5E4400; border: 1px dashed #C9A23A; border-radius: 12px; padding: 8px 14px; font-size: 14px; font-weight: 700; }

/* ---------- postcards ---------- */
.pcard { position: relative; aspect-ratio: 10 / 7; border-radius: 10px; overflow: hidden; background: #FBF7F0; box-shadow: var(--shadow), 0 0 0 1px rgba(59,46,37,.08); container-type: inline-size; }
.pcard > img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pcard .words { position: absolute; left: 6%; top: 6.5%; max-width: 58%; display: flex; flex-direction: column; gap: 1.2cqw; color: var(--card-ink); }
.pcard .for { font: 700 6.6cqw/1 var(--hand); }
.pcard .quote { font: 700 5.2cqw/1.14 var(--serif); letter-spacing: -0.01em; text-wrap: balance; }
.pcard.ft-hand .quote { font: 700 6.4cqw/1.04 var(--hand); letter-spacing: 0; }
.pcard.ft-modern .quote { font: 800 4.7cqw/1.18 var(--body); letter-spacing: -0.005em; }
.pcard.is-note .words { max-width: 62%; }
.pcard.is-note .quote { font: 600 5.4cqw/1.12 var(--hand); letter-spacing: 0; }
.pcard.no-words .quote { display: none; }
.pback { position: relative; aspect-ratio: 10 / 7; border-radius: 10px; overflow: hidden; background: #FFFBF3; box-shadow: var(--shadow), 0 0 0 1px rgba(59,46,37,.08); container-type: inline-size; }
.pback::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 13.6cqw, rgba(59,46,37,.09) 13.6cqw 13.9cqw); }
.pback .note { position: absolute; left: 7%; top: 9%; right: 33%; font: 500 5.6cqw/1.3 var(--hand); color: var(--card-ink); display: flex; flex-direction: column; gap: .6cqw; overflow-wrap: anywhere; }
.pback.sig-only .note { top: 30%; font-size: 7cqw; gap: 2cqw; }
.pback .stamp { position: absolute; right: 6%; top: 8%; width: 17%; aspect-ratio: 3 / 4; padding: 1cqw; background: #FFFDF8; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.pback .stamp img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pback .divider { position: absolute; left: 66%; top: 10%; bottom: 10%; border-left: 2px solid rgba(59,46,37,.12); }
.tape { position: absolute; top: -10px; left: 50%; width: 84px; height: 24px; margin-left: -42px; background: rgba(247, 229, 184, .85); transform: rotate(-3deg); box-shadow: 0 1px 2px rgba(0,0,0,.08); z-index: 2; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: 15px; }
.field .opt { font-weight: 600; color: var(--ink-soft); }
input[type=text], input[type=email], input[type=datetime-local], textarea {
  font: 500 17px/1.4 var(--body); color: var(--ink); background: var(--card);
  border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; width: 100%;
}
textarea { resize: vertical; min-height: 84px; }
input:focus, textarea:focus { outline: none; border-color: var(--clay); box-shadow: 0 0 0 4px var(--clay-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 700 15px/1 var(--body); color: var(--ink); background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: 10px 14px; min-height: 42px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.chip:hover { border-color: var(--clay); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.panel { background: var(--card); border-radius: 22px; padding: 24px; box-shadow: 0 1px 0 rgba(59,46,37,.06), 0 14px 36px -26px rgba(74,48,30,.5); }
@media (max-width: 520px) { .panel { padding: 18px; border-radius: 18px; } }

/* ---------- footer ---------- */
.site-foot { margin-top: 80px; background: var(--paper-2); border-top: 1px solid var(--line); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center; padding-block: 28px; font-size: 14px; color: var(--ink-soft); }
.site-foot .hand { font-size: 24px; color: var(--ink); }

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