/*
  Lithessia front door: frontdoor/site/door/frontdoor.css, the whole look of the front door's pages in a Light and a Dark theme:
  the Aeris Launcher Design Brief v1.1 (Nathan's approved look of 23 October 2026) for the main page, and screen mock v0.4,
  which carries the brief's tokens to the public, sign-in and no-access screens (Claude's proposal).
  Depends on: nothing else. No other stylesheet loads, and no font is downloaded: Calibri, then Carlito, Arial or the device's
  sans-serif. shared/theme-init.js sets data-theme on <html> before the first paint, and shared/theme.js changes it.
  Contract: every colour is one of the brief's tokens, set for each theme by data-theme on <html>, with the constants the brief
  keeps in both themes. Cyan (#00ACDD) is never text on a light background: brand text is --brand. Every focus ring is --focus,
  cyan in Dark and the brief's Structural Blue (#00557D) in Light, so it keeps the 3 to 1 a focus ring needs on every background
  (WCAG 2 SC 1.4.11): Claude's accessibility fix within the brief's own accessibility rule (23 October 2026), as in Aeris's pack.
  --cy, --on-cy, --panel and --txt are the names shared/clerk-appearance.js reads, so Clerk's panel takes the theme's colours.
  shared/components.js draws its messages with the .app-msg classes, styled here. No page needs an inline style (the
  Content-Security-Policy forbids it). Two columns below 1100 px and one below 700 px, with no sideways scrolling at 375 px.
  Colour changes take at most 150 ms.
*/
:root,
[data-theme="dark"] {
  --bg-page: #0B1626;
  --bg-deep: #071120;
  --bg-card: #152740;
  --border-card: #1F3A5C;
  --border-quiet: #2C4A6E;
  --divider: #152740;
  --hero-a: #003C59;
  --hero-b: #0B1626;
  --ph-a: #00557D;
  --ph-b: #071120;
  --icon: #00E5FF;
  --text: #FFFFFF;
  --text-soft: #B8C7D4;
  --text-muted: #8AA0B4;
  --text-disabled: #6B8199;
  --brand: #00ACDD;
  --focus: #00ACDD;
  --card-shadow: none;
  --live-glow: 0 0 0 1px #00ACDD55, 0 12px 40px #00E5FF22;
  --live-glow-hover: 0 0 0 1px #00ACDD88, 0 16px 48px #00E5FF38;
  --soon-bg: #0B1626CC;
  --chip-bg: rgba(0, 172, 221, 0.12);
  --accent-a: #00ACDD;
  --accent-b: #75A38C;
  --bad: #FF9D9D;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg-page: #F4F7FA;
  --bg-deep: #FFFFFF;
  --bg-card: #FFFFFF;
  --border-card: #D5DEE6;
  --border-quiet: #C3CFD9;
  --divider: #E1E8EE;
  --hero-a: #DCEFF8;
  --hero-b: #F4F7FA;
  --ph-a: #CDEBF6;
  --ph-b: #E8F1F7;
  --icon: #00557D;
  --text: #15222C;
  --text-soft: #5E6A73;
  --text-muted: #5E6A73;
  --text-disabled: #8A97A1;
  --brand: #00557D;
  --focus: #00557D;
  --card-shadow: 0 2px 10px #15222C14;
  --live-glow: 0 0 0 1px #00ACDD66, 0 12px 32px #00ACDD2E;
  --live-glow-hover: 0 0 0 1px #00ACDD99, 0 16px 40px #00ACDD44;
  --soon-bg: #FFFFFFE6;
  --chip-bg: rgba(0, 85, 125, 0.08);
  --accent-a: #00557D;
  --accent-b: #00557D;
  --bad: #B42318;
  color-scheme: light;
}

/* The same in both themes (brief v1.1), and the names Clerk's appearance reads. */
:root {
  --cyan: #00ACDD;
  --on-cyan: #071120;
  --lime: #96BC33;
  --art-bg: #071120;
  --cy: var(--cyan);
  --on-cy: var(--on-cyan);
  --panel: var(--bg-card);
  --txt: var(--text);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

/* With no script the theme is the default and cannot change, so the switch is not shown. */
:root:not([data-theme]) .door-toggle {
  display: none;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-page);
  color: var(--text);
  font-family: Calibri, Carlito, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  transition: background-color 150ms, color 150ms;
}

main {
  flex: 1 0 auto;
}

main:focus {
  outline: none;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.door-skip {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--cyan);
  color: var(--on-cyan);
  font-weight: 700;
}

.door-skip:focus {
  top: 12px;
}

/* The top bar and footer every page shares. */
.door-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 48px;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--divider);
}

.door-mark {
  font-size: 24px;
  font-weight: 700;
  white-space: nowrap;
}

.door-mark span {
  color: var(--brand);
}

.door-tagline {
  color: var(--text-muted);
  font-size: 14px;
  white-space: nowrap;
}

.door-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.door-plain {
  color: var(--text-soft);
  font-size: 15px;
}

.door-plain:hover,
.door-foot a:hover {
  color: var(--text);
  text-decoration: underline;
}

.door-toggle {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--border-quiet);
  border-radius: 20px;
}

.door-toggle button {
  padding: 5px 14px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--text-muted);
  font: 700 13px Calibri, Carlito, Arial, sans-serif;
  cursor: pointer;
}

.door-toggle button[aria-checked="true"] {
  background: var(--cyan);
  color: var(--on-cyan);
}

.door-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 24px 48px;
  background: var(--bg-deep);
  border-top: 1px solid var(--divider);
  color: var(--text-muted);
  font-size: 14px;
}

.door-foot nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

/* Buttons: cyan with dark words, outlined in the brand colour, or the Coming Soon one that does nothing. */
.door-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--cyan);
  color: var(--on-cyan);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
}

.door-btn:hover {
  filter: brightness(1.08);
}

.door-btn-out {
  padding: 8px 18px;
  border-color: var(--brand);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}

.door-btn-out:hover {
  filter: none;
  background: var(--chip-bg);
}

.door-btn-out.is-big {
  padding: 13px 22px;
  border-radius: 8px;
  font-size: 16px;
}

.door-btn-full {
  width: 100%;
}

.door-btn[aria-disabled="true"] {
  border-color: var(--border-quiet);
  background: var(--bg-page);
  color: var(--text-disabled);
  cursor: default;
  filter: none;
}

/* The heroes: the main page's band, and the public page's larger one with the illustration. */
.door-hero,
.door-signin-wrap {
  background: linear-gradient(180deg, var(--hero-a) 0%, var(--hero-b) 100%);
}

.door-hero {
  padding: 56px 48px 40px;
}

.door-hero h1 {
  margin: 0 0 12px;
  font-size: 44px;
  font-weight: 700;
  line-height: 1.15;
}

.door-hero p {
  margin: 0;
  color: var(--text-soft);
  font-size: 19px;
}

.door-hero.is-big {
  padding: 72px 48px;
}

.door-hero-in {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 44px;
  align-items: center;
}

.door-hero.is-big h1 {
  margin: 16px 0;
  font-size: 52px;
  line-height: 1.06;
}

.door-accent {
  background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.door-hero p.door-lead {
  max-width: 580px;
  margin-bottom: 26px;
  line-height: 1.55;
}

.door-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.door-hero p.door-fine {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.door-hero p.door-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid var(--border-quiet);
  border-radius: 999px;
  background: var(--soon-bg);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.door-pill span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
}

.door-hero-art {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--cyan);
  border-radius: 14px;
  background: var(--art-bg);
  box-shadow: var(--live-glow);
}

.door-hero-art img,
.door-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The public page's sections. */
.door-sec {
  padding: 60px 48px;
}

.door-sec.is-deep {
  background: var(--bg-deep);
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}

.door-sec h2 {
  margin: 0 0 10px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.door-sub {
  max-width: 700px;
  margin: 0 auto 34px;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.55;
  text-align: center;
}

.door-grid,
.door-tiles {
  list-style: none;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.door-grid {
  padding: 0;
}

.door-card {
  overflow: hidden;
  border: 1px solid var(--border-card);
  border-radius: 14px;
  background: var(--bg-card);
  box-shadow: var(--card-shadow);
}

.door-svc {
  padding: 24px;
}

.door-k {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: var(--chip-bg);
  color: var(--brand);
}

.door-k svg {
  width: 22px;
  height: 22px;
}

.door-svc h3 {
  margin: 0 0 8px;
  font-size: 21px;
  line-height: 1.25;
}

.door-svc p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.door-cta {
  margin-top: 32px;
  text-align: center;
}

/* The sign-in and sign-up pages: the Aeris illustration beside Clerk's panel. */
.door-signin-wrap {
  padding: 56px 48px 72px;
}

.door-signin {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  max-width: 1040px;
  margin: 0 auto;
}

.door-art {
  position: relative;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  background: var(--art-bg);
}

.door-art img {
  position: absolute;
  inset: 0;
}

/* The art is dark in both themes, so its caption keeps the dark theme's words. */
.door-art::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(transparent, rgba(7, 17, 32, 0.95));
}

.door-cap {
  position: relative;
  z-index: 1;
  color: #FFFFFF;
}

.door-cap h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.2;
}

.door-cap p {
  margin: 0;
  color: #B8C7D4;
  line-height: 1.5;
}

.door-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 44px 40px;
}

.door-panel p {
  margin: 0;
  color: var(--text-soft);
}

/* The main page after sign-in (the launcher), brief v1.1's card. */
.door-area {
  padding: 16px 48px 64px;
}

.door-hint {
  margin: 0;
  padding-top: 40px;
  color: var(--text-soft);
}

.door-tiles {
  padding: 0;
}

.door-tile {
  display: flex;
  flex-direction: column;
}

.door-tile.is-live {
  border-color: var(--cyan);
  box-shadow: var(--live-glow);
  transition: transform 150ms, box-shadow 150ms;
}

.door-tile.is-live:hover {
  transform: translateY(-2px);
  box-shadow: var(--live-glow-hover);
}

.door-tile.is-live:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.door-pic {
  position: relative;
  height: 260px;
  background: var(--art-bg);
}

.door-pic img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.door-pic.is-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, var(--ph-a) 0%, var(--ph-b) 72%);
}

.door-pic svg {
  width: 140px;
  height: 140px;
  color: var(--icon);
  opacity: 0.6;
}

.door-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.door-badge.is-live {
  background: var(--lime);
  color: #0B1626;
}

.door-badge.is-soon {
  border: 1px solid var(--border-quiet);
  background: var(--soon-bg);
  color: var(--text-soft);
}

.door-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 22px 24px 26px;
}

.door-body h2 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.25;
}

.door-body p {
  flex: 1 1 auto;
  min-height: 44px;
  margin: 0 0 22px;
  color: var(--text-soft);
  line-height: 1.4;
}

/* A person with no product: a heading, the message and the contact line only. */
.door-none {
  max-width: 660px;
  margin: 0 auto;
  padding: 56px 0 32px;
  text-align: center;
}

.door-none h1 {
  margin: 0 0 12px;
  font-size: 32px;
  line-height: 1.2;
}

.door-none p {
  margin: 0 0 10px;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.55;
}

/* An address has no spaces to break at. */
.door-contact {
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* A message from shared/components.js, with its icon from the DSi outline sprite. */
.app-msg {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  max-width: 660px;
  margin: 24px auto 0;
  padding: 14px 18px;
  border: 1px solid var(--bad);
  border-radius: 14px;
  background: var(--bg-card);
}

.app-msg-text {
  margin: 0;
  color: var(--text);
}

.app-msg strong {
  color: var(--bad);
}

.app-icon {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--bad);
}

@media (prefers-reduced-motion: reduce) {
  body,
  .door-tile.is-live,
  .door-tile.is-live:hover {
    transition: none;
    transform: none;
  }
}

@media (max-width: 1099px) {
  .door-grid,
  .door-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .door-hero-in {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 699px) {
  .door-grid,
  .door-tiles,
  .door-signin {
    grid-template-columns: 1fr;
  }

  .door-top {
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 20px;
  }

  .door-tagline,
  .door-right .door-plain {
    display: none;
  }

  .door-hero,
  .door-hero.is-big,
  .door-sec,
  .door-signin-wrap {
    padding-right: 20px;
    padding-left: 20px;
  }

  .door-hero h1,
  .door-hero.is-big h1 {
    font-size: 32px;
  }

  .door-area {
    padding: 16px 20px 48px;
  }

  .door-art {
    min-height: 260px;
  }

  .door-panel {
    padding: 28px 22px;
  }

  .door-foot {
    padding: 22px 20px;
  }

  .door-foot nav {
    margin-left: 0;
  }

  .door-none {
    padding-top: 32px;
  }
}
