/* =========================================================
   Matt's Screen Repair — styles.css
   Plain CSS. Mobile-first. No frameworks.
   Color palette: approachable blue + green on neutral cream.
   ========================================================= */

:root {
  /* Brand colors — pulled from the new logo */
  --c-ink:        #1e3a5f;   /* deep navy from M body */
  --c-ink-soft:   #3b556b;   /* secondary text */
  --c-muted:      #6b7d8c;   /* tertiary text */
  --c-blue:       #2da3e8;   /* bright blue from swoosh */
  --c-blue-deep:  #1f7fc4;   /* darker bright blue (hover) */
  --c-blue-soft:  #e6f3fc;   /* tinted surface */
  --c-navy:       #1e3a5f;   /* primary navy */
  --c-navy-deep:  #142c48;   /* navy hover */
  --c-green:      #2f8f6f;   /* accent green for primary CTAs */
  --c-green-deep: #246f57;   /* accent green hover */
  --c-bg:         #f7faff;   /* very light cool neutral */
  --c-surface:    #ffffff;   /* card surface */
  --c-border:     #dde6ef;   /* hairline borders, slightly cool */
  --c-focus:      #ffb84d;   /* visible focus ring */

  /* Type scale */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-xs:    0.85rem;   /* ~13.6px */
  --fs-sm:    0.95rem;   /* ~15.2px */
  --fs-base:  1rem;      /* 16px */
  --fs-lg:    1.15rem;
  --fs-xl:    1.4rem;
  --fs-2xl:   1.75rem;
  --fs-3xl:   2.25rem;
  --fs-hero:  clamp(2rem, 5.5vw, 3.25rem);

  /* Spacing */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.25rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-10: 2.5rem;
  --s-12: 3rem;
  --s-16: 4rem;
  --s-20: 5rem;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(20, 59, 84, 0.06);
  --shadow:    0 6px 18px rgba(20, 59, 84, 0.08);

  --container: 1080px;
}

/* ----- Reset & base ----- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--c-blue-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover { color: var(--c-navy); }

h1, h2, h3, h4 {
  color: var(--c-ink);
  line-height: 1.2;
  margin: 0 0 var(--s-4) 0;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-hero); font-weight: 800; }
h2 { font-size: var(--fs-2xl); font-weight: 700; }
h3 { font-size: var(--fs-xl); font-weight: 700; }
h4 { font-size: var(--fs-lg); font-weight: 600; }

p { margin: 0 0 var(--s-4) 0; }

ul, ol { padding-left: 1.25rem; margin: 0 0 var(--s-4) 0; }
li { margin-bottom: var(--s-2); }

:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ----- Layout ----- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-5);
}

.section {
  padding: var(--s-12) 0;
}
@media (min-width: 720px) {
  .section { padding: var(--s-16) 0; }
}

.section--alt { background: var(--c-blue-soft); }
.section--cream { background: #eef5fc; }

.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-blue-deep);
  margin-bottom: var(--s-3);
}

.lead {
  font-size: var(--fs-lg);
  color: var(--c-ink-soft);
  max-width: 60ch;
}

/* ----- Header / nav ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 250, 255, 0.92);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--c-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-3) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--c-ink);
}
.brand img { height: 40px; width: auto; }
.brand-text {
  display: inline-block;
  margin-left: 10px;
  font-weight: 800;
  color: var(--c-navy);
  letter-spacing: -0.01em;
}
.brand-text span { color: var(--c-blue); font-weight: 600; }
@media (max-width: 420px) {
  .brand-text .full { display: none; }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--c-ink);
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  flex-direction: column;
  gap: var(--s-1);
  width: 100%;
  padding-bottom: var(--s-3);
}
.nav-links a {
  display: block;
  padding: var(--s-3) var(--s-2);
  text-decoration: none;
  color: var(--c-ink);
  font-weight: 500;
  border-radius: var(--radius-sm);
  min-height: 44px;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--c-blue-soft);
  color: var(--c-navy);
}

.nav.is-open .nav-links { display: flex; }

@media (min-width: 800px) {
  .nav { flex-wrap: nowrap; }
  .nav-toggle { display: none; }
  .nav-links {
    display: flex !important;
    flex-direction: row;
    width: auto;
    padding-bottom: 0;
    align-items: center;
    gap: var(--s-2);
  }
  .nav-links a { padding: var(--s-2) var(--s-3); }
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--fs-base);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
  line-height: 1.2;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--c-green);
  color: #fff;
}
.btn-primary:hover { background: var(--c-green-deep); color: #fff; }

.btn-secondary {
  background: var(--c-navy);
  color: #fff;
}
.btn-secondary:hover { background: var(--c-navy-deep); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--c-navy);
  border-color: var(--c-navy);
}
.btn-outline:hover {
  background: var(--c-navy);
  color: #fff;
}

.btn .icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

/* Small trust badge under hero CTAs */
.local-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-4);
  padding: 0.4rem 0.7rem;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  font-size: var(--fs-sm);
  color: var(--c-ink-soft);
  box-shadow: var(--shadow-sm);
}
.local-badge .pin {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--c-green);
  flex: 0 0 auto;
}
.local-badge strong { color: var(--c-navy); font-weight: 600; }

/* ----- Hero ----- */
.hero {
  padding: var(--s-12) 0 var(--s-10);
  position: relative;
  overflow: hidden;
}
/* Subtle screen-mesh texture echoing the logo */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("assets/mesh-bg.svg");
  background-size: 28px 28px;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.hero > .container { position: relative; z-index: 1; }
@media (min-width: 800px) {
  .hero { padding: var(--s-20) 0 var(--s-16); }
  .hero .container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--s-12);
    align-items: center;
  }
}
.hero h1 { margin-bottom: var(--s-4); }
.hero p.lead { margin-bottom: var(--s-6); }

.hero-art {
  margin-top: var(--s-8);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
}
.hero-logo {
  display: none;
}
@media (min-width: 800px) {
  .hero-logo {
    display: block;
    margin-bottom: var(--s-5);
    max-width: 320px;
  }
}
@media (min-width: 800px) {
  .hero-art { margin-top: 0; }
}

/* ----- Trust strip ----- */
.trust {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  padding: var(--s-6) 0;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}
@media (min-width: 720px) {
  .trust { grid-template-columns: repeat(4, 1fr); }
}
.trust-item {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
}
.trust-item .dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--c-green);
}
.trust-item strong { display: block; color: var(--c-ink); }
.trust-item span { color: var(--c-ink-soft); font-size: var(--fs-sm); }

/* ----- Cards / grids ----- */
.grid {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: 0; }

.step {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--c-navy);
  color: #fff;
  font-weight: 700;
  margin-bottom: var(--s-3);
}

/* ----- Pricing ----- */
.price-grid {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .price-grid { grid-template-columns: repeat(3, 1fr); }
}
.price-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  text-align: center;
}
.price-card .amount {
  font-size: var(--fs-3xl);
  font-weight: 800;
  color: var(--c-navy);
  margin: var(--s-2) 0;
  line-height: 1;
}
.price-card .unit {
  display: block;
  color: var(--c-muted);
  font-size: var(--fs-sm);
  margin-top: var(--s-2);
}
.price-card.is-feature {
  border-color: var(--c-green);
  box-shadow: 0 0 0 3px rgba(47, 143, 111, 0.12);
}

table.examples {
  width: 100%;
  border-collapse: collapse;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
table.examples th,
table.examples td {
  text-align: left;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--c-border);
  font-size: var(--fs-sm);
}
table.examples th {
  background: var(--c-blue-soft);
  color: var(--c-navy);
  font-weight: 600;
}
table.examples tr:last-child td { border-bottom: none; }

/* ----- Form ----- */
.form {
  display: grid;
  gap: var(--s-4);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
}
.form .field { display: grid; gap: var(--s-2); }
.form label {
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--c-ink);
}
.form input,
.form textarea {
  font: inherit;
  color: var(--c-ink);
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 0.75rem 0.875rem;
  min-height: 48px;
  width: 100%;
}
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus,
.form textarea:focus {
  border-color: var(--c-blue-deep);
  outline: 3px solid var(--c-focus);
  outline-offset: 1px;
}
.form .help {
  font-size: var(--fs-xs);
  color: var(--c-muted);
}
.note {
  background: #fff8e6;
  border: 1px solid #f0d896;
  border-radius: var(--radius);
  padding: var(--s-4);
  font-size: var(--fs-sm);
  color: #6a4e0e;
}

/* ----- Contact info block ----- */
.contact-grid {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 1.1fr 1fr; }
}
.contact-info p { margin-bottom: var(--s-3); }
.contact-info .row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.contact-info .row .icon {
  width: 22px; height: 22px; color: var(--c-navy);
  flex: 0 0 auto;
}

/* ----- Footer ----- */
.site-footer {
  background: var(--c-navy-deep);
  color: #d6e2eb;
  padding: var(--s-10) 0 var(--s-8);
  margin-top: var(--s-16);
}
.site-footer a { color: #b9d3e3; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  gap: var(--s-8);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
}
.site-footer h4 { color: #fff; margin-bottom: var(--s-3); font-size: var(--fs-base); }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin-bottom: var(--s-2); }
.legal {
  border-top: 1px solid #29476a;
  margin-top: var(--s-8);
  padding-top: var(--s-4);
  font-size: var(--fs-xs);
  color: #93adc0;
}

/* ----- Utilities ----- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--s-2); }
.mt-4 { margin-top: var(--s-4); }
.mt-6 { margin-top: var(--s-6); }
.mt-8 { margin-top: var(--s-8); }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--s-2); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-6 { margin-bottom: var(--s-6); }
.muted { color: var(--c-muted); }
.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: var(--s-3);
  top: var(--s-3);
  background: #fff;
  padding: var(--s-2) var(--s-3);
  border: 2px solid var(--c-blue);
  border-radius: var(--radius);
  z-index: 100;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
