/* =============================================================================
   NEA Platform — site styles (Slice 0 foundation)
   Mobile-first: base rules are the phone layout; wider screens add rules with min-width queries.
   Breakpoints verified in UAT: 360, 768, 1024 and 1440 px.
   No inline styles anywhere (strict Content-Security-Policy), so every style lives in this file.
   Fonts: system stacks until the Bodoni 72 / Avenir web-font licences are confirmed (plan item A5).
   ============================================================================= */

/* ---- Design tokens ---- */
:root {
    --navy-900: #020e1c;                     /* page background */
    --navy-800: #061a30;                     /* raised surfaces */
    --navy-700: #0c2a4a;                     /* borders on dark */
    --ivory: #f5efe0;                        /* body text on dark */
    --ivory-dim: #c9c2b0;                    /* secondary text */
    --gold: #c9a227;                         /* accent */
    --gold-bright: #e3bf4b;                  /* accent hover */
    --focus: #ffffff;                        /* focus ring colour */
    --font-serif: "Bodoni 72", "Bodoni MT", Didot, "Playfair Display", Georgia, serif;
    --font-sans: Avenir, "Avenir Next", "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
    --space: clamp(1rem, 2.5vw, 1.5rem);     /* fluid base spacing */
    --max-width: 72rem;                      /* content column */
}

/* ---- Reset essentials ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;                  /* footer sticks to the bottom on short pages */
    background: var(--navy-900);
    color: var(--ivory);
    font-family: var(--font-sans);
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    line-height: 1.6;
}
img, svg, video { max-width: 100%; height: auto; }   /* media never overflows a phone screen */
a { color: var(--gold-bright); }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.15; }

/* ---- Accessibility ---- */
/* Visible focus for keyboard users on every interactive element */
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* Skip link is off-screen until it receives keyboard focus */
.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--gold);
    color: var(--navy-900);
    padding: 0.75rem 1rem;
    z-index: 100;
}
.skip-link:focus { left: 0; }

/* Respect the visitor's reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}


/* ---- Buttons ---- */
.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    min-height: 2.75rem;                     /* comfortable touch target */
    border-radius: 2px;
    font-family: var(--font-serif);
    font-weight: 600;
    text-decoration: none;
    text-align: center;
}
.button--gold { background: var(--gold); color: var(--navy-900); }
.button--gold:hover { background: var(--gold-bright); }
.button--large { padding: 1rem 2.25rem; font-size: 1.125rem; }

/* ---- Main content and hero ---- */
.site-main { flex: 1 0 auto; }
.hero { padding: clamp(3rem, 10vw, 7rem) var(--space); text-align: center; }
.hero__inner { max-width: 48rem; margin: 0 auto; }
.hero__heading { font-size: clamp(2rem, 1.2rem + 4vw, 4rem); margin: 0 0 1rem; }
.hero__subheading { color: var(--ivory-dim); font-size: clamp(1.05rem, 1rem + 0.5vw, 1.35rem); margin: 0 0 2rem; }

/* Simple message pages (404, error) */
.message { max-width: 36rem; margin: 0 auto; padding: clamp(3rem, 10vw, 6rem) var(--space); text-align: center; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--navy-700); background: var(--navy-800); color: var(--ivory-dim); font-size: 0.9rem; }
.site-footer__inner { max-width: var(--max-width); margin: 0 auto; padding: var(--space); text-align: center; }
.site-footer__line { margin: 0.25rem 0; }
.site-footer__links { list-style: none; margin: 0.75rem 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1.25rem; }
.site-footer__links a { display: inline-block; padding: 0.5rem 0; min-height: 2.75rem; }

/* ---- Tablet and up (768px): brand left, nav in the middle, button right on one row ---- */
@media (min-width: 768px) {
    .site-footer__inner { text-align: left; }
    .site-footer__links { justify-content: flex-start; }
}


/* =============================================================================
   Studio (sign-in, enrolment, home): plain, mobile-first, no public chrome
   ============================================================================= */
.studio-header { display: flex; align-items: center; justify-content: center; gap: 0.75rem; padding: clamp(1.5rem, 5vw, 2.5rem) var(--space) 0; }
.studio-header__mark { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 9px; font-family: var(--font-serif); font-size: 1.3rem; color: #1a1204; background: linear-gradient(135deg, #f0d98a, #b8923a 55%, #e5c77a); }
.studio-header__brand { display: grid; font-family: var(--font-serif); font-size: 1.15rem; line-height: 1.2; letter-spacing: 0.02em; }
.studio-header__brand small { font-family: var(--font-sans); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ivory-dim); }
.studio-foot { margin: 0; padding: 1rem var(--space) 1.5rem; text-align: center; font-size: 0.75rem; letter-spacing: 0.08em; color: var(--ivory-dim); }
.studio { flex: 1 0 auto; padding: var(--space); }
body:has(.studio) { background: #0a0a14 radial-gradient(ellipse at 15% 0%, rgba(122, 63, 192, 0.22), transparent 55%), radial-gradient(ellipse at 100% 100%, rgba(43, 58, 159, 0.22), transparent 50%) fixed; }
.studio-card { max-width: 32rem; margin: clamp(1.5rem, 6vw, 4rem) auto; padding: calc(var(--space) * 1.3); background: linear-gradient(180deg, rgba(22, 26, 61, 0.85), rgba(16, 18, 45, 0.85)); border: 1px solid rgba(215, 184, 89, 0.3); border-radius: 12px; } position: relative; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
.studio-card h1 { margin-top: 0; font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2rem); }
.studio-card > h1 { text-align: center; }
.studio-card .button { display: flex; justify-content: center; width: 100%; margin-top: 0.5rem; }
.studio-card .button + .button { margin-top: 0.75rem; }
.studio-card .button:not(.button--gold) { background: rgba(255, 255, 255, 0.05); color: var(--ivory); border: 1px solid rgba(255, 255, 255, 0.2); }
.studio-card .button:not(.button--gold):hover { border-color: var(--gold); }
.studio-card .button--gold { background: linear-gradient(135deg, #f0d98a, #c9a24b 55%, #e5c77a); letter-spacing: 0.04em; }
.studio-card h2 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.13); }
.studio-card label { display: block; font-size: 0.85rem; font-weight: 600; margin: 0.75rem 0 0.3rem; }
.studio-card input[type="text"] { width: 100%; min-height: 2.75rem; padding: 0.5rem 0.75rem; font: inherit; color: var(--ivory); background: rgba(6, 6, 18, 0.7); border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 9px; }
.studio-card a:not(.button) { color: var(--gold-bright); }
.studio-form { display: grid; gap: 0.5rem; }
.studio-form label { font-weight: 600; margin-top: 0.5rem; }
.studio-form input, .studio-result { width: 100%; min-height: 2.75rem; padding: 0.5rem 0.75rem; background: rgba(6, 6, 18, 0.7); color: var(--ivory); border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 9px; font: inherit; }
.studio-form button { margin-top: 1rem; }
.studio-status { min-height: 1.5rem; margin: 1rem 0 0; }
.studio-status--error { color: #ff9b9b; }
.studio-help { color: var(--ivory-dim); font-size: 0.9rem; }
button.button { border: 0; cursor: pointer; }
button.button:disabled { opacity: 0.6; cursor: wait; }

/* My passkeys list */
.passkey-list { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: 0.5rem; }
.passkey-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.75rem; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 9px; }

/* My passkeys: the remove button is a compact outlined button; greyed (not removable) while it is the only passkey */
.studio-card .passkey-item .button { width: auto; margin: 0; padding: 0.5rem 1rem; min-height: 2.5rem; color: #ffb3b3; border-color: rgba(224, 122, 122, 0.55); background: transparent; }
.studio-card .passkey-item .button:hover:not(:disabled) { border-color: #e07a7a; background: rgba(224, 122, 122, 0.12); }
.studio-card .passkey-item .button:disabled { color: var(--ivory-dim); border-color: rgba(255, 255, 255, 0.2); opacity: 0.7; cursor: not-allowed; }
