/* ==========================================================================
   Computer Doctor of Maine — We Actually Sell Things
   Light theme matched to computerdoctor.me (DM Sans, green #70a110, white
   surfaces, 10px buttons). The hero keeps the main site's dark photo band
   and the visit card uses its dark-green block; both use the --dark-* tokens.
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f7f7f7;
  --surface-tint: #f3f5ed;
  --border: rgba(24, 26, 23, 0.10);
  --border-strong: rgba(24, 26, 23, 0.18);

  /* Text */
  --text: #181a17;
  --text-muted: #5b625d;
  --text-dim: #666d67;

  /* Brand green — fills vs. text (the fill green fails AA as small text on white) */
  --green: #70a110;
  --green-hover: #5f8c0c;
  --green-text: #4f7a00;
  --green-tint: rgba(112, 161, 16, 0.10);
  --on-green: #181a17;

  /* Dark band (hero) and dark-green block (visit card) — the main site's own */
  --dark: #181a17;
  --dark-green: #021a14;
  --dark-text: #ffffff;
  --dark-muted: rgba(255, 255, 255, 0.78);
  --dark-border: rgba(255, 255, 255, 0.18);
  --dark-accent: #8dc63f;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-btn: 10px;

  --shadow: 0 12px 32px rgba(24, 26, 23, 0.08);
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  color-scheme: light;
}

/* -------------------------------------------------------------------------
   Reset / base
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
/* Keep anchor targets clear of the sticky header. */
[id] { scroll-margin-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2 { font-weight: 700; line-height: 1.15; margin: 0 0 0.5em; color: var(--text); letter-spacing: -0.01em; }
h3, h4 { font-weight: 600; line-height: 1.2; margin: 0 0 0.5em; color: var(--text); }
p { margin: 0 0 1em; color: var(--text-muted); }
a { color: var(--green-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
ul { margin: 0; padding: 0; }
address { font-style: normal; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--green);
  color: var(--on-green);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  z-index: 1000;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 400px) {
  .wrap { padding: 0 16px; }
}
.wrap-narrow {
  max-width: 760px;
}

.section {
  padding: 72px 0;
}
@media (max-width: 640px) {
  .section { padding: 56px 0; }
}
.section-title {
  font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.25rem);
  text-align: center;
}
.section-lede {
  text-align: center;
  max-width: 46em;
  margin: 0 auto 2.5em;
  color: var(--text-muted);
  font-size: 1.05rem;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green-text);
  margin-bottom: 18px;
}

/* -------------------------------------------------------------------------
   Header — white, like computerdoctor.me
   ------------------------------------------------------------------------- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.brand-logo {
  height: 44px;
  width: auto;
}
.brand-caption {
  color: var(--text-dim);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  display: none;
}
@media (min-width: 560px) {
  .brand-caption { display: inline; }
}
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.header-home {
  display: none;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}
@media (min-width: 900px) {
  .header-home { display: inline; }
}
.header-home:hover { color: var(--green-text); }
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  font-size: 1rem;
}
.header-phone svg { width: 20px; height: 20px; color: var(--green); flex: none; }
.header-phone:hover { color: var(--green-text); text-decoration: none; }

.header-right .header-cta {
  display: none;
  padding: 10px 18px;
  font-size: 0.85rem;
  min-height: 40px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden; /* keeps it out of the tab order while invisible */
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}
@media (min-width: 720px) {
  .header-right .header-cta { display: inline-flex; }
}
.site-header.is-scrolled .header-cta {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition-delay: 0s;
}
/* Without JS the header CTA never gets .is-scrolled, so just show it. */
.no-js .header-right .header-cta {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

/* -------------------------------------------------------------------------
   Hero — the one dark band, same as the homepage hero
   ------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 64px;
  background: var(--dark);
  color: var(--dark-text);
  text-align: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  opacity: 0.32;
  animation: hero-zoom 22s ease-in-out infinite alternate;
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 15% 0%, rgba(112,161,16,0.28), transparent 60%),
    radial-gradient(600px 320px at 90% 10%, rgba(141,198,63,0.16), transparent 60%),
    linear-gradient(180deg, rgba(24,26,23,0.45) 0%, rgba(24,26,23,0.86) 80%, var(--dark) 100%);
  z-index: 1;
}
@keyframes hero-zoom {
  from { transform: scale(1); }
  to { transform: scale(1.09); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg { animation: none; }
}
.hero-inner { position: relative; z-index: 2; max-width: 780px; }
.hero .eyebrow { color: var(--dark-accent); }
.hero-title {
  font-size: clamp(2.3rem, 1.5rem + 3.4vw, 3.8rem);
  margin-bottom: 20px;
  color: var(--dark-text);
}
.hero-title em {
  font-style: italic;
  font-weight: 500;
  color: var(--dark-accent);
}
.hero-sub {
  font-size: 1.15rem;
  max-width: 44em;
  margin: 0 auto 26px;
  color: var(--dark-muted);
}

/* Fix / Buy / Sell — the trilogy row */
.hero-family {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 30px;
  font-size: 0.85rem;
}
.hero-family li > a,
.hero-family li > span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--dark-border);
  color: var(--dark-muted);
  font-weight: 500;
}
.hero-family strong { color: var(--dark-text); font-weight: 700; margin: 0 0.3em; }
.hero-family a:hover { border-color: var(--dark-accent); color: var(--dark-text); text-decoration: none; }
.hero-family li[aria-current="page"] > span {
  border-color: var(--dark-accent);
  background: rgba(141, 198, 63, 0.16);
  color: var(--dark-text);
}
.hero-family li[aria-current="page"] strong { color: var(--dark-accent); }
.hero :focus-visible { outline-color: var(--dark-accent); }

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.hero-note {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--dark-accent);
}

/* -------------------------------------------------------------------------
   Buttons — main site's 10px radius, 600 weight
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 26px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  min-height: 48px;
  text-align: center;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--green);
  color: var(--on-green);
}
.btn-primary:hover { background: var(--green-hover); color: #ffffff; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--green); color: var(--green-text); }
.hero .btn-ghost,
.visit-card .btn-ghost { color: var(--dark-text); border-color: var(--dark-border); }
.hero .btn-ghost:hover,
.visit-card .btn-ghost:hover { border-color: var(--dark-accent); color: var(--dark-accent); }

/* -------------------------------------------------------------------------
   Callout card (intro)
   ------------------------------------------------------------------------- */
.intro { padding-top: 40px; }
.callout-card {
  text-align: center;
  padding: 40px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(112,161,16,0.30);
  background: var(--surface-tint);
}
@media (max-width: 480px) {
  .callout-card { padding: 32px 20px; }
}
.callout-card .eyebrow { margin-bottom: 12px; }
.callout-title {
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
  margin-bottom: 10px;
}
.callout-sub {
  max-width: 40em;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* -------------------------------------------------------------------------
   Cards (shared)
   ------------------------------------------------------------------------- */
.sell-card,
.why-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 22px;
  box-shadow: var(--shadow);
}
.sell-card h4,
.why-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.sell-card p,
.why-card p { margin-bottom: 0; font-size: 0.97rem; }

/* -------------------------------------------------------------------------
   What we sell — pale green band, like the homepage's services band
   ------------------------------------------------------------------------- */
.what-we-sell {
  background: var(--surface-tint);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.group-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 1.15rem;
  margin: 0 0 18px;
}
.sell-grid + .group-title { margin-top: 40px; }
.group-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--green);
  color: var(--on-green);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.group-tag-alt {
  background: transparent;
  color: var(--green-text);
  border: 1.5px solid var(--green);
}
.sell-grid {
  list-style: none;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.policy-note {
  max-width: 46em;
  margin: 36px auto 0;
  text-align: center;
  font-size: 1rem;
  color: var(--text-muted);
  padding: 18px 22px;
  border: 1px solid rgba(112,161,16,0.35);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.policy-note strong { color: var(--text); }
.stock-note {
  max-width: 46em;
  margin: 16px auto 0;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 16px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
}
.stock-note strong { color: var(--text); }

/* -------------------------------------------------------------------------
   Why buy here
   ------------------------------------------------------------------------- */
.why-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* -------------------------------------------------------------------------
   Shop photos — static grid
   ------------------------------------------------------------------------- */
.shop-gallery { padding-top: 0; }
.photo-grid {
  list-style: none;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}
.photo-grid figure {
  position: relative;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.photo-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 1170 / 694; /* the shop photos' native shape; the 4:3 interior shot gets a light crop */
  object-fit: cover;
}
.photo-grid figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 32px 20px 16px;
  background: linear-gradient(180deg, transparent, rgba(24, 26, 23, 0.85));
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
}

/* -------------------------------------------------------------------------
   Come see us — the one CTA, in the homepage's dark-green block
   ------------------------------------------------------------------------- */
.visit { background: var(--surface-alt); border-top: 1px solid var(--border); }
.visit-card {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  padding: 36px 28px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 260px at 0% 0%, rgba(141,198,63,0.18), transparent 70%),
    var(--dark-green);
  color: var(--dark-text);
  box-shadow: 0 24px 60px rgba(2, 26, 20, 0.25);
}
@media (min-width: 800px) {
  .visit-card {
    grid-template-columns: 3fr 2fr;
    gap: 48px;
    padding: 48px 48px;
  }
}
@media (max-width: 480px) {
  .visit-card { padding: 28px 20px; }
}
.visit-card .eyebrow { color: var(--dark-accent); margin-bottom: 12px; }
.visit-card p { color: var(--dark-muted); }
.visit-card :focus-visible { outline-color: var(--dark-accent); }
.visit-title {
  color: var(--dark-text);
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem);
  margin-bottom: 10px;
}
.visit-sub { font-size: 1.05rem; max-width: 34em; }
.visit-address {
  color: var(--dark-text);
  font-size: 1.15rem;
  line-height: 1.5;
  margin: 22px 0 6px;
}
.visit-address strong { font-weight: 700; }
.visit-landmark {
  font-size: 0.92rem;
  margin-bottom: 24px;
}
.visit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
@media (max-width: 480px) {
  .visit-actions .btn { width: 100%; }
}

.visit-hours h3 {
  color: var(--dark-text);
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  margin-bottom: 14px;
}
.hours-table th,
.hours-table td {
  padding: 12px 0;
  border-bottom: 1px solid var(--dark-border);
  text-align: left;
  vertical-align: top;
}
.hours-table th { color: var(--dark-muted); font-weight: 500; }
.hours-table td { color: var(--dark-text); font-weight: 700; text-align: right; white-space: nowrap; }
.hours-table tr:last-child th,
.hours-table tr:last-child td { border-bottom: none; }
.hours-note {
  font-size: 0.88rem;
  margin: 0;
}

/* -------------------------------------------------------------------------
   FAQ
   ------------------------------------------------------------------------- */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--green-text);
  font-size: 1.4rem;
  line-height: 1;
  margin-left: 12px;
  flex: none;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin-top: 12px; margin-bottom: 0; }

/* -------------------------------------------------------------------------
   Footer — light, like computerdoctor.me
   ------------------------------------------------------------------------- */
.site-footer {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  padding: 44px 0 36px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer-brand .brand-logo { height: 48px; }
.site-footer address {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}
.site-footer address a { color: var(--text-muted); }
.site-footer address a:hover { color: var(--green-text); }

/* Fix / Buy / Sell family links */
.footer-family {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}
.footer-family a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 150px;
  padding: 10px 18px;
  border-radius: var(--radius-btn);
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.3;
}
.footer-family a span {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.footer-family a:hover {
  border-color: var(--green);
  color: var(--green-text);
  text-decoration: none;
}
.footer-family a[aria-current="page"] {
  border-color: var(--green);
  background: var(--green-tint);
}
.footer-family a[aria-current="page"] span { color: var(--green-text); }
.footer-legal {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin: 8px 0 0;
}
.footer-legal a { color: var(--text-dim); text-decoration: underline; }
