/* ===========================================================================
   Friendly Computers — design layer (v2)
   Modern, engaging, commercial-first. All theme knobs are custom
   properties below; change them to re-skin without touching layout.
   =========================================================================== */
:root {
  /* palette */
  --bg: #f4f7fb;
  --surface: #ffffff;
  --ink: #0d1b2a;
  --ink-soft: #46586e;
  --ink-faint: #8b97a8;
  --brand: #7c3aed;
  --brand-dark: #6d28d9;
  --brand-tint: rgba(124, 58, 237, .1);
  --brand-glow: rgba(124, 58, 237, .28);
  --accent: #f59e0b;
  --dark: #0b1420;
  --dark-2: #12233a;
  --border: #e3e9f2;
  --brand-text: #6d28d9;
  --header-bg: rgba(255, 255, 255, .86);
  /* form validation / submission notes (light) */
  --ok-bg: #e7f6ec; --ok-border: #b7e0c4; --ok-ink: #15683a;
  --err-bg: #fbe9ea; --err-border: #efc2c5; --err-ink: #b3261e;

  /* type */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Sora", var(--font);
  --radius: 18px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(13, 27, 42, .05), 0 12px 32px rgba(13, 27, 42, .07);
  --shadow-lg: 0 4px 12px rgba(13, 27, 42, .08), 0 24px 56px rgba(13, 27, 42, .12);

  /* layout */
  --container: 1320px;
  --measure: 68ch;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--brand-text); text-decoration: none; }
a:hover { color: var(--brand); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; letter-spacing: -.01em; }

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

/* --- top bar -------------------------------------------------------------- */
.topbar { background: var(--dark); color: #b7c3d4; font-size: .83rem; }
.topbar-inner { display: flex; justify-content: space-between; gap: 1rem; padding-block: .5rem; }
.topbar a { color: #dbe4f0; }
.topbar a:hover { color: #fff; }
.topbar .sep { opacity: .4; margin: 0 .35rem; }

/* --- header / nav ----------------------------------------------------------- */
.site-header {
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.site-header-inner { display: flex; align-items: center; gap: 1.5rem; padding-block: .7rem; }
.logo { display: inline-flex; align-items: center; gap: .55rem; }
.logo-mark {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; font-weight: 800; font-family: var(--font-display);
  box-shadow: 0 6px 16px var(--brand-glow);
}
.logo-text { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--ink); }
.logo-img { height: 40px; width: auto; }
.main-nav { display: flex; gap: .25rem; margin-left: auto; }
.main-nav a {
  color: var(--ink-soft); font-weight: 500; font-size: .95rem;
  padding: .4rem .75rem; border-radius: var(--radius-pill);
}
.main-nav a:hover { color: var(--ink); background: var(--brand-tint); }
.main-nav a.active { color: var(--brand-text); background: var(--brand-tint); font-weight: 600; }

/* --- buttons ----------------------------------------------------------------- */
.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; font-weight: 600; font-size: .95rem;
  padding: .75rem 1.5rem; border-radius: var(--radius-pill);
  border: 0; cursor: pointer;
  box-shadow: 0 10px 24px var(--brand-glow);
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 30px var(--brand-glow); }
.btn-sm { padding: .5rem 1.05rem; font-size: .88rem; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--border); box-shadow: none;
}
.btn-ghost:hover { color: var(--brand-text); border-color: var(--brand); background: var(--brand-tint); }
.btn-light { background: #fff; color: #0d1b2a; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); } /* always on the dark CTA banner */
.btn-light:hover { color: #0d1b2a; }
.btn-ghost-light {
  background: transparent; color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .45); box-shadow: none;
}
.btn-ghost-light:hover { color: #fff; border-color: #fff; background: rgba(255, 255, 255, .1); }
.theme-toggle {
  display: inline-flex; align-items: center; gap: .45rem;
  background: transparent; color: var(--ink-soft);
  font: 600 .82rem var(--font);
  padding: .42rem .9rem; border: 1px solid var(--border);
  border-radius: var(--radius-pill); cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.theme-toggle .tt-icon { display: inline-flex; }
.theme-toggle .tt-icon svg { width: .95em; height: .95em; }
.theme-toggle:hover { color: var(--brand-text); border-color: var(--brand); background: var(--brand-tint); }
.page a.btn + a.btn { margin-left: .6rem; }
/* button row under page titles — flex centers; gap owns spacing */
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .7rem; margin: 1.5rem auto 2.5rem; }
.hero-actions a.btn + a.btn { margin-left: 0; }

/* --- page sections ------------------------------------------------------------- */
main {
  background:
    radial-gradient(55rem 26rem at 78% -6rem, var(--brand-tint), transparent 70%),
    radial-gradient(40rem 22rem at -10rem 8rem, rgba(245, 158, 11, .07), transparent 70%),
    var(--bg);
}
main .page { padding: 4.5rem 0 5rem; }
.page > * { max-width: var(--container); margin-inline: auto; padding-inline: 1.5rem; }
.page > p { max-width: var(--measure); color: var(--ink-soft); }

/* --- standardized heading classes ------------------------------------------
    Every heading renders with a semantic class (assigned in the page markup):
   .page-title / .section-title / .subsection-title = page-level, centered.
   .card-title / .cta-title / .footer-title = component-level, left-aligned.
   Each class owns its complete margin shorthand (including the horizontal
   `auto`), so no later rule can accidentally reset the centering. */
.page-title {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 800; line-height: 1.12;
  margin: 0 auto 1.1rem;
  text-align: center;
  max-width: 26ch;
  background: linear-gradient(100deg, var(--ink) 55%, var(--brand-dark));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-title {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 700;
  margin: 3.5rem auto .8rem;
  text-align: center;
  max-width: 36ch;
  scroll-margin-top: 6rem;
}
.section-title:first-of-type { margin-top: .5rem; }
.subsection-title {
  font-size: 1.25rem;
  margin: 2.5rem auto .6rem;
  text-align: center;
}
.card-title { font-size: 1.12rem; margin: 0 0 .4rem; }

.page ul, .page ol { max-width: var(--measure); color: var(--ink-soft); padding-left: 1.2rem; }
.page li { margin: .3rem 0; }
.page hr { border: 0; height: 1px; background: var(--border); margin: 3rem auto; max-width: var(--container); }
.page blockquote {
  max-width: var(--measure); margin: 1rem 0; padding: 1rem 1.4rem;
  border-left: 3px solid var(--brand); background: var(--brand-tint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-soft);
}

/* --- stats strip ------------------------------------------------------------------ */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem; margin-top: 2.2rem;
}
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.15rem 1.2rem;
  text-align: center; box-shadow: var(--shadow);
}
.stat-value {
  font-family: var(--font-display); font-size: 1.7rem; font-weight: 800;
  color: var(--brand-text); line-height: 1.2;
}
.stat-label { color: var(--ink-faint); font-size: .88rem; font-weight: 500; }

/* --- service / msp / dev cards -------------------------------------------------------- */
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.25rem; margin-top: 1.75rem;
}
.service-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.service-card .icon {
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 13px; margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--brand-tint), transparent);
  color: var(--brand-text);
}
.service-card .icon svg { width: 24px; height: 24px; }
.service-card .service-blurb { color: var(--brand-text); font-weight: 600; font-size: .95rem; margin-bottom: .4rem; }
.service-card .service-detail { color: var(--ink-soft); font-size: .95rem; margin: 0; }

/* --- plans ---------------------------------------------------------------------------- */
.plans-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 1.25rem; margin-top: 2rem; align-items: start;
}
.plan-card {
  position: relative; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem 1.5rem; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.plan-card.popular {
  border-color: var(--brand);
  box-shadow: 0 16px 44px var(--brand-glow);
}
.plan-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), #d97706);
  color: #fff; font-size: .74rem; font-weight: 700; letter-spacing: .03em;
  padding: .28rem .85rem; border-radius: var(--radius-pill); white-space: nowrap;
  box-shadow: 0 6px 14px rgba(245, 158, 11, .35);
}
.plan-price { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; margin: .25rem 0 .5rem; }
.plan-price .cur { font-size: 1.1rem; vertical-align: top; margin-right: .1rem; }
.plan-price sup { font-size: 1rem; color: var(--ink-faint); }
.plan-price .per { font-size: .92rem; font-weight: 500; color: var(--ink-faint); margin-left: .2rem; }
.plan-features { list-style: none; padding: 0; margin: .9rem 0 1.3rem; }
.plan-features li { padding: .28rem 0 .28rem 1.5rem; position: relative; color: var(--ink-soft); font-size: .93rem; }
.plan-features li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 14px; height: 14px;
  background: currentColor; color: var(--brand);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%);
}
.fineprint { font-size: .8rem; color: var(--ink-faint); margin-top: 1.2rem; }

/* --- reviews ----------------------------------------------------------------------------- */
.reviews-kicker { color: var(--ink-soft); font-weight: 500; }
.reviews-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem; margin-top: 1.5rem;
}
.review-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem 1.4rem 1.1rem; margin: 0;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.review-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.review-card .stars { color: var(--accent); letter-spacing: .12em; font-size: .85rem; margin-bottom: .55rem; }
.review-card blockquote { margin: 0 0 .8rem; padding: 0; border: 0; background: none; color: var(--ink-soft); font-size: .95rem; }
.review-card figcaption { font-weight: 600; font-size: .88rem; color: var(--ink); }

/* --- CTA banner ------------------------------------------------------------------------------ */
.cta-banner {
  margin-top: 3.5rem; border-radius: 24px; padding: 2.8rem 2.5rem;
  background:
    radial-gradient(30rem 16rem at 85% 0%, rgba(255, 255, 255, .14), transparent 60%),
    linear-gradient(115deg, var(--dark), var(--brand-dark));
  color: #fff; box-shadow: var(--shadow-lg);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.cta-banner .cta-title { color: #fff; margin: 0 0 .4rem; font-size: clamp(1.5rem, 2.4vw, 2rem); }
.cta-banner p { color: rgba(255, 255, 255, .78); margin: 0; max-width: 46ch; }
.cta-banner .cta-actions { display: flex; gap: .7rem; flex-wrap: wrap; }

/* --- contact ---------------------------------------------------------------------------------- */
.contact-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem 1.6rem;
  max-width: 34rem; box-shadow: var(--shadow);
}
.contact-card p { margin: .4rem 0; }
form.contact-form { display: grid; gap: 1rem; max-width: 36rem; }
.contact-form label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: .7rem .85rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font: inherit; background: var(--surface); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}
.contact-form textarea { min-height: 8rem; }
.contact-form .opt { font-weight: 500; color: var(--ink-faint); font-size: .85rem; }
/* hidden from people, tempting to scrapers; positioned off-screen so it stays unfocusable */
.contact-form .hp-field {
  position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden;
}
.contact-form input[aria-invalid], .contact-form textarea[aria-invalid] {
  border-color: var(--err-ink); box-shadow: 0 0 0 3px var(--err-bg);
}
.field-error { display: block; margin-top: .35rem; font-size: .85rem; color: var(--err-ink); }
/* form-note is injected by script.js after the form */
.form-note {
  margin-top: 1.2rem; padding: .95rem 1.1rem; font-size: .95rem;
  border: 1px solid; border-radius: var(--radius-sm);
}
.form-note.ok { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok-ink); }
.form-note.err { background: var(--err-bg); border-color: var(--err-border); color: var(--err-ink); }
/* form.contact-form's display:grid would otherwise beat the UA [hidden] rule */
.contact-form[hidden] { display: none; }

/* --- footer ------------------------------------------------------------------------------------ */
.site-footer { background: var(--dark); color: #b7c3d4; margin-top: 5rem; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1.2fr 1fr 1fr;
  gap: 2.5rem; padding-block: 3.2rem 1.8rem;
}
.footer-brand p { margin: .4rem 0; }
.footer-brand .logo-text { color: #fff; }
.site-footer .footer-title { color: #fff; margin: 0 0 .6rem; font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; }
.site-footer p { margin: .3rem 0; font-size: .93rem; }
.site-footer a { color: #9fc0d8; }
.site-footer a:hover { color: #fff; }
.footer-legal {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  border-top: 1px solid rgba(255, 255, 255, .09);
  padding-block: 1.1rem; font-size: .83rem; color: #8290a3;
}

/* --- dark mode --------------------------------------------------------------------
   Auto: follows prefers-color-scheme. Override: script.js sets data-theme on <html>
   ("light" forces light here, "dark" forces dark below). Keep the two dark blocks
   identical when changing palette values. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1220;
    --surface: #131e30;
    --ink: #e7edf7;
    --ink-soft: #a9b7cb;
    --ink-faint: #74839c;
    --brand-text: #a78bfa;
    --brand-tint: rgba(139, 92, 246, .18);
    --brand-glow: rgba(139, 92, 246, .4);
    --accent: #fbbf24;
    --dark: #05090f;
    --dark-2: #0c1626;
    --border: #232f47;
    --header-bg: rgba(15, 24, 40, .86);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .45);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, .45), 0 24px 56px rgba(0, 0, 0, .55);
    --ok-bg: #10291b; --ok-border: #1e5233; --ok-ink: #7fd39a;
    --err-bg: #2c1416; --err-border: #63272b; --err-ink: #f0a19c;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220;
  --surface: #131e30;
  --ink: #e7edf7;
  --ink-soft: #a9b7cb;
  --ink-faint: #74839c;
  --brand-text: #a78bfa;
  --brand-tint: rgba(139, 92, 246, .18);
  --brand-glow: rgba(139, 92, 246, .4);
  --accent: #fbbf24;
  --dark: #05090f;
  --dark-2: #0c1626;
  --border: #232f47;
  --header-bg: rgba(15, 24, 40, .86);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .45);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, .45), 0 24px 56px rgba(0, 0, 0, .55);
  --ok-bg: #10291b; --ok-border: #1e5233; --ok-ink: #7fd39a;
  --err-bg: #2c1416; --err-border: #63272b; --err-ink: #f0a19c;
}

/* --- responsive ---------------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .main-nav { gap: 0; }
  .site-header-inner { flex-wrap: wrap; justify-content: center; gap: .8rem; }
  .main-nav { flex-wrap: wrap; justify-content: center; width: 100%; order: 3; }
  .cta-banner { padding: 2.2rem 1.6rem; }
}
@media (max-width: 720px) {
  .topbar span:last-child { display: none; }
  .topbar-inner { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; }
  .page a.btn + a.btn { margin-left: 0; margin-top: .6rem; }
  .hero-actions a.btn + a.btn { margin-top: 0; } /* flex gap owns stacking spacing */
}
