/* Send Eli — shared styles. Matches the airmail-envelope look from the original build. */
:root {
  --cream: #fbf8f0;        /* matches the homepage ivory */
  --paper: #f7f2e7;
  --paper-2: #fbf8f0;
  --navy: #1f2a4a;
  --red: #c8322f;
  --red-dark: #a82623;
  --teal: #13938a;        /* homepage teal */
  --ink: #3b3b46;
  --muted: #7d7768;
  --line: #ebe2cf;
  --radius: 16px;
  --script: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
  --display: "Baloo 2", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --airmail: repeating-linear-gradient(-45deg,
      var(--red) 0 14px, #fff 14px 20px, var(--navy) 20px 34px, #fff 34px 40px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); }

.airmail-bar { height: 8px; background: var(--airmail); }

.page { max-width: 480px; margin: 0 auto; padding: 0 16px 40px; position: relative; z-index: 1; }

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 0; }
.logo { width: 54px; height: 54px; border-radius: 50%; overflow: hidden; background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.12); border: 2px solid #fff; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 2px solid var(--teal); color: var(--teal); background: rgba(255,255,255,.6);
  padding: 7px 18px; border-radius: 999px; text-decoration: none;
  font-weight: 800; font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
}
.pill:hover { background: #fff; }

/* Hero */
.hero-img { margin: 6px -16px 0; }
.hero-img img { width: 100%; height: auto; }
h1.title {
  font-family: var(--display); font-weight: 800; color: var(--navy);
  font-size: clamp(30px, 8.4vw, 38px); line-height: 1.12; text-align: center; margin: 10px 0 14px;
}
h1.title .accent { color: var(--red); }
.tape {
  display: block; width: fit-content; margin: 0 auto 14px;
  font-family: var(--script); font-weight: 700; font-size: 20px; color: var(--navy);
  background: #e9d5ab; padding: 4px 22px; transform: rotate(-1.5deg);
  clip-path: polygon(2% 0, 98% 4%, 100% 50%, 97% 100%, 3% 96%, 0 50%);
}
.rhyme { font-family: var(--script); font-weight: 700; font-size: 24px; color: #4a4f6a; text-align: center; line-height: 1.45; margin: 0 0 24px; }
.lead { text-align: center; color: #4a4f6a; margin: 0 0 22px; }

/* Envelope card */
.envelope { background: var(--airmail); padding: 10px; border-radius: 6px; box-shadow: 0 20px 44px -26px rgba(25,27,15,.38); }
.envelope-inner {
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  padding: 18px 18px 22px; border-radius: 2px; position: relative;
}
.postmark { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-bottom: 4px; }
.waves { width: 104px; height: 34px; }
.stamp {
  width: 74px; height: 86px; background: #fffaf0; padding: 6px;
  /* Perforated edge only: small half-circles bitten out along the border, solid center */
  -webkit-mask: radial-gradient(circle at center, transparent 2.6px, #000 3px) -4px -4px / 8px 8px,
                linear-gradient(#000 0 0) center / calc(100% - 8px) calc(100% - 8px) no-repeat;
          mask: radial-gradient(circle at center, transparent 2.6px, #000 3px) -4px -4px / 8px 8px,
                linear-gradient(#000 0 0) center / calc(100% - 8px) calc(100% - 8px) no-repeat;
  transform: rotate(3deg); filter: drop-shadow(0 1px 2px rgba(0,0,0,.2));
}
.stamp img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Form */
label.field-label { display: block; font-weight: 800; font-size: 15px; color: #4a4a4a; margin: 14px 0 6px; }
.input, .textarea {
  width: 100%; border: 1.5px solid #ebe2cf; background: #fffefb; border-radius: 14px;
  padding: 11px 16px; font-size: 17px; color: var(--navy); font-family: var(--body);
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { font-family: var(--script); font-weight: 700; color: #a5a3a8; font-size: 22px; }
.input.script { font-family: var(--script); font-weight: 700; font-size: 23px; }
.input:focus, .textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(19,147,138,.16); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--red); }
.textarea {
  resize: none; min-height: 150px; font-family: var(--script); font-weight: 700; font-size: 23px; line-height: 40px; padding-top: 4px;
  background: #fffdf8 repeating-linear-gradient(180deg, transparent 0 39px, #e8dfcc 39px 40px);
  background-attachment: local;
}
.counter { text-align: right; font-size: 13px; color: var(--muted); margin-top: 6px; }
.divider { border: 0; border-top: 1.5px solid #dccdb0; margin: 22px 0 6px; }
.divider.dashed { border-top-style: dashed; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; font-size: 14.5px; color: #555; line-height: 1.45; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--navy); flex: none; }
.error-msg { color: var(--red-dark); font-size: 14px; margin-top: 6px; display: none; }
.error-msg.show { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  border: 0; border-radius: 999px; padding: 15px 22px; cursor: pointer; text-decoration: none;
  font-family: var(--display); font-weight: 800; font-size: 21px;
  background: linear-gradient(180deg, #d6403b, var(--red-dark)); color: #fff;
  box-shadow: 0 4px 0 #8c1d1b, 0 8px 18px rgba(168,38,35,.3);
  transition: transform .1s, box-shadow .1s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #8c1d1b, 0 4px 10px rgba(168,38,35,.3); }
.btn[disabled] { opacity: .7; cursor: wait; }
.btn svg { width: 24px; height: 24px; }
.btn.secondary { background: #fff; color: var(--navy); box-shadow: 0 3px 0 #d8ccb2; border: 2px solid var(--navy); font-size: 18px; }
.btn.small { font-size: 17px; padding: 11px 18px; }
.btn-row { display: grid; gap: 14px; margin-top: 18px; }
.form-status { text-align: center; margin-top: 14px; font-weight: 700; color: var(--red-dark); min-height: 1.2em; }
.turnstile-wrap { margin-top: 16px; display: flex; justify-content: center; min-height: 0; }

/* Content blocks */
.card { background: rgba(255,255,255,.82); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-top: 22px; }
.card h2 { font-family: var(--display); font-weight: 800; color: var(--navy); font-size: 24px; margin: 0 0 8px; line-height: 1.2; }
.card p { margin: 0 0 10px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 10px 0 0; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 10px 44px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 2px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 15px;
}
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.share-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 12px;
  border: 2px solid var(--navy); background: #fff; color: var(--navy); font-weight: 800; text-decoration: none;
  font-size: 15px; cursor: pointer; font-family: var(--body);
}
.note-quote {
  font-family: var(--script); font-weight: 700; font-size: 26px; color: var(--navy); background: #fffdf8; border-left: 4px solid var(--red);
  padding: 10px 16px; border-radius: 6px; margin: 10px 0 0;
}
.muted { color: var(--muted); font-size: 14px; }

/* Confirmation art + Eli's luggage tag */
.ready-art { position: relative; width: 78%; margin: 0 auto 26px; }
.ready-art img { width: 100%; height: auto; border-radius: 14px; }
.luggage-tag {
  position: absolute; right: -10%; bottom: -14px; transform: rotate(-6deg);
  background: #fffaf0; border: 1.5px solid #d9c9a6; border-radius: 6px 14px 14px 6px;
  padding: 10px 14px 10px 30px; font-family: var(--script); font-weight: 700; color: var(--navy); font-size: 18px; line-height: 1.35;
  box-shadow: 0 4px 10px rgba(60,40,10,.18); max-width: 70%;
}
.luggage-tag::before { /* eyelet */
  content: ""; position: absolute; left: 10px; top: 50%; width: 10px; height: 10px; margin-top: -5px;
  border-radius: 50%; background: var(--cream); border: 2px solid #b9a57c;
}
.luggage-tag::after { /* string */
  content: ""; position: absolute; left: -26px; top: 50%; width: 32px; height: 2px; background: var(--red); transform: rotate(-20deg);
}
.luggage-tag span { color: var(--muted); font-family: var(--body); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.luggage-tag b { font-weight: 700; }

/* Gallery */
.gallery figure.example figcaption::before { content: "Example · "; color: var(--muted); }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.gallery figure { margin: 0; background: #fff; padding: 8px 8px 10px; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.gallery figure:nth-child(odd) { transform: rotate(-1.2deg); }
.gallery figure:nth-child(even) { transform: rotate(1deg); }
.gallery img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 3px; }
.gallery figcaption { font-family: var(--script); font-weight: 700; font-size: 18px; color: var(--navy); margin-top: 6px; line-height: 1.3; }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; font-family: var(--script); font-weight: 700; font-size: 23px; }

/* Footer */
.footer { text-align: center; margin-top: 30px; font-size: 13px; color: var(--muted); }
.footer .pill { margin-bottom: 16px; text-transform: none; letter-spacing: 0; font-size: 15px; padding: 9px 20px; }
.footer .pill svg { width: 20px; height: 20px; }

/* Falling leaves */
.leaves { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.leaf { position: absolute; top: -40px; will-change: transform; animation: fall linear forwards; }
.leaf svg { display: block; animation: sway ease-in-out infinite alternate; }
@keyframes fall { to { transform: translate3d(var(--drift), 110vh, 0) rotate(var(--spin)); } }
@keyframes sway { from { transform: translateX(-12px) rotate(-18deg); } to { transform: translateX(12px) rotate(18deg); } }
@media (prefers-reduced-motion: reduce) { .leaves { display: none; } .btn { transition: none; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }


/* ---------- Layout: phone first, then tablet and desktop ---------- */
.layout { display: block; }
.col-b > *:first-child { margin-top: 22px; }
.hero-img img { border-radius: 0; }

@media (min-width: 640px) {
  .page { max-width: 600px; padding: 0 24px 48px; }
  .hero-img { margin: 10px 0 0; }
  .hero-img img { border-radius: 18px; }
}

@media (min-width: 960px) {
  .page { max-width: 1140px; padding: 0 40px 56px; }
  .topbar { padding-top: 22px; }
  .layout {
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 56px; align-items: start; margin-top: 18px;
  }
  .layout.stick .col-a { position: sticky; top: 24px; }
  .col-b > *:first-child { margin-top: 0; }
  .col-a h1.title { text-align: left; font-size: 52px; margin-top: 18px; }
  .col-a .tape { margin-left: 0; }
  .col-a .rhyme, .col-a .lead { text-align: left; font-size: 22px; }
  .ready-art { width: 82%; margin-left: 0; }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .footer { margin-top: 56px; }
  .btn:hover { filter: brightness(1.05); }
  .share-btn:hover, .pill:hover { background: var(--mint, #eaf5f3); }
}

@media (min-width: 1280px) {
  .col-a h1.title { font-size: 58px; }
}
/* Tall artwork (visiting page): keep it from towering on phones */
.hero-img.tall { text-align: center; }
.hero-img.tall img { width: auto; max-width: 82%; max-height: 460px; margin: 0 auto; border-radius: 0; }
@media (min-width: 960px) { .hero-img.tall img { max-height: 560px; max-width: 100%; } }
/* Cutout art sits straight on the page, no rounded photo corners */
.hero-img img, .ready-art img { border-radius: 0 !important; }
.gallery .example-5 { grid-column: auto; }

/* Faded world map behind every page, same art as the homepage hero.
   A fixed layer (not background-attachment: fixed) so it also works on phones. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(251,248,240,.80) 0%, rgba(251,248,240,.86) 100%),
              url("https://www.whereintheworldiseli.com/assets/map-bg.jpg") center / cover no-repeat;
}

/* Brand type everywhere (matches the main site): Baloo 2 headings */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; color: var(--navy); }
