/* =========================================================
   Franco's Painters — styles.css
   Clean & modern. One accent (teal). System-friendly.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --ink: #16181d;
  --ink-soft: #2b2f38;
  --muted: #5b6270;
  --bg: #ffffff;
  --surface: #f4f6f8;
  --surface-2: #eef1f4;
  --line: #e2e6ea;
  --brand: #0f766e;
  --brand-strong: #115e59;
  --brand-tint: #e6f2f1;
  --white: #ffffff;
  --focus: #1d9bf0;

  --container: 1180px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .10);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, .10);
  --shadow-lg: 0 24px 60px rgba(16, 24, 40, .18);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.35rem + 0.75vw, 2rem);
  --step-3: clamp(1.9rem, 1.6rem + 1.5vw, 2.9rem);
  --step-4: clamp(2.4rem, 1.9rem + 2.5vw, 3.9rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--brand-strong); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
ul { padding-left: 1.1rem; }
button { font: inherit; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.section { padding-block: clamp(3.2rem, 8vw, 6rem); }
.section--tight { padding-block: clamp(2.4rem, 6vw, 4rem); }
.section--surface { background: var(--surface); }
.section-head { max-width: 62ch; margin-bottom: clamp(1.8rem, 4vw, 2.8rem); }
.section-head p { color: var(--muted); font-size: var(--step-1); margin-top: .7rem; }
.eyebrow {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-strong);
  margin-bottom: .8rem;
}
.center { text-align: center; margin-inline: auto; }
.stack > * + * { margin-top: 1rem; }
.lead { font-size: var(--step-1); color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--step-0);
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--brand-strong); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); background: var(--surface); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: #f0f2f4; }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn--outline-light:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.btn--lg { padding: 1rem 1.7rem; font-size: var(--step-1); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
}
.brand__mark {
  width: 30px; height: 30px;
  flex: none;
  border-radius: 8px;
  background: var(--brand);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: .95rem;
}
.brand__name span { color: var(--brand-strong); }

.nav { display: flex; align-items: center; gap: .3rem; }
.nav a {
  padding: .55rem .8rem;
  border-radius: 8px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: .98rem;
}
.nav a:hover { background: var(--surface); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--brand-strong); font-weight: 700; }

.header-actions { display: flex; align-items: center; gap: .6rem; }
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  padding: .55rem .9rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
}
.header-phone:hover { border-color: var(--ink); }
.header-phone svg { width: 16px; height: 16px; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  display: block;
  width: 20px; height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .header-phone span { display: none; }
  .header-phone { padding: .55rem; }
  .header-actions .btn--primary { display: none; }
  .nav {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: .6rem clamp(1.1rem, 4vw, 2rem) 1.2rem;
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
  }
  .nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav a { padding: .9rem .4rem; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav a:last-child { border-bottom: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  color: #fff;
  display: grid;
  align-items: end;
  min-height: min(78vh, 680px);
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(12,14,18,.28) 0%, rgba(12,14,18,.42) 45%, rgba(12,14,18,.82) 100%);
}
.hero .container { padding-block: clamp(2.5rem, 7vw, 4.5rem); }
.hero h1 {
  color: #fff;
  font-size: var(--step-4);
  max-width: 16ch;
}
.hero p { font-size: var(--step-1); max-width: 46ch; margin-top: 1rem; color: rgba(255,255,255,.92); }
.hero .btn-row { margin-top: 1.8rem; }
.hero__trust {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.4rem;
  font-size: var(--step--1);
  letter-spacing: .02em;
  color: rgba(255,255,255,.85);
}
.hero__trust span { display: inline-flex; align-items: center; gap: .5rem; }
.hero__trust span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: var(--ink); color: #fff; padding-block: clamp(2.6rem, 7vw, 4.5rem); }
.page-hero h1 { color: #fff; font-size: var(--step-3); }
.page-hero p { color: rgba(255,255,255,.8); font-size: var(--step-1); margin-top: .7rem; max-width: 56ch; }
.breadcrumb { font-size: var(--step--1); color: rgba(255,255,255,.6); margin-bottom: .8rem; }
.breadcrumb a { color: rgba(255,255,255,.8); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.6rem); }
.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)); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--muted); }
.card__icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--brand-tint);
  color: var(--brand-strong);
  display: grid; place-items: center;
  margin-bottom: 1rem;
}
.card__icon svg { width: 22px; height: 22px; }
.card--link:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card__more { margin-top: 1rem; font-weight: 700; color: var(--brand-strong); text-decoration: none; display: inline-flex; gap: .4rem; }
.card--link:hover .card__more { gap: .7rem; }

/* Feature (image + text) rows */
.feature { display: grid; gap: clamp(1.4rem, 4vw, 3rem); align-items: center; }
@media (min-width: 800px) {
  .feature { grid-template-columns: 1fr 1fr; }
  .feature--reverse .feature__media { order: 2; }
}
.feature__media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.feature__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.feature h3 { font-size: var(--step-2); margin-bottom: .8rem; }
.feature ul { margin-top: 1rem; color: var(--ink-soft); display: grid; gap: .4rem; }
.feature ul li::marker { color: var(--brand); }

/* ---------- Gallery / portfolio ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.8rem; }
.filter-btn {
  padding: .55rem 1rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  font-weight: 600;
  font-size: .95rem;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.filter-btn:hover { border-color: var(--ink); }
.filter-btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(.7rem, 2vw, 1.2rem);
}
.gallery__item {
  position: relative;
  border: 0;
  padding: 0;
  margin: 0;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 3;
}
.gallery__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.4rem .9rem .7rem;
  font-size: .85rem;
  font-weight: 600;
  color: #fff;
  text-align: left;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.7));
  opacity: 0;
  transition: opacity .2s ease;
}
.gallery__item:hover figcaption,
.gallery__item:focus-visible figcaption { opacity: 1; }
.gallery__item.is-hidden { display: none; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10,12,15,.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 5vw, 3rem);
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}
.lightbox__caption {
  position: absolute;
  bottom: clamp(1rem, 4vw, 2rem);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.85);
  font-size: .9rem;
}
.lightbox__btn {
  position: absolute;
  top: 1rem;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  display: grid; place-items: center;
}
.lightbox__btn:hover { background: rgba(255,255,255,.22); }
.lightbox__close { right: 1rem; }
.lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ---------- Stats ---------- */
.stats { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat { text-align: center; padding: 1.4rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.stat__num { font-size: var(--step-3); font-weight: 800; color: var(--brand-strong); letter-spacing: -.03em; }
.stat__label { color: var(--muted); font-size: var(--step--1); margin-top: .3rem; }

/* ---------- Testimonials ---------- */
.quote {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
}
.quote p { font-size: var(--step-1); color: var(--ink-soft); }
.quote footer { margin-top: 1rem; font-weight: 700; font-size: .95rem; }
.quote footer span { display: block; font-weight: 500; color: var(--muted); }
.stars { color: #e0a500; letter-spacing: .1em; margin-bottom: .7rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--brand-strong); color: #fff; }
.cta-band .container { display: grid; gap: 1.4rem; align-items: center; }
@media (min-width: 780px) { .cta-band .container { grid-template-columns: 1fr auto; } }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); margin-top: .5rem; }

/* ---------- Process steps ---------- */
.steps { counter-reset: step; display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.3rem; position: relative; }
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--brand); color: #fff;
  font-weight: 800; font-size: .95rem;
  margin-bottom: .8rem;
}
.step h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.step p { color: var(--muted); font-size: .95rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: clamp(1.6rem, 4vw, 3rem); }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1.2fr .9fr; } }

.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field .req { color: var(--brand-strong); }
.field input, .field select, .field textarea {
  font: inherit;
  padding: .8rem .9rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); outline: none; }
.field textarea { resize: vertical; min-height: 130px; }
.form__note { font-size: var(--step--1); color: var(--muted); }
.form-status { padding: .9rem 1rem; border-radius: var(--radius-sm); font-weight: 600; display: none; }
.form-status.is-visible { display: block; }
.form-status--ok { background: var(--brand-tint); color: var(--brand-strong); }
.form-status--err { background: #fde8e8; color: #a5271f; }
.hp { position: absolute; left: -9999px; opacity: 0; }

.contact-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.contact-panel h3 { margin-bottom: 1rem; }
.contact-list { list-style: none; padding: 0; display: grid; gap: 1.1rem; }
.contact-list li { display: flex; gap: .8rem; align-items: flex-start; }
.contact-list svg { width: 20px; height: 20px; color: var(--brand-strong); flex: none; margin-top: 3px; }
.contact-list a { color: var(--ink); text-decoration: none; font-weight: 600; }
.contact-list a:hover { color: var(--brand-strong); }
.contact-list span { display: block; color: var(--muted); font-weight: 400; font-size: .92rem; }

/* ---------- Areas list ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .4rem .9rem; font-size: .9rem; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.72); padding-block: clamp(2.6rem, 6vw, 4rem) 1.6rem; }
.site-footer a { color: rgba(255,255,255,.72); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-brand .brand { color: #fff; }
.footer-brand p { margin-top: .8rem; font-size: .95rem; max-width: 34ch; }
.site-footer h4 { color: #fff; font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: .9rem; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: .55rem; font-size: .95rem; }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
  justify-content: space-between;
  font-size: .85rem;
  color: rgba(255,255,255,.55);
}

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.note-box {
  border: 1px dashed var(--brand);
  background: var(--brand-tint);
  color: var(--brand-strong);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  font-size: .95rem;
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  background: #fff;
  color: var(--ink);
  padding: .7rem 1rem;
  border-radius: 8px;
  z-index: 200;
  transition: top .15s ease;
}
.skip-link:focus { top: 1rem; }
