/* Postalia web. The app's palette and type: cream paper, Cormorant for anything that is "postcard",
   the system face for everything else, terracotta as the one accent. */
:root {
  --ground: #F2EDE3;
  --paper: #F7F3EA;
  --card: #FBF8F2;
  --ink: #1C1B18;
  --muted: #6B6457;
  --line: #D8CEBC;
  --accent: #A4492E;
  --confirm: #4F6B45;
  --postmark: #6E7B8E;
  --display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(40, 30, 20, .10), 0 14px 32px rgba(40, 30, 20, .14);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #131211; --card: #1E1D1A; --ink: #F2EDE3; --muted: #A79E8C; --line: #3B3934;
    --accent: #E0866A; --confirm: #93AD82; --postmark: #9AA6B6;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 36px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
  /* The postcards are objects: their paper never inverts. */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 17px/1.65 var(--body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 24px; }

/* Header */
.site { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 24px; }
.wordmark { font: 600 20px/1 var(--display); letter-spacing: .38em; text-transform: uppercase; color: var(--ink); text-decoration: none; padding-left: .38em; }
.site nav { display: flex; gap: 6px 22px; flex-wrap: wrap; font-size: 15px; }
.site nav a { color: var(--muted); text-decoration: none; }
.site nav a:hover { color: var(--accent); }

/* Shared type */
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
h1, h2 { font-family: var(--display); font-weight: 600; text-wrap: balance; margin: 0; letter-spacing: -.005em; }
h1 { font-size: clamp(48px, 8.5vw, 92px); line-height: .98; }
h2 { font-size: clamp(34px, 5vw, 52px); line-height: 1.05; }
h3 { font: 600 19px/1.35 var(--body); margin: 0 0 6px; }
p { margin: 0; }
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 34ch; }

/* The postcard as an object */
.card { border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); background: var(--paper); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-block: 48px 96px; }
.hero-copy { display: grid; gap: 24px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
/* Apple's official badge, unmodified: only its height is set, with clear space around it. */
.store-badge { display: inline-block; line-height: 0; }
.store-badge img { height: 50px; width: auto; }
/* Until the official badge files are in img/ (see README): a quiet placeholder of the same size. */
.store-badge.missing { width: 150px; height: 50px; border: 1.5px dashed var(--line); border-radius: 10px; display: inline-grid; place-items: center; text-decoration: none; }
.store-badge.missing img { display: none; }
.store-badge.missing::after { content: "App Store"; font: 600 14px var(--body); color: var(--muted); letter-spacing: .02em; }
.badge { display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: var(--ground); border-radius: 12px; padding: 11px 18px; font-weight: 600; font-size: 15px; text-decoration: none; }
.badge svg { width: 20px; height: 20px; fill: currentColor; }
.cta small { color: var(--muted); font-size: 15px; }

.fan { position: relative; height: clamp(320px, 42vw, 470px); }
.fan .card { position: absolute; top: 50%; left: 50%; width: clamp(160px, 20vw, 250px); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.fan .card:nth-child(1) { transform: translate(-100%, -46%) rotate(-9deg); }
.fan .card:nth-child(2) { transform: translate(0%, -46%) rotate(8deg); }
.fan .card:nth-child(3) { transform: translate(-50%, -54%); z-index: 1; }
.fan:hover .card:nth-child(1) { transform: translate(-108%, -46%) rotate(-12deg); }
.fan:hover .card:nth-child(2) { transform: translate(8%, -46%) rotate(11deg); }
.postmark { position: absolute; right: 2%; top: 2%; width: 120px; color: var(--postmark); opacity: .8; transform: rotate(-12deg); z-index: 2; pointer-events: none; }

/* Sections */
section.band { padding-block: 88px; border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 10px; max-width: 620px; margin-bottom: 44px; }
.section-head p { color: var(--muted); font-size: 18px; }

/* Photo → postcard */
.transform { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, .8fr); gap: 28px; align-items: center; }
.transform figure { margin: 0; display: grid; gap: 12px; }
.transform figcaption { font-size: 14px; color: var(--muted); }
.transform .photo { border-radius: 10px; box-shadow: var(--shadow); }
.arrow { font: 600 44px/1 var(--display); color: var(--accent); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; counter-reset: step; }
.step { display: grid; gap: 8px; align-content: start; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font: 600 30px/1 var(--display); color: var(--accent); letter-spacing: .06em; }
.step p { color: var(--muted); }
.styles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.styles span { font-size: 13px; border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; color: var(--ink); }

/* Back of the card */
.back { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.back .card { transform: rotate(-2deg); max-width: 400px; }
.back-copy { display: grid; gap: 14px; }
.back-copy p { color: var(--muted); font-size: 18px; max-width: 40ch; }

/* Collection */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.grid figure { margin: 0; display: grid; gap: 10px; }
.grid figcaption { font-size: 14px; color: var(--muted); }

/* Promises */
.promises { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.promise { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: grid; gap: 6px; align-content: start; }
.promise svg { width: 26px; height: 26px; stroke: var(--confirm); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.promise p { color: var(--muted); font-size: 16px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.plan { border: 1px solid var(--line); border-radius: 16px; padding: 26px 24px; display: grid; gap: 6px; align-content: start; background: var(--card); position: relative; }
.plan.featured { border: 2px solid var(--accent); }
.plan .price { font: 600 40px/1.1 var(--body); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.plan .per { color: var(--muted); font-size: 15px; }
.plan ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 15px; display: grid; gap: 4px; }
.plan .ribbon { position: absolute; top: -12px; left: 22px; background: var(--confirm); color: #fff; font-size: 12px; font-weight: 700; border-radius: 99px; padding: 2px 10px; }
.fine { margin-top: 18px; font-size: 14px; color: var(--muted); max-width: 70ch; }

/* Closing */
.closing { text-align: center; display: grid; justify-items: center; gap: 22px; padding-block: 96px; border-top: 1px solid var(--line); }
.closing .wordmark { font-size: 15px; color: var(--muted); }

/* Footer */
footer.site-footer { border-top: 1px solid var(--line); padding-block: 28px 40px; display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; font-size: 14px; color: var(--muted); }
footer.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer.site-footer a { color: var(--muted); text-decoration: none; }
footer.site-footer a:hover { color: var(--accent); }

/* Legal pages: one reading column */
.page { max-width: 720px; margin: 0 auto; padding-inline: 24px; padding-block: 8px 72px; }
.page h1 { font-size: clamp(38px, 6vw, 52px); margin-bottom: 8px; }
.page h2 { font: 600 20px/1.35 var(--body); margin: 36px 0 8px; letter-spacing: 0; }
.page h3 { font-size: 17px; margin: 22px 0 4px; }
.page p, .page ul { margin: 0 0 12px; }
.page ul { padding-left: 22px; }
.page li { margin-bottom: 6px; }
.updated, .note { color: var(--muted); font-size: 15px; }
.lang { display: flex; gap: 14px; font-size: 15px; margin: 16px 0 8px; }
.summary { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin: 20px 0; }
.summary ul { margin: 0; }
.page hr { border: 0; border-top: 1px solid var(--line); margin: 56px 0 32px; }
.page footer { margin-top: 56px; color: var(--muted); font-size: 14px; }

/* Entrance: the fan settles once; nothing else moves on its own. */
@media (prefers-reduced-motion: no-preference) {
  .fan .card { animation: settle .9s cubic-bezier(.2, .8, .2, 1) both; }
  .fan .card:nth-child(1) { animation-delay: .05s; }
  .fan .card:nth-child(2) { animation-delay: .12s; }
  .fan .card:nth-child(3) { animation-delay: .2s; }
  @keyframes settle { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }

/* Narrow screens */
@media (max-width: 820px) {
  .hero, .back { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-block: 16px 64px; }
  .fan { order: -1; }
  .transform { grid-template-columns: minmax(0, 1fr); }
  .arrow { transform: rotate(90deg); justify-self: center; }
  .steps, .promises, .plans { grid-template-columns: minmax(0, 1fr); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .back .card { max-width: 320px; justify-self: center; }
  section.band { padding-block: 64px; }
}
