/*
Theme Name: Octinex Atlas
Description: Staff portal for Octinex Atlas: sign-in, chat and "My tasks", in the Octinex design system (Octi-Site DESIGN.md) with the octinex character rain on the home page. No blog, no comments.
Version: 0.1.3
Requires PHP: 8.1
Author: Octinex
Text Domain: atlas
*/

/* ── Fonts (self-hosted, SIL OFL; no requests to Google) ─────────────────── */
@font-face { font-family: 'Space Grotesk'; src: url('assets/fonts/space-grotesk-var.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Oxanium'; src: url('assets/fonts/oxanium-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('assets/fonts/jetbrains-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }

/* ── Tokens (DESIGN.md) ──────────────────────────────────────────────────── */
:root {
  --font-glyph: 'JetBrains Mono';          /* the rain's characters (glyph/font.ts reads this) */
  --font-body: 'Space Grotesk', system-ui, sans-serif;
  --font-display: 'Oxanium', system-ui, sans-serif;
  --indigo: #4F46E5;                       /* the one interactive colour */
  --indigo-hover: #4338CA;
  --identity: #221B6E;                     /* identity ground (home) */
  --navy: #0F172A;                         /* housing; text on light */
  --navy-surface: #16213A;
  --navy-line: #1E2A4A;
  --navy-deep: #060A14;
  --amber: #F59E0B;                        /* warmth: glows on dark, solid marks on light */
  --amber-logo: #FFAE1A;
  --slate: #64748B;                        /* secondary text on light (≈4.8:1) */
  --on-dark-2: #A5B0C8;                    /* secondary text on dark grounds */
  --white: #F8FAFC;
  --band: #F1F5F9;
  --line: #E2E8F0;
  --line-hover: #CBD5E1;
  --danger: #DC2626;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1280px;
  --gutter: clamp(20px, 5vw, 80px);
  --header-h: 69px;                        /* the home hero slides under the header by this much */
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--navy); font: 400 16px/1.65 var(--font-body); text-wrap: pretty; }
a { color: var(--indigo); text-underline-offset: 3px; }
a:hover { color: var(--indigo-hover); }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; border-radius: 4px; }
img, svg { display: block; max-width: 100%; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.atlas-label { font: 600 11px/1.4 var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; }
.atlas-container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* ── Header (dark bar on every page) ─────────────────────────────────────── */
.atlas-header { position: relative; z-index: 3; background: var(--navy); color: var(--white); border-bottom: 1px solid var(--navy-line); }
/* Home: the rain falls behind a soft fade, so the logo (a drawing, which the engine does not keep clear) stays clean. */
.atlas-home .atlas-header { background: linear-gradient(to bottom, rgba(34, 27, 110, 0.96) 55%, rgba(34, 27, 110, 0)); border-bottom-color: transparent; }
.atlas-header .atlas-container { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.atlas-lockup { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.atlas-lockup svg { height: 16px; width: auto; }
.atlas-lockup-product { font: 700 15px/1 var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; padding-left: 14px; border-left: 1px solid rgba(248, 250, 252, 0.25); }
.atlas-lockup:hover { color: inherit; }
.atlas-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.atlas-nav a { white-space: nowrap; color: var(--white); text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 8px; transition: background 150ms var(--ease); }
.atlas-nav a:hover { background: rgba(248, 250, 252, 0.08); color: var(--white); }
.atlas-nav a[aria-current="page"] { background: rgba(79, 70, 229, 0.35); }
.atlas-nav .atlas-nav-quiet { color: var(--on-dark-2); }

/* ── Home: identity ground with the character rain ───────────────────────── */
.atlas-hero { position: relative; min-height: 100svh; margin-top: calc(-1 * var(--header-h)); padding-top: var(--header-h); display: flex; flex-direction: column; overflow: hidden; color: var(--white);
  background: radial-gradient(110% 130% at 50% 0%, #2A2384 0%, var(--identity) 58%, #1D1763 100%); }
.atlas-stage { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.atlas-aurora { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(40% 35% at 18% 78%, rgba(79, 70, 229, 0.22), transparent 70%), radial-gradient(30% 28% at 82% 22%, rgba(245, 158, 11, 0.12), transparent 70%);
  animation: atlasDrift 18s ease-in-out infinite alternate; }
@keyframes atlasDrift { to { transform: translate3d(2%, -2%, 0) scale(1.04); } }
@keyframes atlasRise { from { opacity: 0; transform: translateY(14px); } }
.atlas-hero-body { position: relative; z-index: 2; flex: 1; display: grid; align-items: end; gap: 48px; padding-top: 48px; padding-bottom: clamp(48px, 8vh, 96px); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .atlas-hero-body { grid-template-columns: minmax(0, 1fr) 400px; } }
.atlas-hero-copy > * { animation: atlasRise 500ms var(--ease) both; }
.atlas-hero-copy > :nth-child(2) { animation-delay: 80ms; }
.atlas-hero-copy > :nth-child(3) { animation-delay: 160ms; }
.atlas-badge { display: inline-flex; align-items: center; gap: 10px; color: var(--on-dark-2); }
.atlas-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber-logo); box-shadow: 0 0 12px rgba(255, 174, 26, 0.7); }
.atlas-display { margin: 18px 0 0; max-width: 15ch; font: 700 clamp(40px, 7vw, 64px)/1.08 var(--font-display); letter-spacing: -0.02em; text-wrap: balance; }
.atlas-lede { margin: 20px 0 0; max-width: 560px; color: var(--on-dark-2); font-size: 18px; }

/* Sign-in card and the two doors (dark surfaces on the identity ground) */
.atlas-card { position: relative; background: rgba(22, 33, 58, 0.92); border: 1px solid var(--navy-line); border-radius: 16px; padding: 28px; box-shadow: 0 24px 60px -24px rgba(6, 10, 20, 0.7); animation: atlasRise 600ms 120ms var(--ease) both; }
.atlas-card h2 { margin: 0 0 4px; font: 600 22px/1.25 var(--font-body); letter-spacing: -0.5px; }
.atlas-card p { margin: 0 0 20px; color: var(--on-dark-2); font-size: 15px; }
.atlas-card label { display: block; margin: 14px 0 6px; font-size: 14px; font-weight: 500; }
.atlas-card input[type="text"], .atlas-card input[type="password"] { width: 100%; padding: 11px 12px; border: 1px solid var(--navy-line); border-radius: 8px; background: var(--navy); color: var(--white); font: inherit; }
.atlas-card input[type="text"]:focus, .atlas-card input[type="password"]:focus { border-color: var(--indigo); outline: none; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.35); }
.atlas-card .login-remember { margin-top: 12px; }
.atlas-card .login-remember label { display: inline-flex; gap: 8px; align-items: center; margin: 0; font-weight: 400; color: var(--on-dark-2); }
.atlas-card .login-submit { margin: 20px 0 0; }
.atlas-button, .atlas-card input[type="submit"] { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px 18px; border: 0; border-radius: 8px; background: var(--indigo); color: #fff; font: 600 15px/1.2 var(--font-body); text-decoration: none; cursor: pointer; transition: background 150ms var(--ease); }
.atlas-button:hover, .atlas-card input[type="submit"]:hover { background: var(--indigo-hover); color: #fff; }
.atlas-card-foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--navy-line); color: var(--on-dark-2); font-size: 13px; }
.atlas-card-foot a { color: var(--white); }
.atlas-doors { display: grid; gap: 12px; }
.atlas-door { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--navy-line); border-radius: 12px; background: var(--navy); color: var(--white); text-decoration: none; transition: border-color 150ms var(--ease), transform 150ms var(--ease); }
.atlas-door:hover { color: var(--white); border-color: var(--indigo); transform: translateY(-1px); }
.atlas-door strong { display: block; font-size: 17px; font-weight: 600; }
.atlas-door span { color: var(--on-dark-2); font-size: 14px; }
.atlas-door-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: rgba(79, 70, 229, 0.25); color: #C7D2FE; font: 700 18px/1 var(--font-glyph), monospace; }
.atlas-door-count { margin-left: auto; flex: none; padding: 4px 10px; border-radius: 999px; background: rgba(245, 158, 11, 0.16); color: #FCD34D; font-size: 13px; font-weight: 600; }
.atlas-hero-note { position: relative; z-index: 2; width: 100%; margin: 0 auto; padding-bottom: 20px; color: var(--on-dark-2); }

/* ── Inner pages (chat, My tasks): cool light band ───────────────────────── */
.atlas-page { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); background: var(--band); min-height: calc(100svh - var(--header-h) - 64px); }
.atlas-page-head { margin-bottom: 28px; }
.atlas-page-head .atlas-label { color: var(--slate); }
.atlas-page-head h1 { margin: 8px 0 0; font: 700 clamp(28px, 3.6vw, 40px)/1.1 var(--font-body); letter-spacing: -1px; text-wrap: balance; }
.atlas-page-content { max-width: 820px; }
/* The page heading already names the page; keep the plugin box's one-line explanation, drop its title. */
.atlas-page .atlas-chat-head strong { display: none; }
.atlas-page .atlas-chat-head span { font-size: 14px; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.atlas-footer { background: var(--navy-deep); color: var(--on-dark-2); font-size: 13px; }
.atlas-footer .atlas-container { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; min-height: 64px; }
.atlas-footer svg { height: 10px; width: auto; }

/* ── Motion off: same page, standing still ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .atlas-aurora, .atlas-hero-copy > *, .atlas-card { animation: none; }
  .atlas-door, .atlas-nav a { transition: none; }
}

/* Phones: navigation in its own row under the logo. */
@media (max-width: 640px) {
  :root { --header-h: 104px; }
  .atlas-header .atlas-container { flex-wrap: wrap; gap: 4px 16px; min-height: var(--header-h); padding-top: 14px; padding-bottom: 8px; align-content: center; }
  .atlas-nav { margin-left: -10px; width: calc(100% + 10px); }
  .atlas-nav a { padding: 8px 10px; font-size: 14px; }
  .atlas-nav .atlas-nav-quiet { margin-left: auto; }
  .atlas-card { padding: 22px; }
}
