/* ===========================================================
   Digital Duct Tape Computer Repair — styles.css
   Design system, layout, components, responsive, a11y.
   =========================================================== */

/* ---- Design tokens ---- */
:root {
  /* Duct-tape palette */
  --tape-silver:    #B8BCC1;
  --tape-dark:      #4A4F55;
  --tape-darker:    #2F343A;
  --tape-light:     #E8EAEC;
  --tape-light-2:   #F1F3F5;
  --accent:         #E63946;       /* red duct-tape accent */
  --accent-dark:    #B92C39;
  --ink:            #1A1A1A;
  --ink-soft:       #2A2E33;
  --paper:          #FAFAF7;
  --paper-warm:     #F4F1EA;
  --line:           #D8DBDE;
  --success:        #2A7F4E;

  /* Type */
  --font-sans: 'Helvetica Neue', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Menlo, Consolas, monospace;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Layout */
  --container: 1100px;
  --container-narrow: 760px;
  --radius:    4px;

  /* Shadows */
  --shadow-1: 0 1px 2px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-2: 0 4px 10px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-3: 0 10px 25px rgba(0,0,0,0.12), 0 4px 10px rgba(0,0,0,0.06);

  /* Tape motif */
  --tape-angle: -1.5deg;
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-4);
  color: var(--ink);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

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

a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s;
}
a:hover { color: var(--accent); }

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

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--space-7) 0;
}

/* ---- Accessibility helpers ---- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: 1000;
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-3) var(--space-4);
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
}
.skip-link:focus { top: var(--space-4); }

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

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

.section { padding: var(--space-8) 0; }
.section--tight { padding: var(--space-7) 0; }
.section--dark { background: var(--tape-darker); color: var(--paper); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--paper); }
.section--warm { background: var(--paper-warm); }

.grid {
  display: grid;
  gap: var(--space-5);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---- Duct-tape stripe divider ---- */
.tape-stripe {
  height: 14px;
  background:
    linear-gradient(180deg,
      var(--tape-light) 0%,
      var(--tape-silver) 35%,
      var(--tape-dark) 60%,
      var(--tape-silver) 85%,
      var(--tape-light) 100%);
  border-top: 1px solid rgba(0,0,0,0.15);
  border-bottom: 1px solid rgba(0,0,0,0.15);
  position: relative;
  overflow: hidden;
}
.tape-stripe::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 3px,
    rgba(255,255,255,0.08) 3px,
    rgba(255,255,255,0.08) 4px
  );
}
.tape-stripe::after {
  content: '';
  position: absolute;
  left: -2%; right: -2%;
  top: 2px; bottom: 2px;
  background: linear-gradient(180deg, rgba(255,255,255,0.3), transparent 50%);
  transform: var(--tape-angle, -1.5deg);
  transform-origin: left center;
}

/* ---- Header / Nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-5);
  max-width: var(--container);
  margin: 0 auto;
  gap: var(--space-4);
}
.site-header__logo { flex-shrink: 0; }
.site-header__logo img { height: 56px; width: auto; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle:hover { background: var(--ink); color: var(--paper); }

.site-nav { display: flex; align-items: center; gap: var(--space-5); }
.site-nav ul {
  display: flex;
  gap: var(--space-5);
  list-style: none;
  margin: 0; padding: 0;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  padding: var(--space-2) 0;
  position: relative;
}
.site-nav a:hover,
.site-nav a.is-active { color: var(--accent-dark); }
.site-nav a.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 3px;
  background: var(--tape-silver);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  transform: var(--tape-angle, -1.5deg);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-3) var(--space-4);
  text-decoration: none;
  font-weight: 700;
  border-radius: var(--radius);
  font-size: 0.95rem;
  border: 2px solid var(--ink);
  transition: transform 0.15s, box-shadow 0.15s;
}
.header-cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}

/* ---- Hero ---- */
.hero {
  padding: var(--space-9) 0 var(--space-8);
  background:
    linear-gradient(180deg, var(--paper-warm) 0%, var(--paper) 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; right: -10%;
  width: 60%;
  height: 100%;
  background:
    repeating-linear-gradient(
      135deg,
      transparent 0,
      transparent 30px,
      rgba(184, 188, 193, 0.08) 30px,
      rgba(184, 188, 193, 0.08) 32px
    );
  pointer-events: none;
}
.hero__inner {
  position: relative;
  max-width: 760px;
  text-align: center;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  margin-bottom: var(--space-5);
}
.hero__sub {
  font-size: 1.25rem;
  color: var(--ink-soft);
  margin-bottom: var(--space-6);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.hero__ctas {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.eyebrow {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
  transform: var(--tape-angle, -1.5deg);
  box-shadow: var(--shadow-1);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, color 0.15s;
  line-height: 1;
}
.btn--primary {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent-dark);
  box-shadow: var(--shadow-2);
}
.btn--primary:hover {
  background: var(--accent-dark);
  color: var(--paper);
  transform: translateY(-2px);
  box-shadow: var(--shadow-3);
}
.btn--secondary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn--secondary:hover {
  background: var(--tape-dark);
  color: var(--paper);
  transform: translateY(-2px);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn--tape {
  background:
    linear-gradient(180deg, var(--tape-light) 0%, var(--tape-silver) 50%, var(--tape-dark) 100%);
  color: var(--ink);
  border: 1px solid var(--tape-dark);
  position: relative;
  transform: var(--tape-angle, -1.5deg);
  box-shadow: var(--shadow-2);
}
.btn--tape:hover {
  transform: translateY(-2px) var(--tape-angle, -1.5deg);
  box-shadow: var(--shadow-3);
}

/* ---- Trust bar ---- */
.trust-bar {
  background: var(--tape-darker);
  color: var(--paper);
  padding: var(--space-5) 0;
}
.trust-bar__items {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-6);
  justify-content: center;
  list-style: none;
  margin: 0; padding: 0;
}
.trust-bar li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  margin: 0;
  font-size: 0.95rem;
}
.trust-bar svg { width: 22px; height: 22px; flex-shrink: 0; }

/* ---- Cards ---- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-6);
  position: relative;
  box-shadow: var(--shadow-1);
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.card h3 { margin-top: 0; }
.card__icon {
  width: 48px;
  height: 48px;
  background: var(--tape-light);
  border: 1px solid var(--tape-silver);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}
.card__icon svg { width: 28px; height: 28px; }

.card--tape {
  background: var(--paper-warm);
  position: relative;
}
.card--tape::before {
  content: '';
  position: absolute;
  top: -8px; left: 24px; right: 24px;
  height: 16px;
  background: linear-gradient(180deg, var(--tape-light) 0%, var(--tape-silver) 50%, var(--tape-dark) 100%);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  transform: var(--tape-angle, -1.5deg);
  box-shadow: var(--shadow-1);
}

/* ---- Service list (services page) ---- */
.service-list { display: grid; gap: var(--space-4); }
.service {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-4);
  align-items: start;
  padding: var(--space-5) var(--space-6);
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--tape-silver);
  border-radius: var(--radius);
}
.service h3 { margin: 0 0 var(--space-2); }
.service__desc { color: var(--ink-soft); margin: 0; }
.service__price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent-dark);
  white-space: nowrap;
  background: var(--paper-warm);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

/* ---- Process steps ---- */
.process { display: grid; gap: var(--space-5); }
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-5);
  align-items: start;
}
.step__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.25rem;
  border-radius: 50%;
  flex-shrink: 0;
}
.step h3 { margin: 0 0 var(--space-2); }

/* ---- Testimonials ---- */
.testimonial {
  background: var(--paper-warm);
  padding: var(--space-6);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  position: relative;
  display: flex;
  flex-direction: column;
}
.testimonial::before {
  content: '\201C';
  position: absolute;
  top: -10px; left: 16px;
  font-size: 4rem;
  line-height: 1;
  color: var(--accent);
  font-family: Georgia, serif;
}
.testimonial__quote {
  font-style: italic;
  margin: 0 0 var(--space-4);
  color: var(--ink-soft);
  flex-grow: 1;
}
.testimonial__author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  font-weight: 600;
  font-style: normal;
}
.testimonial__avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--tape-silver);
  border: 1px solid var(--tape-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink);
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ---- CTA section ---- */
.cta-section {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  padding: var(--space-8) 0;
}
.cta-section h2 { color: var(--paper); }
.cta-section p { color: var(--tape-light); font-size: 1.15rem; }
.cta-section__buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-5);
}

/* ---- Forms ---- */
.form { display: grid; gap: var(--space-4); }
.form__row { display: grid; gap: var(--space-4); grid-template-columns: 1fr 1fr; }
.form__field { display: grid; gap: var(--space-2); }
.form label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}
.form label .req { color: var(--accent); }
.form input,
.form select,
.form textarea {
  font: inherit;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(184, 188, 193, 0.4);
}
.form textarea { resize: vertical; min-height: 120px; font-family: inherit; }
.form__error { color: var(--accent-dark); font-size: 0.875rem; display: none; }
.form__field--error input,
.form__field--error select,
.form__field--error textarea { border-color: var(--accent); }
.form__field--error .form__error { display: block; }

/* ---- Contact info block ---- */
.contact-info {
  display: grid;
  gap: var(--space-5);
}
.contact-info__item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}
.contact-info__icon {
  width: 44px; height: 44px;
  background: var(--paper-warm);
  border: 1px solid var(--tape-silver);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-info__icon svg { width: 22px; height: 22px; }
.contact-info__label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin: 0 0 var(--space-1);
}
.contact-info__value {
  font-weight: 600;
  margin: 0;
  font-size: 1.0625rem;
}
.contact-info__value a { color: var(--ink); text-decoration: none; }
.contact-info__value a:hover { color: var(--accent-dark); text-decoration: underline; }

/* ---- Service area chips ---- */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; margin: 0; }
.chips li {
  background: var(--tape-light);
  border: 1px solid var(--tape-silver);
  padding: var(--space-2) var(--space-4);
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
  color: var(--ink-soft);
}

/* ---- About / bio photo placeholder ---- */
.photo-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 360px;
  background:
    linear-gradient(180deg, var(--tape-light) 0%, var(--tape-silver) 50%, var(--tape-dark) 100%);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  box-shadow: var(--shadow-2);
  margin: 0 auto;
}
.photo-placeholder::after {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px dashed var(--ink);
  border-radius: var(--radius);
  opacity: 0.4;
}

/* ---- Map placeholder ---- */
.map-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, var(--paper-warm) 0%, var(--tape-light-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.map-placeholder svg { width: 100%; height: 100%; }
.map-pin {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -100%);
  background: var(--accent);
  color: var(--paper);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.875rem;
  box-shadow: var(--shadow-2);
  white-space: nowrap;
}
.map-pin::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px;
  background: var(--accent);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--tape-darker);
  color: var(--tape-light);
  padding: var(--space-7) 0 var(--space-5);
  margin-top: var(--space-8);
}
.site-footer a { color: var(--tape-light); }
.site-footer a:hover { color: var(--paper); }
.site-footer__grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1.5fr 1fr 1fr;
  margin-bottom: var(--space-6);
}
.site-footer h4 {
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin: 0 0 var(--space-3);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: var(--space-2); }
.site-footer__logo img {
  height: 60px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: var(--space-3);
}
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-4);
  text-align: center;
  font-size: 0.875rem;
  color: var(--tape-silver);
}
.site-footer__hours {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.8;
}

/* ---- Page header (sub-pages) ---- */
.page-header {
  background: var(--paper-warm);
  padding: var(--space-8) 0 var(--space-7);
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.page-header h1 { margin-bottom: var(--space-3); }
.page-header p {
  font-size: 1.125rem;
  color: var(--ink-soft);
  max-width: 600px;
  margin: 0 auto;
}

/* ---- Responsive ---- */
@media (max-width: 880px) {
  .site-footer__grid { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: var(--space-2); }
  .site-header__inner { flex-wrap: wrap; }
  .site-nav {
    display: none;
    width: 100%;
    order: 3;
    padding-top: var(--space-3);
    border-top: 1px solid var(--line);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }
  .site-nav li {
    border-bottom: 1px solid var(--line);
  }
  .site-nav a {
    display: block;
    padding: var(--space-3) 0;
  }
  .header-cta { font-size: 0.875rem; padding: var(--space-2) var(--space-3); }
}

@media (max-width: 480px) {
  .hero { padding: var(--space-7) 0 var(--space-6); }
  .section { padding: var(--space-7) 0; }
  .service { grid-template-columns: 1fr; }
  .service__price { justify-self: start; }
  .trust-bar__items { gap: var(--space-3); }
  .trust-bar li { font-size: 0.875rem; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
