/*
 * Tecelon's landing page.
 *
 * The palette is taken from the weaver: near-black with a blue cast, gold for
 * the threads, a cold white where the light is. Dark is the only theme here —
 * the artwork decides that — but everything else follows the same rules as the
 * console: one 4px spacing scale, a short type scale, 44px targets, 16px
 * inputs, and a layout built at 390px first.
 */

:root {
  --ink: #07080f; /* the dark the weaver sits in */
  --ink-2: #0c0e18;
  --raised: #11142033;
  --line: #ffffff14;
  --thread: #f0b45e; /* the golden threads */
  --thread-dim: #f0b45e99;
  --glow: #cfe0ff; /* the cold light in the eyes */
  --text: #e9ecf5;
  --muted: #a3aac0;
  --radius: 14px;
  color-scheme: dark;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  /* The light the weaver sits in: cold above, gold where the threads gather. */
  background:
    radial-gradient(1100px 700px at 78% -10%, #16203a 0%, transparent 60%),
    radial-gradient(700px 500px at 12% 8%, #1a1408 0%, transparent 55%),
    var(--ink);
  -webkit-font-smoothing: antialiased;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  padding: 12px 16px;
  background: var(--ink-2);
  border: 1px solid var(--thread);
  border-radius: var(--radius);
}

/* ---- the bar --------------------------------------------------------- */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px max(16px, env(safe-area-inset-left));
  max-width: 1120px;
  margin: 0 auto;
}

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

.mark {
  width: 28px;
  height: 28px;
  color: var(--thread);
  filter: drop-shadow(0 0 10px #f0b45e55);
}

.bar nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bar nav a {
  display: none;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 999px;
}

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

.bar nav a.cta {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--ink);
  background: var(--thread);
  font-weight: 600;
  padding: 0 18px;
}

@media (min-width: 720px) {
  .bar nav a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }
}

/* ---- hero ------------------------------------------------------------- */

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-left)) 64px;
}

section {
  padding: 48px 0;
  border-top: 1px solid var(--line);
}

.hero {
  border-top: 0;
  padding-top: 8px;
  display: grid;
  gap: 32px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--thread);
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(40px, 11vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 650;
}

.lead {
  margin: 0 0 24px;
  font-size: 18px;
  color: var(--muted);
  max-width: 34em;
}

.hero-art {
  margin: 0;
  position: relative;
}

.hero-art img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  border: 1px solid var(--line);
  /* The artwork already ends in darkness; this lets it sit in the page's. */
  mask-image: radial-gradient(130% 100% at 50% 35%, #000 55%, transparent 100%);
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 48px;
    padding-top: 24px;
  }
}

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

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: #ffffff0a;
}

.button:hover {
  background: #ffffff14;
}

.button.primary {
  color: #1a1204;
  background: linear-gradient(180deg, #ffd18a, var(--thread));
  border-color: transparent;
  box-shadow: 0 10px 30px -12px #f0b45eaa;
}

.button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 3px;
}

.fine {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
}

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

h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 5.2vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 620;
}

h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 620;
}

p {
  margin: 0 0 12px;
}

.section-lead {
  color: var(--muted);
  max-width: 44em;
  font-size: 17px;
  margin-bottom: 32px;
}

.cards {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.cards article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff08, transparent);
}

.cards p {
  margin: 0;
  color: var(--muted);
}

@media (min-width: 860px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
  .cards.four {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1040px) {
  .cards.four {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---- steps ------------------------------------------------------------ */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 32px;
}

.steps li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  align-items: start;
}

.step-n {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--thread-dim);
  color: var(--thread);
  font-weight: 650;
  /* The thread running between the steps. */
  box-shadow: 0 0 0 6px #f0b45e0f;
}

.steps p {
  color: var(--muted);
  max-width: 46em;
}

pre {
  margin: 12px 0 0;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #00000055;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--glow);
}

.terminal {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--thread);
  border-radius: var(--radius);
  background: #00000055;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--muted);
}

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

.terminal .link {
  color: var(--glow);
}

.terminal .ok {
  display: block;
  margin-top: 6px;
  color: #7fd6a2;
}

/* ---- the comparison --------------------------------------------------- */

.table {
  display: grid;
  gap: 1px;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}

.row > * {
  padding: 14px 16px;
  background: var(--ink-2);
  font-size: 14px;
  color: var(--muted);
}

.row [role='rowheader'] {
  grid-column: 1 / -1;
  color: var(--thread);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.row strong {
  color: var(--text);
  font-weight: 620;
}

.row.head {
  display: none;
}

/*
 * Narrow: with no header row above them, a pair of answers says nothing about
 * whose they are, so each carries its own label.
 */
.row [role='cell']::before {
  content: attr(data-col);
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff59;
}

@media (min-width: 860px) {
  .row {
    grid-template-columns: 180px repeat(3, 1fr);
  }
  .row [role='rowheader'] {
    grid-column: auto;
  }
  .row.head {
    display: grid;
  }
  .row [role='cell']::before {
    display: none;
  }
  .row.head > * {
    color: var(--text);
    font-weight: 620;
  }
}

/* ---- two columns, ticks ------------------------------------------------ */

.split {
  display: grid;
  gap: 40px;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
  }
}

.split p {
  color: var(--muted);
}

.ticks {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.ticks li {
  position: relative;
  padding-left: 26px;
  font-size: 15px;
  color: var(--muted);
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--thread);
  box-shadow: 0 0 10px #f0b45eaa;
}

/* ---- the last word ----------------------------------------------------- */

.start {
  text-align: center;
  padding: 64px 0 24px;
}

.start p {
  margin: 0 auto 24px;
  max-width: 40em;
  color: var(--muted);
  font-size: 17px;
}

.start .actions {
  justify-content: center;
}

footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px max(16px, env(safe-area-inset-left)) max(40px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

footer strong {
  color: var(--text);
}

/*
 * Grid and flex children shrink, or a long line pushes the page sideways —
 * which the step with the docker command did, on a phone, until this.
 */
.cards > *,
.steps > *,
.steps li > *,
.split > *,
.row > * {
  min-width: 0;
}

pre {
  max-width: 100%;
}
