/* ============================================================
   NAKHLA JET — Design tokens: Mist by day, Midnight by night
   The site-wide design update (docs/design-update.md, approved by the PO on
   2026-10-19) carries v3's language to every page. The values come from the
   design system (https://claude.ai/artifact/SaRBJtwCchR6deEZDJF9Q2) and v3.

   The phone's setting picks the theme: Mist by default, Midnight under
   prefers-color-scheme: dark. There is no theme switch. Components read only
   the semantic --nj-* names below; the brand colours and the spacing scale
   are kept as the palette's and the scale's record.
   ============================================================ */

/* ---------------- MIST (day, default) ---------------- */
:root {
  color-scheme: light;

  /* Ground and surfaces */
  --nj-bg:          #EDF0F4;   /* mist */
  --nj-raised:      #E3E8EF;
  --nj-glow-top:    #F8FAFC;   /* the light in the room, top of the page */
  --nj-glow-bottom: rgba(138,179,214,.30);   /* sky light from the foot */

  /* Brand colours (fixed in both themes) */
  --nj-midnight:    #050A30;   /* Instagram navy */
  --nj-ink:         #1B2350;
  --nj-mist:        #EDF0F4;
  --nj-sea:         #1F4A69;
  --nj-sky:         #8AB3D6;
  --nj-dusk:        #EFB48C;
  --nj-on-dark:     #F2F4F8;

  /* The Arabic-edition banner: midnight by day */
  --nj-grad-band:   linear-gradient(165deg, #1B2350 0%, #050A30 100%);

  /* Text: ink 13.1:1 on mist; slate 5.1:1 */
  --nj-text:        #1B2350;
  --nj-text-soft:   #5A6771;

  /* Action: the one primary button and what is chosen */
  --nj-accent:        #050A30;   /* primary fill */
  --nj-accent-bright: #1F4A69;   /* links and small accents: sea, 8.2:1 on mist */
  --nj-on-accent:     #F2F4F8;
  --nj-action-hover:   #0E143D;
  --nj-action-pressed: #03061D;
  --nj-action-muted:   rgba(27,35,80,.10);
  --nj-action-wash:    rgba(27,35,80,.05);

  /* What is chosen */
  --nj-select-border: #1F4A69;

  /* Lines and materials */
  --nj-hairline:        rgba(27,35,80,.12);
  --nj-hairline-strong: rgba(27,35,80,.28);
  --nj-glass:         rgba(255,255,255,.58);
  --nj-glass-border:  rgba(255,255,255,.9);
  --nj-glass-hover:   rgba(255,255,255,.78);
  --nj-glass-chip:    rgba(255,255,255,.45);   /* pills */
  --nj-glass-strong:  rgba(255,255,255,.82);   /* a pill on a photo's edge */
  --nj-option-on:     rgba(255,255,255,.82);   /* a chosen answer, as v3 */
  --nj-option-off:    rgba(255,255,255,.34);   /* the answers not chosen, while one is */
  --nj-well:          rgba(27,35,80,.07);      /* an empty photo frame */
  --nj-backdrop:      rgba(5,10,48,.38);       /* behind a sheet */
  --nj-dock:          rgba(237,240,244,.66);   /* the frosted thumb zone */
  --nj-raised-btn:    #FFFFFF;                 /* round count buttons */

  /* Elevation: soft and low */
  --nj-shadow-1: 0 14px 30px -22px rgba(27,35,80,.45);
  --nj-shadow-3: 0 24px 64px -24px rgba(27,35,80,.35);
  --nj-shadow-button: inset 0 1px 0 rgba(255,255,255,.08), 0 1px 2px rgba(5,10,48,.18), 0 8px 18px -12px rgba(5,10,48,.5);
  --nj-shadow-frame:  0 22px 40px -24px rgba(27,35,80,.45);   /* a photo in its frame */
  --nj-shadow-sheet:  0 -20px 50px -20px rgba(5,10,48,.5);

  /* The one opposite-theme band per page: midnight by day */
  --nj-band-text:   #F2F4F8;
  --nj-band-soft:   #A9B4C8;
}

/* ---------------- MIDNIGHT (night: the phone's dark mode) ---------------- */
/* Night is off: every visitor sees Mist until night is reviewed against the new look (PO, 2026-11-05).
   To bring it back, put `(prefers-color-scheme: dark)` back in place of `not all` here, in v3.css,
   the JS in js/app.js (NJ.theme) and the theme-color meta in tools/prerender.mjs and v3/index.html. */
@media not all {
  :root {
    color-scheme: dark;

    --nj-bg:          #050A30;
    --nj-raised:      #141D55;
    --nj-glow-top:    #0D1850;
    --nj-glow-bottom: rgba(138,179,214,.16);

    --nj-grad-band:   linear-gradient(165deg, #141D55 0%, #0A1240 100%);

    /* on-dark 17.5:1 on midnight; quiet text 9.2:1 */
    --nj-text:        #F2F4F8;
    --nj-text-soft:   #A9B4C8;

    --nj-accent:        #F2F4F8;   /* the button inverts */
    --nj-accent-bright: #8AB3D6;   /* sky, 8.7:1 on midnight */
    --nj-on-accent:     #050A30;
    --nj-action-hover:   #FFFFFF;
    --nj-action-pressed: #DFE3EC;
    --nj-action-muted:   rgba(255,255,255,.12);
    --nj-action-wash:    rgba(255,255,255,.06);

    --nj-select-border: #8AB3D6;

    --nj-hairline:        rgba(255,255,255,.14);
    --nj-hairline-strong: rgba(255,255,255,.3);
    --nj-glass:         rgba(255,255,255,.07);
    --nj-glass-border:  rgba(255,255,255,.14);
    --nj-glass-hover:   rgba(255,255,255,.12);
    --nj-glass-chip:    rgba(255,255,255,.06);
    --nj-glass-strong:  rgba(13,24,80,.82);
    --nj-option-on:     rgba(255,255,255,.12);
    --nj-option-off:    rgba(255,255,255,.04);
    --nj-well:          rgba(255,255,255,.07);
    --nj-backdrop:      rgba(0,0,0,.55);
    --nj-dock:          rgba(5,10,48,.66);
    --nj-raised-btn:    rgba(255,255,255,.12);

    --nj-shadow-1: 0 14px 30px -22px rgba(0,0,0,.6);
    --nj-shadow-3: 0 24px 64px -24px rgba(0,0,0,.6);
    --nj-shadow-button: 0 1px 2px rgba(0,0,0,.4), 0 8px 18px -12px rgba(0,0,0,.65);
    --nj-shadow-frame:  0 22px 40px -24px rgba(0,0,0,.7);
    --nj-shadow-sheet:  0 -20px 50px -20px rgba(0,0,0,.7);

    /* The band turns to mist at night */
    --nj-band-text:   #1B2350;
    --nj-band-soft:   #5A6771;
  }
}

/* ---------------- Theme-invariant ---------------- */
:root {
  --nj-font-display: 'Cormorant Infant', 'Cormorant Garamond', Georgia, serif;
  --nj-font-body:    'Jost', 'Futura', 'Avenir Next', system-ui, sans-serif;
  --nj-text-lead: 17px; --nj-text-lead-md: 19px;
  --nj-text-body: 16px; --nj-text-body-md: 17px;

  --nj-s1:4px; --nj-s2:8px; --nj-s3:12px; --nj-s4:16px; --nj-s5:24px;
  --nj-s6:32px; --nj-s7:48px; --nj-s8:64px; --nj-s9:96px; --nj-s10:128px;
  --nj-gutter:20px; --nj-maxw:1280px;
  --nj-col: 480px;   /* a rebuilt page's column, as v3's */

  /* Radius: buttons are tailored (PO, 2026-10-19); chips and pills stay round */
  --nj-r-btn:  14px;
  --nj-r-pill: 999px;
  --nj-r-card: 20px;
  --nj-r-lg:  24px;
  --nj-glass-blur: 18px;

  /* Motion: v3's ease; content never waits on an animation */
  --nj-ease: cubic-bezier(.2,.7,.2,1);
  --nj-dur-tap: 150ms;  --nj-dur-fast: 200ms;  --nj-dur-med: 440ms;

  /* One height ladder for every control */
  --nj-ctl-sm: 44px;
  --nj-ctl-md: 48px;
  --nj-ctl-lg: 58px;    /* the tailored button's height */
  --nj-header-h: 56px;
}
@media (min-width: 720px) { :root { --nj-col: 520px; } }
