/* =========================================================
   Tony Rivett Tiling — custom styles layered on Tailwind CDN
   Brand: navy #1d3d5c · teal #3d8a9e · cyan #a8d0d8 · green #3a7d44
   ========================================================= */

:root {
  --navy: #0b355c;
  --navy-dark: #07223d;
  --teal: #0a84d6;
  --teal-dark: #0a5fa8;
  --teal-light: #4fb0ee;
  --cyan: #afd8f5;
  --cyan-light: #e8f3fc;
  --green: #1f9e4a;
  --green-dark: #16753a;
  --charcoal: #1a1d21;
}

html { scroll-behavior: smooth; }
/* Offset anchored sections so the sticky header doesn't cover headings */
section[id] { scroll-margin-top: 110px; }

body { overflow-x: hidden; }

/* ---------- Buttons ---------- */
.btn-primary,
.btn-outline,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  border-radius: .6rem;
  padding: .7rem 1.4rem;
  transition: all .2s ease;
  cursor: pointer;
  line-height: 1.1;
}
.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 14px -4px rgba(58,125,68,.6);
}
.btn-primary:hover { background: var(--green-dark); transform: translateY(-2px); }

.btn-outline {
  border: 2px solid var(--teal);
  color: var(--teal);
  background: transparent;
}
.btn-outline:hover { background: var(--teal); color: #fff; }

.btn-ghost {
  border: 2px solid rgba(255,255,255,.7);
  color: #fff;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(2px);
}
.btn-ghost:hover { background: #fff; color: var(--navy); }

/* ---------- Nav ---------- */
.nav-link {
  position: relative;
  color: var(--navy);
  transition: color .2s;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--teal);
  transition: width .25s ease;
}
.nav-link:hover { color: var(--teal); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--teal); }

.mobile-link {
  padding: .75rem .25rem;
  border-bottom: 1px solid #f1f1f1;
  color: var(--navy);
  font-weight: 500;
}
.mobile-link:active { color: var(--teal); }

/* ---------- Hero slider ---------- */
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  /* Brand gradient fallback shows when no photo is present */
  background-color: var(--navy);
  background-image: linear-gradient(135deg, var(--navy) 0%, var(--teal-dark) 55%, var(--teal) 100%);
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1s ease, transform 6s ease;
  display: flex;
  align-items: center;
}
/* When a real photo loads it sits on top; gradient stays as fallback */
.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 10;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20,43,64,.92) 0%, rgba(20,43,64,.62) 45%, rgba(20,43,64,.25) 100%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.025) 0 2px, transparent 2px 26px);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: 0 1.5rem;
  margin: 0 auto;
  width: 100%;
  max-width: min(1200px, 100%);
}
@media (min-width: 640px) { .hero-content { padding: 0 2rem; } }

.hero-eyebrow {
  display: inline-block;
  color: var(--cyan);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .8rem;
  margin-bottom: 1rem;
  padding: .35rem .8rem;
  background: rgba(58,125,68,.85);
  border-radius: 999px;
  color: #fff;
}
.hero-title {
  font-family: "Barlow Condensed", sans-serif;
  color: #fff;
  font-weight: 700;
  font-size: clamp(2.3rem, 6vw, 4.2rem);
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: .5px;
  max-width: 18ch;
  text-shadow: 0 2px 20px rgba(0,0,0,.35);
}
.hero-text {
  color: rgba(255,255,255,.92);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  margin-top: 1.1rem;
  max-width: 46ch;
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  backdrop-filter: blur(4px);
  transition: background .2s;
}
.hero-arrow:hover { background: var(--green); border-color: var(--green); }
@media (max-width: 640px) { .hero-arrow { display: none; } }

.hero-dot {
  width: 11px; height: 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.45);
  border: none;
  cursor: pointer;
  transition: all .25s;
}
.hero-dot.is-active { background: var(--green); width: 30px; }

/* ---------- Trust bar ---------- */
.trust-item { display: flex; flex-direction: column; gap: .25rem; }
.trust-num {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--cyan);
  font-weight: 700;
}
.trust-label { font-size: .9rem; color: rgba(255,255,255,.8); }

/* ---------- Section headings ---------- */
.section-head { text-align: center; max-width: 680px; margin: 0 auto; }
.eyebrow {
  color: var(--teal);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .82rem;
}
.section-title {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.05;
  color: var(--navy);
  margin-top: .4rem;
}
.section-head .section-title { text-align: center; }
.section-sub { margin-top: .9rem; color: rgba(29,61,92,.7); font-size: 1.05rem; line-height: 1.6; }

/* ---------- Service cards ---------- */
.service-card {
  background: #fff;
  border: 1px solid #e8eef0;
  border-radius: 1rem;
  padding: 1.8rem;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -20px rgba(29,61,92,.35);
  border-color: var(--teal-light);
}
.service-icon {
  width: 56px; height: 56px;
  border-radius: .85rem;
  display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--teal) 0%, var(--navy) 100%);
  margin-bottom: 1.1rem;
}
.service-icon svg { width: 30px; height: 30px; }
.service-title {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .3px;
}
.service-desc { margin-top: .5rem; color: rgba(29,61,92,.72); line-height: 1.55; font-size: .97rem; }

/* ---------- About ---------- */
.img-fallback {
  background: linear-gradient(135deg, var(--teal) 0%, var(--navy) 100%);
  position: relative;
}
.img-fallback::after {
  content: "Tony Rivett Tiling";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: "Barlow Condensed", sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255,255,255,.4);
  font-size: 1.4rem;
}
.about-tick {
  position: relative;
  padding-left: 1.9rem;
  color: var(--navy);
  font-weight: 500;
}
.about-tick::before {
  content: "";
  position: absolute;
  left: 0; top: 2px;
  width: 20px; height: 20px;
  border-radius: 999px;
  background: var(--green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath fill-rule='evenodd' d='M16.7 5.3a1 1 0 010 1.4l-8 8a1 1 0 01-1.4 0l-4-4a1 1 0 011.4-1.4L8 12.6l7.3-7.3a1 1 0 011.4 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-size: 14px;
  background-repeat: no-repeat;
  background-position: center;
}

/* ---------- Portfolio ---------- */
.filter-btn {
  padding: .5rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
  color: var(--cyan);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  transition: all .2s;
}
.filter-btn:hover { background: rgba(255,255,255,.16); }
.filter-btn.is-active { background: var(--green); color: #fff; border-color: var(--green); }

.portfolio-item {
  position: relative;
  border-radius: .85rem;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--teal-dark), var(--navy));
  cursor: pointer;
}
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.portfolio-item:hover img { transform: scale(1.08); }
.portfolio-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.4rem 1rem .9rem;
  background: linear-gradient(transparent, rgba(20,43,64,.92));
  color: #fff;
  display: flex;
  flex-direction: column;
  transform: translateY(8px);
  opacity: .9;
  transition: all .3s;
}
.portfolio-item:hover figcaption { transform: translateY(0); opacity: 1; }
.portfolio-item figcaption span { font-family: "Barlow Condensed", sans-serif; font-size: 1.25rem; text-transform: uppercase; letter-spacing: .4px; }
.portfolio-item figcaption small { color: var(--cyan); font-size: .8rem; }
.portfolio-item.is-hidden { display: none; }

/* ---------- Instagram feed ---------- */
.ig-item {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: .6rem;
  overflow: hidden;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
}
.ig-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.ig-item:hover img { transform: scale(1.1); }
.ig-item::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(29,61,92,0);
  transition: background .25s;
}
.ig-item:hover::after { background: rgba(29,61,92,.25); }
.ig-skeleton {
  aspect-ratio: 1 / 1;
  border-radius: .6rem;
  background: linear-gradient(100deg, #e9eff1 30%, #f6fafb 50%, #e9eff1 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Reviews ---------- */
.review-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.8rem;
  box-shadow: 0 12px 30px -22px rgba(29,61,92,.4);
  border: 1px solid #e8eef0;
}
.review-card .stars { color: #f5a623; letter-spacing: 2px; font-size: 1.1rem; }
.review-card p { margin: .9rem 0; color: rgba(29,61,92,.85); line-height: 1.6; font-style: italic; }
.review-card footer { font-weight: 600; color: var(--teal); font-size: .92rem; }

/* ---------- Service area chips ---------- */
.area-chip {
  padding: .55rem 1.2rem;
  background: var(--cyan-light);
  border: 1px solid #cfe6fb;
  color: var(--navy);
  border-radius: 999px;
  font-weight: 500;
  transition: all .2s;
}
.area-chip:hover { background: var(--teal); color: #fff; border-color: var(--teal); }

/* ---------- Contact ---------- */
.contact-line { display: flex; align-items: center; gap: 1rem; color: #fff; transition: color .2s; }
.contact-line:hover { color: var(--cyan); }
.contact-ico {
  width: 46px; height: 46px;
  border-radius: .7rem;
  display: grid; place-items: center;
  background: var(--green);
  color: #fff;
  flex-shrink: 0;
}
.contact-line span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.contact-line small { color: rgba(168,208,216,.7); font-size: .82rem; }

.form-label { display: block; font-weight: 600; font-size: .88rem; color: var(--navy); margin-bottom: .35rem; }
.form-input {
  width: 100%;
  border: 1px solid #d6dee1;
  border-radius: .6rem;
  padding: .7rem .9rem;
  font-size: .97rem;
  color: var(--navy-dark);
  background: #fbfdfd;
  transition: border-color .2s, box-shadow .2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(61,138,158,.18);
  background: #fff;
}

/* ---------- Footer ---------- */
.footer-head { color: #fff; font-family: "Barlow Condensed", sans-serif; font-size: 1.2rem; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 1rem; }
.footer-link { transition: color .2s; }
.footer-link:hover { color: var(--teal-light); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-slide { transition: opacity .4s ease; transform: none !important; }
}
