/* Orthanc — marketing site
   Palette, type, and layout per brand/STYLE_GUIDE.md.
   Dark is the brand's home; light mode is the guest. */

:root {
  /* Core brand tokens (STYLE_GUIDE.md §2) */
  --obsidian: #0A1B20;
  --nightwatch: #17454E;
  --stone: #233A40;
  --moonlight: #7FB6BE;
  --lantern: #F0B254;
  --ember: #D68A22;
  --parchment: #F4F7F6;
  --ink: #122A30;

  /* Semantic — dark mode defaults */
  --bg: var(--obsidian);
  --bg-card: rgba(35, 58, 64, 0.35);
  --text: #EAF2F1;
  --text-2: #9FB8BB;
  --link: var(--moonlight);
  --accent: var(--lantern);
  --accent-hover: var(--ember);
  --accent-ink: #14181C;
  --amber-small: #FFDE9C;        /* small amber text on dark (§2) */
  --session-active: var(--lantern);
  --session-expired: #5C7B81;
  --hairline: rgba(234, 242, 241, 0.12);
  --panel-hairline: rgba(230, 237, 243, 0.09);
  --glow-opacity: 0.8;

  /* Type (STYLE_GUIDE.md §3) — guide families lead; system stacks carry */
  --font-display: "Bricolage Grotesque", "Avenir Next Condensed", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, system-ui, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  color-scheme: dark light;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: var(--parchment);
    --bg-card: #FFFFFF;
    --text: var(--ink);
    --text-2: #4A6268;
    --link: #2C6E7B;             /* teal from icon-small.svg field; AA on parchment */
    --amber-small: var(--ember); /* small amber on light (§2) */
    --session-active: #B36F0E;
    --hairline: rgba(18, 42, 48, 0.14);
    --glow-opacity: 0.5;
  }
}

/* ---------- Base ---------- */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 26px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* The nightwatch gradient: only the background field, vertical, subtle (§2) */
body.dark-field {
  background: linear-gradient(to bottom, var(--nightwatch) -12%, var(--bg) 620px);
}

@media (prefers-color-scheme: light) {
  body.dark-field {
    background: linear-gradient(to bottom, #E3EDEC -12%, var(--bg) 620px);
  }
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--text);
}

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

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

::selection {
  background: var(--lantern);
  color: var(--accent-ink);
}

.wrap {
  max-width: 1040px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

.section {
  padding-block: clamp(56px, 9vw, 104px);
}

.section + .section {
  border-top: 1px solid var(--hairline);
}

/* ---------- Type scale (STYLE_GUIDE.md §3) ---------- */

h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 7vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 32px;
  line-height: 38px;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
  text-wrap: balance;
}

h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 22px;
  line-height: 28px;
  margin-bottom: 8px;
}

p {
  max-width: 68ch;
}

.lede {
  color: var(--text-2);
  font-size: 19px;
  line-height: 29px;
}

.small {
  font-size: 14px;
  line-height: 20px;
  color: var(--text-2);
}

/* Machine-shaped strings stay mono even inside display type (§3) */
h1 code {
  font-size: 0.82em;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ---------- Header ---------- */

.site-header {
  padding-block: 22px;
}

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

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.wordmark img {
  width: 28px;
  height: 28px;
  display: block;
}

.site-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 15px;
  color: var(--text-2);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
}

/* ---------- Buttons ---------- */

.btn-lantern {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  padding: 15px 26px;
  border-radius: 9px;
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  cursor: pointer;
}

.btn-lantern:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}

.btn-quiet {
  display: inline-block;
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  padding: 14px 22px;
  border-radius: 9px;
  border: 1px solid var(--hairline);
  color: var(--text);
  text-decoration: none;
}

.btn-quiet:hover {
  border-color: var(--text-2);
  color: var(--text);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(48px, 8vw, 96px) clamp(56px, 8vw, 88px);
  text-align: center;
}

/* The signature glow: one fixed radial lantern behind the hero (§5),
   with the sanctioned slow ember flicker. */
.hero::before {
  content: "";
  position: absolute;
  inset: -120px 0 auto 0;
  height: 640px;
  background: radial-gradient(ellipse 60% 55% at 50% 32%,
              rgba(240, 178, 84, 0.17), transparent 70%);
  opacity: var(--glow-opacity);
  pointer-events: none;
  animation: ember 6s ease-in-out infinite alternate;
}

@keyframes ember {
  from { opacity: calc(var(--glow-opacity) * 0.88); }
  to   { opacity: var(--glow-opacity); }
}

.hero > * {
  position: relative;
}

.hero h1 {
  max-width: 21ch;
  margin-inline: auto;
}

.hero .lede {
  margin: 22px auto 0;
  max-width: 58ch;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 34px;
}

.hero-terms {
  margin: 16px auto 0;
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ---------- The config panel (hero centerpiece) ----------
   ~/.aws/config on the left, the Orthanc popup it becomes on the right.
   Always dark-fielded, in both color schemes — it is brand artwork. */

.panel {
  margin: clamp(40px, 6vw, 64px) auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 0 18px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 20px;
}

.pane {
  background: linear-gradient(160deg, #11272E, var(--obsidian) 70%);
  border: 1px solid var(--stone);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(4, 12, 15, 0.45);
  overflow: hidden;
  color: #E6EDF3;
}

.pane-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--panel-hairline);
  color: #8FA6AA;
  font-size: 11.5px;
}

.pane-head .bolt {
  color: var(--lantern);
}

.pane-head strong {
  color: #E6EDF3;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pane-config pre {
  padding: 14px 16px 18px;
  overflow-x: auto;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: #93A8AC;
}

.ini-b {
  color: var(--lantern); /* the amber brackets — popup.css's signature */
}

.ini-h {
  color: #E6EDF3;
  font-weight: 600;
}

.ini-v {
  color: #C4D3D5;
}

.panel-arrow {
  align-self: center;
  color: var(--session-expired);
  font-size: 20px;
  user-select: none;
}

/* Popup rendition — faithful to Extension/src/popup.css */
.p-row {
  padding: 11px 16px 12px;
  border-bottom: 1px solid var(--panel-hairline);
}

.p-row:last-child {
  border-bottom: none;
}

.p-line {
  display: flex;
  align-items: center;
  gap: 9px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-active {
  background: var(--lantern);         /* lit — the keyhole glows */
  box-shadow: 0 0 6px rgba(240, 178, 84, 0.7);
}

.dot-expired {
  background: var(--session-expired); /* unlit, not red: a normal state */
}

.p-name {
  font-weight: 600;
  font-size: 13px;
}

.p-name .ini-b {
  font-weight: 400;
}

.p-state {
  margin-left: auto;
  font-size: 11px;
  color: #7E9296;
}

.p-meta {
  margin: 4px 0 0 16px;
  color: #7E9296;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.p-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 8px;
}

.p-btn {
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 5px;
  border: 1px solid transparent;
}

.p-btn-console {
  background: var(--lantern);
  color: var(--accent-ink);
}

.p-btn-login {
  border-color: var(--panel-hairline);
  color: #8FA6AA;
}

@media (max-width: 819px) {
  .panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    justify-items: stretch;
  }

  .panel-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }
}

/* ---------- The loop (pain) ---------- */

.terminal {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 22px;
  background: var(--obsidian);
  border: 1px solid var(--stone);
  border-radius: 10px;
  padding: 16px 18px;
  color: #C4D3D5;
  overflow-x: auto;
  max-width: 640px;
  margin-bottom: 26px;
}

.terminal .prompt {
  color: var(--moonlight);
}

.terminal .dim {
  color: #7E9296;
}

/* ---------- How it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-top: 40px;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step) ".";
  display: block;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--amber-small);
  margin-bottom: 10px;
}

.steps p {
  margin-top: 6px;
  color: var(--text-2);
  font-size: 16px;
  line-height: 25px;
}

@media (max-width: 719px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }
}

/* ---------- Fact grid (CLI interop, multi-session, status) ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 36px;
}

.fact {
  background: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 24px 22px;
}

.fact h3 {
  font-size: 18px;
  line-height: 24px;
}

.fact p {
  color: var(--text-2);
  font-size: 15px;
  line-height: 23px;
}

@media (max-width: 719px) {
  .facts {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Browsers ---------- */

.browser-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  list-style: none;
}

.browser-row li {
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 8px 16px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--text);
}

.browser-row li.more {
  color: var(--text-2);
  border-style: dashed;
}

.store-links {
  margin-top: 26px;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 15px;
}

/* ---------- Privacy ---------- */

.privacy-list {
  list-style: none;
  margin-top: 30px;
  max-width: 74ch;
}

.privacy-list li {
  padding: 14px 0 14px 26px;
  position: relative;
  border-top: 1px solid var(--hairline);
  color: var(--text-2);
  font-size: 16px;
  line-height: 25px;
}

.privacy-list li:last-child {
  border-bottom: 1px solid var(--hairline);
}

/* The keyhole bullet: lit, because the light is the only thing that leaves */
.privacy-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 24px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--session-active);
}

.privacy-list strong {
  color: var(--text);
  font-weight: 600;
}

.privacy-more {
  margin-top: 20px;
}

/* ---------- Pricing ---------- */

.price-card {
  margin-top: 36px;
  max-width: 560px;
  background: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: clamp(28px, 5vw, 44px);
}

.price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 8vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
}

.price small {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 17px;
  color: var(--text-2);
  letter-spacing: 0;
  margin-left: 10px;
}

.price-points {
  list-style: none;
  margin: 24px 0 30px;
}

.price-points li {
  padding: 9px 0;
  border-top: 1px solid var(--hairline);
  font-size: 16px;
  color: var(--text-2);
}

.price-points li strong {
  color: var(--text);
  font-weight: 600;
}

.price-note {
  margin-top: 16px;
}

/* ---------- FAQ ---------- */

.faq {
  margin-top: 12px;
  max-width: 74ch;
}

.faq details {
  border-top: 1px solid var(--hairline);
}

.faq details:last-child {
  border-bottom: 1px solid var(--hairline);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 34px 18px 0;
  font-weight: 600;
  font-size: 17px;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 16px;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--amber-small);
}

.faq details[open] summary::after {
  content: "\2013";
}

.faq details p {
  padding: 0 0 20px;
  color: var(--text-2);
}

.faq details p + p {
  margin-top: -8px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: 40px 56px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 36px;
  align-items: baseline;
}

.site-footer nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.site-footer a {
  font-size: 15px;
}

.footer-tag {
  width: 100%;
  margin-top: 6px;
}

/* ---------- Privacy policy page ---------- */

.prose {
  max-width: 74ch;
  padding-block: clamp(40px, 6vw, 72px) clamp(64px, 9vw, 104px);
}

.prose h1 {
  font-size: clamp(34px, 5vw, 46px);
  margin-bottom: 14px;
}

.prose h2 {
  font-size: 26px;
  line-height: 32px;
  margin: 44px 0 14px;
}

.prose p,
.prose ul {
  margin-bottom: 16px;
  color: var(--text);
}

.prose ul {
  padding-left: 24px;
}

.prose li {
  margin-bottom: 8px;
}

.prose .effective {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 32px;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 40px 0 24px;
}

.prose em {
  color: var(--text-2);
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero::before {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
