/* Shared design system for iMessage Wrapped -- deliberately mirrors the
   archipelago map's own look (static/archipelago/map.css): dark ocean
   background, parchment "chrome plate" cards, gold accents, Fredoka
   headings. Index, wrapped, and any future page pull from this so the
   whole product reads as one thing, not a map page bolted onto a
   separate pastel SaaS template. */

@font-face {
    font-family: "Fredoka";
    src: url(archipelago/fredoka.woff2) format("woff2");
    font-weight: 400 700;
    font-display: swap;
}

:root {
    --ocean-1: #23394a;
    --ocean-2: #16242f;
    --parchment: #f4e9d3;
    --parchment-edge: #d9c79c;
    --blush: #f6dde3;      /* nested-plate tint: stat tiles, input borders */
    --rose: #e0517a;       /* primary accent (heart pink/red) */
    --deep-rose: #b83a5e;  /* accent hover / headings */
    --cream: #f4e9d3;
    --ink: #2a2118;
    --ink-soft: #4a3d2c;
    --ink-faint: #6b5f4c;
    --gold: #b83a5e;
    --on-dark: #f4e9d3;
    --on-dark-muted: rgba(244, 233, 211, 0.72);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "SF Pro Rounded", "Segoe UI", Roboto, sans-serif;
    color: var(--on-dark);
    background: radial-gradient(ellipse at 50% 0%, var(--ocean-1) 0%, var(--ocean-2) 70%);
    background-attachment: fixed;
    min-height: 100vh;
}

.wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

h1 {
    font-family: 'Fredoka', ui-rounded, sans-serif;
    font-size: 34px;
    font-weight: 700;
    color: var(--gold);
    margin: 0 0 8px;
    letter-spacing: 0.01em;
}

h2 {
    font-family: 'Fredoka', ui-rounded, sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--ink);
    margin-top: 0;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    margin: 0 0 6px;
}

.subtitle {
    color: var(--on-dark-muted);
    margin: 0 0 32px;
    line-height: 1.5;
}

.card {
    background: var(--parchment);
    border: 1px solid var(--parchment-edge);
    border-radius: 4px 18px 6px 16px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
    padding: 24px 28px;
    margin-bottom: 28px;
    color: var(--ink);
}

.card p { line-height: 1.55; color: var(--ink-soft); }

.flash {
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.flash-success { background: #e8f7ee; color: #1f7a4d; }
.flash-error { background: #fdeaea; color: #b3302f; }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
a.button, button {
    display: inline-block;
    background: var(--rose);
    color: var(--ink);
    border: none;
    border-radius: 999px;
    padding: 11px 20px;
    font-family: 'Fredoka', ui-rounded, sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
a.button:hover, button:hover { background: var(--deep-rose); }
a.button.secondary, button.secondary {
    background: var(--blush);
    color: var(--ink);
    box-shadow: none;
}
a.button.secondary:hover { background: var(--parchment-edge); }

.import-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 16px 0 24px;
}
@media (max-width: 600px) {
    .import-methods { grid-template-columns: 1fr; }
}
.method h3 {
    font-family: 'Fredoka', ui-rounded, sans-serif;
    font-size: 15px;
    margin: 0 0 8px;
    color: var(--deep-rose);
}
.method ol {
    margin: 0;
    padding-left: 20px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--ink-faint);
}
.method code {
    background: var(--blush);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 12.5px;
}

form.upload-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--ink);
}
.field .hint {
    font-size: 12px;
    color: var(--ink-faint);
    margin: 2px 0 0;
}
input[type="text"], input[type="file"] {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--parchment-edge);
    background: #fffdf8;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
}

ul.conversations {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    color: var(--ink-faint);
    max-height: 200px;
    overflow-y: auto;
}

/* ---- Stat tiles (used on the Wrapped page) ---- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 4px 0 4px;
}
@media (max-width: 600px) {
    .stat-grid { grid-template-columns: 1fr; }
}
.stat-tile {
    background: var(--blush);
    border-radius: 14px;
    padding: 16px 18px;
    text-align: center;
}
.stat-tile .stat-value {
    font-family: 'Fredoka', ui-rounded, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--deep-rose);
    display: block;
}
.stat-tile .stat-label {
    font-size: 12.5px;
    color: var(--ink-faint);
}

.rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.rank-list li {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid var(--blush);
    font-size: 14.5px;
    color: var(--ink-soft);
}
.rank-list li:last-child { border-bottom: none; }
.rank-list .rank-count {
    color: var(--ink-faint);
    font-weight: 600;
}

.chart-card canvas { max-width: 100%; }

/* ---- Pricing card (paywall) ---- */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 4px 0 8px;
}
@media (max-width: 600px) {
    .pricing-grid { grid-template-columns: 1fr; }
}
.price-tile {
    background: #fffdf8;
    border: 1px solid var(--parchment-edge);
    border-radius: 14px;
    padding: 18px 20px;
}
.price-tile.featured {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px var(--gold) inset;
}
.price-tile .price-name {
    font-family: 'Fredoka', ui-rounded, sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: var(--ink);
}
.price-tile .price-amount {
    font-family: 'Fredoka', ui-rounded, sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--deep-rose);
    margin: 4px 0;
}
.price-tile ul {
    margin: 10px 0 14px;
    padding-left: 18px;
    font-size: 13px;
    color: var(--ink-faint);
    line-height: 1.6;
}

/* ---- Demo/example banner (static example page) ---- */
.demo-banner {
    background: var(--ink);
    color: #fff;
    text-align: center;
    padding: 12px 18px;
    font-size: 13.5px;
    line-height: 1.5;
}
.demo-banner strong { color: var(--gold); }
