/* Mole VPS landing page.
   Idea: the page is a cut through the ground. Sky and a molehill on top, then soil that gets darker
   as you scroll down; the bot's real chat messages sit in the burrow. Every colour and font is a token. */

@font-face { font-family: "Allo"; src: url("assets/fonts/AlloVariableFriendly.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("assets/JetBrainsMono.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  /* sky */
  --sky-top: #dfe9da;
  --sky-low: #f1f2e3;
  --ink: #1f1811;
  --ink-soft: #55493b;
  /* surface */
  --grass: #2e9e4f;
  --grass-deep: #1f7a3a;
  /* ground, top to bottom */
  --soil-1: #3d2c1d;
  --soil-2: #2d2016;
  --soil-3: #21170f;
  --bedrock: #150f0a;
  /* on the ground */
  --bone: #f3ecdf;
  --dust: #c9baa3;
  --line: rgba(243, 236, 223, 0.16);
  --line-ink: rgba(31, 24, 17, 0.16);
  --signal: #39ff6a;
  --bubble: #1a130d;
  --btn: rgba(243, 236, 223, 0.1);
  --tg-blue: #2a6cab;
  --tg-green: #1f7a3a;
  --tg-red: #a63a32;
  --signal-halo: rgba(57, 255, 106, 0.18);
  --code-bg: rgba(243, 236, 223, 0.09);
  --spoiler-a: rgba(243, 236, 223, 0.55);
  --spoiler-b: rgba(243, 236, 223, 0.2);
  --on-accent: #0f1a12;
  --focus: #ffd24a;

  --face: "Allo", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --wrap: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 22px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--face); font-size: 18px; line-height: 1.5; color: var(--bone); background: var(--bedrock); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
h1, h2 { font-stretch: 118%; font-weight: 800; letter-spacing: 0; line-height: 0.98; overflow-wrap: break-word; min-width: 0; }
h1 { font-size: clamp(42px, 6.1vw, 82px); }
h2 { font-size: clamp(32px, 4.2vw, 54px); }
h3 { font-size: 24px; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.lede { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.45; max-width: 34ch; }
.note { font-size: 15px; line-height: 1.45; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }

/* ---------- buttons ---------- */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border-radius: 999px; font: inherit; font-weight: 700; font-size: 18px; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--sky-low); }
.btn-primary:hover { background: var(--grass-deep); }
.btn-ground { background: var(--signal); color: var(--on-accent); }
.btn-ground:hover { background: var(--bone); }
.btn-small { min-height: 44px; padding: 0 20px; font-size: 16px; }
.link { display: inline-block; padding-block: 10px; font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-color: currentColor; transition: text-decoration-color 0.15s ease; }
.link:hover { text-decoration-color: var(--grass); }

/* ---------- sky: nav + hero ---------- */
.sky { background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-low) 100%); color: var(--ink); position: relative; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 24px; }
.brand { display: inline-flex; min-height: 44px; align-items: center; gap: 12px; white-space: nowrap; font-stretch: 122%; font-weight: 800; font-size: 21px; text-decoration: none; }
.brand img { height: 34px; width: auto; }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); font-size: 16px; font-weight: 600; }
.nav-links a:not(.btn) { text-decoration: none; padding-block: 12px; }
.nav-links a:not(.btn):hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }

.hero { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(20px, 4vw, 56px); align-items: end; padding-top: clamp(24px, 5vh, 56px); }
.hero-copy { padding-bottom: clamp(32px, 6vh, 64px); }
.hero-copy .lede { margin-top: 24px; color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 32px; }
.hero-copy .note { margin-top: 20px; color: var(--ink-soft); max-width: 44ch; }

/* the molehill: the mark stands on the surface line and comes up once on load */
.hill { position: relative; align-self: end; justify-self: center; width: min(100%, 330px); overflow: clip; }
.hill img { width: 100%; animation: surface 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both; }
@keyframes surface { from { transform: translateY(46%); } to { transform: translateY(0); } }

/* ---------- the surface line ---------- */
.turf { height: 22px; background:
    linear-gradient(180deg, var(--grass) 0 8px, var(--grass-deep) 8px 13px, var(--soil-1) 13px);
  position: relative; }
.turf::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 12px;
  background: conic-gradient(from -28deg at 50% 100%, var(--grass) 0 56deg, transparent 0) 0 0 / 13px 12px repeat-x; }

/* ---------- ground ---------- */
.ground { position: relative; background: linear-gradient(180deg, var(--soil-1) 0%, var(--soil-2) 34%, var(--soil-3) 72%, var(--bedrock) 100%); }
.ground::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='520'%3E%3Cg fill='none' stroke='%23f3ecdf' stroke-width='1.2'%3E%3Cpath d='M0 60 C150 30 300 90 450 60 S750 30 900 60' opacity='.13'/%3E%3Cpath d='M0 190 C180 220 320 160 470 190 S760 220 900 190' opacity='.1'/%3E%3Cpath d='M0 330 C140 300 330 360 480 330 S740 300 900 330' opacity='.12'/%3E%3Cpath d='M0 450 C170 480 310 420 460 450 S770 480 900 450' opacity='.09'/%3E%3C/g%3E%3Cg fill='%23f3ecdf'%3E%3Cellipse cx='120' cy='130' rx='7' ry='4.5' opacity='.1'/%3E%3Cellipse cx='610' cy='250' rx='9' ry='6' opacity='.08'/%3E%3Cellipse cx='350' cy='400' rx='5' ry='3.5' opacity='.11'/%3E%3Cellipse cx='800' cy='95' rx='4' ry='3' opacity='.1'/%3E%3Cellipse cx='230' cy='290' rx='3.5' ry='2.5' opacity='.09'/%3E%3C/g%3E%3C/svg%3E"); }
.ground > * { position: relative; }

/* the shaft: one tunnel down the left edge; the marker rides it as you scroll */
.shaft { position: absolute; top: 0; bottom: 0; left: max(var(--gutter), calc((100% - var(--wrap)) / 2)); width: 2px; pointer-events: none;
  background: repeating-linear-gradient(180deg, var(--line) 0 10px, transparent 10px 20px); }
.shaft i { position: sticky; top: 46vh; display: block; width: 18px; height: 18px; margin-left: -8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 6px var(--signal-halo); }

section { padding-block: clamp(64px, 10vh, 120px); }
.ground .wrap { padding-left: calc(var(--gutter) + clamp(24px, 5vw, 64px)); }
.sec-head { max-width: 22ch; }
.sec-head + .lede { margin-top: 16px; color: var(--dust); }

/* ---------- chat messages (what the bot really sends) ---------- */
.msg { background: var(--bubble); border: 1px solid var(--line); border-radius: var(--r-l) var(--r-l) var(--r-l) 6px; overflow: clip; max-width: 460px; width: 100%; }
.msg img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.msg-text { padding: 16px 16px 16px; font-size: 15.5px; line-height: 1.45; color: var(--bone); }
.msg-text i { color: var(--dust); }
.msg-text code { background: var(--code-bg); padding: 1px 8px; border-radius: 6px; }
.spoiler { background: repeating-linear-gradient(90deg, var(--spoiler-a) 0 3px, var(--spoiler-b) 3px 6px); color: transparent; border-radius: 4px; user-select: none; }
.kb { display: grid; gap: 8px; margin-top: 8px; max-width: 460px; width: 100%; }
.kb-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.kb span { display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 8px; border-radius: var(--r-s); background: var(--btn); font-size: 15px; font-weight: 600; text-align: center; color: var(--bone); }
.kb span.primary { background: var(--tg-blue); color: var(--bone); }
.kb span.success { background: var(--tg-green); color: var(--bone); }
.kb span.danger { background: var(--tg-red); color: var(--bone); }
.me { justify-self: end; margin-top: 8px; background: var(--grass-deep); color: var(--bone); padding: 8px 16px; border-radius: var(--r-m) var(--r-m) 6px var(--r-m); font-size: 15.5px; width: fit-content; margin-left: auto; }
.chat { display: grid; justify-items: start; max-width: 460px; width: 100%; }

/* hero message hangs under the molehill */
.under { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; gap: clamp(20px, 4vw, 56px); padding-top: 0; padding-bottom: clamp(48px, 8vh, 88px); }
.under .chat { grid-column: 2; position: relative; padding-top: 44px; }
.under .chat::before { content: ""; position: absolute; left: 50%; top: 0; height: 44px; width: 2px; background: repeating-linear-gradient(180deg, var(--line) 0 8px, transparent 8px 16px); }
.under-copy { align-self: center; padding-top: 44px; }
.under-copy p { color: var(--bone); max-width: 20ch; font-stretch: 112%; font-weight: 700; font-size: clamp(24px, 2.8vw, 38px); line-height: 1.12; letter-spacing: -0.012em; }

/* ---------- steps ---------- */
.steps { display: grid; gap: clamp(48px, 8vh, 96px); margin-top: clamp(40px, 6vh, 72px); }
.step { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(20px, 5vw, 72px); align-items: center; }
.step-n { font-stretch: 118%; font-weight: 800; font-size: clamp(56px, 7vw, 96px); line-height: 0.9; color: var(--signal); font-variant-numeric: tabular-nums; }
.step h3 { margin-top: 16px; font-size: clamp(24px, 2.4vw, 32px); }
.step p { margin-top: 8px; color: var(--dust); max-width: 30ch; font-size: clamp(18px, 1.6vw, 21px); }

/* ---------- plans ---------- */
.plans-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 72px); margin-top: clamp(36px, 5vh, 60px); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
caption { text-align: left; font-stretch: 118%; font-weight: 800; font-size: 26px; padding-bottom: 16px; }
th, td { text-align: left; padding: 16px 8px 16px 0; border-top: 1px solid var(--line); font-size: 16.5px; vertical-align: baseline; }
thead th { font-weight: 500; color: var(--dust); font-size: 15px; border-top: 0; padding-block: 0 8px; }
tbody th { font-weight: 700; font-size: 18px; }
td.price, th.price { text-align: right; padding-right: 0; }
td.price { font-stretch: 112%; font-weight: 800; font-size: 22px; }
.plans-note { margin-top: 28px; color: var(--dust); }

/* ---------- manage ---------- */
.manage { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.manage ul { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--line); }
.manage li { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 11ch) minmax(0, 1fr); gap: 16px; }
.manage li b { font-weight: 700; }
.manage li span { color: var(--dust); }

/* ---------- close + footer ---------- */
.close { text-align: left; }
.close h2 { max-width: 16ch; }
.close p { margin-top: 16px; color: var(--dust); max-width: 46ch; font-size: clamp(18px, 1.7vw, 22px); }
.close .btn { margin-top: 32px; }
footer { padding-block: 44px 56px; border-top: 1px solid var(--line); color: var(--dust); font-size: 15px; }
.foot { display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; justify-content: space-between; }
.foot .brand { color: var(--bone); }

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  .brand { font-size: 18px; gap: 8px; }
  .brand img { height: 28px; }
  .nav .btn-small { padding: 0 16px; font-size: 15px; }
  .nav-links a:not(.btn) { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding-bottom: 8px; }
  .hill { width: 200px; justify-self: end; margin-right: 6%; }
  .under { grid-template-columns: minmax(0, 1fr); }
  .under .chat { grid-column: 1; grid-row: 1; justify-self: end; }
  .under .chat::before { left: auto; right: calc(6% + 100px); }
  .under-copy { padding-top: 8px; }
  .step, .manage, .plans-grid { grid-template-columns: minmax(0, 1fr); }
  .step .chat, .manage .chat { justify-self: start; }
  .ground .wrap { padding-left: calc(var(--gutter) + 24px); }
  th, td { font-size: 15px; padding-right: 8px; }
  .hide-s { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hill img { animation: none; }
  .btn { transition: none; }
}
