/* ==========================================================================
   Formantus marketing site — shared stylesheet
   Hand-written, no build step, no external dependencies, system fonts only.
   Palette:
     accent blue   #4aa3ff   (FIRDesign)
     teal          #3fb6a0   (RoomSim)
     amber         #e0a05a   (Measurement)
     dark chart    #15171b / #1b1d22
     light bg      #fbfbfc / #f0f1f3
     text          #2f343b   headings #3a3f47
   ========================================================================== */

:root {
  --accent:        #4aa3ff;
  --accent-dark:   #2f7fd6;
  --teal:          #3fb6a0;
  --amber:         #e0a05a;
  --dark-1:        #15171b;
  --dark-2:        #1b1d22;
  --light-1:       #fbfbfc;
  --light-2:       #f0f1f3;
  --text:          #2f343b;
  --heading:       #3a3f47;
  --muted:         #6b727c;
  --border:        #dfe2e7;
  --reference:     #c9ced6;

  --maxw:          1080px;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 1px 3px rgba(20, 23, 27, 0.06), 0 6px 24px rgba(20, 23, 27, 0.06);
  --shadow-lg:     0 10px 40px rgba(20, 23, 27, 0.12);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
          "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

/* ----- base ------------------------------------------------------------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--light-1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  color: var(--heading);
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); margin: 0 0 0.4em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin: 0 0 0.6em; }
h3 { font-size: 1.2rem; margin: 0 0 0.4em; }

p { margin: 0 0 1em; }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; }

ul, ol { padding-left: 1.3em; }
li { margin: 0.3em 0; }

code, kbd {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--light-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.1em 0.4em;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ----- buttons ---------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.8em 1.5em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #0b1320;
  box-shadow: 0 2px 10px rgba(74, 163, 255, 0.35);
}
.btn-primary:hover { background: #62b0ff; }

.btn-secondary {
  background: transparent;
  color: var(--accent-dark);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--light-2); }

/* On dark backgrounds */
.on-dark .btn-secondary {
  color: #eaf2fb;
  border-color: rgba(255, 255, 255, 0.25);
}
.on-dark .btn-secondary:hover { background: rgba(255, 255, 255, 0.08); }

/* The buy CTA shares this class everywhere so the checkout URL is easy to
   find/replace once the storefront is chosen. */
/* TODO: Lemon Squeezy checkout URL — every .buy-link currently points to a placeholder. */
.buy-link { /* styling comes from .btn-primary; this is the find/replace hook */ }

/* ----- header / nav ----------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 251, 252, 0.92);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 650;
  color: var(--heading);
}
.brand:hover { text-decoration: none; }
.brand img { height: 28px; width: auto; display: block; }

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.nav a {
  color: var(--text);
  padding: 0.45em 0.7em;
  border-radius: 6px;
  font-size: 0.97rem;
  font-weight: 500;
}
.nav a:hover { background: var(--light-2); text-decoration: none; }
.nav a.active { color: var(--accent-dark); font-weight: 650; }
.nav .btn { padding: 0.5em 1em; font-size: 0.95rem; }

/* ----- hero (dark) ------------------------------------------------------ */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 500px at 70% -10%, rgba(74, 163, 255, 0.18), transparent 60%),
    linear-gradient(180deg, var(--dark-1), var(--dark-2));
  color: #e9edf2;
}
.hero .container { position: relative; z-index: 2; }
.hero h1, .hero h2, .hero h3 { color: #f5f8fc; }
.hero p { color: #b9c2cd; }

/* Faint log-frequency gridlines behind the hero, echoing the app */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 12.5% 100%;
  pointer-events: none;
}

.hero-home {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
  padding: clamp(3rem, 2rem + 5vw, 6rem) 0;
}
.hero-copy .lede {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  max-width: 40ch;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}
.hero-note {
  margin-top: 1.2rem;
  font-size: 0.92rem;
  color: #98a3b0;
}

/* The blue-curve motif rendered as an inline SVG card */
.hero-art {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
}
.hero-art svg { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); }

/* Compact hero used on inner pages */
.hero-page {
  padding: clamp(2.5rem, 2rem + 3vw, 4rem) 0;
}
.hero-page .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.6rem;
}
.hero-page p { max-width: 60ch; }

/* ----- sections (light) ------------------------------------------------- */

section { padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) 0; }
section.alt { background: var(--light-2); }

.section-head {
  max-width: 60ch;
  margin: 0 auto 2.5rem;
  text-align: center;
}
.section-head p { color: var(--muted); }

/* ----- cards / grids ---------------------------------------------------- */

.grid {
  display: grid;
  gap: 1.25rem;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

/* App family cards */
.app-card { display: flex; flex-direction: column; }
.app-card .icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  margin-bottom: 1rem;
  display: block;
}
.app-card h3 { display: flex; align-items: center; gap: 0.5rem; }
.app-card p { color: var(--muted); flex: 1; }
.app-card .card-cta { margin-top: 1rem; }

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2em 0.6em;
  border-radius: 999px;
  vertical-align: middle;
}
.badge-available { background: rgba(74, 163, 255, 0.14); color: var(--accent-dark); }
.badge-soon      { background: var(--light-2); color: var(--muted); }
.badge-free      { background: rgba(63, 182, 160, 0.16); color: #2c8473; }

/* Accent edge per app */
.accent-blue  { border-top: 3px solid var(--accent); }
.accent-teal  { border-top: 3px solid var(--teal); }
.accent-amber { border-top: 3px solid var(--amber); }

/* Feature list with checkmarks */
.features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.7rem;
}
.features.cols-2 { grid-template-columns: repeat(2, 1fr); }
.features li {
  position: relative;
  padding-left: 1.7em;
  margin: 0;
}
.features li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.45em;
  width: 0.8em; height: 0.45em;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.features li strong { color: var(--heading); }

/* "Why" feature blocks */
.why-grid { gap: 1.25rem; }
.why-item h3 { font-size: 1.05rem; }
.why-item p { color: var(--muted); margin: 0; }

/* ----- screenshot placeholders ----------------------------------------- */

.shots { gap: 1.25rem; }
.shot {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--light-2);
}
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { padding: .55rem .85rem; font-size: .85rem; color: var(--muted); font-weight: 600; }

/* Home showcase screenshot */
.showcase { padding-top: .5rem; }
.screenshot {
  margin: 0 auto;
  max-width: 1000px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--light-2);
  box-shadow: 0 20px 50px rgba(20, 24, 32, .18);
}
.screenshot img { display: block; width: 100%; height: auto; }
.screenshot figcaption {
  padding: .65rem 1rem; font-size: .85rem; color: var(--muted); font-weight: 600; text-align: center;
}

/* ----- pricing ---------------------------------------------------------- */

.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
  max-width: 920px;
  margin: 0 auto;
}
.price-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-lg);
}
.price-card h3 { margin-bottom: 0.2rem; }
.price-card .price {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--heading);
  margin: 0.3rem 0 0.1rem;
}
.price-card .price small { font-size: 0.95rem; color: var(--muted); font-weight: 500; }
.price-card .sub { color: var(--muted); margin-bottom: 1.1rem; }
.price-card ul { margin: 0 0 1.5rem; }
.price-card .features { flex: 1; }
.price-card .btn { width: 100%; }

/* ----- download --------------------------------------------------------- */

.dl-grid { gap: 1.25rem; }
.dl-card h3 { display: flex; align-items: center; gap: 0.5rem; }
.dl-list { list-style: none; padding: 0; margin: 0.6rem 0 0; }
.dl-list li { margin: 0.55rem 0; }
.dl-list a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-weight: 600;
}
.dl-list .fname { font-family: var(--mono); font-size: 0.85em; color: var(--muted); font-weight: 400; }

.note {
  background: rgba(224, 160, 90, 0.1);
  border: 1px solid rgba(224, 160, 90, 0.4);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.note h3 { margin-top: 0; font-size: 1.05rem; }
.note p:last-child, .note ul:last-child { margin-bottom: 0; }

.info {
  background: rgba(74, 163, 255, 0.08);
  border: 1px solid rgba(74, 163, 255, 0.3);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.info p:last-child { margin-bottom: 0; }

/* ----- steps ------------------------------------------------------------ */

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6em;
  margin: 1em 0;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 1.8em; height: 1.8em;
  background: var(--accent);
  color: #0b1320;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9em;
}

/* ----- FAQ -------------------------------------------------------------- */

.faq details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 1.1rem;
  margin: 0.8rem 0;
  box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--heading);
  padding: 0.7rem 0;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+";
  display: inline-block;
  width: 1.2em;
  color: var(--accent);
  font-weight: 700;
}
.faq details[open] summary::before { content: "\2013"; }
.faq details > *:not(summary) { margin: 0 0 0.8rem 1.2em; color: var(--text); }

/* ----- prose (legal pages) ---------------------------------------------- */

.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 2rem; }
.prose .meta { color: var(--muted); font-size: 0.95rem; }

/* ----- CTA band --------------------------------------------------------- */

.cta-band {
  background:
    radial-gradient(800px 300px at 80% 0%, rgba(74,163,255,0.18), transparent 60%),
    linear-gradient(180deg, var(--dark-2), var(--dark-1));
  color: #e9edf2;
  text-align: center;
}
.cta-band h2 { color: #f5f8fc; }
.cta-band p { color: #b9c2cd; max-width: 50ch; margin-left: auto; margin-right: auto; }
.cta-band .hero-cta { justify-content: center; }

/* ----- footer ----------------------------------------------------------- */

.site-footer {
  background: var(--dark-1);
  color: #aab3bf;
  padding: 3rem 0 2rem;
  font-size: 0.95rem;
}
.site-footer a { color: #cdd6e0; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand img { height: 30px; margin-bottom: 0.6rem; }
.footer-brand p { color: #7f8895; max-width: 30ch; }
.footer-col h4 {
  color: #e9edf2;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.8rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 0.4rem 0; }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: #7f8895;
  font-size: 0.88rem;
}

/* ----- responsive ------------------------------------------------------- */

@media (max-width: 880px) {
  .hero-home { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 480px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .grid-3, .grid-2,
  .features.cols-2 { grid-template-columns: 1fr; }
  .nav { gap: 0.1rem; }
  .nav a { padding: 0.4em 0.5em; font-size: 0.9rem; }
  .nav .home-link { display: none; } /* logo already links home */
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
}
