/* Atlas visual system v1: Texly-inspired rhythm, original Black Tomato travel expression. */
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque-latin-variable.ada540c0e24a.woff2") format("woff2-variations"); font-style: normal; font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist-latin-variable.a147f99cd533.woff2") format("woff2-variations"); font-style: normal; font-weight: 100 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-400.79936b18df9f.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-600.5a2ce7798732.woff2") format("woff2"); font-style: normal; font-weight: 600; font-display: swap; }

:root {
  --color-paper: #f6f5f1;
  --color-paper-2: #ecebe5;
  --color-paper-3: #deddd6;
  --color-ink: #101114;
  --color-ink-2: #202329;
  --color-muted: #5d6571;
  --color-rule: #d7d8d5;
  --color-rule-2: #aab0b7;
  --color-accent: #fdbf2d;
  --color-accent-deep: #dc8a00;
  --color-accent-ink: #101114;
  --color-focus: #fdbf2d;
  --color-error: #b8382c;
  --color-success: #2f8664;
  --color-surface: #ffffff;
  --color-map-land: #b9c2c5;
  --color-map-line: #74828a;
  --font-display: "Bricolage Grotesque", "Avenir Next", sans-serif;
  --font-body: "Geist", "Avenir Next", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, monospace;
  --radius-sm: .45rem;
  --radius-md: .9rem;
  --radius-lg: 1.35rem;
  --shadow-card: 0 1px 1px rgb(6 28 58 / .04), 0 18px 55px rgb(6 28 58 / .09);
  --shadow-float: 0 28px 90px rgb(0 0 0 / .28);
  --ease-enter: cubic-bezier(.25, 1, .5, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur-fast: 140ms;
  --dur-mid: 360ms;
  --dur-slow: 760ms;
}

html[data-appearance="dark"] {
  --color-paper: #101114;
  --color-paper-2: #17191d;
  --color-paper-3: #22252a;
  --color-ink: #f7f7f5;
  --color-ink-2: #e0e4e8;
  --color-muted: #aab4c0;
  --color-rule: #30343a;
  --color-rule-2: #505862;
  --color-accent: #fdbf2d;
  --color-accent-deep: #ffd36a;
  --color-accent-ink: #101114;
  --color-focus: #fdbf2d;
  --color-error: #ff9388;
  --color-success: #7bd3ab;
  --color-surface: #17191d;
  --color-map-land: #243952;
  --color-map-line: #5b7695;
  --shadow-card: 0 1px 1px rgb(0 0 0 / .15), 0 18px 60px rgb(0 0 0 / .28);
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); transition: color var(--dur-mid) var(--ease-out), background-color var(--dur-mid) var(--ease-out); }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

.appearance-toggle {
  position: fixed;
  inset: auto max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) auto;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 2.6rem;
  padding: .45rem .8rem .45rem .5rem;
  color: #f7f7f5;
  background: rgb(6 28 58 / .82);
  border: 1px solid rgb(255 255 255 / .18);
  border-radius: 999px;
  box-shadow: 0 10px 32px rgb(0 0 0 / .2);
  backdrop-filter: blur(18px);
  font: 600 .72rem var(--font-body);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-mid) var(--ease-out);
}
.appearance-toggle:hover { transform: translateY(-2px); }
.appearance-orbit { position: relative; display: grid; place-items: center; width: 1.65rem; height: 1.65rem; border: 1px solid rgb(255 255 255 / .25); border-radius: 50%; }
.appearance-orbit::before { content: ""; width: .65rem; height: .65rem; border-radius: 50%; background: var(--color-accent); box-shadow: 0 0 1rem rgb(253 191 45 / .65); transition: transform var(--dur-slow) var(--ease-enter), box-shadow var(--dur-slow) var(--ease-enter); }
.appearance-orbit i { position: absolute; inset: -.18rem; border: 1px solid rgb(255 255 255 / .12); border-radius: 50%; transform: rotate(-25deg); }
html[data-appearance="dark"] .appearance-orbit::before { transform: translateX(.28rem); box-shadow: -.28rem 0 0 #061c3a, 0 0 .8rem rgb(255 211 106 / .22); }

/* Authentication: full-bleed cartographic threshold with a restrained glass panel. */
.auth-page { background: #061c3a; }
.atlas-threshold {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  background-color: #061c3a;
  background-image: url("media/atlas-world-dawn-v1.8eb1a19d209c.webp");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: calc(50% + var(--scene-x, 0px)) calc(50% + var(--scene-y, 0px));
  transition: background-position .42s var(--ease-out);
}
.atlas-threshold::before,
.atlas-threshold::after { content: ""; position: absolute; inset: 0; pointer-events: none; transition: opacity 1.2s var(--ease-in-out); }
.atlas-threshold::before { z-index: -1; background: linear-gradient(90deg, rgb(3 14 31 / .82) 0%, rgb(3 14 31 / .34) 54%, rgb(3 14 31 / .14) 100%); }
.atlas-threshold::after { z-index: -1; opacity: 0; background: rgb(3 15 34 / .54); mix-blend-mode: multiply; }
html[data-appearance="dark"] .atlas-threshold::after { opacity: 1; }
.atlas-visual { justify-content: flex-start; background: transparent; color: #fff; }
.atlas-visual::after { display: none; }
.wordmark { animation: atlas-enter var(--dur-slow) var(--ease-enter) both; }
.wordmark > span:first-child { display: inline-flex; align-items: center; gap: .7rem; }
.wordmark > span:first-child::before { content: ""; display: block; width: 1.35rem; height: 1.35rem; flex: 0 0 auto; background: url("black-tomato-mark.5485bf2e48bb.svg") center / contain no-repeat; filter: drop-shadow(0 4px 10px rgb(0 0 0 / .22)); }
.atlas-visual .field-copy { margin-top: clamp(2.5rem, 10svh, 7rem); padding-block: 0; }
.field-copy { text-shadow: 0 2px 24px rgb(0 0 0 / .38); animation: atlas-enter var(--dur-slow) var(--ease-enter) .1s both; }
.field-copy h1 { max-width: 9.5ch; font-family: var(--font-display); font-weight: 480; letter-spacing: -.055em; }
.field-copy .overline { color: #ffd36a; }
.field-copy p:last-child { color: rgb(255 255 255 / .78); }
.field-footer { color: rgb(255 255 255 / .72); }
.field-footer i { color: var(--color-accent); font-style: normal; }
.route-map-cinematic, .atlas-visual .route-map { z-index: 1; opacity: .42; filter: drop-shadow(0 0 12px rgb(253 191 45 / .25)); }
.atlas-visual .route { stroke: rgb(253 191 45 / .7); stroke-width: 1.1; stroke-dasharray: 4 11; }
.atlas-visual .marker circle { fill: var(--color-accent); }
.atlas-visual .marker text { fill: #fff; }
.auth-panel { background: transparent; }
.auth-card {
  padding: clamp(1.6rem, 4vw, 2.6rem);
  color: #f7f7f5;
  background: rgb(6 28 58 / .78);
  border: 1px solid rgb(255 255 255 / .16);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(24px) saturate(115%);
  animation: auth-panel-enter .62s var(--ease-enter) .12s both;
}
.auth-card .eyebrow { color: #ffd36a; }
.auth-card h2 { color: #fff; font-family: var(--font-display); font-weight: 480; }
.auth-card .lede, .auth-card .field-help, .auth-card .sso-note, .auth-card .privacy-note { color: rgb(255 255 255 / .64); }
.auth-card .field-group label { color: rgb(255 255 255 / .9); }
.auth-card .input-shell input { color: #fff; background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .24); }
.auth-card .input-shell input::placeholder { color: rgb(255 255 255 / .46); }
.auth-card .input-shell input:hover { background: rgb(255 255 255 / .12); }
.auth-card .input-shell input:focus-visible { border-color: var(--color-accent); outline-color: rgb(253 191 45 / .32); }
.auth-card .input-status { border-color: rgb(255 255 255 / .38); }
.auth-card .primary-action { min-height: 3.45rem; border-radius: .55rem; }
.auth-card .primary-action:hover { background: #ffd36a; }
.auth-card .or { color: rgb(255 255 255 / .46); }
.auth-card .or::before, .auth-card .or::after { background: rgb(255 255 255 / .15); }
.auth-card .sso-action { color: rgb(255 255 255 / .55); border-color: rgb(255 255 255 / .18); }
.auth-card .text-action { color: #fff; }

/* Atlas home: a calm launch surface with one clear operational route. */
.home-page, .workspace-page { background: var(--color-paper); }
.home-nav, .workspace-nav {
  min-height: 4.7rem;
  border-color: var(--color-rule);
  background: color-mix(in srgb, var(--color-paper) 88%, transparent);
  backdrop-filter: blur(20px) saturate(130%);
  transition: background-color var(--dur-mid) var(--ease-out), border-color var(--dur-mid) var(--ease-out);
}
.home-nav { position: sticky; top: 0; z-index: 30; padding-inline: clamp(1rem, 4vw, 3rem); }
.home-brand { color: var(--color-ink); font-family: var(--font-body); letter-spacing: .12em; }
.home-brand span { color: var(--color-accent-deep); }
.nav-status { display: none; align-items: center; gap: .5rem; color: var(--color-muted); font-size: var(--text-xs); }
.nav-status i, .live-state i { width: .45rem; height: .45rem; border-radius: 50%; background: var(--color-success); box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--color-success) 14%, transparent); }
.home-main { max-width: 92rem; padding-top: clamp(2.5rem, 7vw, 6.5rem); }
.home-hero { display: grid; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.home-hero-copy { min-width: 0; }
.home-main h1 { max-width: 11ch; font-family: var(--font-display); font-weight: 470; letter-spacing: -.06em; }
.home-lede { max-width: 36rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }
.primary-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 1.4rem; min-height: 3.2rem; padding: .65rem 1rem; color: var(--color-accent-ink); background: var(--color-accent); border-radius: .55rem; font-weight: 700; text-decoration: none; transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out); }
.primary-link:hover { background: #ffd36a; transform: translateY(-2px); }
.hero-caption { color: var(--color-muted); font-size: var(--text-xs); }
.atlas-window {
  position: relative;
  min-height: clamp(20rem, 39vw, 32rem);
  overflow: hidden;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-lg);
  background: #061c3a url("media/atlas-world-dawn-v1.8eb1a19d209c.webp") 57% center / cover no-repeat;
  box-shadow: var(--shadow-card);
  isolation: isolate;
}
.atlas-window::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(6 28 58 / .02), rgb(6 28 58 / .42)); }
.atlas-window::after { content: ""; position: absolute; width: 36%; aspect-ratio: 1; inset: 22% auto auto 35%; border: 1px solid rgb(253 191 45 / .28); border-radius: 50%; box-shadow: 0 0 0 3rem rgb(253 191 45 / .04), 0 0 0 7rem rgb(253 191 45 / .025); animation: map-pulse 5s ease-in-out infinite; }
.window-coordinate, .window-label { position: absolute; z-index: 2; bottom: 1rem; color: rgb(255 255 255 / .72); font: 500 .65rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.window-coordinate { left: 1rem; }
.window-label { right: 1rem; color: #ffd36a; }
.workspace-intro { display: grid; gap: 1rem 3rem; align-items: end; margin-top: clamp(4.5rem, 10vw, 9rem); padding-bottom: 1.5rem; border-bottom: 1px solid var(--color-ink); }
.workspace-intro h2 { margin: 0; font: 480 clamp(2.2rem, 5vw, 4.5rem)/.95 var(--font-display); letter-spacing: -.045em; }
.workspace-intro > p { max-width: 34rem; margin: 0; color: var(--color-muted); line-height: 1.6; }
.atlas-card-grid { gap: 1rem; margin-top: 1rem; }
.atlas-card { position: relative; min-height: 18rem; padding: 1.35rem; border: 1px solid var(--color-rule); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-card); transition: transform var(--dur-mid) var(--ease-out), border-color var(--dur-mid) var(--ease-out), background-color var(--dur-mid) var(--ease-out); }
.atlas-card:hover { transform: translateY(-4px); border-color: var(--color-rule-2); }
.atlas-card > span:first-child { color: var(--color-accent-deep); }
.atlas-card .card-state { position: absolute; top: 1.3rem; right: 1.3rem; margin: 0; color: var(--color-muted); font-size: var(--text-xs); }
.atlas-card .live-state { display: flex; align-items: center; gap: .5rem; color: var(--color-success); }
.atlas-card h2 { margin-top: 4rem; font-family: var(--font-display); font-weight: 500; }
.active-area { margin-inline: 0; background: var(--color-surface); }
.active-area h2 a { text-decoration: none; }
.muted-card { background: color-mix(in srgb, var(--color-paper-2) 55%, var(--color-surface)); }

/* Operational workspaces: modular analytics without losing density. */
.workspace-main, .provider-main { padding-top: clamp(2.5rem, 5vw, 5rem); }
.workspace-heading h1, .provider-hero h1, .section-heading h2, .provider-identity h3, .audit-grid h3, .empty-state h3 { font-family: var(--font-display); font-weight: 480; }
.workspace-heading { padding-bottom: 2rem; border-bottom: 1px solid var(--color-rule); }
.freshness { min-width: 13rem; padding: 1rem; border: 1px solid var(--color-rule); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-card); }
.status-dot { animation: status-pulse 2.4s ease-in-out infinite; }
.metric-strip { gap: 1px; overflow: hidden; border: 1px solid var(--color-rule); border-radius: var(--radius-md); background: var(--color-rule); box-shadow: var(--shadow-card); }
.metric-strip article { padding: 1.35rem; border: 0 !important; background: var(--color-surface); }
.metric-strip strong { font-family: var(--font-display); font-weight: 480; }
.world-map { border-radius: var(--radius-lg); background: #0b2a52; border-color: color-mix(in srgb, var(--color-rule) 55%, transparent); box-shadow: var(--shadow-card); }
.world-map::before { background-image: linear-gradient(to right, rgb(255 255 255 / .045) 1px, transparent 1px), linear-gradient(to bottom, rgb(255 255 255 / .045) 1px, transparent 1px); }
.world-map svg path { fill: #36516f; stroke: #7b94ad; }
.map-marker { color: #fff; }
.map-marker strong { color: #fff; background: rgb(6 28 58 / .82); backdrop-filter: blur(10px); }
.map-marker span { color: #061c3a; background: #fff; border-color: #0b2a52; box-shadow: 0 0 0 1px #fff, 0 8px 24px rgb(0 0 0 / .22); }
.map-marker.is-active span { background: var(--color-accent); box-shadow: 0 0 0 2px var(--color-accent), 0 0 2rem rgb(253 191 45 / .42); }
.grade-panel, .changes-panel { min-width: 0; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--color-rule); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-card); }
.filter-form { border-radius: var(--radius-md); background: #061c3a; box-shadow: var(--shadow-card); }
.filter-form input, .filter-form select { border-radius: .45rem; background: #fff; color: #101114; }
.search-field input { border-start-end-radius: 0; border-end-end-radius: 0; }
.provider-list > article { margin-top: .65rem; padding: 1.25rem; border: 1px solid var(--color-rule); border-radius: var(--radius-md); background: var(--color-surface); transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out); }
.provider-list > article:hover { transform: translateY(-2px); border-color: var(--color-rule-2); }
.provider-list { border: 0; }
.audit-grid article, .restriction-list > article, .empty-state { border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.audit-grid article { background: var(--color-surface); }
.restriction-list > article { background: #061c3a; }

[data-reveal] { opacity: 0; transform: translateY(18px); }
[data-reveal].is-visible { opacity: 1; transform: none; transition: opacity var(--dur-slow) var(--ease-enter), transform var(--dur-slow) var(--ease-enter); }

@keyframes atlas-enter { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes auth-panel-enter { from { opacity: 0; transform: translateY(24px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes map-pulse { 0%, 100% { opacity: .45; transform: scale(.96); } 50% { opacity: .9; transform: scale(1.03); } }
@keyframes status-pulse { 0%, 100% { box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--color-success) 12%, transparent); } 50% { box-shadow: 0 0 0 .5rem color-mix(in srgb, var(--color-success) 2%, transparent); } }

@media (min-width: 48rem) {
  .nav-status { display: flex; }
  .home-hero { grid-template-columns: minmax(0, .86fr) minmax(26rem, 1.14fr); }
  .workspace-intro { grid-template-columns: minmax(0, 1fr) minmax(20rem, .7fr); }
}

@media (min-width: 60rem) {
  .atlas-threshold { grid-template-columns: minmax(0, 1.35fr) minmax(29rem, .65fr); }
  .atlas-visual { padding: 2rem clamp(2rem, 4vw, 4.5rem); }
  .auth-panel { padding: 2.2rem clamp(1.5rem, 3vw, 3.5rem); }
  .auth-wrap { margin-block: auto; }
}

@media (max-width: 59.99rem) {
  .atlas-threshold { grid-template-rows: minmax(21rem, 46svh) auto; background-position: 45% center; }
  .atlas-threshold::before { background: linear-gradient(180deg, rgb(3 14 31 / .3), rgb(3 14 31 / .86) 47%, #061c3a 72%); }
  .atlas-visual { min-height: 21rem; }
  .atlas-visual .field-copy { margin-top: clamp(1.75rem, 5svh, 3rem); }
  .auth-panel { background: #061c3a; }
  .auth-card { box-shadow: none; }
  .field-footer { display: none; }
}

@media (max-width: 39.99rem) {
  .appearance-toggle { padding-right: .55rem; }
  .appearance-toggle [data-appearance-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .home-nav { grid-template-columns: 1fr auto; }
  .home-hero { gap: 2.5rem; }
  .atlas-window { min-height: 17rem; }
  .atlas-card { min-height: 15rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .status-dot, .atlas-window::after { animation: none; }
  [data-reveal] { opacity: 1; transform: none; }
}
