package dev.privacyllc.period.designsystem

import androidx.compose.ui.graphics.Color

/**
 * The palette from [docs/design/BRAND_GUIDE.md], which the project owner
 * supplied on 2026-08-18 and which supersedes the sketch in PRODUCT_PLAN.md §39
 * where the two differ.
 *
 * Two rules survive from §39 unchanged, because they are product decisions
 * rather than colour preferences:
 *
 *  - **the period state is a sophisticated rose or plum, never a graphic
 *    blood-red** — the guide's Period Rose and Strong Period Day do this;
 *  - **nothing anywhere reads as "safe"** — which is why the fertile window is
 *    a pink rather than a green, and why the calendar's states differ in shape
 *    as well as colour.
 *
 * ## The one deliberate departure from §39
 *
 * §39 asks for a muted teal or sage fertile window, to hold it apart from the
 * period colour. The brand guide is plum-and-rose throughout and gives fertility
 * its own pink (`#E891AE`). The guide wins — it is newer, it is the owner's, and
 * a teal accent in this identity would look like it came from another app.
 *
 * What §39 was protecting is kept by other means: the calendar's four states
 * differ in **shape** (solid disc, dotted ring, continuous ring, star), which is
 * what makes them legible in greyscale and to a colourblind user. Colour is the
 * second signal here, never the only one.
 *
 * Nothing outside this file declares a colour literal. A `Color(0xFF…)` in a
 * composable is a review failure.
 */
internal object PeriodPalette {

    // ---- Plum family. Structure, headers, dark text. -----------------------
    val DeepPlum = Color(0xFF563659)
    val RichPurple = Color(0xFF704770)
    val DarkMauve = Color(0xFF815276)
    val DeepPurple = Color(0xFF4A235A)

    // ---- Rose family. Cycle indicators and accents. ------------------------
    val PeriodRose = Color(0xFFE58698)
    val SoftRose = Color(0xFFE6A6B8)
    val BlushPink = Color(0xFFF0B3C5)

    /** Used sparingly — selected dates, active states. The guide is explicit about that. */
    val FertilityPink = Color(0xFFEA5D88)

    // ---- Lavender. Inactive and secondary. ---------------------------------
    val SoftLavender = Color(0xFFD8BED8)
    val LightLavender = Color(0xFFE4D3E4)
    val LavenderMist = Color(0xFFF0E1F0)

    // ---- Light theme ground. "Blush-tinted ivory", never pure white. -------
    val LightBackground = Color(0xFFF4E7F1)
    val LightSurface = Color(0xFFF6F2F4)
    val LightSurfaceAlt = Color(0xFFF4E9E9)

    // ---- Dark theme. Eggplant, never ordinary black. -----------------------
    val MidnightPlum = Color(0xFF100811)
    val DeepEggplant = Color(0xFF16071D)
    val DarkViolet = Color(0xFF211124)
    val RaisedSurface = Color(0xFF32153E)

    // ---- Dark accents. Soft glow, not neon. --------------------------------
    val GlowPink = Color(0xFFF3BCD8)
    val RoseNeon = Color(0xFFEC6D9A)
    val LavenderGlow = Color(0xFFD9AEDD)
    val MauveGlow = Color(0xFFA46DA6)

    // ---- Cycle day dots, §5 of the guide. ----------------------------------
    val DayNeutral = Color(0xFFD8B4D4)
    val DayPeriod = Color(0xFFDF5A80)
    val DayStrongPeriod = Color(0xFFA62C61)
    val DayFertility = Color(0xFFE891AE)
    val DayPredicted = Color(0xFFCFA8D0)

    // ---- Text. ------------------------------------------------------------
    val OnLight = Color(0xFF2A1B2C)
    val OnDark = Color(0xFFF3E6F1)

    /**
     * Error, kept in the family rather than borrowed from Material.
     *
     * A stock red would be the one loud thing on a screen that is otherwise
     * deliberately calm, and this app shows errors about health data.
     */
    val Error = Color(0xFF9B2B4A)
    val ErrorDark = Color(0xFFF0A8B8)
}
