/* Ardesta landing page. Colours follow the "signal" brand kit in SlopDocs
   (branding/ardesta-arc-v5-colours/signal): orange #F97316 to yellow #FDE047
   on warm dark #2E2A26, with a light mode below. */
:root {
  color-scheme: dark;
  --bg: #1c1916;
  --surface: #2e2a26;
  --surface-2: #38332e;
  --line: #4a433c;
  --text: #f7f3ee;
  --muted: #bdb3a7;
  --orange: #f97316;
  --orange-hover: #fb8a3c;
  --on-orange: #1c1916;
  --accent: #fde047;
  --grad-a: #f97316;
  --grad-b: #fde047;
  --ring: rgb(249 115 22 / .3);
  --glow: rgb(249 115 22 / .2);
  --glow-2: rgb(253 224 71 / .12);
  --header-bg: rgb(28 25 22 / .85);
  --shadow: rgb(0 0 0 / .4);
  --shadow-strong: rgb(0 0 0 / .6);
  --ok: #4ade80;
  --err: #f87171;
  --radius: 16px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Light mode follows the system setting. Orange darkens to the SlopDocs
   light-theme primary so text and buttons keep their contrast. */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f8f6f3;
    --surface: #ffffff;
    --surface-2: #f1ede8;
    --line: #e4ddd4;
    --text: #1c1917;
    --muted: #5f5852;
    --orange: #c2410c;
    --orange-hover: #9a3412;
    --on-orange: #ffffff;
    --accent: #b45309;
    --grad-a: #c2410c;
    --grad-b: #d97706;
    --ring: rgb(194 65 12 / .25);
    --glow: rgb(249 115 22 / .12);
    --glow-2: rgb(234 179 8 / .12);
    --header-bg: rgb(248 246 243 / .85);
    --shadow: rgb(60 40 20 / .14);
    --shadow-strong: rgb(60 40 20 / .22);
    --ok: #15803d;
    --err: #b91c1c;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }
h1, h2 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--accent); color: var(--bg); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: var(--header-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand img { height: 44px; width: auto; margin-left: -12px; }
.signin { color: var(--muted); font-weight: 600; font-size: .95rem; text-decoration: none; }
.signin:hover { color: var(--text); }

/* Buttons */
.btn { display: inline-block; padding: 13px 24px; border: 0; border-radius: 999px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .1s ease, background .15s ease; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .7; cursor: progress; }
.btn-primary { background: var(--orange); color: var(--on-orange); }
.btn-primary:hover { background: var(--orange-hover); }
.btn-ghost { color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface); }

/* Hero */
.hero { padding: 80px 0 64px; text-align: center; background: radial-gradient(900px 420px at 50% 0%, var(--glow), transparent 70%); }
.hero-inner { max-width: 820px; }
.badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px var(--ring); }
.grad { background: linear-gradient(120deg, var(--grad-a), var(--grad-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { color: var(--muted); font-size: 1.15rem; max-width: 38em; margin: 0 auto; }

/* Waitlist form */
.waitlist { margin: 36px auto 0; max-width: 640px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-align: left; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.fields label:first-child { grid-column: 1 / -1; }
.waitlist label span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.waitlist em { color: var(--muted); font-style: normal; font-weight: 400; }
.waitlist input { width: 100%; padding: 12px 14px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.waitlist input:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 3px var(--ring); }
.waitlist .btn { width: 100%; }
.hp { position: absolute; left: -9999px; }
.status { margin: 12px 0 0; font-weight: 600; min-height: 1.6em; }
.status:empty { display: none; }
.status[data-kind=ok] { color: var(--ok); }
.status[data-kind=error] { color: var(--err); }
.fine { margin: 10px 0 0; color: var(--muted); font-size: .85rem; text-align: center; }
.waitlist.done .fields, .waitlist.done .btn, .waitlist.done .fine { display: none; }
.waitlist.done .status { margin: 0; text-align: center; font-size: 1.05rem; }

/* Screenshots: real captures of the Big Rig demo tenant */
.shots { padding: 32px 0 80px; }
.shots-grid { display: grid; grid-template-columns: 2.2fr 1fr 1fr; gap: 28px; align-items: center; }
.shot { margin: 0; }
.shot img { width: 100%; height: auto; }
.shot figcaption { margin-top: 14px; color: var(--muted); font-size: .92rem; text-align: center; }
.frame { background: var(--surface); border: 1px solid var(--line); box-shadow: 0 30px 60px var(--shadow); overflow: hidden; }
.frame-browser { border-radius: 12px; }
.chrome { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 11px; }
.chrome i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.chrome span { margin-left: 10px; padding: 2px 12px; border-radius: 6px; background: var(--bg); color: var(--muted); }
.frame-phone { border-radius: 30px; padding: 8px; max-width: 260px; margin-inline: auto; background: #0b0a09; }
.frame-phone img { border-radius: 23px; }

/* Wide screens: one composition, phones overlapping the desktop's lower right */
@media (min-width: 901px) {
  .shots-grid { display: block; position: relative; padding-bottom: 72px; }
  .shot-desktop { width: 80%; }
  .shot-desktop figcaption { text-align: left; max-width: 52%; }
  .shot-phone { position: absolute; bottom: 0; width: 21%; }
  .shot-phone:nth-of-type(2) { right: 19%; bottom: 36px; }
  .shot-phone:nth-of-type(3) { right: 0; }
  .shot-phone .frame-phone { max-width: none; box-shadow: 0 30px 60px var(--shadow-strong); }
  .shot-phone figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* Brand loops (public/loops.js draws an SVG into each) */
.loop { display: block; width: 72px; height: 72px; flex: none; }
.loop svg { display: block; width: 100%; height: 100%; }
.hero-icon { width: 96px; height: 96px; margin: 0 auto 18px; }

/* Feature list */
.features { padding: 64px 0; background: var(--surface); border-block: 1px solid var(--line); }
.features h2 { text-align: center; margin-bottom: 36px; }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 32px; }
.feature-list li { display: flex; align-items: center; gap: 16px; }
.feature-list h3 { margin: 0 0 2px; font-size: 1.05rem; font-weight: 700; }
.feature-list p { margin: 0; color: var(--muted); font-size: .95rem; }

/* 404 page */
.not-found { min-height: calc(100vh - 69px); display: grid; align-content: center; }
.not-found-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 32px 0 0; }

/* Closer */
.closer { padding: 88px 0; text-align: center; background: radial-gradient(600px 300px at 50% 100%, var(--glow-2), transparent 70%); }
.closer-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.closer img { width: 72px; height: 72px; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: .9rem; }
.foot-row { display: flex; justify-content: space-between; }
.foot a { color: var(--muted); }

@media (max-width: 900px) {
  .shots-grid { grid-template-columns: 1fr 1fr; }
  .shot-desktop { grid-column: 1 / -1; }
  .feature-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .hero { padding-top: 48px; }
  .fields { grid-template-columns: 1fr; }
  .shots-grid { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; }
  .frame-phone { max-width: 280px; }
  .signin { font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
