/* Window-Works marketing site. Palette mirrors static/css/styles.css in the app. */
:root {
  --bg: #ffffff;
  --bg-alt: #f7f9fb;
  --surface: #ffffff;
  --surface-sunk: #f2f4f7;
  --text: #1d2939;
  --muted: #667085;
  --border: #e4e7ec;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #eff4ff;
  --free: #039855;
  --free-soft: #e7f6ee;
  --occupied: #b54708;
  --occupied-dot: #f79009;
  --occupied-soft: #fef0db;
  --empty-cell: #eaecf0;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, 0.25), 0 8px 20px -8px rgba(15, 23, 42, 0.08);
  --radius: 16px;
  --cell-min: 18px;
  --gap: 4px;
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220;
    --bg-alt: #0f172a;
    --surface: #111a2e;
    --surface-sunk: #0b1324;
    --text: #e6ebf3;
    --muted: #98a2b3;
    --border: #1f2a40;
    --accent: #5b8cff;
    --accent-strong: #7aa2ff;
    --accent-soft: #15234a;
    --free: #32d583;
    --free-soft: #0e2f22;
    --occupied: #fdb022;
    --occupied-soft: #3a2608;
    --empty-cell: #1b2538;
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.6), 0 8px 20px -8px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-sunk); border: 1px solid var(--border); padding: 0.08em 0.4em; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }
.muted { color: var(--muted); }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--text); text-decoration: none; letter-spacing: -0.02em; }
.brand-mark { width: 26px; height: 26px; }
.site-nav { display: flex; gap: 28px; margin-left: auto; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; }
.site-nav a:hover { color: var(--text); }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font: 600 16px/1.2 var(--sans);
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .copy-button:focus-visible, .desk:focus-visible, .grid-scroller:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.button-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.button-primary:hover { background: var(--accent-strong); }
.button-ghost { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow-sm); }
.button-ghost:hover { border-color: color-mix(in srgb, var(--text) 25%, var(--border)); }
.button-small { padding: 8px 14px; font-size: 14px; }
.button-block { width: 100%; }
.button-light { background: #fff; color: #1d2939; }
.button-outline-light { color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.button-outline-light:hover { border-color: #fff; }

/* Hero */
.hero {
  position: relative;
  padding: 88px 0 56px;
  text-align: center;
  background:
    radial-gradient(600px 300px at 15% 0%, color-mix(in srgb, #5B9BD5 22%, transparent), transparent 70%),
    radial-gradient(500px 280px at 85% 10%, color-mix(in srgb, #FF66CC 16%, transparent), transparent 70%),
    radial-gradient(500px 260px at 60% 100%, color-mix(in srgb, #70AD47 12%, transparent), transparent 70%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 65%);
  opacity: 0.6;
}
.hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 13px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.hero .eyebrow { background: var(--surface); border: 1px solid var(--border); padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--free); box-shadow: 0 0 0 4px var(--free-soft); }
.hero h1 { font-size: clamp(42px, 7vw, 76px); font-weight: 800; letter-spacing: -0.035em; margin-top: 24px; }
.gradient-text { background: linear-gradient(90deg, #2563eb 0%, #7030A0 50%, #FF66CC 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { max-width: 640px; margin-top: 22px; font-size: clamp(17px, 2vw, 20px); color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.hero-points { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; list-style: none; padding: 0; margin: 28px 0 0; font-size: 15px; color: var(--muted); }
.check { color: var(--free); font-weight: 700; margin-right: 4px; }

/* Demo window */
.demo-section { padding: 0 0 40px; position: relative; }
.window { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; }
.window-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.window-dots { display: inline-flex; gap: 7px; }
.window-dots i { width: 12px; height: 12px; border-radius: 50%; background: #f97066; }
.window-dots i:nth-child(2) { background: #fdb022; }
.window-dots i:nth-child(3) { background: #32d583; }
.window-url { flex: 1; text-align: center; font: 13px var(--mono); color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px; max-width: 360px; margin: 0 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-badge { font: 600 12px/1 var(--sans); color: var(--accent); background: var(--accent-soft); padding: 6px 10px; border-radius: 999px; }
.window-body { padding: 24px; }
.demo-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.demo-title { font-size: 22px; }
.demo-sub { color: var(--muted); font-size: 15px; margin-top: 4px; max-width: 560px; }
.demo-stats { display: flex; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; }
.pill i { width: 8px; height: 8px; border-radius: 50%; }
.pill-free { background: var(--free-soft); color: var(--free); }
.pill-free i { background: var(--free); }
.pill-occupied { background: var(--occupied-soft); color: var(--occupied); }
.pill-occupied i { background: var(--occupied-dot); }

.demo-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.grid-scroller { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-alt); padding: 14px; }
.floor-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 30), minmax(var(--cell-min), 1fr));
  gap: var(--gap);
  width: 100%;
  min-width: calc(var(--cols, 30) * var(--cell-min) + (var(--cols, 30) - 1) * var(--gap));
}
.floor-grid > * { aspect-ratio: 1; }
.desk {
  position: relative; border: 0; padding: 0; border-radius: 6px;
  background: var(--fill); cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.2s ease;
}
.desk:hover { transform: scale(1.18); z-index: 2; box-shadow: 0 6px 14px -4px rgba(15, 23, 42, 0.45); }
.desk::after {
  content: ""; position: absolute; right: 3px; bottom: 3px; width: 7px; height: 7px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 1.5px rgba(15, 23, 42, 0.18);
}
.desk.is-occupied::after { background: var(--occupied-dot); box-shadow: 0 0 0 1.5px #fff; }
.desk.is-mine::after { background: var(--free); box-shadow: 0 0 0 1.5px #fff; }
.desk.is-selected { outline: 3px solid var(--text); outline-offset: 2px; z-index: 3; }
.desk.just-booked { animation: pop 0.5s ease; }
.floor-grid.is-filtering .desk:not(.is-highlighted) { opacity: 0.18; }
.cell-blank { border-radius: 6px; background: var(--empty-cell); opacity: 0.55; }
.cell-blank.has-label { opacity: 0.9; background-image: repeating-linear-gradient(135deg, transparent 0 4px, color-mix(in srgb, var(--muted) 18%, transparent) 4px 5px); }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .desk, .button { transition: none; } .desk.just-booked { animation: none; } }

.desk-panel { border: 1px solid var(--border); border-radius: 14px; padding: 20px; min-height: 100%; background: var(--surface); }
.panel-empty { text-align: center; color: var(--accent); padding: 16px 4px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.panel-empty p { color: var(--text); font-size: 15px; }
.panel-empty p.muted { color: var(--muted); font-size: 14px; }
.panel-dept { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.swatch { width: 12px; height: 12px; border-radius: 4px; }
#panel-label { font-size: 24px; margin-top: 8px; }
.panel-id { margin-top: 6px; font-size: 13px; }
.panel-facts { margin: 16px 0 0; display: grid; gap: 10px; }
.panel-facts div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; border-bottom: 1px dashed var(--border); padding-bottom: 8px; }
.panel-facts dt { color: var(--muted); }
.panel-facts dd { margin: 0; font-weight: 600; text-align: right; }
.status-free { color: var(--free); }
.status-occupied { color: var(--occupied); }
.reserve-form { margin-top: 18px; display: grid; gap: 8px; }
.reserve-form label { font-size: 14px; font-weight: 600; }
.reserve-form input { font: 16px var(--sans); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.reserve-form input:focus { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
.reserve-form .button { margin-top: 4px; }
.panel-note { margin-top: 14px; font-size: 14px; }

.legend { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.legend button {
  display: inline-flex; align-items: center; gap: 8px; font: 500 14px var(--sans); color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; cursor: pointer;
}
.legend button:hover, .legend button[aria-pressed="true"] { border-color: var(--text); }
.legend .swatch { width: 10px; height: 10px; border-radius: 3px; }
.demo-footnote { text-align: center; color: var(--muted); font-size: 14px; margin-top: 16px; }

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section h2 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; margin-top: 14px; }
.section-lede { color: var(--muted); font-size: 18px; margin-top: 14px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: none; }
.steps li { position: relative; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.step-num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.steps h3 { font-size: 19px; margin-top: 16px; }
.steps p { color: var(--muted); font-size: 15px; margin-top: 8px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--tint); background: color-mix(in srgb, var(--tint) 13%, transparent); }
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 18px; margin-top: 18px; }
.feature p { color: var(--muted); font-size: 15px; margin-top: 8px; }

.split { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; }
.split-reverse { grid-template-columns: 5fr 6fr; }
.split-copy p { color: var(--muted); margin-top: 16px; font-size: 17px; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 30px; color: var(--muted); font-size: 16px; }
.ticks li b { color: var(--text); }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--free); background: var(--free-soft); }
.shot { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-lg); background: #fff; }

.api-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow-x: auto; }
.api-card table { width: 100%; border-collapse: collapse; font-size: 15px; }
.api-card th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 14px 18px; border-bottom: 1px solid var(--border); }
.api-card td { padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.api-card tr:last-child td { border-bottom: 0; }
.api-card td:first-child { white-space: nowrap; }
.api-card td:last-child { color: var(--muted); }
.api-card code { background: none; border: 0; padding: 0; }
.verb { display: inline-block; min-width: 48px; font: 600 11px/1 var(--mono); padding: 5px 7px; border-radius: 6px; margin-right: 10px; text-align: center; }
.verb-get { background: var(--free-soft); color: var(--free); }
.verb-post { background: var(--accent-soft); color: var(--accent); }

.code-card { background: #0f172a; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid #1e293b; }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: #111c33; border-bottom: 1px solid #1e293b; color: #94a3b8; font: 13px var(--mono); }
.copy-button { font: 600 13px var(--sans); color: #e2e8f0; background: #1e293b; border: 1px solid #334155; border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.copy-button:hover { background: #273449; }
.code-card pre { margin: 0; padding: 20px 22px; overflow-x: auto; color: #e2e8f0; font: 14px/1.75 var(--mono); }
.code-card pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.code-card .c { color: #64748b; }
.after-code { margin-top: 20px; color: var(--muted); font-size: 15px; text-align: center; }

.cta { padding: 0 0 96px; }
.cta-inner {
  max-width: 1112px; border-radius: 28px; padding: 64px 32px; text-align: center; color: #fff;
  background:
    radial-gradient(400px 200px at 10% 0%, rgba(255, 102, 204, 0.35), transparent 70%),
    radial-gradient(400px 220px at 90% 100%, rgba(112, 173, 71, 0.35), transparent 70%),
    linear-gradient(135deg, #1d4ed8, #4c1d95);
}
.cta h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.cta p { margin: 14px auto 0; max-width: 560px; color: rgba(255, 255, 255, 0.82); font-size: 18px; }

.site-footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.site-footer a { color: var(--muted); }
.site-footer nav { display: flex; gap: 20px; }
.site-footer nav a { text-decoration: none; font-weight: 500; }
.site-footer nav a:hover { color: var(--text); }

/* Responsive */
@media (max-width: 980px) {
  .demo-layout { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .split-reverse { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 720px) {
  :root { --gap: 3px; }
  .site-nav { display: none; }
  .header-inner > .button { margin-left: auto; }
  .container { padding: 0 16px; }
  .hero { padding: 56px 0 40px; }
  .window-body { padding: 16px; }
  .window-url { display: none; }
  .window-bar { justify-content: space-between; }
  .steps, .feature-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .cta-inner { border-radius: 20px; padding: 44px 20px; }
}
