/* ==========================================================================
   Assista Tech Concept — shared styles
   Page-specific layout lives in each page's own <style> block.
   ========================================================================== */

/* Tokens */
:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --text: #1c1917;
  --text-muted: #57534e;
  --border: #e7e5e4;
  --accent: #9a3412;
  --accent-hover: #7c2d12;

  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;

  --max-width: 1120px;
  --measure: 38rem; /* about 65 characters */
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

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

/* Typography */
h1, h2, h3 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

h1 { font-size: clamp(2.1rem, 4.5vw, 2.85rem); letter-spacing: -0.02em; margin-bottom: var(--space-md); }
h2 { font-size: clamp(1.6rem, 3vw, 2rem); margin-bottom: var(--space-sm); }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p { max-width: var(--measure); margin-bottom: 1.15em; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 36rem;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

/* Layout */
.container {
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
}

/* Header and navigation.
   The sticky header is the positioning context for the mobile dropdown,
   so the menu spans the full header width. Do not add position: relative
   to .nav. */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}
.logo span { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  margin-left: auto;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--text); }

.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.6rem;
  border: 1.5px solid transparent;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn:hover {
  background: var(--accent-hover);
  text-decoration: none;
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--text);
  background: transparent;
  color: var(--text);
}

/* Dark call-to-action band (home "closing" and services "cta-band") */
.cta-band {
  background: var(--text);
  color: #fafaf9;
  padding: var(--space-xl) 0;
}
.cta-band h2 { color: #fafaf9; margin-bottom: 0.75rem; }
.cta-band p { color: #a8a29e; max-width: 32rem; margin-bottom: 1.5rem; }

/* Footer */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--space-lg) 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-inner a { color: var(--text-muted); }
.footer-inner a:hover { color: var(--text); }

/* Focus */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Mobile navigation */
@media (max-width: 800px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    z-index: 40;
  }
  .nav-links.is-open { display: flex; }
  .nav-links li { border-top: 1px solid var(--border); }
  .nav-links a { display: block; padding: 0.9rem 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
