/* ==========================================================
   Tinnelly Construction Ltd — site styles
   Brand: red #B3122E, charcoal #1F2226, white
   ========================================================== */

:root {
  --red: #b3122e;
  --red-dark: #8e0e24;
  --charcoal: #1f2226;
  --charcoal-2: #2c3036;
  --ink: #23262b;
  --muted: #5b616b;
  --line: #e3e5e8;
  --bg: #ffffff;
  --bg-soft: #f5f5f3;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(20, 22, 26, 0.08);
  --max: 1180px;
  --font-head: "Archivo", "Arial Narrow", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  color: var(--charcoal);
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--charcoal); color: #d9dce0; }
.section--dark h2, .section--dark h3 { color: #fff; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}
.lead { font-size: 1.125rem; color: var(--muted); max-width: 62ch; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center .lead { margin-left: auto; margin-right: auto; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--charcoal); color: #fff; padding: 10px 16px; z-index: 1000;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  padding: 14px 26px; border-radius: 6px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); color: #fff; }
.btn--ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--charcoal); }
.btn--outline { border-color: var(--charcoal); color: var(--charcoal); }
.btn--outline:hover { background: var(--charcoal); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Top bar + header ---------- */
.topbar { background: var(--charcoal); color: #c9ccd1; font-size: .875rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 8px; padding-bottom: 8px; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.topbar a:hover { color: #ffb3c0; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff; border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { height: 60px; width: auto; }

.nav-toggle {
  display: none; background: none; border: 0; padding: 10px; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 26px; height: 3px; background: var(--charcoal); border-radius: 2px; position: relative; transition: transform .25s, opacity .25s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -8px; }
.nav-toggle span::after { top: 8px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-8px) rotate(-45deg); }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 6px; }
.main-nav a {
  display: block; padding: 10px 14px; text-decoration: none; color: var(--charcoal);
  font-family: var(--font-head); font-weight: 600; border-radius: 6px;
}
.main-nav a:hover { color: var(--red); }
.main-nav a[aria-current="page"] { color: var(--red); box-shadow: inset 0 -3px 0 var(--red); border-radius: 0; }
.main-nav .btn { margin-left: 8px; padding: 11px 20px; color: #fff; }
.main-nav .btn:hover { color: #fff; }
.main-nav .btn[aria-current="page"] { box-shadow: none; border-radius: 6px; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    display: none;
  }
  .nav-open .main-nav { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 20px; }
  .main-nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .main-nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--red); padding-left: 14px; }
  .main-nav .btn { margin: 14px 0 0; border-bottom: 0; }
  .topbar .hide-sm { display: none; }
  .brand img { height: 52px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  min-height: min(84vh, 720px); display: flex; align-items: center;
  background: var(--charcoal);
}
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(18,20,24,.88) 0%, rgba(18,20,24,.62) 50%, rgba(18,20,24,.2) 100%);
}
.hero .container { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 72px; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .lead { color: #e6e8eb; font-size: 1.2rem; }
.hero .eyebrow { color: #ff8fa3; }
.hero .btn-row { margin-top: 28px; }

.page-hero {
  position: relative; color: #fff; background: var(--charcoal); overflow: hidden;
  padding: clamp(64px, 10vw, 120px) 0 clamp(48px, 7vw, 80px);
}
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.page-hero .container { position: relative; }
.page-hero h1 { color: #fff; max-width: 20ch; }
.page-hero .lead { color: #e1e4e8; }
.page-hero .eyebrow { color: #ff8fa3; }
.breadcrumb { font-size: .875rem; color: #c3c7cc; margin-bottom: 14px; }
.breadcrumb a { color: #fff; }

/* ---------- Trust strip ---------- */
.trust { background: var(--red); color: #fff; }
.trust ul { list-style: none; margin: 0; padding: 22px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.trust li { display: flex; flex-direction: column; text-align: center; }
.trust strong { font-family: var(--font-head); font-size: 1.6rem; line-height: 1.1; }
.trust span { font-size: .9rem; opacity: .9; }
@media (max-width: 700px) { .trust ul { grid-template-columns: repeat(2, 1fr); row-gap: 22px; } }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card p { color: var(--muted); margin-bottom: 0; }
.card__icon {
  width: 52px; height: 52px; border-radius: 10px; background: #fbe9ec; color: var(--red);
  display: grid; place-items: center; margin-bottom: 18px;
}
.card__icon svg { width: 28px; height: 28px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split__media--pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 540px; }
.split__media--pair img { aspect-ratio: 1 / 1; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
}

.ticks { list-style: none; padding: 0; margin: 0 0 24px; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ---------- Project cards ---------- */
.project-card {
  position: relative; display: block; border-radius: var(--radius); overflow: hidden;
  background: var(--charcoal); color: #fff; text-decoration: none;
}
.project-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s, opacity .3s; }
.project-card:hover img { transform: scale(1.04); opacity: .85; }
.project-card__body {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px;
  background: linear-gradient(to top, rgba(15,17,20,.92), rgba(15,17,20,0));
}
.project-card__body h3 { color: #fff; margin-bottom: 4px; }
.project-card__body p { margin: 0; font-size: .9rem; color: #d7dade; }
.tag {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: var(--red); color: #fff; padding: 4px 10px; border-radius: 4px; margin-bottom: 10px;
}

/* ---------- Project detail (projects page) ---------- */
.project { padding: clamp(40px, 6vw, 72px) 0; border-bottom: 1px solid var(--line); }
.project:last-child { border-bottom: 0; }
.project__meta { display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--muted); font-size: .95rem; margin-bottom: 18px; }
.project__meta b { color: var(--charcoal); }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 28px; }
.gallery button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 8px; overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s; }
.gallery button:hover img { transform: scale(1.05); }
.gallery--wide button:first-child { grid-column: span 2; grid-row: span 2; }
.gallery--wide button:first-child img { aspect-ratio: auto; height: 100%; }
@media (max-width: 700px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.filters a {
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none;
  color: var(--charcoal); font-weight: 600; font-size: .95rem; background: #fff;
}
.filters a:hover { border-color: var(--red); color: var(--red); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 500; background: rgba(10,11,13,.92);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-height: 86vh; max-width: 100%; width: auto; border-radius: 6px; }
.lightbox__close {
  position: absolute; top: 14px; right: 14px; width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: #fff; color: var(--charcoal); font-size: 28px; line-height: 1; cursor: pointer;
}
.lightbox__cap { position: absolute; bottom: 16px; left: 20px; right: 20px; text-align: center; color: #e5e7ea; font-size: .95rem; }

/* ---------- Testimonial / quote band ---------- */
.values { counter-reset: v; }
.values .card h3::before {
  counter-increment: v; content: "0" counter(v);
  display: block; font-size: .9rem; color: var(--red); letter-spacing: .1em; margin-bottom: 6px;
}

.cta-band { background: var(--red); color: #fff; }
.cta-band .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 48px; padding-bottom: 48px; }
.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { margin: 0; color: #ffe3e8; }
.cta-band .btn--primary { background: #fff; color: var(--red); }
.cta-band .btn--primary:hover { background: var(--charcoal); color: #fff; }

/* ---------- Areas served ---------- */
.areas { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.areas li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: .95rem; }
.section--dark .areas li { background: var(--charcoal-2); border-color: #3a3f46; color: #fff; }

/* ---------- Timeline (about) ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.stat { background: var(--bg-soft); border-radius: var(--radius); padding: 22px; border-left: 4px solid var(--red); }
.stat strong { display: block; font-family: var(--font-head); font-size: 2rem; color: var(--charcoal); line-height: 1.1; }
.stat span { color: var(--muted); font-size: .95rem; }

/* ---------- Forms ---------- */
.form-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
@media (max-width: 900px) { .form-wrap { grid-template-columns: 1fr; } }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; color: var(--charcoal); }
label .req { color: var(--red); }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #cfd3d8; border-radius: 6px; padding: 12px 14px; min-height: 48px;
}
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--red); box-shadow: 0 0 0 3px rgba(179,18,46,.15); }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--muted); }
.checkbox input { width: 20px; min-height: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--red); }
.hidden { position: absolute !important; left: -9999px !important; }
.form-note { font-size: .875rem; color: var(--muted); margin-top: 14px; }

.contact-list { list-style: none; padding: 0; margin: 0 0 28px; }
.contact-list li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-list svg { width: 22px; height: 22px; color: var(--red); flex: none; margin-top: 3px; }
.contact-list b { display: block; color: var(--charcoal); }
.contact-list a { text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer { background: #15171a; color: #a9aeb5; font-size: .95rem; }
.site-footer .container { padding-top: 64px; padding-bottom: 28px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 32px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-logo { background: #fff; border-radius: 8px; padding: 6px 10px; display: inline-block; margin-bottom: 16px; }
.footer-logo img { height: 56px; width: auto; }
.site-footer h3 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #dfe2e6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid #2a2d32; margin-top: 44px; padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .85rem; }

/* ---------- Top bar contact group ---------- */
.topbar__links { display: flex; gap: 18px; flex-wrap: wrap; }
@media (max-width: 560px) { .topbar__links .hide-xs { display: none; } }

/* ---------- Sector sections (projects page) ---------- */
.sector { padding: clamp(48px, 7vw, 88px) 0; border-top: 1px solid var(--line); }
.sector:first-of-type { border-top: 0; }
.sector__head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; }
.sector__head .lead { margin-bottom: 0; }
.sector__count { font-family: var(--font-head); font-weight: 700; color: var(--muted); }

.store-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
@media (max-width: 760px) { .store-grid { grid-template-columns: 1fr; } }
.store { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.store__main { padding: 0; border: 0; background: var(--charcoal); cursor: zoom-in; display: block; width: 100%; position: relative; }
.store__main img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: opacity .3s; }
.store__main:hover img { opacity: .88; }
.store__photos {
  position: absolute; right: 12px; bottom: 12px; background: rgba(15,17,20,.8); color: #fff;
  font-size: .8rem; font-weight: 600; padding: 5px 10px; border-radius: 4px;
}
.store__body { padding: 20px 22px 22px; }
.store__body h3 { margin-bottom: 4px; }
.store__loc { color: var(--muted); font-size: .95rem; margin-bottom: 10px; display: flex; gap: 6px; align-items: center; }
.store__loc svg { width: 16px; height: 16px; color: var(--red); flex: none; }
.store__body p { color: var(--muted); margin: 0; }
.store__thumbs { display: none; }

.gallery--tall img { aspect-ratio: 3 / 4; }

/* ---------- Lightbox prev/next ---------- */
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.9); color: var(--charcoal); font-size: 26px; line-height: 1; cursor: pointer;
}
.lightbox__nav:hover { background: #fff; }
.lightbox__prev { left: 14px; }
.lightbox__next { right: 14px; }
.lightbox__nav[hidden] { display: none; }

/* ---------- Map link ---------- */
.map-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-top: 24px; }
.map-card iframe { display: block; width: 100%; height: 260px; border: 0; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.mt-lg { margin-top: 40px; }

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