/* ==========================================================================
   Copy "Glass Workbench" landing site
   Dark, glass-panel macOS pro tool. Self-contained: self-hosted fonts, no CDNs.
   ========================================================================== */

/* ---- Self-hosted fonts (woff2 under ../fonts) ---------------------------- */
@font-face {
  font-family: "Sora"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/sora-700.woff2") format("woff2");
}
@font-face {
  font-family: "Sora"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("../fonts/sora-800.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/jetbrainsmono-500.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/jetbrainsmono-700.woff2") format("woff2");
}

/* ---- Tokens ------------------------------------------------------------- */
:root {
  --bg: #0B0C0F;
  --bg-2: #101217;
  --surface: #15171D;
  --surface-2: #1C1F27;
  --line: #262A33;
  --line-2: #333A46;
  --text: #ECEDF1;
  --dim: #A2A8B4;
  --mute: #6B7280;
  --accent: #4C9DFF;
  --accent-2: #6FB0FF;
  --accent-dim: #2E6FD6;
  --glow: rgba(76, 157, 255, 0.30);

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --display: "Sora", var(--sans);
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1140px;
  --pad: clamp(20px, 5vw, 48px);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  --shadow-card: 0 10px 30px -14px rgba(0, 0, 0, 0.65);
}

/* ---- Reset / base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* Faint blueprint measurement grid + a top glow, behind everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 520px at 72% -8%, rgba(76, 157, 255, 0.10), transparent 60%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 46px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 46px 100%;
  opacity: 0.35;
  mask-image: radial-gradient(1000px 700px at 60% 0%, #000 0%, transparent 78%);
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: rgba(76, 157, 255, 0.32); }

/* ---- Layout primitives -------------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { padding: clamp(64px, 10vw, 128px) 0; position: relative; }
.section + .section { border-top: 1px solid var(--line); }

.eyebrow {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow .num { color: var(--mute); }
.section-head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 14px 0 12px;
}
.section-head p { color: var(--dim); font-size: clamp(16px, 2vw, 19px); margin: 0; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  padding: 11px 18px; border-radius: 11px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.btn-primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #05121f; box-shadow: 0 8px 24px -8px var(--glow);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--accent-dim); transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }

/* keyboard chip + brew command chip */
kbd, .kbd {
  font-family: var(--mono); font-weight: 500; font-size: 0.86em;
  background: var(--surface-2); border: 1px solid var(--line-2);
  border-bottom-width: 2px; border-radius: 6px; padding: 2px 7px; color: var(--text);
}
.cmd {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 13.5px; color: var(--dim);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px;
}
.cmd .dollar { color: var(--mute); }
.cmd button {
  margin-left: auto; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em;
  color: var(--accent-2); background: transparent; border: 1px solid var(--line-2);
  border-radius: 6px; padding: 3px 8px; cursor: pointer; text-transform: uppercase;
}
.cmd button:hover { border-color: var(--accent-dim); color: var(--text); }

/* ---- Header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 12, 15, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 800; letter-spacing: -0.01em; }
.brand .mark { width: 24px; height: 24px; }
.nav { display: flex; gap: 22px; margin-left: 12px; }
.nav a { font-size: 14px; color: var(--dim); }
.nav a:hover { color: var(--text); }
.header-cta { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.header-cta .gh { color: var(--dim); display: inline-flex; }
.header-cta .gh:hover { color: var(--text); }
@media (max-width: 720px) { .nav { display: none; } }

/* ---- Hero --------------------------------------------------------------- */
.hero { padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 9vw, 120px); position: relative; }
.hero .wrap { display: grid; grid-template-columns: 1.02fr 1.1fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero-copy h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(38px, 6.2vw, 66px); line-height: 1.02; letter-spacing: -0.03em;
  margin: 18px 0 18px;
}
.hero-copy h1 .accent { color: var(--accent-2); }
.hero-copy .lead { color: var(--dim); font-size: clamp(17px, 2.1vw, 20px); max-width: 30em; margin: 0 0 26px; }
.hero-copy .lead .kbd { color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.hero-meta { font-family: var(--mono); font-size: 12.5px; color: var(--mute); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hero-meta a { color: var(--dim); } .hero-meta a:hover { color: var(--accent-2); }
.hero-meta .dot { color: var(--line-2); }

@media (max-width: 900px) {
  /* minmax(0, 1fr) — not plain 1fr — so the column can shrink below the shelf mock's
     min-content width instead of forcing the whole hero wider than the viewport. */
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { order: 2; max-width: 100%; overflow: hidden; }
}

/* ---- Glass shelf mock (hero + reused) ----------------------------------- */
.scene { position: relative; }
.shelf {
  background: rgba(24, 27, 34, 0.66);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 12px;
  overflow: hidden;
}
.hero-visual .shelf {
  transform: perspective(1400px)
             rotateY(calc(-9deg + var(--px, 0) * 7deg))
             rotateX(calc(3deg + var(--py, 0) * -6deg));
  transform-origin: left center;
  transition: transform 0.2s ease-out;
  will-change: transform;
}
@media (max-width: 900px) { .hero-visual .shelf { transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-visual .shelf { transform: perspective(1400px) rotateY(-9deg) rotateX(3deg); } }
.shelf-top { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  font-size: 12px; color: var(--dim); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.tab.on { color: var(--text); border-color: var(--accent-dim); background: rgba(76,157,255,0.12); }
.tab .swatch { width: 8px; height: 8px; border-radius: 50%; }
.search {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--mute); background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 5px 9px; min-width: 120px;
}
.shelf-rule { height: 1px; background: var(--line); margin: 2px 4px 10px; }
.cards { display: flex; gap: 10px; overflow: hidden; padding: 2px 4px 6px; }

.card {
  flex: 0 0 148px; height: 150px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px; display: flex; flex-direction: column; gap: 7px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}
.card.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 10px 30px -12px var(--glow); background: linear-gradient(180deg, rgba(76,157,255,0.08), var(--surface)); }
.card-h { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--mute); }
.card-h .app { width: 13px; height: 13px; border-radius: 3px; background: linear-gradient(135deg,#4b5563,#2b303a); flex: none; }
.card-h .app.safari { background: linear-gradient(135deg,#3a92ff,#1f6fd6); }
.card-h .app.xcode { background: linear-gradient(135deg,#2b7be0,#155ab0); }
.card-h .app.finder { background: linear-gradient(135deg,#38b0ff,#1e73c8); }
.card-h .time { margin-left: auto; }
.card-h .star { color: #f5c451; }
.card-rule { height: 1px; background: var(--line); }
.card-body { font-family: var(--mono); font-size: 10.5px; line-height: 1.5; color: var(--dim); overflow: hidden; }
.card-title { font-size: 11px; font-weight: 600; color: var(--text); }
.card .swatch-lg { height: 34px; border-radius: 6px; }
.card .thumb { flex: 1; border-radius: 6px; background: linear-gradient(135deg,#233043,#141922); border: 1px solid var(--line); }
.card .link-row { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--dim); }
.card .link-row .fav { width: 12px; height: 12px; border-radius: 3px; background: linear-gradient(135deg,#f59e0b,#d97706); flex: none; }

/* syntax-highlight sample (content coloring, like the app) */
.tok-key { color: #c58fff; } .tok-str { color: #7ee0a1; } .tok-com { color: var(--mute); }
.tok-num { color: #57c8d4; } .tok-type { color: #6fb0ff; }
.hl-mark { color: var(--accent-2); font-weight: 600; }

/* Smart-search token field (mock) */
.token-field {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 13px; color: var(--text);
  background: var(--surface); border: 1px solid var(--accent-dim);
  border-radius: 10px; padding: 9px 11px; box-shadow: 0 0 0 3px rgba(76,157,255,0.12);
}
.token-field .mag { color: var(--mute); flex: none; }
.token-field .typed { color: var(--text); }
.token-field .caret { width: 1.5px; height: 15px; background: var(--accent); border-radius: 1px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  font-size: 12px; font-weight: 500; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 9px 3px 6px;
}
.pill .ic { width: 13px; height: 13px; border-radius: 3px; flex: none; color: var(--mute); }
.pill .ic.safari { background: linear-gradient(135deg,#3a92ff,#1f6fd6); }
.suggest {
  margin-top: 9px; width: 214px; max-width: 100%; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 4px; box-shadow: var(--shadow-card);
}
.suggest .row {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  color: var(--text); padding: 6px 8px; border-radius: 6px;
}
.suggest .row.on { background: var(--accent); color: #fff; }
.suggest .row .ic { width: 14px; height: 14px; flex: none; border-radius: 3px; color: var(--mute); opacity: 0.85; }
.suggest .row.on .ic { color: #fff; opacity: 1; }

/* ---- Hero "free & open source" pill ------------------------------------- */
.free-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.03em;
  color: var(--accent-2);
  background: rgba(76, 157, 255, 0.10);
  border: 1px solid var(--accent-dim);
  border-radius: 999px; padding: 5px 12px; margin-bottom: 14px;
}
.free-pill svg { width: 13px; height: 13px; flex: none; }

/* ---- Contribute --------------------------------------------------------- */
.contribute-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 820px) { .contribute-grid { grid-template-columns: 1fr; } }
.contribute-card { display: block; padding: 24px; transition: transform 0.14s ease, border-color 0.14s ease; }
.contribute-card:hover { transform: translateY(-3px); border-color: var(--accent-dim); }
.contribute-card .ic { width: 26px; height: 26px; color: var(--accent-2); margin-bottom: 14px; }
.contribute-card h4 { font-family: var(--display); font-weight: 700; font-size: 18px; margin: 0 0 6px; }
.contribute-card p { color: var(--dim); font-size: 14.5px; margin: 0 0 14px; }
.contribute-card .contribute-go { font-family: var(--mono); font-size: 12px; color: var(--accent-2); }
@media (prefers-reduced-motion: reduce) { .contribute-card:hover { transform: none; } }

/* ---- Feature rows ------------------------------------------------------- */
.feature { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 4vw, 60px); align-items: center; }
.feature + .feature { margin-top: clamp(56px, 8vw, 104px); }
.feature.flip .feature-copy { order: 2; }
.feature-copy h3 { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.02em; margin: 12px 0 10px; }
.feature-copy p { color: var(--dim); margin: 0 0 14px; }
.feature-copy ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.feature-copy li { font-size: 15px; color: var(--dim); display: flex; gap: 9px; align-items: flex-start; }
.feature-copy li::before { content: ""; width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 0 3px rgba(76,157,255,0.15); }
@media (max-width: 820px) {
  .feature, .feature.flip { grid-template-columns: minmax(0, 1fr); }
  .feature .feature-copy, .feature.flip .feature-copy { order: 0; }
  .feature-visual { max-width: 100%; overflow: hidden; }
}

/* small panels reused in feature visuals */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.glass-panel { background: rgba(24,27,34,0.62); backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); }

/* paste stack mock */
.stack { width: 260px; max-width: 100%; padding: 10px; }
.stack-h { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; padding: 3px 4px 9px; }
.stack-h .count { font-family: var(--mono); font-size: 11px; color: var(--dim); background: var(--surface-2); border-radius: 999px; padding: 0 7px; }
.stack-row { display: flex; align-items: center; gap: 9px; padding: 6px 4px; border-top: 1px solid var(--line); font-size: 12.5px; }
.stack-row .n { font-family: var(--mono); font-size: 11px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: var(--dim); background: var(--surface-2); flex: none; }
.stack-row.next .n { background: var(--accent); color: #05121f; font-weight: 700; }
.stack-row .txt { font-family: var(--mono); color: var(--dim); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.stack-row .badge { margin-left: auto; font-size: 9px; font-weight: 700; text-transform: uppercase; color: var(--accent-2); background: rgba(76,157,255,0.14); border-radius: 999px; padding: 1px 6px; }

/* rich editor mock */
.editor { width: 300px; max-width: 100%; padding: 12px; }
.editor .toolbar { display: flex; gap: 6px; margin-bottom: 9px; }
.editor .toolbar span { width: 26px; height: 24px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 12px; color: var(--dim); }
.editor .toolbar span.on { color: var(--accent-2); border-color: var(--accent-dim); background: rgba(76,157,255,0.12); }
.editor .field { font-size: 13.5px; line-height: 1.6; color: var(--text); min-height: 74px; }
.editor .stats { font-family: var(--mono); font-size: 11px; color: var(--mute); margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }

/* ---- Privacy grid ------------------------------------------------------- */
.priv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 820px) { .priv-grid { grid-template-columns: 1fr; } }
.priv-card { padding: 20px; }
.priv-card .ic { width: 30px; height: 30px; color: var(--accent-2); margin-bottom: 12px; }
.priv-card h4 { font-family: var(--display); font-weight: 700; font-size: 17px; margin: 0 0 6px; }
.priv-card p { color: var(--dim); font-size: 14.5px; margin: 0; }

/* ---- Install ------------------------------------------------------------ */
.install-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 820px) { .install-grid { grid-template-columns: 1fr; } }
.install-card { padding: 24px; }
.install-card h4 { font-family: var(--display); font-weight: 700; font-size: 19px; margin: 0 0 6px; }
.install-card p { color: var(--dim); font-size: 14.5px; margin: 0 0 16px; }
.install-note { margin-top: 22px; font-size: 13.5px; color: var(--mute); }
.install-note .kbd { color: var(--dim); }

/* ---- CTA band ----------------------------------------------------------- */
.cta-band { text-align: center; }
.cta-band h2 { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 4.6vw, 46px); letter-spacing: -0.02em; margin: 12px 0 22px; }
.cta-actions { display: inline-flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; color: var(--dim); font-size: 14px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.site-footer .brand { color: var(--text); margin-bottom: 10px; }
.site-footer .fcol h5 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); margin: 0 0 10px; }
.site-footer .fcol a { display: block; color: var(--dim); padding: 3px 0; }
.site-footer .fcol a:hover { color: var(--accent-2); }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 18px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--mute); }
@media (max-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .brand-col { grid-column: 1 / -1; } }

/* ---- Motion: hero shelf slide-up + card settle -------------------------- */
@keyframes shelfUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cardSettle { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.hero-visual .scene { animation: shelfUp 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.hero-visual .card { animation: cardSettle 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
/* Stagger the cards so the shelf fills in card-by-card after it rises. */
.hero-visual .card:nth-child(1) { animation-delay: 0.20s; }
.hero-visual .card:nth-child(2) { animation-delay: 0.28s; }
.hero-visual .card:nth-child(3) { animation-delay: 0.36s; }
.hero-visual .card:nth-child(4) { animation-delay: 0.44s; }
.hero-visual .card:nth-child(5) { animation-delay: 0.52s; }
.hero-visual .card:nth-child(1) { animation-delay: 0.18s; }
.hero-visual .card:nth-child(2) { animation-delay: 0.28s; }
.hero-visual .card:nth-child(3) { animation-delay: 0.38s; }
.hero-visual .card:nth-child(4) { animation-delay: 0.48s; }
.hero-visual .card:nth-child(5) { animation-delay: 0.58s; }
.card { transition: transform 0.14s ease, border-color 0.14s ease; }
.scene:hover .card:not(.sel) { border-color: var(--line-2); }

@media (prefers-reduced-motion: reduce) {
  .hero-visual .scene, .hero-visual .card { animation: none; }
  .hero-visual .shelf { transform: none; }
  .card { transition: none; }
}
