/* ===========================================================================
   Turriff PC Repair - site styles
   Colours, type and shapes are lifted straight from the A5 flyer.
   =========================================================================== */

:root {
  --navy:       #0B1628;
  --navy-deep:  #07101D;
  --accent:     #00AEEF;
  --accent-deep:#0084BA;
  --soft:       #3A4A60;
  --muted:      #96A8BC;
  --tint:       #F2F7FB;
  --line:       #E1E8EF;
  --white:      #FFFFFF;
  --wrap:       1120px;
  --radius:     18px;
  --font: "Lato", "Helvetica Neue", Arial, sans-serif;
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B1628' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  /* shared darkened motherboard backdrop for the navy sections */
  --photo-bg: url("../img/mobo-bg-1600.jpg");
  --photo-veil-x: linear-gradient(90deg,
      rgba(7, 16, 29, 0.96) 0%,
      rgba(7, 16, 29, 0.92) 38%,
      rgba(7, 16, 29, 0.76) 66%,
      rgba(7, 16, 29, 0.64) 100%);
  --photo-veil-y: linear-gradient(180deg,
      rgba(7, 16, 29, 0.86) 0%,
      rgba(7, 16, 29, 0.30) 45%,
      rgba(7, 16, 29, 0.82) 100%);
}

@media (min-width: 1500px) {
  :root { --photo-bg: url("../img/mobo-bg-2400.jpg"); }
}

*, *::before, *::after { box-sizing: border-box; }

/* Anchor jumps must clear the 82px sticky header (78px bar + 4px top border),
   otherwise section headings land underneath it. */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent-deep); }

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.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;
  left: -9999px;
  top: 0;
  z-index: 100;
}
.skip-link:focus {
  left: 1rem; top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--navy);
  font-weight: 900;
  border-radius: 8px;
  text-decoration: none;
}

/* --------------------------------------------------------------- header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  /* 4px track; .scroll-progress fills it as the page scrolls */
  border-top: 4px solid rgba(255, 255, 255, 0.16);
}

.scroll-progress {
  position: absolute;
  top: -4px;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  line-height: 1;
  text-decoration: none;
}

.brand-logo {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

/* Facebook button: a filled "f" on a subtly lighter navy disc */
.social-link {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: 1.25rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: var(--accent);
  transition: background-color 0.15s ease;
}

.social-link svg {
  width: 14px;
  height: 22px;
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.12);
}
.brand-name {
  color: var(--white);
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
}
.brand-sub {
  margin-top: 0.35rem;
  color: var(--accent);
  font-weight: 900;
  font-size: 0.7rem;
  letter-spacing: 0.42em;
}

.nav {
  margin-left: auto;
  display: flex;
  gap: 1.6rem;
}
.nav a {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}
.nav a:hover { color: var(--white); }

.btn {
  display: inline-block;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-weight: 900;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease,
              border-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-call {
  background: var(--accent);
  color: var(--navy);
  padding: 0.7rem 1.15rem;
  font-size: 0.98rem;
  white-space: nowrap;
}
.btn-call:hover { background: var(--white); }

/* ----------------------------------------------------------------- hero --- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
  padding: clamp(3.25rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
}

/* the cyan monitor mark would fight the photo, so mute it */
.hero-photo .hero-mark { opacity: 0.32; }

.hero .wrap { position: relative; z-index: 1; }

.kicker {
  margin: 0 0 1.35rem;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker-dark { color: var(--accent-deep); }

h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2.4rem, 7.5vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-weight: 900;
}
h1 span { color: var(--accent); }

.lead {
  margin: 0 0 2.25rem;
  max-width: 34ch;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: #D6E2EE;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 0;
}

.btn-primary { background: var(--accent); color: var(--navy); }
.btn-primary:hover { background: var(--white); }

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--white);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.75rem;
  margin: 2.75rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
}
.facts li { display: flex; align-items: center; gap: 0.6rem; }
.facts li::before {
  content: "";
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--accent) var(--check) center / 58% no-repeat;
}

.hero-mark {
  position: absolute;
  right: max(2rem, calc((100% - var(--wrap)) / 2));
  top: 50%;
  width: clamp(9rem, 17vw, 15rem);
  transform: translateY(-50%);
  opacity: 0.5;
}

/* ------------------------------------------------------------- services --- */

.section { padding: clamp(3.25rem, 7vw, 5.5rem) 0; }

.section h2,
.contact h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.85rem, 4.2vw, 2.9rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 900;
}

.intro {
  margin: 0 0 2.5rem;
  max-width: 54ch;
  font-size: 1.05rem;
  color: var(--soft);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: 1.75rem 1.5rem;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.card p { margin: 0; color: var(--soft); }

.tick {
  display: block;
  width: 2rem;
  height: 2rem;
  margin-bottom: 1.1rem;
  border-radius: 50%;
  background: var(--accent) var(--check) center / 52% no-repeat;
}

/* ---------------------------------------------------------------- price --- */

.price {
  background: var(--accent);
  color: var(--navy);
  padding: clamp(2.5rem, 5vw, 3.75rem) 0;
}

.price-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}

.price-amount {
  margin: 0;
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: -0.04em;
}

.price-copy { max-width: 32rem; }

.price-label {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.price-note {
  margin: 0 0 1.35rem;
  max-width: 28ch;
  font-size: 1.05rem;
  font-weight: 700;
}

.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--white); color: var(--navy); }

/* -------------------------------------------------------------- contact --- */

.contact {
  background: var(--navy);
  color: var(--white);
  padding: clamp(3.25rem, 7vw, 5.5rem) 0;
  text-align: left;
}

.phone {
  display: inline-block;
  margin: 0.5rem 0 1rem;
  color: var(--white);
  font-size: clamp(1.35rem, 5vw, 3.1rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.phone:hover { color: var(--accent); }

.contact-note {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

/* --------------------------------------------------- hours and address --- */

.contact-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem 3rem;
  max-width: 42rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.hours,
.address-block { min-width: 0; }

.hours h3,
.address-block h3 {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
}

.hours-list { margin: 0; }

.hours-row {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hours-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.hours-row dt {
  margin: 0;
  color: var(--white);
  font-weight: 700;
}

.hours-row dd {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hours-row-closed dd { opacity: 0.7; }

.address-lines {
  margin: 0;
  color: var(--white);
  font-style: normal;
  font-weight: 700;
  line-height: 1.7;
  overflow-wrap: break-word;
}

/* ---------------------------------------------------------- photo bands --- */
/* Every full-width section on the navy base (the heroes and the contact
   band) carries the same motherboard backdrop. Two navy veils keep the photo
   behind the copy; the horizontal one is densest on the text side and the
   vertical one blends the top and bottom edges into the page. Header and
   footer are deliberately left as flat navy. */
.hero-photo,
.contact-photo {
  background-color: var(--navy-deep);
  background-image: var(--photo-veil-x), var(--photo-veil-y), var(--photo-bg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* --------------------------------------------------------------- footer --- */

.site-footer {
  background: var(--navy-deep);
  color: var(--muted);
  padding: 2rem 0;
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

.footer-brand {
  margin: 0;
  color: var(--white);
  font-weight: 900;
  letter-spacing: 0.08em;
}
.footer-brand span { color: var(--accent); }

.footer-copy { margin: 0; }
.footer-copy a { color: var(--muted); text-decoration: none; }
.footer-copy a:hover { color: var(--white); }

/* ----------------------------------------------------------- responsive --- */

@media (max-width: 760px) {
  .nav { display: none; }
  .header-inner { gap: 1rem; }
  .hero-mark { display: none; }
  .facts { font-size: 0.85rem; }
}

@media (max-width: 520px) {
  .facts { flex-direction: column; gap: 0.65rem; }
}

@media (max-width: 420px) {
  /* only the hero's stacked buttons go full width - not the header CTA */
  .actions { flex-direction: column; }
  .actions .btn { width: 100%; text-align: center; }
  /* keep the logo lockup and the call button on one line on small phones */
  .brand-logo { width: 38px; height: 38px; border-radius: 9px; }
  .brand { gap: 0.55rem; }
  /* not enough width for the social button next to the call CTA */
  .social-link { display: none; }
}

@media (max-width: 360px) {
  /* 320px screens: give the lockup and CTA breathing room */
  .brand-name { font-size: 1.3rem; }
  .brand-logo { width: 34px; height: 34px; }
  .brand-sub { font-size: 0.62rem; letter-spacing: 0.34em; }
  .btn-call { padding: 0.6rem 0.8rem; font-size: 0.88rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}
