/* LumaCard site — minimal CSS, mirrors app palette from LumaCard/Shared/Theme/Colors.swift */

:root {
    --bg:           #FAFAF7;
    --card:         #FAF4E1;
    --ink:          #1F2937;
    --ink-2:        #78716C;
    --accent:       #E8DCC4;
    --success:      #10B981;
    --hint:         #F59E0B;
    --border:       #F0E9DC;
    --canvas:       #FFFBF2;
    --radius:       16px;
    --radius-lg:    24px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Hiragino Sans", "Microsoft JhengHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

a:hover {
    text-decoration-color: var(--hint);
}

nav {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(8px);
}

nav .nav-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

nav .brand {
    font-weight: 700;
    font-size: 20px;
    text-decoration: none;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

nav .brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-block;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

nav .nav-links {
    display: flex;
    gap: 20px;
    font-size: 15px;
}

nav .nav-links a {
    text-decoration: none;
}

main {
    flex: 1;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 48px 24px;
}

h1, h2, h3 {
    color: var(--ink);
    line-height: 1.25;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 44px;
    font-weight: 800;
    margin-top: 0;
}

h2 {
    font-size: 28px;
    font-weight: 700;
}

h3 {
    font-size: 20px;
    font-weight: 600;
}

.lede {
    font-size: 20px;
    color: var(--ink-2);
    max-width: 640px;
}

.hero {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 56px 40px;
    margin-bottom: 48px;
    border: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
}

.hero-icon {
    border-radius: 22px;
    display: block;
    margin-bottom: 24px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.hero .badges {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Hero mockup — a CSS-only iPhone frame containing a miniature of the app's
   tracing screen. Visual proxy for screenshots before we have real ones. */
.hero-mockup {
    display: flex;
    justify-content: center;
}
.phone {
    width: 240px;
    height: 488px;
    background: #0d0d10;
    border-radius: 42px;
    padding: 8px;
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.18),
        0 0 0 2px rgba(255, 255, 255, 0.08) inset;
    position: relative;
}
.phone::before {
    /* Dynamic Island */
    content: "";
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 22px;
    background: #000;
    border-radius: 999px;
    z-index: 2;
}
.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--canvas);
    border-radius: 34px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-top: 42px;
}
.phone-statusbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 22px;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink);
    height: 18px;
}
.phone-statusbar-icons {
    letter-spacing: -1px;
    font-size: 9px;
}
.phone-header {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    padding: 14px 0 8px;
}
.phone-canvas {
    flex: 1;
    margin: 0 16px;
    background:
        linear-gradient(to right, transparent 49.5%, var(--accent) 49.5% 50.5%, transparent 50.5%),
        linear-gradient(to bottom, transparent 49.5%, var(--accent) 49.5% 50.5%, transparent 50.5%),
        var(--card);
    border-radius: 14px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.phone-trace {
    width: 86%;
    height: 86%;
}
.phone-stars {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 10px 0 6px;
    font-size: 18px;
    color: #d6d3c8;
}
.phone-stars .star.filled {
    color: var(--hint);
}
.phone-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    padding: 6px 0 20px;
}
.phone-action {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--card);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--ink);
}
.phone-action.primary {
    background: var(--ink);
    color: var(--canvas);
    border-color: var(--ink);
}

@media (max-width: 760px) {
    .hero {
        grid-template-columns: 1fr;
    }
    .hero-mockup {
        order: -1;
    }
    .phone {
        width: 200px;
        height: 408px;
    }
}

.badge {
    background: var(--canvas);
    border: 1px solid var(--accent);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 14px;
    color: var(--ink);
}

.badge.success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 48px 0;
}

.feature {
    background: var(--canvas);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

/* Each feature card has a small preview that mimics the corresponding screen
   inside the app, using authentic content (real characters, real vocab,
   real sticker emojis from the in-app catalog) rather than decorative icons. */
.feature .preview {
    height: 92px;
    margin-bottom: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 14px;
    overflow: hidden;
}

/* Trace: three real glyphs from the curriculum on a faint grid-paper backdrop */
.preview-trace {
    background:
        linear-gradient(var(--bg) 0%, var(--bg) 100%),
        linear-gradient(to right, transparent 49%, var(--accent) 49% 51%, transparent 51%),
        linear-gradient(to bottom, transparent 49%, var(--accent) 49% 51%, transparent 51%);
    background-blend-mode: normal, multiply, multiply;
    background-color: var(--canvas);
}
.trace-glyph {
    font-size: 40px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1;
    font-family: "PingFang TC", "Hiragino Sans", -apple-system, serif;
}

/* Vocab card: stacked word + translation, mimics the in-app flashcard layout */
.preview-vocab {
    flex-direction: column;
    gap: 4px;
}
.vocab-word {
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
}
.vocab-meta {
    font-size: 14px;
    color: var(--ink-2);
    font-family: "PingFang TC", "Hiragino Sans", sans-serif;
}

/* Puzzle: three letter tiles, sized like the app's draggable pieces */
.preview-puzzle {
    gap: 10px;
}
.tile {
    width: 42px;
    height: 48px;
    background: var(--canvas);
    border: 2px solid var(--accent);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    box-shadow: 0 2px 0 var(--accent);
}

/* Stickers: three actual emojis from the in-app StickerCatalog, sized as
   collection badges with tier-coloured rings */
.preview-stickers {
    gap: 16px;
}
.sticker {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--canvas);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    border: 2px solid var(--accent);
}
.sticker.tier-common    { border-color: var(--border); }
.sticker.tier-epic      { border-color: var(--hint); }
.sticker.tier-legendary { border-color: var(--success); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); }

/* Profile chips, matching ProfileChip.swift visual style */
.preview-profile {
    gap: 10px;
}
.chip {
    background: var(--canvas);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

/* Offline: minimal text marker, no emoji */
.preview-offline {
    flex-direction: column;
    gap: 8px;
}
.offline-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-2);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.offline-bar {
    width: 64px;
    height: 4px;
    border-radius: 2px;
    background: var(--accent);
    position: relative;
}
.offline-bar::after {
    content: "";
    position: absolute;
    inset: -6px 0;
    border-top: 1px solid var(--ink-2);
    transform: rotate(-12deg);
    transform-origin: center;
}

.feature h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

.feature p {
    margin: 0;
    color: var(--ink-2);
    font-size: 15px;
}

.privacy-callout {
    background: var(--canvas);
    border: 2px solid var(--success);
    border-radius: var(--radius);
    padding: 28px;
    margin: 48px 0;
}

.privacy-callout h2 {
    margin-top: 0;
    color: var(--success);
}

.privacy-callout ul {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
}

.privacy-callout ul li {
    padding: 6px 0;
    padding-left: 28px;
    position: relative;
    font-size: 16px;
}

.privacy-callout ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

article.prose h2 {
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

article.prose p,
article.prose li {
    font-size: 17px;
    color: var(--ink);
}

article.prose ul,
article.prose ol {
    padding-left: 24px;
}

article.prose code {
    background: var(--accent);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--ink);
}

article.prose hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 32px 0;
}

footer {
    border-top: 1px solid var(--border);
    padding: 32px 24px;
    margin-top: 64px;
    color: var(--ink-2);
    font-size: 14px;
}

footer .footer-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

footer .footer-links {
    display: flex;
    gap: 20px;
}

@media (max-width: 600px) {
    h1 { font-size: 32px; }
    h2 { font-size: 24px; }
    .hero { padding: 36px 24px; }
    main { padding: 32px 16px; }
}
