/*! DIY Sounds — © 2026 Glenn Mejias. All rights reserved.
 *  https://diysounds.com
 *  Not licensed for redistribution, reuse or derivative works.
 *  See /terms.html
 */
/*
 * One stylesheet for every marketing page.
 *
 * The landing page used to carry its CSS inline, which was fine while there
 * was one page. There are now a dozen, and a shared file that caches once is
 * both smaller over the site and the only way the pages stay consistent.
 */

:root {
  --bg: #14161a;
  --panel: #1c1f26;
  --line: #2c313b;
  --text: #e6e9ef;
  --muted: #8b94a6;
  --accent: #5aa9ff;
  --measured: #4ec98a;
  --edge: #3c434f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

a { color: var(--accent); }

/* Header ------------------------------------------------------------------ */

header.site { border-bottom: 1px solid var(--line); padding: 20px 0; }
header.site .wrap { display: flex; align-items: center; gap: 12px; }
.mark { width: 28px; height: 28px; border-radius: 8px; display: block; object-fit: cover; }
.name { font-weight: 600; letter-spacing: -0.01em; color: var(--text); text-decoration: none; }
.free {
  margin-left: auto;
  font-size: 13px;
  color: var(--measured);
  border: 1px solid rgba(78, 201, 138, 0.35);
  border-radius: 999px;
  padding: 3px 12px;
}

/* The tools sub-bar.
 *
 * Not the calculator menu that used to sit here — that was eight links
 * repeating what the crumbs already said. These two are the only route to the
 * tools from anywhere on the site: /app/ is noindex, so nothing links them and
 * no search result reaches them. A shortcut is the whole point, so they sit
 * above the fold rather than behind a scroll.
 */
nav.site {
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  font-size: 14px;
}
nav.site .wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
nav.site .nav-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
nav.site a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  text-decoration: none;
}
nav.site a:hover { color: var(--text); }
nav.site a svg { color: var(--accent); flex: none; }

/* Hero -------------------------------------------------------------------- */

.hero { padding: 88px 0 48px; text-align: center; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 20px;
  padding: 6px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}
h1 {
  margin: 0 0 20px;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 650;
}
.lede {
  margin: 0 auto 32px;
  max-width: 660px;
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--muted);
}

.cta {
  display: inline-block;
  background: var(--accent);
  color: #0b1220;
  font-weight: 600;
  text-decoration: none;
  padding: 13px 30px;
  border-radius: 10px;
}
.cta:hover { filter: brightness(1.08); }
.cta-note { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* Two calls to action, side by side. The calculator stays the filled one —
   it is what most people came for, and it needs no account. The community
   sits beside it as the outlined choice rather than competing for the eye. */
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  padding: 13px 26px;
  border: 1px solid var(--edge);
  border-radius: 10px;
}
.cta-secondary:hover { background: var(--panel); border-color: var(--muted); }
.cta-secondary svg { flex: none; }

/* Screenshots ------------------------------------------------------------- */

figure { margin: 0; }
.shot {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.hero-shot { margin-top: 56px; }

/* The hero reel: a muted autoplay loop, with a button for its soundtrack
   (js/reel.js shows it). The reel is black, so the frame is too. */
.hero-reel { position: relative; }
.hero-reel video { aspect-ratio: 16 / 9; object-fit: cover; background: #050607; }
.reel-sound {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(5, 6, 7, 0.72);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.reel-sound:hover { border-color: var(--accent); }
.reel-sound:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.reel-sound[hidden] { display: none; }
.reel-sound .on { display: none; }
.reel-sound.is-on .on { display: inline; }
.reel-sound.is-on .off { display: none; }

figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); text-align: center; }

/* Alternating feature rows ------------------------------------------------ */

.features { padding: 40px 0 24px; }
.feature {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
  border-top: 1px solid var(--line);
}
.feature:nth-child(even) .feature-text { order: 2; }
.feature h2 { margin: 0 0 12px; font-size: 24px; letter-spacing: -0.02em; font-weight: 600; }
.feature p { margin: 0 0 12px; color: var(--muted); }
.feature p:last-child { margin-bottom: 0; }

/* The assistant's example conversation, drawn rather than screenshotted -- */

.chat-demo {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
}
.chat-demo-head {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #1a1d24;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.chat-demo-body { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.chat-demo-body p { margin: 0; padding: 9px 12px; border-radius: 10px; font-size: 14px; line-height: 1.5; max-width: 85%; }
/* Doubled up to outrank `.feature p`, which would grey them out. */
.chat-demo-body .chat-demo-q { align-self: flex-end; background: var(--accent); color: #0d1117; }
.chat-demo-body .chat-demo-a { align-self: flex-start; background: #22262f; color: var(--text); }

/* Article pages ----------------------------------------------------------- */

.article { padding: 56px 0 24px; }
.article h1 { font-size: clamp(30px, 5vw, 42px); text-align: left; margin-bottom: 16px; }
.article .lede { margin: 0 0 32px; max-width: none; text-align: left; }
.article h2 {
  margin: 44px 0 14px;
  font-size: 26px;
  letter-spacing: -0.02em;
  font-weight: 600;
  scroll-margin-top: 24px;
}
.article h3 { margin: 28px 0 10px; font-size: 18px; font-weight: 600; }
.article p { margin: 0 0 16px; color: #c2c8d4; }
.article ul, .article ol { margin: 0 0 16px; padding-left: 22px; color: #c2c8d4; }
.article li { margin-bottom: 8px; }
.article li::marker { color: var(--muted); }

/* Breadcrumbs, so the trail is visible as well as marked up. */
.crumbs { font-size: 13px; color: var(--muted); padding: 20px 0 0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }

/* A formula, or any short block of maths. Scrolls rather than pushing the
   page sideways on a phone. */
.formula {
  display: block;
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 0 0 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  color: var(--text);
  white-space: pre;
}
.formula .note {
  display: block;
  margin-top: 8px;
  font-family: inherit;
  font-size: 13px;
  color: var(--muted);
  white-space: pre-wrap;
}

/* A callout for the thing people get wrong. */
.aside {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 0 0 20px;
}
.aside p:last-child { margin-bottom: 0; }
.aside strong { color: var(--text); }

/* Tables: reference numbers, alignment comparisons. */
.table-scroll { overflow-x: auto; margin: 0 0 20px; }
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 460px;
  font-size: 15px;
}
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
th { color: var(--text); font-weight: 600; white-space: nowrap; }
td { color: #c2c8d4; }
caption { caption-side: bottom; padding-top: 10px; font-size: 13px; color: var(--muted); text-align: left; }

/* An inline call to action inside an article. */
.inline-cta {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
  background: var(--panel);
  text-align: center;
}
.inline-cta h2 { margin: 0 0 8px; font-size: 20px; }
.inline-cta p { margin: 0 0 18px; color: var(--muted); }

/* FAQ. Real <details> so it works without script and the text is in the DOM
   for a crawler either way. */
.faq { margin: 0 0 16px; border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  list-style: none;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+";
  color: var(--accent);
  font-weight: 400;
  line-height: 1.4;
}
.faq[open] summary::before { content: "\2013"; }
.faq .answer { padding: 0 0 16px 24px; }
.faq .answer p { margin: 0 0 12px; color: #c2c8d4; }
.faq .answer p:last-child { margin-bottom: 0; }

/* Card grid, for the "other calculators" block. */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 0 0 20px; }
.card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  background: var(--panel);
  text-decoration: none;
}
.card:hover { border-color: var(--edge); }
.card h3 { margin: 0 0 6px; font-size: 17px; color: var(--text); }
.card p { margin: 0; font-size: 14px; color: var(--muted); }

/* Closing + footer -------------------------------------------------------- */

.closing { border-top: 1px solid var(--line); padding: 72px 0; text-align: center; }
.closing h2 { margin: 0 0 14px; font-size: 30px; letter-spacing: -0.02em; }
.closing p { margin: 0 auto 28px; max-width: 560px; color: var(--muted); }

footer.site {
  border-top: 1px solid var(--line);
  padding: 28px 0 48px;
  font-size: 14px;
  color: var(--muted);
}
footer.site .wrap { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--text); }
footer.site .spacer { margin-left: auto; }

@media (max-width: 760px) {
  .hero { padding: 56px 0 32px; }
  .hero-shot { margin-top: 36px; }
  .reel-sound { right: 8px; bottom: 8px; padding: 5px 10px; font-size: 12px; gap: 6px; }
  .reel-sound svg { width: 14px; height: 14px; }
  .feature { grid-template-columns: 1fr; gap: 24px; padding: 40px 0; }
  .feature:nth-child(even) .feature-text { order: 0; }
  footer.site .spacer { margin-left: 0; }
  nav.site .wrap { gap: 14px; }
  nav.site .nav-label { display: none; }
}

/* The assistant ------------------------------------------------------------
   A round button above the fold's bottom-right corner, and the panel it opens.
   `js/ask.js` builds both; neither exists until the API says there is an
   assistant to talk to, so none of this is ever seen on a static preview.

   These pages have no dock and no status bar, so the offsets are plain numbers
   rather than the app's `--dock-h` arithmetic — there is nothing here for the
   button to ride above except the bottom of the window. */

.ask-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--accent);
  color: #0b1420;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.15s ease;
}

.ask-fab:hover { background: #7cbcff; border-color: #7cbcff; }
.ask-fab:active { transform: scale(0.94); }
.ask-fab:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.ask-fab.is-open {
  background: var(--panel);
  border-color: var(--edge);
  color: var(--text);
}

.ask-float {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: 380px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 140px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.ask-float[hidden] { display: none; }

.ask-float-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 10px 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #1a1d24;
}

.ask-float-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.ask-float-close {
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.ask-float-close:hover { background: #22262f; color: var(--text); }

/* Pushed right, beside the ×, so the title keeps the left edge. */
.ask-float-clear {
  margin-left: auto;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.ask-float-clear:hover:not(:disabled) { background: #22262f; color: var(--text); }
.ask-float-clear:disabled { opacity: 0.5; cursor: default; }
.ask-float-clear[hidden] { display: none; }

.ask-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 14px;
  overflow: hidden;
}

.ask-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 120px;
  overflow-y: auto;
  padding-right: 4px;
}

.ask-intro { display: flex; flex-direction: column; gap: 12px; }
.ask-starters { display: flex; flex-direction: column; gap: 6px; }

.ask-starter {
  padding: 8px 10px;
  border: 1px solid var(--edge);
  border-radius: 7px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.ask-starter:hover { background: #22262f; }

.ask-turn {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.55;
  /* Answers are text, never markup — see the header of `js/ask.js`. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ask-turn-user {
  align-self: flex-end;
  max-width: 88%;
  background: var(--accent);
  color: #0d1117;
  font-weight: 500;
}

.ask-turn-model {
  background: #12141a;
  border: 1px solid var(--line);
  color: var(--text);
}

.ask-turn-model.is-error { border-color: #e2686b; color: #e2686b; }
.ask-turn.ask-waiting { padding: 14px 12px; }

.ask-signin-link { font-weight: 600; }

.ask-dots { display: inline-flex; gap: 5px; }

.ask-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: ask-dot 1.2s ease-in-out infinite;
}

.ask-dots i:nth-child(2) { animation-delay: 0.15s; }
.ask-dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes ask-dot {
  0%, 60%, 100% { opacity: 0.25; }
  30% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ask-dots i { animation: none; opacity: 0.5; }
}

.ask-composer { display: flex; flex-direction: column; gap: 8px; }

.ask-input {
  width: 100%;
  min-height: 56px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: #12141a;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
}

.ask-input:focus { outline: none; border-color: var(--accent); }
.ask-input::placeholder { color: var(--muted); }

.ask-send {
  align-self: flex-end;
  padding: 8px 16px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: #0b1420;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.ask-send:hover { background: #7cbcff; border-color: #7cbcff; }

.ask-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.ask-note.is-spent { color: #d99a2b; font-weight: 560; }

.ask-signin-note {
  padding: 9px 11px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: #12141a;
}

@media (max-width: 720px) {
  .ask-float {
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    bottom: 80px;
    max-height: calc(100vh - 130px);
  }
  .ask-fab { right: 12px; bottom: 16px; }
}
