/* mollica.app: the app's paper, card, serif titles and tomato, with its
   dark colours when the device is in dark mode. Colours come from the app's
   asset catalog (ios/Mollica/Assets.xcassets) and Theme.swift. */

:root {
  --paper: #FAF4E8;
  --card: #FFFFFF;
  --tile: #F3EADA;
  --text: #1F1D1A;
  --secondary: #5F5C57;
  --rule: #E7DFD0;
  --tomato: #C8402F;
  --tomato-ink: #A93424;
  --on-tomato: #FFFFFF;
  --gold: #D9A342;
  --amber: #C17A2E;
  --olive: #3C3F2E;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 8px 24px rgba(60, 40, 20, .08);
  --serif: "New York", ui-serif, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --radius: 18px;
  --width: 1080px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1A1815;
    --card: #2A2723;
    --tile: #24211D;
    --text: #F2EFE9;
    --secondary: #B8B5B0;
    --rule: #3A3631;
    --tomato: #E86B57;
    --tomato-ink: #F08A78;
    --on-tomato: #1A1815;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--tomato-ink); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; text-wrap: pretty; }

.wrap { max-width: var(--width); margin: 0 auto; padding: 0 20px; }

/* Header */

.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand span { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; }
.site-nav { display: flex; align-items: center; gap: 22px; font-size: .95rem; }
.site-nav a:not(.button) { color: var(--secondary); text-decoration: none; }
.site-nav a:not(.button):hover { color: var(--text); }
@media (max-width: 640px) { .site-nav a:not(.button) { display: none; } }

/* Buttons */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; border: 0;
  background: var(--tomato); color: var(--on-tomato);
  font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
}
.button:hover { filter: brightness(1.05); }
.button.small { padding: 9px 16px; font-size: .9rem; }
.button.secondary { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--rule); }
.button.block { display: flex; width: 100%; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.app-store {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 20px 10px 16px; border-radius: 12px;
  background: var(--text); color: var(--paper); text-decoration: none;
}
.app-store svg { width: 24px; height: 24px; fill: currentColor; }
.app-store small { display: block; font-size: .68rem; line-height: 1.1; opacity: .85; }
.app-store strong { display: block; font-size: 1.15rem; line-height: 1.1; font-weight: 600; }

.muted { color: var(--secondary); }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); margin-bottom: .6em; }

/* Hero */

.hero { padding: 40px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero p.lead { font-size: 1.2rem; color: var(--secondary); max-width: 34em; }
.hero .note { font-size: .9rem; color: var(--secondary); margin-top: 14px; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .phones { order: 2; }
}

/* Screenshot placeholders: a phone outline with a label, until real
   screenshots are ready. Swap each .phone's contents for an <img>. */

.phones { display: flex; justify-content: center; gap: 18px; }
.phone {
  position: relative; flex: 0 0 auto;
  width: min(270px, 70vw); aspect-ratio: 9 / 19.5;
  border-radius: 40px; padding: 12px;
  background: var(--card); box-shadow: var(--shadow), inset 0 0 0 1px var(--rule);
}
.phone.tilt { transform: rotate(-3deg) translateY(16px); width: min(230px, 55vw); }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 30px; }
.placeholder {
  height: 100%; border-radius: 30px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 24px; text-align: center;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--rule) 55%, transparent) 14px 15px),
    var(--tile);
  color: var(--secondary); font-size: .85rem;
}
.placeholder b { font-family: var(--serif); font-size: 1.1rem; color: var(--text); font-weight: 600; }
@media (max-width: 520px) { .phone.tilt { display: none; } }

/* Feature rows */

.features { padding: 24px 0 40px; }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 56px 0; }
.feature + .feature { border-top: 1px solid var(--rule); }
.feature:nth-child(even) .phones { order: -1; }
.feature ul { padding: 0; margin: 1.2em 0 0; list-style: none; }
.feature li { position: relative; padding-left: 28px; margin-bottom: .55em; }
.feature li::before {
  content: ""; position: absolute; left: 4px; top: .55em;
  width: 9px; height: 9px; border-radius: 50%; background: var(--gold);
}
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 32px; padding: 44px 0; }
  .feature:nth-child(even) .phones { order: 0; }
}

/* Small cards */

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .35em; }
.card p { margin: 0; color: var(--secondary); font-size: .98rem; }
.icon-dot {
  width: 40px; height: 40px; border-radius: 12px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--tomato) 14%, transparent); color: var(--tomato);
}
.icon-dot svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

section.band { padding: 72px 0; }
section.band.tinted { background: var(--tile); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head p { color: var(--secondary); font-size: 1.1rem; }

/* Plans */

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 860px; }
@media (max-width: 700px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--card); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.plan.plus { box-shadow: var(--shadow), inset 0 0 0 2px var(--tomato); }
.plan h3 { font-size: 1.5rem; }
.plan ul { padding: 0; margin: 16px 0 0; list-style: none; }
.plan li { padding: 9px 0 9px 30px; border-top: 1px solid var(--rule); position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 4px; color: var(--tomato); font-weight: 700; }

/* FAQ */

.faq { max-width: 760px; }
.faq details { border-top: 1px solid var(--rule); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--tomato); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--secondary); }

/* Closing call to action */

.cta { text-align: center; padding: 80px 0; }
.cta img { width: 88px; height: 88px; border-radius: 22px; margin: 0 auto 22px; box-shadow: var(--shadow); }
.cta .buttons { justify-content: center; }

/* Footer */

.site-footer { border-top: 1px solid var(--rule); padding: 28px 0 40px; font-size: .9rem; color: var(--secondary); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--secondary); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* Single-message pages: invitations, email links, unsubscribe, 404 */

.message-page { min-height: 100vh; display: flex; flex-direction: column; }
.message-page main { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 24px 20px 64px; }
.message {
  width: 100%; max-width: 480px; background: var(--card); border-radius: 24px;
  padding: 36px 30px; box-shadow: var(--shadow); text-align: center;
}
.message .badge {
  width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--tomato) 14%, transparent); color: var(--tomato);
}
.message .badge svg { width: 30px; height: 30px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.message h1 { font-size: 1.9rem; }
.message p { color: var(--secondary); }
.message .buttons { flex-direction: column; align-items: stretch; margin-top: 24px; }
.message .fine { font-size: .85rem; margin: 20px 0 0; }

/* A shared recipe */

.recipe { max-width: 720px; margin: 0 auto; padding: 8px 20px 64px; }
.recipe header { margin-bottom: 24px; }
.recipe .meta { color: var(--secondary); }
.recipe .save {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--card); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin: 20px 0 32px;
}
.recipe .save p { margin: 0; }
.recipe h2 { font-size: 1.5rem; margin-top: 1.4em; }
.recipe h4 { font-family: var(--serif); font-size: 1.05rem; margin: 1.2em 0 .3em; }
.recipe ul.ingredients { padding: 0; list-style: none; margin: 0; }
.recipe ul.ingredients li { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.recipe ol.steps { padding-left: 1.4em; }
.recipe ol.steps li { margin-bottom: 1em; padding-left: .3em; }
.recipe ol.steps li::marker { font-family: var(--serif); font-weight: 600; color: var(--tomato); }
.recipe .notes { white-space: pre-wrap; background: var(--tile); border-radius: 14px; padding: 16px 18px; }

/* Long text: privacy, terms, support */

.prose { max-width: 720px; margin: 0 auto; padding: 16px 20px 72px; }
.prose h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.prose h2 { font-size: 1.5rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.4em; }
.prose li { margin-bottom: .4em; }
.prose .draft { background: var(--tile); border-left: 4px solid var(--gold); padding: 12px 16px; border-radius: 8px; font-size: .95rem; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; margin: 1em 0; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
