/* ===============================
   SimplifiTech — styles.css
   Cozy • Simple • Secure • Friendly
   =============================== */

/* Follow system unless data-theme overrides explicitly */
html { color-scheme: light dark; }

/* ---------- Base reset ---------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial;
  color: var(--text);
  background: var(--bg);
  scroll-behavior: smooth;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- THEME: Light (Neutral Cozy Tech) ---------- */
[data-theme='light'] {
  /* Neutral foundation */
  --bg: #f2f3f5;
  --surface: #fcfcfd;
  --muted-surface: #e7e9ee;

  /* Text */
  --text: #1c212b;
  --subtext: #505a6b;

  /* Brand */
  --primary: #7b75c9;
  --primary-strong: #5f56b0;
  --accent: #47b2a2;
  --ring: rgba(123,117,201,.35);

  /* Depth */
  --shadow: 0 8px 24px rgba(20,30,50,.10);
  --radius: 18px;

  /* Banner */
  --banner-start: #dcd8ee;
  --banner-end:   #c7d6da;
  --banner-text:  #1c212b;
}

/* ---------- THEME: Dark ---------- */
[data-theme='dark'] {
  --bg: #0f1320;
  --surface: #131a2b;
  --muted-surface: #0f1828;
  --text: #f7fafc;
  --subtext: #c8d3f0;
  --primary: #7fd8c2;
  --primary-strong: #63c9b3;
  --accent: #6c3ef4;
  --ring: rgba(127,216,194,.45);
  --shadow: 0 14px 35px rgba(3,7,18,.38);
  --radius: 18px;

  --banner-start: #775ed8;
  --banner-end:   #49bfa9;
  --banner-text:  #f7fafc;
}

/* ---------- System dark fallback (only if no data-theme set) ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1320;
    --surface: #131a2b;
    --muted-surface: #0f1828;
    --text: #f7fafc;
    --subtext: #c8d3f0;
    --primary: #7fd8c2;
    --primary-strong: #63c9b3;
    --accent: #6c3ef4;
    --ring: rgba(127,216,194,.45);
    --shadow: 0 14px 35px rgba(3,7,18,.38);

    --banner-start: #775ed8;
    --banner-end:   #49bfa9;
    --banner-text:  #f7fafc;
    --radius: 18px;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), color-mix(in oklab, var(--primary), white 20%));
  color: #0f1220;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 6px 0 rgba(6,36,31,0.25), var(--shadow);
  border: 0;
  letter-spacing: 0.2px;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
[data-theme='dark'] .btn {
  background: linear-gradient(180deg, var(--primary), color-mix(in oklab, var(--primary), black 28%));
  color: #081112;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }

.btn.secondary {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  box-shadow: none;
  font-weight: 700;
}

/* Keyboard focus (accessibility) */
a:focus-visible, .btn:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 10px;
}

/* ---------- Header + nav ---------- */
header {
  position: sticky;
  top: 0;
  backdrop-filter: saturate(1.4) blur(10px);
  background: color-mix(in oklab, var(--bg), black 7%);
  z-index: 50;
  border-bottom: 1px solid color-mix(in oklab, var(--surface), black 6%);
}

/* Keep header from visually "jumping" on load */
header {
  min-height: 64px;            /* fixes height on first paint */
  background: color-mix(in oklab, var(--bg), black 7%);
  border-bottom: 1px solid color-mix(in oklab, var(--surface), black 6%);
  transition: none;            /* kill header transition to avoid flash */
}


.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
}

.brand { 
  /* was: margin-left: 20px; */
  margin-left: 0; 
}

.brand-name {
  font-family: "Inter", system-ui;
  font-weight: 800;
  font-size: 1.125rem;
  white-space: nowrap;
  line-height: 1.1;
}

.menu {
  display: flex;
  align-items: center;
  gap: 1rem;
  /* was: margin-right: auto; margin-left: 40px; */
  margin: 0;
}

.menu a {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  color: var(--text);
  background: color-mix(in oklab, var(--muted-surface), black 10%);
  transition: background .25s ease, color .25s ease, box-shadow .2s ease;
}
.menu a:hover,
.menu a[aria-current="page"] {
  background: color-mix(in oklab, var(--muted-surface), black 18%);
  color: var(--primary);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 60px 0 90px;
  background:
    radial-gradient(1000px 420px at 50% -10%, color-mix(in oklab, var(--primary), transparent 88%), transparent 70%),
    linear-gradient(180deg, color-mix(in oklab, var(--muted-surface), transparent 0%), transparent 60%);
}

/* ---------- Pills ---------- */
.pill {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  border: 1px solid color-mix(in oklab, var(--primary), transparent 50%);
  color: var(--primary);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-weight: 700;
  background: color-mix(in oklab, var(--muted-surface), transparent 0%);
}

/* ---------- Headings & text ---------- */
h1, h2, h3 {
  font-family: "Quicksand", "Inter", system-ui;
  font-weight: 700;
  color: var(--subtext);
}
h1 {
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  line-height: 1.12;
  margin: 0.2rem 0 1.1rem;
}
h2, h3 { color: var(--primary); }

.lead {
  font-size: 1.1rem;
  color: var(--subtext);
  max-width: 50ch;
}

/* ---------- Layout ---------- */
.grid { display: grid; gap: 18px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid color-mix(in oklab, var(--surface), black 10%);
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .18s ease;
}
.card:hover { transform: translateY(-2px); }

/* Contact-card variant (only on contact page) */
.card-contact {
  background: var(--surface);
  border: 1px solid color-mix(in oklab, var(--surface), black 10%);
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .18s ease;
  max-width: 340px;  /* adjust 320–380px to taste */
  margin: 0 auto;
}

.section-title {
  font-family: "Quicksand", "Inter", system-ui;
  font-weight: 700;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  margin: 0 0 14px;
  color: var(--primary-strong);
}

.muted { color: var(--subtext); }

/* ---------- Decorative ---------- */
.hr-squiggle {
  height: 10px;
  background: radial-gradient(7px 7px at 6px 6px, var(--accent) 60%, transparent 61%) repeat-x;
  background-size: 16px 10px;
  opacity: .55;
  margin: 18px 0;
  border: 0;
}

/* ---------- Footer ---------- */
footer {
  padding: 60px 0;
  color: var(--subtext);
  border-top: 1px solid color-mix(in oklab, var(--surface), black 6%);
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  text-align: center;
  line-height: 1.6;
  max-width: 1100px;
  margin: 0 auto;
}
.footer-links p { margin: 0; flex: 1 1 100%; }
.footer-links a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: color .2s ease;
}
.footer-links a:hover { color: var(--accent); }

.star { color: var(--accent); font-size: 1rem; padding: 0 6px; opacity: 0.9; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  position: fixed;
  top: 10px;
  right: 10px;
  padding: 10px 18px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid color-mix(in oklab, var(--text), transparent 75%);
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all .3s ease;
  z-index: 100;
}
.theme-toggle:hover {
  transform: translateY(-1px);
  background: var(--muted-surface);
}

/* ---------- Launch banner ---------- */
.launch-offer {
  background: linear-gradient(90deg, var(--banner-start), var(--banner-end));
  color: var(--banner-text);
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  box-shadow: var(--shadow);
  margin: 28px 0 16px;
  text-align: center;
  letter-spacing: 0.2px;
}

/* ---------- Transitions ---------- */
html, body, header, footer, .card, .menu a, .btn, .launch-offer {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

/* ---------- Contact page form ---------- */
.contact-section { padding: 60px 0; }
.contact-wrap { margin-top: 28px; }

.contact-form {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: row;          /* natural top-to-bottom flow */
}

.contact-form .field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;                 /* prevents overflow pushing items around */
}

.contact-form .full  { grid-column: 1 / -1; }  /* << key fix */

.contact-form label { font-weight: 700; color: var(--subtext); }

.contact-form input,
.contact-form textarea {
  appearance: none;
  border: 1px solid color-mix(in oklab, var(--text), transparent 80%);
  background: var(--surface);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  box-shadow: 0 1px 0 rgba(0,0,0,.02) inset;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
  width: 100%;
  display: block;
}

.contact-form textarea {
  resize: vertical;   /* << was horizontal */
  line-height: 1.5;   /* << was 2 */
  min-height: 168px;
}

/* --- Global responsive polish --- */
@media (max-width: 1024px) {
  .container { padding: 0 16px; }
  .menu { margin-left: 20px; gap: .75rem; }
  .hero { padding: 48px 0 72px; }
}

@media (max-width: 720px) {
  .nav { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .brand { margin-left: 0; }
  .card, .card-contact { padding: 18px; }
  .hero { padding: 40px 0 56px; }
  .section-title { font-size: clamp(1.25rem, 5vw, 1.75rem); }
  .theme-toggle { top: 8px; right: 8px; }
}

/* --- Keep media responsive, but don't touch the header logo --- */
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Optional: don't globally size inline SVGs */
svg { display: block; }

@media (max-width: 720px) {
  .nav { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .brand { margin-left: 0; flex: 0 0 auto; }   /* brand stays compact */
}

/* ====== Header + menu resilience ====== */

/* Hamburger button styles */
.menu-toggle {
  display: none; /* hidden on desktop */
  position: relative;
  width: 42px;
  height: 36px;
  border: 1px solid color-mix(in oklab, var(--text), transparent 75%);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  border-radius: 1px;
}

  /* Move the theme toggle so it never covers the menu */
  .theme-toggle {
    top: auto;
    bottom: 12px;
    right: 12px;
  }

  /* Contact form: single column */
  .contact-form { grid-template-columns: 1fr; }
  .contact-form .full { grid-column: 1 / -1; }

/* Ensure media doesn’t fight header logo */
img:not(.logo-wordmark), video {
  max-width: 100%;
  height: auto;
  display: block;
}
/* optional: inline SVGs don’t need global sizing */
svg { display: block; }

/* Clean wordmark sizing (no chip) */
.logo-wordmark {
  display: block;
  height: 28px;   /* try 26–32px to taste */
  width: auto;    /* preserve aspect ratio */
}

/* Keep the brand row tidy */
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  margin-left: 20px;
  flex-wrap: nowrap;
}

/* On small screens, make the wordmark a bit smaller so it doesn't wrap */
@media (max-width: 720px) {
  .logo-wordmark { height: 24px; }
  .brand { margin-left: 0; }
}


/* Ensure the header bar is the positioning context */
.nav { position: relative; }

/* Mobile menu: anchor it under the bar, full width, with its own background */
@media (max-width: 768px) {
  .menu {
    display: none;
    position: absolute;      /* anchor to .nav */
    top: 100%;               /* sit below the bar */
    left: 0;
    right: 0;
    z-index: 60;             /* above page, below theme toggle */
    background: var(--surface);
    border-bottom: 1px solid color-mix(in oklab, var(--surface), black 6%);
    box-shadow: 0 10px 20px rgba(0,0,0,.06);
    padding: 10px 12px;
    flex-direction: column;
    gap: 8px;
    margin: 0;
  }
  .menu.open { display: flex; }

  /* Full-width tappable links */
  .menu a {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
  }

  /* Keep brand compact, push toggle + menu nicely */
  .brand { margin-left: 0; flex: 0 0 auto; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
}

.logo-wordmark {
  display: block;
  height: 28px;    /* adjust to taste */
  width: auto;     /* keep aspect ratio */
  max-width: none; /* don't let global img rules shrink it */
  object-fit: contain;
  flex: 0 0 auto;  /* don't let flexbox stretch/shrink it */
}

/* Default: horizontal grids on desktop/tablet */
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Mobile: stack vertically */
@media (max-width: 720px) {
  .grid.cols-2,
  .grid.cols-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .brand-name { font-size: 1rem; }
}

/* Responsive auto-fit grid (2 columns on desktop, stack on mobile) */
.grid.auto-fit {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
}

/* When used in the contact page, don't center the card in its track */
.grid.auto-fit .card-contact { 
  margin: 0; 
}

#muted {
  display: block;
  text-align: center;
  margin-bottom: auto;
  max-width: 500px;   /* controls how wide the box can be */
  max-height: 300px;
  margin: 18px auto 30px; /* centers it horizontally + adds space above */
  padding: 0 12px;     /* keeps a little breathing room inside */
  text-align: center;  /* optional but looks neat */
  color: var(--subtext);
}

.card-group1 {
  display: flex;
  gap: 18px;
  align-items: stretch;   /* equal heights per row */
  flex-wrap: wrap;
  margin-top: 22px;       /* moved spacing here */
}

/* direct children sizing */
.card-group1 > *         { flex: 1 1 320px; }
#card-plus               { flex: 2 1 680px; max-width: none; width: 100%; }
.card-reachout           { flex: 1 1 320px; max-width: 460px; }

/* make each card a flex column so content aligns nicely */
.card-group1 > .card {
  display: flex;
  flex-direction: column;
}

/* optional: push footer bits to bottom if you add more later */
/* .card .spacer { flex: 1 1 auto; } */

@media (max-width: 900px) {
  .card-group1 { flex-direction: column; }
  .card-reachout { max-width: none; }
}
