/* Two palettes. The inline script in <head> resolves "follow the system" into a
   real data-theme before the first paint, so there is no media query here: day
   is the bare :root, night is the attribute, and nothing is ever both.

   The four accents are Tailwind CSS's default palette (MIT): teal, indigo, pink
   and amber, at 600/700 for day and 300/400 for night. The one exception is --b
   at night, lightened by hand from indigo-300 because the Tailwind value sat too
   close to --a. Keep a replacement balanced against the two glass tones below,
   which are not from there and were tuned against these. */
:root {
  color-scheme: light;
  --bg: #f6f7fb; --surface: #fff; --fg: #111634; --lead: #39406a; --mut: #5c658c;
  --a: #0d9488; --b: #4f46e5; --c: #db2777; --d: #b45309;
  --glass: rgba(17, 22, 52, .04); --glass-hi: rgba(17, 22, 52, .08);
  --line: rgba(17, 22, 52, .14); --line-hi: rgba(17, 22, 52, .34);
  --navfade: rgba(246, 247, 251, .82); --shadow: rgba(17, 22, 52, .18);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  /* Lighter and more contrasty than the first draft, which read as murky:
     the background is off-black rather than black, and the muted tone and the
     glass panels are raised until the cards separate from it. */
  --bg: #0c1124; --surface: #171f3d; --fg: #eef1ff; --lead: #ccd4f7; --mut: #a4aed6;
  --a: #5eead4; --b: #97a3ff; --c: #f9a8d4; --d: #fbbf24;
  --glass: rgba(255, 255, 255, .07); --glass-hi: rgba(255, 255, 255, .13);
  --line: rgba(255, 255, 255, .17); --line-hi: rgba(255, 255, 255, .4);
  --navfade: rgba(12, 17, 36, .82); --shadow: rgba(0, 0, 0, .6);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--fg);
       font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.1; margin: 0; }

/* nav */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 10; display: flex; justify-content: space-between;
       align-items: center; gap: 1rem; padding: .9rem clamp(1rem, 4vw, 3rem);
       background: linear-gradient(var(--navfade), transparent); backdrop-filter: blur(6px); }
.brand { text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.brand .d { color: var(--a); font-size: 1.3em; margin-right: .1em; }
.nav-right { display: flex; align-items: center; gap: .4rem; }
.nav nav { display: flex; gap: clamp(.8rem, 2.5vw, 2rem); align-items: center; }
.nav nav a { text-decoration: none; color: var(--mut); transition: color .2s; }
.nav nav a:hover { color: var(--fg); }
/* Contact is the third button of the row that ends the bar, so it has to be
   the same object as the other two: the pill from static/controls.css, spelled
   out again because that file is shared with the designs that have no such bar.
   Keep the two in step by hand -- they are meant to be indistinguishable. */
.nav .cta { display: inline-flex; align-items: center;
            font-size: .78rem; line-height: 1; letter-spacing: .02em;
            color: var(--fg); background: transparent; padding: .4rem .7rem;
            border: 1px solid color-mix(in srgb, currentColor 30%, transparent); border-radius: 99px;
            transition: background .2s, border-color .2s, color .2s; }
.nav .cta:hover { color: var(--fg); background: color-mix(in srgb, currentColor 12%, transparent);
                  border-color: color-mix(in srgb, currentColor 55%, transparent); }

/* hero */
.hero { position: relative; min-height: min(88vh, 780px); display: grid; align-items: center; overflow: hidden;
        padding: 6rem clamp(1rem, 6vw, 5rem) 3rem; }
#field { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%;
               background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.hero-in { position: relative; z-index: 1; max-width: 62rem; }
.eyebrow { color: var(--a); letter-spacing: .16em; text-transform: uppercase; font-size: .8rem; margin: 0 0 1rem; }
h1 { font-size: clamp(3rem, 9.5vw, 8.5rem); font-weight: 800; letter-spacing: -.035em; }
h1 .t2 { background: linear-gradient(100deg, var(--a), var(--b) 55%, var(--c)); -webkit-background-clip: text;
         background-clip: text; color: transparent; }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.6rem); color: var(--lead); max-width: 40rem; margin: 1.2rem 0 1.6rem; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.chips li { display: flex; align-items: center; gap: .5rem; padding: .35rem .9rem .35rem .4rem; border-radius: 99px;
            background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(8px); font-size: .92rem; }
.chips .g { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%;
            background: linear-gradient(135deg, var(--a), var(--b)); color: var(--surface); font-weight: 700; font-size: .85rem; }
.cue { position: absolute; z-index: 1; bottom: 1.2rem; left: 50%; translate: -50% 0; text-decoration: none;
       color: var(--mut); font-size: 1.6rem; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { translate: -50% 8px; } }

/* sections */
.wrap { max-width: 72rem; margin: 0 auto; padding: 3.5rem clamp(1rem, 4vw, 2rem); }
.wrap > h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1.5rem; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
         gap: 1.5rem; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-top: 3.2rem; }
.steps li::before { content: "0" counter(s); position: absolute; top: 0; left: 0; font-size: 2.6rem; font-weight: 800;
                    background: linear-gradient(135deg, var(--a), var(--b)); -webkit-background-clip: text;
                    background-clip: text; color: transparent; }
.steps b { display: block; font-size: 1.5rem; margin-bottom: .2rem; }
.steps span { color: var(--mut); }
.grads { color: var(--mut); margin: 2rem 0 0; font-size: 1.1rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card { display: flex; flex-direction: column; gap: .6rem; padding: 1.4rem; border-radius: 22px; text-decoration: none;
        background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px);
        transition: transform .25s, border-color .25s, background .25s; position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 14rem; height: 14rem; border-radius: 50%;
                background: radial-gradient(var(--glow, var(--b)), transparent 65%); opacity: .22; transition: opacity .25s; }
.card.p1 { --glow: var(--a); } .card.p2 { --glow: var(--b); } .card.p3 { --glow: var(--c); } .card.p4 { --glow: var(--d); }
.card:hover { transform: translateY(-6px); border-color: var(--line-hi); background: var(--glass-hi); }
.card:hover::before { opacity: .5; }
.level { position: relative; align-self: flex-start; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase;
         padding: .15rem .6rem; border-radius: 99px; border: 1px solid var(--line); color: var(--mut); }
.card h3 { position: relative; font-size: 1.25rem; }
.card p { position: relative; margin: 0; color: var(--mut); flex: 1; }
/* Two destinations per card -- the dialog, and the whole programme -- so this
   row holds two links and the card itself is no longer one. position:relative
   keeps them above the card's glow, as everything else in the card is. */
.more { position: relative; display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; font-weight: 600; }
.more a { color: var(--a); text-decoration: none; }
.more a::after { content: " →"; transition: margin .2s; }
.more a:hover { text-decoration: underline; }
.card:hover .more a::after { margin-left: .4rem; }
.more .full { color: var(--mut); }
.more .full:hover { color: var(--a); }

.perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.perk { display: flex; flex-direction: column; gap: .3rem; padding: 1.2rem 0; border-top: 1px solid var(--line);
        text-decoration: none; }
.perk b { font-size: 1.5rem; line-height: 1.15; }
.perk span { color: var(--mut); }
a.perk:hover b { color: var(--a); }

.news { display: grid; }
.news-item { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; padding: 1rem 0; text-decoration: none;
             border-top: 1px solid var(--line); transition: padding .2s, color .2s; }
.news-item:last-child { border-bottom: 1px solid var(--line); }
.news-item:hover { padding-left: .8rem; color: var(--a); }
.news-item time { color: var(--mut); font-variant-numeric: tabular-nums; }
.more-links { color: var(--mut); }

footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; color: var(--mut);
         padding: 2rem clamp(1rem, 4vw, 3rem); border-top: 1px solid var(--line); font-size: .9rem; }

/* modal */
dialog.modal { border: 0; padding: 0; color: var(--fg); background: var(--surface); border-radius: 26px;
               width: min(40rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto;
               box-shadow: 0 30px 90px var(--shadow), 0 0 0 1px var(--line); margin: auto; }
dialog.modal[open] { animation: pop .25s cubic-bezier(.2, .9, .3, 1.2); }
/* ::backdrop does not reliably inherit custom properties, so it is spelled out. */
dialog.modal::backdrop { background: rgba(17, 22, 52, .45); backdrop-filter: blur(6px); }
:root[data-theme="dark"] dialog.modal::backdrop { background: rgba(3, 5, 12, .72); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.modal-body { position: relative; padding: 2rem clamp(1.2rem, 4vw, 2.2rem) 2.2rem; }
.modal-body::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
                      background: linear-gradient(90deg, var(--a), var(--b), var(--c)); }
.modal .kicker { color: var(--a); letter-spacing: .14em; text-transform: uppercase; font-size: .75rem; margin: 0 0 .5rem; }
.modal h2 { font-size: 1.8rem; margin-bottom: 1rem; padding-right: 2.5rem; }
.modal a { color: var(--a); }
.modal ul { padding-left: 1.2rem; }
.modal li { margin: .3rem 0; }
/* The way out of the dialog and into the whole programme. */
.modal .full { margin: 1.4rem 0 0; font-weight: 600; }
.modal .full a { text-decoration: none; }
.modal .full a::after { content: " →"; }
.modal .full a:hover { text-decoration: underline; }
.close { position: absolute; top: .8rem; right: .9rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid var(--line);
         background: var(--glass); color: var(--fg); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.close:hover { background: var(--glass-hi); }

@media (max-width: 640px) {
  .nav nav a:not(.cta) { display: none; }
  .news-item { grid-template-columns: 1fr; gap: .1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; } .cue, dialog.modal[open] { animation: none; }
}
