/* Mr. RSVP — Reyes & Sons Versatile Professions
   Mobile first: base rules are for phones, wider screens are added below. */

:root {
  --navy: #0f1f33;
  --navy-2: #182c47;
  --ink: #18212c;
  --muted: #4a5767;
  --bg: #ffffff;
  --bg-alt: #f5f2ed;
  --line: #e2ddd5;
  --accent: #f59e0b;        /* amber: buttons, highlights */
  --accent-hover: #fbb53c;
  --accent-ink: #0f1f33;    /* text on amber */
  --link: #a14a05;          /* amber-dark, readable on white */
  --link-on-dark: #fcc35a;
  --radius: 10px;
  --max: 1120px;
  --call-bar-h: 64px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  /* room for the fixed call bar on phones */
  padding-bottom: calc(var(--call-bar-h) + env(safe-area-inset-bottom, 0px));
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; color: var(--navy); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 8vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 5.5vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

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

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 10px 14px;
  font-weight: 700; border-radius: 6px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 20px;
  border-radius: var(--radius); border: 2px solid transparent;
  font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none;
  cursor: pointer; transition: background-color .15s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 56px; padding: 14px 24px; font-size: 1.125rem; }
.btn-block { width: 100%; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }

.icon-inline { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }

/* ── Header (sticky) ─────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy);
  border-bottom: 3px solid var(--accent);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: #fff; min-width: 0; }
.brand-name { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; }
.brand-sub { font-size: .72rem; color: #c7d2e0; letter-spacing: .02em; line-height: 1.3; }
.btn-call-header { min-height: 44px; padding: 10px 14px; white-space: nowrap; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  background:
    linear-gradient(160deg, rgba(245,158,11,.10) 0%, rgba(245,158,11,0) 45%),
    var(--navy);
  color: #fff;
  padding: 56px 0 64px;
}
.hero h1 { color: #fff; max-width: 15ch; }
.eyebrow {
  display: inline-block; margin-bottom: 18px;
  color: var(--link-on-dark); font-weight: 700; font-size: .85rem;
  letter-spacing: .08em; text-transform: uppercase;
}
.hero-tagline { margin: -4px 0 14px; font-size: clamp(1.3rem, 4.8vw, 1.75rem); font-weight: 800; line-height: 1.2; color: var(--link-on-dark); }
.hero-sub { font-size: 1.15rem; color: #dbe3ee; max-width: 40ch; margin-bottom: 28px; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; }

/* ── Sections ────────────────────────────────────────────── */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section-lead { color: var(--muted); font-size: 1.1rem; max-width: 52ch; margin-bottom: 28px; }

/* Services: compact cards that open to show the details */
.service-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
.service-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  border-top: 4px solid var(--accent);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.service-icon {
  width: 44px; height: 44px; margin-bottom: 12px;
  fill: none; stroke: var(--navy); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}
.service-heading { margin: 0; font: inherit; letter-spacing: normal; }
.service-toggle {
  display: grid; grid-template-columns: 1fr auto; align-items: start; column-gap: 12px;
  width: 100%; margin: 0; padding: 22px 20px; border: 0; border-radius: var(--radius);
  background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.service-toggle:focus-visible { outline-offset: -3px; border-radius: var(--radius); }
.service-toggle .service-icon { grid-column: 1; grid-row: 1; }
.service-chevron {
  grid-column: 2; grid-row: 1; width: 26px; height: 26px;
  fill: none; stroke: var(--navy); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .2s ease;
}
.service-title { grid-column: 1 / -1; display: block; font-size: 1.2rem; font-weight: 700; line-height: 1.15; color: var(--navy); letter-spacing: -0.01em; margin-bottom: 6px; }
.service-teaser { grid-column: 1 / -1; display: block; color: var(--muted); }
.service-details-body { padding: 0 20px 20px; }
.service-details ul { margin: 0 0 14px; padding-left: 1.2em; }
.service-details li { margin-bottom: 4px; }
.service-details li::marker { color: var(--accent); }
.service-call { font-weight: 700; }
/* Collapsed only once the script has run, so without it every detail shows. */
.services-js .service-details {
  display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden;
  transition: grid-template-rows .25s ease, opacity .2s ease, visibility 0s linear .25s;
}
.services-js .service-details-inner { overflow: hidden; min-height: 0; }
.services-js .service-card.is-open .service-details { grid-template-rows: 1fr; opacity: 1; visibility: visible; transition-delay: 0s; }
.service-card.is-open { border-color: var(--accent); }
.service-card.is-open .service-chevron { transform: rotate(180deg); }
@media (hover: hover) {
  .service-card:hover, .service-card.is-open { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15, 31, 51, .12); border-color: var(--accent); }
}
@media (prefers-reduced-motion: reduce) {
  .service-card, .service-chevron, .services-js .service-details { transition: none; }
  .service-card:hover, .service-card.is-open { transform: none; }
}

/* About */
.about { display: grid; gap: 24px; align-items: center; }
.about p { font-size: 1.15rem; max-width: 60ch; }
.about-badge {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 150px; height: 150px; border-radius: 50%;
  background: var(--navy); color: #fff; text-align: center; border: 4px solid var(--accent);
}
.about-years { font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--accent); }
.about-years-label { font-size: .78rem; padding: 4px 16px 0; line-height: 1.25; color: #dbe3ee; }

/* Service area */
.area-list { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.area-list li {
  background: var(--navy); color: #fff; border-radius: 999px;
  padding: 8px 16px; font-weight: 600; font-size: 1rem;
}
.area-list li:last-child { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.area-note { color: var(--muted); margin: 0; }

/* Gallery (used once the "Our Work" section is uncommented) */
/* Gallery: phone photos are mostly upright, so tiles are 3:4; two across on phones. */
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.gallery-item { margin: 0; background: var(--bg); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.gallery-item img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; background: var(--line); }
.gallery-item figcaption { padding: 8px 10px; font-weight: 600; font-size: .9rem; line-height: 1.3; color: var(--navy); }
/* An odd photo out spans the row instead of sitting alone (two-across layout). */
.gallery-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
.gallery-item:last-child:nth-child(odd) img { aspect-ratio: 4 / 3; }

/* ── Contact ─────────────────────────────────────────────── */
.section-dark { background: var(--navy); color: #e6ecf3; }
.section-dark h2 { color: #fff; }
.section-dark a:not(.btn) { color: var(--link-on-dark); }
.contact { display: grid; gap: 32px; }
.contact-info p { color: #dbe3ee; max-width: 46ch; }
.contact-info .btn { margin: 8px 0 18px; }
.contact-line { font-size: 1.05rem; }

.quote-form {
  background: var(--bg); color: var(--ink);
  border-radius: var(--radius); padding: 22px 18px;
  border-top: 4px solid var(--accent);
}
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--navy); }
.req { color: var(--link); }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 2px solid #7d8a99; border-radius: 8px; padding: 12px 12px; min-height: 48px;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy); outline: 3px solid var(--accent); outline-offset: 1px; }
.form-note { font-size: .9rem; color: var(--muted); }

/* ── Google reviews ──────────────────────────────────────── */
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--bg-alt); }
.review-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 18px; }
.review-links a:not(.btn) { color: var(--link); font-weight: 600; }

/* ── Closing line ────────────────────────────────────────── */
.closing { padding: 48px 0 56px; text-align: center; background: var(--bg); }
.closing-quote { margin: 0 auto; max-width: 42ch; }
.closing-quote::before { content: ""; display: block; width: 56px; height: 3px; margin: 0 auto 20px; background: var(--accent); border-radius: 2px; }
.closing-quote p { margin: 0; font-style: italic; font-size: clamp(1.25rem, 4.2vw, 1.6rem); line-height: 1.4; color: var(--navy); }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer { background: #0a1626; color: #c7d2e0; padding: 28px 0; font-size: .95rem; }
.site-footer p { margin: 0 0 6px; }
.site-footer a { color: #fff; }

/* ── Phone call bar (phones only) ────────────────────────── */
.call-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; gap: .5em;
  min-height: var(--call-bar-h);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--accent); color: var(--accent-ink);
  font-weight: 800; font-size: 1.15rem; text-decoration: none;
  box-shadow: 0 -4px 14px rgba(15, 31, 51, .25);
}
.call-bar:hover { background: var(--accent-hover); }

/* Very narrow phones: keep the header on one line. */
@media (max-width: 359px) {
  .brand-sub { display: none; }
}

/* ── Wider screens ───────────────────────────────────────── */
@media (min-width: 600px) {
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { gap: 16px; }
  .gallery-item figcaption { padding: 10px 14px; font-size: 1rem; }
  .quote-form { padding: 28px; }
}

@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .call-bar { display: none; }
  .brand-sub { font-size: .8rem; }
  .btn-call-header { padding: 10px 18px; }
  .hero { padding: 96px 0 104px; }
  .section { padding: 80px 0; }
  .about { grid-template-columns: auto 1fr; gap: 40px; }
  .about-badge { width: 180px; height: 180px; }
  .about-years { font-size: 3.2rem; }
  .closing { padding: 72px 0 80px; }
}

@media (min-width: 960px) {
  .service-grid { grid-template-columns: repeat(3, 1fr); }   /* six services: two rows of three */
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery-item:last-child:nth-child(odd) { grid-column: auto; }
  .gallery-item:last-child:nth-child(odd) img { aspect-ratio: 3 / 4; }
  .contact { grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: start; }
  .footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
}
