/* Foamcube site — shared styles. Same dark + orange feel as the simulator. */
:root {
  color-scheme: dark;
  --accent: #e83068;
  --accent-soft: #ff4d83;
  --bg: #0e1116;
  --bg-2: #161b22;
  --bg-3: #21262d;
  --border: #30363d;
  --text: #e6e6e6;
  --text-dim: #aab1bc;
  --text-mute: #777f8a;
}
* { box-sizing: border-box; }
html, body { margin:0; padding:0; background:var(--bg); color:var(--text);
             font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
             line-height: 1.55; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* Top nav */
nav.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(22,27,34,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
nav.top .wrap {
  max-width: 1080px; margin: 0 auto; padding: 12px 20px;
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
}
nav.top .brand { font-weight: 700; letter-spacing: .5px; color: #fff; font-size: 16px; text-decoration: none; }
nav.top .brand span { color: var(--accent); }
nav.top .brand:hover { text-decoration: none; }
nav.top a { color: var(--text-dim); padding: 4px 0; font-size: 14px; }
nav.top a:hover { color: #fff; text-decoration: none; }
nav.top a.active { color: #fff; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
nav.top .spacer { flex: 1; }
nav.top .cta {
  background: var(--accent); color: #0e1116 !important; padding: 7px 14px;
  border-radius: 6px; font-weight: 700; font-size: 13px;
}
nav.top .cta:hover { background: var(--accent-soft); text-decoration: none; }
nav.top .help-pill {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: #ffd400; color: #0e1116 !important;
  font-weight: 800; font-size: 14px; line-height: 1;
  text-decoration: none; box-shadow: 0 0 0 0 rgba(255,212,0,0.7);
  transition: box-shadow .2s, transform .2s;
}
nav.top .help-pill:hover { transform: scale(1.1); box-shadow: 0 0 0 4px rgba(255,212,0,0.25); text-decoration: none; }
nav.top .help-pill.active { box-shadow: 0 0 0 3px rgba(255,212,0,0.45); }

/* Main content */
main { max-width: 900px; margin: 0 auto; padding: 40px 24px 80px; }
main.wide { max-width: 1080px; }
h1 { font-size: 38px; margin: 0 0 12px; color: #fff; line-height: 1.15; }
h1 .accent { color: var(--accent); }
h2 { font-size: 22px; margin: 36px 0 10px; color: #fff; }
h3 { font-size: 14px; margin: 24px 0 8px; color: #fff;
     text-transform: uppercase; letter-spacing: 1.5px; }
p { color: var(--text); margin: 8px 0 14px; }
.lead { font-size: 18px; color: var(--text-dim); margin-bottom: 24px; }
ul, ol { padding-left: 22px; color: var(--text); }
li { margin: 4px 0; }
code { background: var(--bg-3); padding: 1px 6px; border-radius: 3px;
       font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* Hero */
.hero { padding: 24px 0 24px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.hero .sub { color: var(--accent); font-size: 12px; letter-spacing: 2px;
             text-transform: uppercase; margin-bottom: 12px; font-weight: 600; }
.hero .actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 10px 18px; border-radius: 6px; font-weight: 600;
       border: 1px solid var(--border); background: var(--bg-3); color: var(--text); font-size: 14px; }
.btn:hover { background: var(--border); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #0e1116; }
.btn.primary:hover { filter: brightness(1.1); background: var(--accent); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
         gap: 14px; margin: 18px 0; }
.card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px;
        padding: 18px 18px 20px; }
.card h3 { margin-top: 0; color: var(--accent); font-size: 12px; }
.card p { font-size: 14px; color: var(--text-dim); margin: 0; }
.card .num { font-size: 28px; color: #fff; font-weight: 700; margin-bottom: 4px; }

/* Footer */
footer.site { border-top: 1px solid var(--border); padding: 24px 20px;
              color: var(--text-mute); font-size: 12px; }
footer.site .wrap { max-width: 1080px; margin: 0 auto;
                    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer.site a { color: var(--text-dim); }

/* Small */
.muted { color: var(--text-mute); }
.callout { background: var(--bg-2); border-left: 3px solid var(--accent);
           padding: 12px 16px; border-radius: 4px; margin: 16px 0; }

/* ============================================================
   Mobile (phones, small tablets in portrait)
   Below 720 px we tighten everything and stack the nav.
   ============================================================ */
@media (max-width: 720px) {
  /* Nav: shrink padding, allow horizontal scroll instead of vertical-stacking */
  nav.top .wrap { padding: 8px 12px; gap: 10px; }
  nav.top .brand { font-size: 14px; }
  nav.top .brand small { display: none; }   /* hide "cncfoam.com" tag-along */
  nav.top a { font-size: 12px; padding: 2px 0; }
  nav.top .cta { padding: 6px 10px; font-size: 11px; }
  nav.top .spacer { flex: 1; min-width: 4px; }

  /* Main content: slimmer padding, smaller hero */
  main { padding: 22px 14px 60px; }
  h1 { font-size: 26px; line-height: 1.2; margin-bottom: 8px; }
  h2 { font-size: 18px; margin: 26px 0 8px; }
  h3 { font-size: 12px; }
  p, li { font-size: 14px; }
  .lead { font-size: 15px; margin-bottom: 18px; }

  .hero { padding: 16px 0 16px; margin-bottom: 18px; }
  .hero .sub { font-size: 11px; letter-spacing: 1.5px; margin-bottom: 8px; }
  .hero .actions { gap: 8px; margin-top: 16px; }
  .btn { padding: 8px 14px; font-size: 13px; }

  /* Cards collapse to single column */
  .cards { grid-template-columns: 1fr; gap: 10px; }
  .card { padding: 14px; }
  .card .num { font-size: 22px; }

  /* Footer stacks neatly */
  footer.site .wrap { flex-direction: column; align-items: flex-start; gap: 6px; padding: 0; }
  footer.site { padding: 18px 14px; }

  /* Q&A page tweaks */
  .qa h3 { font-size: 14px; margin-top: 14px; }
  .qa p { font-size: 13px; }

  /* Tables (admin / hardware BOM) — let them scroll horizontally */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Extra-small phones (< 380 px) — last-ditch shrinks */
@media (max-width: 380px) {
  nav.top .wrap { gap: 8px; }
  nav.top a { font-size: 11px; }
  h1 { font-size: 22px; }
  main { padding: 18px 12px 50px; }
}
