/* Aureon landing page. Page colors are set by app.js from the selected theme. */
:root {
  --page: #0d0c0b;
  --surface: #181715;
  --raised: #1e1c19;
  --line: #2b2824;
  --text: #d9d2c7;
  --muted: #a39b8f;
  --faint: #6b645a;
  --accent: #e5b567;
  --accent-strong: #f0c67f;
  --on-accent: #1a140a;
  --thread: #e5b567;
  --glow: #e5b56733;

  --sans: "Sora", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --measure: 62ch;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  background: var(--page);
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-strong);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -60px;
  padding: 8px 14px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  top: 12px;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 22px var(--gutter);
}

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

.top nav {
  display: flex;
  gap: clamp(14px, 2.4vw, 32px);
  font-size: 15px;
}

.top nav a {
  color: var(--muted);
  text-decoration: none;
}

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

/* Hero */
.hero {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 72px) var(--gutter) 0;
}

.hero-copy {
  max-width: 760px;
}

h1 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(2.6rem, 6.2vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 13ch;
  text-wrap: balance;
}

.lede {
  margin: 26px 0 0;
  max-width: var(--measure);
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 19px);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.5s var(--ease);
}

.button:hover {
  color: var(--text);
  border-color: var(--accent);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

.button.primary:hover {
  background: var(--accent-strong);
  color: var(--on-accent);
}

.fineprint {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--faint);
}

/* Preview controls: a bar sitting on top of the editor */
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin-top: clamp(40px, 6vw, 64px);
}

.controls .switches {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-left: auto;
}

.segmented {
  margin: 0;
  padding: 0;
  border: 0;
}

#variant-options {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
}

#variant-options label {
  position: relative;
}

#variant-options input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

#variant-options span {
  display: block;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

#variant-options input:checked + span {
  background: var(--accent);
  color: var(--on-accent);
}

#variant-options input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--muted);
  cursor: pointer;
}

.switch input {
  appearance: none;
  width: 38px;
  height: 22px;
  margin: 0;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  cursor: pointer;
  transition: background-color 0.25s;
}

.switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text);
  transition: transform 0.25s var(--ease);
}

.switch input:checked {
  background: var(--accent);
}

.switch input:checked::after {
  transform: translateX(16px);
  background: var(--on-accent);
}

/* The live editor: the page's centerpiece */
.editor {
  margin: 16px 0 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border, var(--line));
  background: var(--ed-bg);
  color: var(--ed-fg);
  box-shadow:
    0 0 0 1px var(--glow),
    0 40px 120px -40px var(--glow),
    0 30px 60px -30px #00000099;
  font-family: var(--sans);
  transition: background-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.ed-title {
  display: grid;
  grid-template-columns: 1fr minmax(0, 420px) 1fr;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  background: var(--title-bg);
  color: var(--title-fg);
  border-bottom: 1px solid var(--border);
}

.ed-dots {
  display: flex;
  gap: 7px;
}

.ed-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--act-muted);
  opacity: 0.55;
}

.ed-cc {
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--cc-border);
  background: var(--cc-bg);
  font-size: 12.5px;
  display: grid;
  place-items: center;
}

.ed-body {
  display: grid;
  grid-template-columns: 48px 230px minmax(0, 1fr);
  height: clamp(420px, 56vw, 640px);
}

.ed-activity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding-top: 14px;
  background: var(--act-bg);
  border-right: 1px solid var(--side-border);
}

.ed-activity svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--act-muted);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ed-activity svg.on {
  stroke: var(--act-fg);
}

.ed-side {
  background: var(--side-bg);
  color: var(--side-fg);
  border-right: 1px solid var(--side-border);
  font-size: 13px;
  overflow: hidden;
}

.ed-side-title {
  margin: 0;
  padding: 10px 18px 8px;
  font-size: 12px;
  font-weight: 500;
}

#files {
  list-style: none;
  margin: 0;
  padding: 0;
}

#files button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 3px 18px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

#files button:hover {
  background: var(--hover-bg);
}

#files button[aria-current="true"] {
  background: var(--sel-bg);
  color: var(--sel-fg);
}

.file-icon {
  width: 22px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--tab-top);
  opacity: 0.85;
  text-align: center;
}

.ed-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ed-tabs {
  display: flex;
  background: var(--tabs-bg);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ed-tabs button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 0;
  border-top: 1px solid transparent;
  background: none;
  color: var(--tab-muted);
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.ed-tabs button[aria-selected="true"] {
  background: var(--tab-bg);
  color: var(--tab-fg);
  border-top-color: var(--tab-top);
}

.ed-crumbs {
  padding: 4px 22px;
  font-size: 12.5px;
  color: var(--crumb);
}

.ed-code {
  flex: 1;
  margin: 0;
  padding: 4px 0 24px;
  overflow: auto;
  font: 400 14.5px/1.75 var(--mono);
  font-variant-ligatures: contextual;
  tab-size: 2;
}

.ed-code .row {
  display: grid;
  grid-template-columns: 64px max-content;
  padding-right: 32px;
}

.ed-code .row.active {
  background: var(--ed-line);
}

.ed-code .n {
  padding-right: 22px;
  text-align: right;
  color: var(--ed-ln);
  user-select: none;
}

.ed-code .row.active .n {
  color: var(--ed-ln-active);
}

.ed-code .t {
  white-space: pre;
}

.ed-code .row.active .t::before {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.2em;
  margin-right: -2px;
  vertical-align: -0.22em;
  background: var(--ed-cursor);
}

.ed-code .i {
  font-style: italic;
}

.ed-code .b {
  font-weight: 600;
}

.editor.upright .i {
  font-style: normal;
}

.ed-status {
  display: flex;
  gap: 18px;
  align-items: center;
  height: 26px;
  padding: 0 14px;
  background: var(--status-bg);
  color: var(--status-fg);
  border-top: 1px solid var(--status-border);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
}

.ed-status-right {
  margin-left: auto;
  display: flex;
  gap: 18px;
}

/* Sections */
section {
  scroll-margin-top: 24px;
}

h2 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.section-copy p,
.section-intro {
  max-width: var(--measure);
  color: var(--muted);
}

.colors,
.shots,
.install {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(72px, 10vw, 140px) var(--gutter) 0;
}

.colors {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px 72px;
  align-items: start;
}

.colors .section-copy {
  position: sticky;
  top: 32px;
}

.roles {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.role {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  grid-template-areas:
    "dot name sample"
    ". note hex";
  gap: 2px 16px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.role-swatch {
  grid-area: dot;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  align-self: center;
  transition: background-color 0.5s var(--ease);
}

.role-name {
  grid-area: name;
  font-weight: 500;
}

.role-sample {
  grid-area: sample;
  font: 400 15px var(--mono);
  justify-self: end;
  transition: color 0.5s var(--ease);
}

.role-note {
  grid-area: note;
  font-size: 14px;
  color: var(--faint);
}

.role-hex {
  grid-area: hex;
  justify-self: end;
  font: 400 13px var(--mono);
  color: var(--faint);
}

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

.shot {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}

.shot img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  transition: border-color 0.2s, transform 0.3s var(--ease);
}

.shot:hover img,
.shot[aria-pressed="true"] img {
  border-color: var(--accent);
}

.shot strong {
  color: var(--text);
  font-weight: 600;
  margin-right: 6px;
}

.install {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px 72px;
  align-items: start;
  padding-bottom: clamp(72px, 10vw, 140px);
}

.steps {
  margin: 24px 0;
  padding-left: 22px;
  color: var(--muted);
}

.steps li {
  margin-bottom: 12px;
  padding-left: 6px;
}

.steps strong {
  color: var(--text);
}

kbd {
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface);
  font: 500 13px var(--mono);
  color: var(--text);
}

.settings {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.settings-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px 10px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.copy {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--raised);
  color: var(--text);
  font: 500 13px var(--sans);
  padding: 6px 14px;
  cursor: pointer;
}

.copy:hover {
  border-color: var(--accent);
}

.settings pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  font: 400 14px/1.75 var(--mono);
  color: var(--text);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--faint);
}

.foot a {
  color: var(--muted);
}

/* Smaller screens */
@media (max-width: 1100px) {
  .ed-body {
    grid-template-columns: 44px 190px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .controls .switches {
    margin-left: 0;
  }

  .colors,
  .install {
    grid-template-columns: minmax(0, 1fr);
  }

  .colors .section-copy {
    position: static;
  }

  .shot-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .top nav a:not(:last-child) {
    display: none;
  }

  .ed-body {
    grid-template-columns: minmax(0, 1fr);
    height: 460px;
  }

  .ed-activity,
  .ed-side {
    display: none;
  }

  .ed-title {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
  }

  .ed-code {
    font-size: 13px;
  }

  .ed-code .row {
    grid-template-columns: 44px max-content;
  }

  .ed-code .n {
    padding-right: 14px;
  }

  .ed-status span:nth-child(2),
  .ed-status-right span:not(:last-child) {
    display: none;
  }

  .role {
    grid-template-columns: 14px minmax(0, 1fr);
    grid-template-areas:
      "dot name"
      ". sample"
      ". note";
  }

  .role-sample {
    justify-self: start;
  }

  .role-hex {
    display: none;
  }
}

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

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