/* Pictuli website: indigo ink on paper cream, soft rounded cards, coral, sunny and aqua accents. Colour is the star. */

@font-face {
    font-family: "Nunito";
    src: url("/_content/ColorBook.UI/fonts/nunito-latin.woff2") format("woff2");
    font-weight: 400 900;
    font-display: swap;
}

:root {
    --font-display: "Nunito", system-ui, sans-serif;
    --font-body: "Nunito", system-ui, sans-serif;
    --indigo: #403a78;
    --coral: #ff746c;
    --sunny: #ffc857;
    --aqua: #50c9c3;
    --paper: #fff9f0;
    --paper-2: #f3f0fa;
    --card: #ffffff;
    --ink: var(--indigo);
    --ink-soft: #77729f;
    --edge: #e6e2f3;
    --tomato: var(--coral);
    --sun: var(--sunny);
    --sky: var(--aqua);
    --grass: #7ccf9c;
    --berry: #ff8fb1;
    --grape: #8f84d6;
    --dots: transparent;
    --line: 1.5px;
    --shadow: 0 14px 36px rgba(64, 58, 120, 0.12), 0 2px 6px rgba(64, 58, 120, 0.06);
    --shadow-sm: 0 6px 16px rgba(64, 58, 120, 0.10);
    --radius: 24px;
    --max: 1120px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #17142e;
        --paper-2: #221e40;
        --card: #221e40;
        --ink: #f3f0ff;
        --ink-soft: #b4add6;
        --edge: #35305c;
        --shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
        --shadow-sm: 0 6px 16px rgba(0, 0, 0, 0.35);
    }
}
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.08rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    background-image: radial-gradient(var(--dots) 1.5px, transparent 1.6px);
    background-size: 24px 24px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; margin: 0 0 0.4em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
a { color: inherit; }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }

/* --- Header ---------------------------------------------------------------------------------------------------- */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; gap: 16px; }
.site-nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a {
    font-family: var(--font-display);
    font-weight: 700;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 999px;
    border: 2px solid transparent;
}
.site-nav a:hover { border-color: var(--ink); background: var(--card); }

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 2rem;
    letter-spacing: -0.035em;
    line-height: 1;
    color: var(--ink);
    text-decoration: none;
}
.wordmark img { width: 1.1em; height: 1.1em; border-radius: 0.25em; }
.wordmark__i { position: relative; display: inline-block; }
.wordmark__dot {
    position: absolute;
    left: 50%;
    top: 0.06em;
    width: 0.25em;
    height: 0.25em;
    border-radius: 50%;
    background: var(--coral);
    transform: translateX(-50%);
}
.tagline { font-family: var(--font-display); font-weight: 800; color: var(--ink-soft); }

/* --- Hero ------------------------------------------------------------------------------------------------------ */
.hero { padding: 40px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero h1 em { font-style: normal; color: var(--coral); }
.hero__lead { font-size: 1.25rem; color: var(--ink-soft); max-width: 34em; }

.badges { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.badge {
    display: inline-flex;
    flex-direction: column;
    padding: 10px 18px;
    border: var(--line) solid var(--edge);
    border-radius: 16px;
    background: var(--card);
    box-shadow: var(--shadow-sm);
    font-family: var(--font-display);
    line-height: 1.1;
}
.badge small { font-family: var(--font-body); font-size: 0.75rem; color: var(--ink-soft); }
.badge strong { font-size: 1.15rem; }

.phone {
    position: relative;
    width: min(360px, 100%);
    margin-inline: auto;
    padding: 18px 14px 26px;
    border: var(--line) solid var(--edge);
    border-radius: 46px;
    background: var(--card);
    box-shadow: var(--shadow);
    transform: rotate(2.5deg);
}
.phone::before {
    content: "";
    display: block;
    width: 34%;
    height: 8px;
    margin: 0 auto 14px;
    border-radius: 99px;
    background: var(--ink);
    opacity: 0.85;
}
.phone svg { display: block; width: 100%; height: auto; border: var(--line) solid var(--edge); border-radius: 18px; background: #fff; }
.phone__tray { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
.phone__tray span { width: 34px; height: 34px; border-radius: 50%; border: var(--line) solid var(--edge); }

.sticker {
    position: absolute;
    right: -26px;
    bottom: 54px;
    padding: 8px 14px;
    background: var(--berry);
    color: #2a2552;
    border: var(--line) solid var(--edge);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    font-family: var(--font-display);
    font-weight: 800;
    transform: rotate(-8deg);
}

/* A page that colors itself in, shape by shape, the way a child taps through it. */
.self-coloring [data-region][fill] { animation: fill-in 600ms cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: var(--d, 0s); }
@keyframes fill-in { from { fill: #ffffff; } }

@media (prefers-reduced-motion: reduce) {
    .self-coloring [data-region][fill] { animation: none; }
    html { scroll-behavior: auto; }
}

/* --- Sections -------------------------------------------------------------------------------------------------- */
.section { padding: 72px 0; }
.section--band { background: var(--paper-2); border-block: var(--line) solid var(--edge); }
.section__intro { max-width: 40em; margin-bottom: 36px; }
.section__intro p { color: var(--ink-soft); font-size: 1.15rem; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card {
    padding: 24px 22px 20px;
    border: var(--line) solid var(--edge);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
}
.card:nth-child(4n + 1) { --accent: var(--tomato); }
.card:nth-child(4n + 2) { --accent: var(--sky); }
.card:nth-child(4n + 3) { --accent: var(--grass); }
.card:nth-child(4n + 4) { --accent: var(--grape); }
.card__dot { width: 46px; height: 46px; border-radius: 50%; border: var(--line) solid var(--edge); background: var(--accent); margin-bottom: 14px; }
.card p { color: var(--ink-soft); margin: 0; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.frame {
    border: var(--line) solid var(--edge);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
    transform: rotate(-1.5deg);
}
.frame svg { display: block; width: 100%; height: auto; }

.promises { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.promises li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 18px;
    border: 2px solid var(--edge);
    border-radius: 16px;
    background: var(--card);
}
.promises strong { font-family: var(--font-display); font-size: 1.15rem; display: block; }
.promises span { color: var(--ink-soft); }
.tick {
    flex: none;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--edge);
    background: var(--grass);
    color: #2a2552;
    font-weight: 900;
}

.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.pack {
    padding: 18px;
    border: 2px solid var(--edge);
    border-radius: 18px;
    background: var(--card);
}
.pack h3 { font-size: 1.25rem; margin-bottom: 4px; }
.pack p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 10px; }
.chip {
    display: inline-block;
    padding: 2px 12px;
    border: 2px solid var(--edge);
    border-radius: 999px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
}
.chip--free { background: var(--grass); color: #2a2552; }
.chip--paid { background: var(--sun); color: #2a2552; }

/* --- Text pages ------------------------------------------------------------------------------------------------ */
.prose {
    max-width: 46em;
    margin: 24px auto 80px;
    padding: 40px clamp(20px, 5vw, 56px);
    border: var(--line) solid var(--edge);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
}
.prose h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.prose h2 { font-size: 1.6rem; margin-top: 1.6em; }
.prose em { color: var(--ink-soft); }

/* --- Forms (login) --------------------------------------------------------------------------------------------- */
.login { max-width: 420px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-family: var(--font-display); font-weight: 700; }
.field input {
    font: inherit;
    padding: 12px 14px;
    border: 2px solid var(--edge);
    border-radius: 14px;
    background: var(--paper);
    color: var(--ink);
}
.field input:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.button {
    display: inline-block;
    font: 800 1.1rem var(--font-display);
    padding: 12px 24px;
    border: var(--line) solid var(--edge);
    border-radius: 999px;
    background: var(--coral);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(255, 116, 108, 0.35);
    cursor: pointer;
    text-decoration: none;
}
.button:active { transform: translate(2px, 2px); box-shadow: var(--shadow-sm); }
.button--quiet { background: var(--card); color: var(--ink); }
.alert { padding: 12px 16px; border: 2px solid var(--edge); border-radius: 14px; background: #ffd9cf; color: #2a2552; margin-bottom: 16px; }
.check { display: flex; gap: 8px; align-items: center; margin-bottom: 20px; }

/* --- Footer ---------------------------------------------------------------------------------------------------- */
.site-footer { padding: 36px 0 48px; border-top: var(--line) solid var(--edge); background: var(--paper-2); }
.site-footer .wrap { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.site-footer nav { margin-left: auto; display: flex; gap: 18px; }
.site-footer small { color: var(--ink-soft); }

@media (max-width: 900px) {
    .hero .wrap, .split { grid-template-columns: 1fr; gap: 40px; }
    .cards { grid-template-columns: repeat(2, 1fr); }
    .sticker { right: -6px; }
}

@media (max-width: 560px) {
    .cards { grid-template-columns: 1fr; }
    .site-nav a:not(:last-child) { display: none; }
    .section { padding: 56px 0; }
}

/* Blazor focuses the heading after navigation for screen readers; no ring for that programmatic focus. */
h1:focus { outline: none; }
