/* Imago portal — dark shell, Questrial display, mono for machine data. */

@font-face {
  font-family: "Questrial";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/portal/assets/fonts/questrial-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Questrial";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/portal/assets/fonts/questrial-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;

  --ink: #11111e;
  --ink-2: #171726;
  --ink-3: #1e1e31;
  --line: #2c2c42;
  --line-soft: #23233a;

  --paper: #f2f2f8;
  --paper-2: #9c9cb6;
  --paper-3: #6f6f8c;

  --cyan: #0ef0fa;
  --gold: #f7d825;
  --mint: #88e87e;
  --flare: #ff5c6c;

  /* Signature: gold to cyan at 54deg means "live". Nothing else uses it. */
  --live: linear-gradient(54deg, #f7d825 0%, #0ef0fa 100%);

  --display: "Questrial", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", "Cascadia Mono",
    Consolas, monospace;

  --radius: 14px;
  --radius-sm: 9px;
  --shell: min(1180px, 92vw);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  background-color: var(--ink);
  background-image: radial-gradient(
    900px 620px at 78% -12%,
    rgba(14, 240, 250, 0.09),
    rgba(17, 17, 30, 0) 68%
  );
  background-repeat: no-repeat;
  color: var(--paper);
  font-family: var(--display);
  font-size: 16px;
  font-synthesis-weight: none;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- type ---------- */

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

h1 {
  font-size: clamp(34px, 5.2vw, 56px);
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 20px;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
}

.eyebrow {
  margin: 0;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.lede {
  max-width: 58ch;
  color: var(--paper-2);
  font-size: 17px;
}

.muted {
  color: var(--paper-2);
}

.small {
  margin: 0;
  color: var(--paper-2);
  font-size: 14px;
}

.meta {
  margin: 0;
  color: var(--paper-3);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.data {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.live-text {
  color: var(--cyan);
  background-image: var(--live);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  flex: none;
  background-color: rgba(17, 17, 30, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header::after {
  content: "";
  display: block;
  height: 2px;
  background-image: var(--live);
  opacity: 0.85;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: var(--shell);
  min-height: 72px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--paper);
  font-size: 21px;
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
  color: var(--paper);
}

/* Aperture mark: the product is an imaging tool. */
.brand-mark {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-image: var(--live);
  flex: none;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background-color: var(--ink);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav form {
  margin: 0;
  display: flex;
}

.nav-link {
  color: var(--paper-2);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-link:hover {
  color: var(--paper);
  text-decoration: none;
}

/* ---------- shells ---------- */

.page-shell {
  flex: 1 0 auto;
  width: var(--shell);
  margin: 0 auto;
  padding: 56px 0 96px;
}

.auth-shell {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--shell);
  margin: 0 auto;
  padding: 48px 0 64px;
}

.site-footer {
  flex: none;
  border-top: 1px solid var(--line-soft);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: var(--shell);
  margin: 0 auto;
  padding: 26px 0;
}

/* ---------- auth card ---------- */

.auth-card {
  position: relative;
  overflow: hidden;
  width: min(452px, 100%);
  padding: 40px 36px 34px;
  background-color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background-image: var(--live);
}

.auth-card h1 {
  margin-top: 12px;
  font-size: 36px;
}

.auth-card .lede {
  margin-top: 12px;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
}

/* ---------- forms ---------- */

.stack {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}

.field {
  display: grid;
  gap: 9px;
}

.field-label {
  color: var(--paper-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

input {
  width: 100%;
  padding: 13px 14px;
  background-color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 15px;
}

input:hover {
  border-color: #3a3a56;
}

input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(14, 240, 250, 0.16);
}

/* ---------- buttons ---------- */

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease,
    color 0.16s ease;
}

.primary {
  background-color: var(--cyan);
  color: #08131c;
}

.primary:hover {
  background-color: #6df5fc;
  color: #08131c;
  text-decoration: none;
}

.secondary {
  background-color: transparent;
  border-color: var(--line);
  color: var(--paper);
}

.secondary:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  text-decoration: none;
}

.danger {
  background-color: transparent;
  border-color: rgba(255, 92, 108, 0.4);
  color: var(--flare);
}

.danger:hover {
  border-color: var(--flare);
  background-color: rgba(255, 92, 108, 0.1);
  text-decoration: none;
}

.link-button {
  min-height: auto;
  padding: 0;
  background-color: transparent;
  border: 0;
  color: var(--paper-2);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.link-button:hover {
  color: var(--cyan);
}

.full {
  width: 100%;
}

/* ---------- hero + status strip ---------- */

.hero {
  padding-bottom: 40px;
}

.hero h1 {
  margin-top: 14px;
  overflow-wrap: anywhere;
}

.hero .lede {
  margin-top: 16px;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  margin-top: 40px;
  background-color: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.status-cell {
  padding: 22px 24px;
  background-color: var(--ink-2);
}

.status-label {
  margin: 0;
  color: var(--paper-3);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.status-value {
  margin: 10px 0 0;
  font-size: 26px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

/* ---------- sections ---------- */

.section-block {
  padding-top: 56px;
  scroll-margin-top: 96px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line-soft);
}

.section-heading h2 {
  margin-top: 10px;
}

/* ---------- plan cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: 18px;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 26px 24px;
  background-color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.plan-card:hover {
  border-color: #3d3d5c;
  transform: translateY(-2px);
}

.plan-card h3 {
  margin: 14px 0 0;
}

.plan-card .small {
  margin-top: 10px;
}

.price {
  margin: 22px 0 0;
  font-size: 40px;
  letter-spacing: -0.035em;
  line-height: 1;
}

.price-unit {
  color: var(--paper-2);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.06em;
}

.module-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.module-list li {
  padding: 5px 9px;
  background-color: var(--ink-3);
  border-radius: 6px;
  color: var(--paper-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.tag {
  display: inline-flex;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--paper-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tag.accent {
  border-color: rgba(14, 240, 250, 0.42);
  color: var(--cyan);
}

/* ---------- lists ---------- */

.list-card {
  overflow: hidden;
  background-color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px;
  border-top: 1px solid var(--line-soft);
}

.list-row:first-child {
  border-top: 0;
}

.row-title {
  margin: 0;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.02em;
}

.row-lines {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.align-right {
  text-align: right;
}

.state-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background-color: var(--paper-3);
  vertical-align: 1px;
}

.state-dot.ok {
  background-color: var(--mint);
}

.state-dot.warn {
  background-color: var(--gold);
}

.state-dot.off {
  background-color: var(--flare);
}

/* ---------- feedback ---------- */

.empty-state {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 32px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--paper-2);
}

.notice {
  margin-bottom: 24px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
}

.notice.success {
  border-color: rgba(136, 232, 126, 0.32);
  background-color: rgba(136, 232, 126, 0.08);
  color: var(--mint);
}

.notice.warning {
  border-color: rgba(247, 216, 37, 0.32);
  background-color: rgba(247, 216, 37, 0.08);
  color: var(--gold);
}

.notice.error {
  border-color: rgba(255, 92, 108, 0.32);
  background-color: rgba(255, 92, 108, 0.08);
  color: var(--flare);
}

.stack .notice,
.auth-card .notice {
  margin: 22px 0 0;
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .header-inner,
  .footer-inner,
  .page-shell,
  .auth-shell {
    width: min(92vw, 560px);
  }

  .page-shell {
    padding-top: 36px;
  }

  .auth-shell {
    padding-top: 4vh;
  }

  .site-nav {
    gap: 18px;
  }

  .nav-link {
    display: none;
  }

  .auth-card {
    padding: 32px 24px 28px;
  }

  .section-heading,
  .list-row,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .align-right {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
  }

  .plan-card:hover {
    transform: none;
  }
}
