/* App Nebula — candidate brand direction (design round 7; see Theme/BrandStyle.cs and
   trellis-family.css, which holds the structure this sheet colours).

   Idea: agents in orbit. Four robots circling an app grid in deep space, lit by one gradient that
   runs cyan through violet to magenta.

   Palette, from the brand sheet:
     dark    Deep Space #03051D · Nebula Cyan #03A4FD · Nebula Violet #9A54FC · Nebula Magenta #F931FD
             · Iris Steel #474C9C · Starlight #F3F2FF
     light   Starlight #F5F4FF · Deep Cyan #0A72C4 · Deep Violet #4A4FE0 · Deep Magenta #B3169E
             · Iris Mist #B8B4EA · Deep Space #0D0C33
   The gradient is the primary action and colours the second word of the wordmark. The accent text
   beside it is cyan on dark and violet on light, as the sheets draw it, and it carries research;
   purple marks planning, blue marks work that is built or approved, magenta carries review. The whole
   style is set in Outfit: no second face.

   Every text token holds WCAG 2.2 AA on panel, ground and inset in both schemes. */

[data-brand="nebula"] {
    --font-brand: var(--font-ui);

    /* Phases: accent (research/primary), purple (plan), blue (implement), magenta (review). */
    --phase-research: light-dark(#4a37d6, #4fd8ff);
    --phase-research-strong: light-dark(#3a2ab8, #9aeaff);
    --phase-plan: light-dark(#8a2bc2, #b892ff);
    --phase-plan-strong: light-dark(#7222a3, #d0b8ff);
    --phase-implement: light-dark(#0a6cb9, #7fa8ff);
    --phase-implement-strong: light-dark(#0a5c9e, #a9c4ff);
    --phase-review: light-dark(#b3169e, #ee8bff);
    --phase-review-strong: light-dark(#8f127f, #f4b3ff);

    --ink: light-dark(#0d0c33, #f3f2ff);
    --ink-body: light-dark(#232252, #dcdcf5);
    --ink-soft: light-dark(#54527f, #a9aedb);
    --ink-faint: light-dark(#7a78a6, #777cb5);
    --ink-mute: light-dark(#a3a0c8, #5b6099);

    --line: light-dark(#b8b4ea, #474c9c);
    --line-soft: light-dark(#dcdaf6, #20265c);
    --panel: light-dark(#ffffff, #0a0d30);
    --ground: light-dark(#f5f4ff, #03051d);
    --inset: light-dark(#f8f7ff, #0e1240);
    --shadow-ink: light-dark(rgba(13, 12, 51, .10), rgba(0, 0, 0, .5));

    --tint-research: light-dark(#eceaff, rgba(79, 216, 255, .10));
    --tint-plan: light-dark(rgba(138, 43, 194, .08), rgba(184, 146, 255, .12));
    --tint-implement: light-dark(#e3f1fb, rgba(127, 168, 255, .12));
    --tint-review: light-dark(#f9e8f6, rgba(231, 58, 252, .10));
    --tint-neutral: light-dark(#f3f2fb, rgba(255, 255, 255, .03));
    --rail-hover: light-dark(#f0eeff, #10154a);

    --on-hue: light-dark(#ffffff, #03051d);
    --primary-hover: light-dark(#3a2ab8, #9aeaff);
    --affirm-hover: light-dark(#084b80, #c7d9ff);

    /* The nebula gradient: cyan through violet to magenta. Five stops so the light scheme's three
       colours and the dark scheme's five land on the same positions. */
    --brand-gradient: linear-gradient(90deg,
        light-dark(#0a72c4, #03a4fd),
        light-dark(#2a61d2, #557bfd),
        light-dark(#4a4fe0, #9a54fc),
        light-dark(#7f33bf, #cc40fc),
        light-dark(#b3169e, #f931fd));
    --accent-fill: var(--brand-gradient);
    --accent-ink: var(--on-hue);
    --accent-glow:
        0 6px 16px light-dark(rgba(74, 79, 224, .28), transparent),
        0 0 24px light-dark(transparent, rgba(154, 84, 252, .5));
    --tint-accent: light-dark(#eceaff, rgba(111, 134, 255, .14));
    --edge-accent: light-dark(#a79bf0, rgba(111, 134, 255, .6));

    /* Ground: one violet light behind the hero, no grid. */
    --ground-glow: light-dark(rgba(74, 79, 224, .16), rgba(111, 134, 255, .22));
    --ground-grid: transparent;

    /* The mark: one supplied icon for both schemes, cut to the design's mask window; the white
       corners of the file fall outside the rounded mask. */
    --mark: url("img/nebula-icon-96.webp");
    --mark-hero: url("img/nebula-icon-512.webp");
    --mark-radius: 22.4%;
    --mark-ring: 0 0 0 0 transparent;
    --mark-glow:
        0 24px 80px light-dark(rgba(74, 79, 224, .3), transparent),
        0 0 110px light-dark(transparent, rgba(111, 134, 255, .4));
}

/* The wordmark: "App" in ink, "Nebula" in the gradient, both in Outfit. */
[data-brand="nebula"] .logotype-word {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Gradient-filled text: the fill is the background showing through transparent glyphs. Where the
   user agent forces colours it also forces `color`, so the word stays readable there. */
[data-brand="nebula"] .logotype-tail {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
