/* SFWaaS.com — marketing site
   Same CM family palette + fonts. Home page carries one darker full-width
   band for the commercial-infra section ("sinister context inside a whitehat
   project"). Hero headline rotates across three phrases via CSS keyframes. */

@import "/assets/css/fonts.css";

:root {
  --bg: #faf9f5;
  --bg-card: #ffffff;
  --bg-sunken: #f1f0ea;
  --bg-dark: #141823;           /* commercial-pitch band */
  --bg-dark-deep: #0b0e16;
  --border: #e6e4dc;
  --border-strong: #d2cfc4;
  --border-dark: #2a2f3f;

  --text: #111111;
  --text-muted: #555555;
  --text-faint: #888888;
  --text-inverse: #f4f4f7;
  --text-inverse-muted: #9aa0b4;

  --link: #0a5fb8;
  --link-hover: #08487e;
  --link-dark: #8ab4ff;

  --accent: #1f2937;
  --accent-amber: #b8590a;
  --accent-live:  #1d7a3a;

  --ff-display: "Bebas Neue", "Impact", "Arial Black", sans-serif;
  --ff-editorial: "DM Serif Display", Georgia, "Times New Roman", serif;
  --ff-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ff-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1120px;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); font-family: var(--ff-sans); line-height: 1.5; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }

/* -------- Header / nav -------- */
.site-header { background: var(--bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; max-width: var(--container); margin: 0 auto; gap: 1.5rem; }
.nav-brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; }
.nav-brand:hover { color: var(--text); }
.nav-brand img { height: 32px; width: auto; }
.nav-brand .wordmark { font-family: var(--ff-display); font-size: 1.45rem; letter-spacing: .04em; color: var(--text); line-height: 1; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; font-family: var(--ff-mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.nav-links a { color: var(--text-muted); text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-cta { font-family: var(--ff-mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; padding: .55rem 1rem; border: 1px solid var(--text); color: var(--text); text-decoration: none; border-radius: 6px; }
.nav-cta:hover { background: var(--text); color: var(--bg-card); }

/* -------- Typography -------- */
.eyebrow { font-family: var(--ff-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted); margin-bottom: .85rem; }
.display { font-family: var(--ff-display); font-weight: 400; letter-spacing: .005em; line-height: 1.05; }
.editorial { font-family: var(--ff-editorial); font-weight: 400; letter-spacing: -.005em; }

h1.display { font-size: clamp(2.5rem, 6.5vw, 4.6rem); }
h2.display { font-size: clamp(2rem, 4.5vw, 3rem); }
h2.editorial { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 1rem; }
h3.editorial { font-size: 1.3rem; margin: 0 0 .5rem; }

/* -------- Buttons -------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--ff-mono); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; padding: .85rem 1.4rem; border-radius: 6px; text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--text); color: var(--bg-card); }
.btn-primary:hover { background: #333; color: #fff; }
.btn-secondary { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { border-color: var(--text); color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; }

.btn-dark { background: #ffffff; color: var(--bg-dark); }
.btn-dark:hover { background: #e6e7ef; color: var(--bg-dark); }
.btn-dark-secondary { background: transparent; border-color: var(--border-dark); color: var(--text-inverse); }
.btn-dark-secondary:hover { border-color: var(--text-inverse); color: #fff; }

/* -------- Hero with rotating headline -------- */
.hero { padding: 4rem 0 3rem; }
.hero-wrap { max-width: 880px; }
.rotate {
  position: relative;
  display: block;
  min-height: 1.1em;
}
.rotate-phrase {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(10px);
  animation: rotatePhrase 15s cubic-bezier(.4,.0,.2,1) infinite;
}
.rotate-phrase:nth-child(1) { animation-delay: 0s; position: relative; } /* first one takes space */
.rotate-phrase:nth-child(2) { animation-delay: 5s; }
.rotate-phrase:nth-child(3) { animation-delay: 10s; }
@keyframes rotatePhrase {
  0%     { opacity: 0; transform: translateY(10px); }
  3%     { opacity: 1; transform: translateY(0); }
  30%    { opacity: 1; transform: translateY(0); }
  33%    { opacity: 0; transform: translateY(-10px); }
  100%   { opacity: 0; transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) {
  .rotate-phrase { animation: none; opacity: 1; transform: none; position: relative; }
  .rotate-phrase + .rotate-phrase { display: none; }
}

.hero .lead { font-family: var(--ff-editorial); font-size: clamp(1.2rem, 2vw, 1.5rem); color: var(--text); margin: 1.75rem 0 1.75rem; max-width: 680px; line-height: 1.4; }
.hero .trust-line { font-family: var(--ff-mono); font-size: .82rem; color: var(--text-muted); margin-top: 1.25rem; }
.hero .trust-line .dot { color: var(--text-faint); margin: 0 .5rem; }

/* -------- Used-by strip -------- */
.usedby { padding: 2.5rem 0; border-top: 1px solid var(--border); background: var(--bg-sunken); }
.usedby-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 2.5rem; }
.usedby-label { font-family: var(--ff-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); flex: 0 0 auto; }
.usedby-list { display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; align-items: center; }
.usedby-item { display: inline-flex; align-items: baseline; gap: .5rem; text-decoration: none; color: var(--text); }
.usedby-item .name { font-family: var(--ff-editorial); font-size: 1.2rem; letter-spacing: -.01em; }
.usedby-item:hover .name { color: var(--link); }
.usedby-chip { font-family: var(--ff-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-amber); border: 1px solid rgba(184,89,10,.35); padding: .1rem .45rem; border-radius: 999px; }

/* -------- Section scaffolding -------- */
.section { padding: 3.5rem 0; border-top: 1px solid var(--border); }
.section-head { max-width: 720px; margin-bottom: 2rem; }
.section-head p { color: var(--text-muted); font-size: 1rem; margin-top: .5rem; line-height: 1.6; }

/* -------- Three-tile grid for "what it does" -------- */
.tri-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.tri-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; }
.tri-card h3 { font-family: var(--ff-editorial); font-weight: 400; font-size: 1.3rem; margin-bottom: .6rem; }
.tri-card p { color: var(--text-muted); font-size: .97rem; line-height: 1.6; }
.tri-card .chip { display: inline-block; font-family: var(--ff-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); padding: .2rem .55rem; border: 1px solid var(--border); border-radius: 999px; margin-bottom: .75rem; }

/* -------- Dark band (commercial-infra pitch) -------- */
.dark-band {
  background: var(--bg-dark);
  color: var(--text-inverse);
  padding: 4rem 0;
  border-top: none;
  position: relative;
  overflow: hidden;
}
.dark-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 400px at 85% -10%, rgba(31,41,55,.8), transparent 60%),
    linear-gradient(180deg, rgba(11,14,22,.0), rgba(11,14,22,.55));
  pointer-events: none;
}
.dark-band > * { position: relative; }
.dark-band .eyebrow { color: var(--text-inverse-muted); }
.dark-band h2.editorial { color: var(--text-inverse); font-size: clamp(1.8rem, 3.5vw, 2.6rem); max-width: 760px; }
.dark-band .lede { font-family: var(--ff-editorial); font-size: 1.3rem; color: var(--text-inverse); max-width: 720px; line-height: 1.45; margin: 1.25rem 0 1rem; }
.dark-band p { color: var(--text-inverse-muted); max-width: 680px; line-height: 1.65; margin-bottom: .85rem; }
.dark-band a { color: var(--link-dark); }
.dark-band a:hover { color: #fff; }
.dark-band .aside { font-family: var(--ff-mono); font-size: .82rem; color: var(--text-inverse-muted); margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border-dark); letter-spacing: .01em; }

/* -------- Engine panel (deferential OSS pointer on home) -------- */
.engine-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2rem; }
.engine-panel .left { flex: 1 1 320px; }
.engine-panel h3 { font-family: var(--ff-editorial); font-weight: 400; font-size: 1.4rem; margin-bottom: .4rem; }
.engine-panel p { color: var(--text-muted); font-size: .97rem; line-height: 1.55; }
.engine-panel .right { flex: 0 0 auto; }

/* -------- OSS engine page -------- */
.oss-head { padding: 3.5rem 0 1rem; }
.oss-head .display { font-size: clamp(2.3rem, 5.5vw, 3.75rem); }
.oss-head .sub { font-family: var(--ff-mono); color: var(--text-muted); font-size: .9rem; margin-top: .5rem; }
.oss-body { max-width: 800px; padding: 1rem 0 2rem; }
.oss-body h2 { font-family: var(--ff-editorial); font-weight: 400; font-size: 1.6rem; margin: 2.25rem 0 .75rem; }
.oss-body h2:first-child { margin-top: 0; }
.oss-body p { color: var(--text); line-height: 1.65; margin-bottom: .9rem; }
.oss-body p.muted { color: var(--text-muted); }
.oss-body ul { list-style: none; padding: 0; margin: .5rem 0 1rem; }
.oss-body ul li { padding: .35rem 0; border-bottom: 1px solid var(--border); }
.oss-body ul li:last-child { border-bottom: none; }
.oss-body code { font-family: var(--ff-mono); font-size: .88rem; background: var(--bg-sunken); padding: .1rem .4rem; border-radius: 3px; }
.oss-body .delimiter { background: var(--bg-sunken); border-left: 3px solid var(--accent); padding: 1.25rem 1.5rem; border-radius: 4px; margin: 1.5rem 0; }
.oss-body .delimiter h3 { font-family: var(--ff-editorial); font-weight: 400; font-size: 1.2rem; margin-bottom: .35rem; }
.oss-body .delimiter p { color: var(--text); margin: .25rem 0; }
.oss-body .deadpan { font-family: var(--ff-editorial); font-size: 1.15rem; color: var(--text-muted); margin: 1.5rem 0; padding: .5rem 0; }

/* -------- FAQ -------- */
.faq { max-width: 800px; }
.faq-item { border-bottom: 1px solid var(--border); padding: 1.5rem 0; }
.faq-item:first-child { padding-top: 0; }
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { font-family: var(--ff-editorial); font-weight: 400; font-size: 1.25rem; margin-bottom: .5rem; }
.faq-item p { color: var(--text-muted); line-height: 1.65; }
.faq-item p + p { margin-top: .75rem; }

/* -------- Page header (non-home) -------- */
.page-head { padding: 3rem 0 1rem; }
.page-head .display { font-size: clamp(2.3rem, 5.5vw, 3.75rem); }
.page-head .sub { font-family: var(--ff-mono); color: var(--text-muted); font-size: .9rem; margin-top: .5rem; }

/* -------- Footer (shared CM-family pattern) -------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg); padding: 2.5rem 1.5rem 2rem; font-family: var(--ff-mono); font-size: .8rem; color: var(--text-muted); margin-top: 2rem; }
.site-footer .footer-inner { max-width: var(--container); margin: 0 auto; display: flex; flex-direction: column; gap: .75rem; }
.site-footer .footer-extras { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.site-footer .footer-copyright a { text-decoration: underline; text-underline-offset: 3px; }
.site-footer .sep { color: var(--text-faint); opacity: .7; }

/* -------- Responsive -------- */
@media (max-width: 900px) {
  .tri-grid { grid-template-columns: 1fr; }
  .nav { flex-wrap: wrap; row-gap: .5rem; }
  .nav-links { gap: 1rem; }
  .nav-cta { order: 3; }
  .usedby-inner { gap: .75rem 1.25rem; }
}
@media (max-width: 560px) {
  .hero { padding: 2.5rem 0 2rem; }
  .section { padding: 2.5rem 0; }
  .dark-band { padding: 3rem 0; }
}
