/* =============================================================
   WINFREE CONTRACTING, INC. — site.css
   One stylesheet for the whole site. Mobile first.

   Change the look in one place: everything below draws from the
   custom properties in :root. The palette is royal blue (from the
   company logo), white, and concrete grey. No gradients, no
   shadows, no rounded corners. Rules and whitespace do the work.

   Type: headings are Libre Caslon Text (echoes the serif in the
   logo, loaded from Google Fonts, two files). Body is Georgia,
   a system font, so it costs nothing to load.
   ============================================================= */

:root {
  /* ---- palette ------------------------------------------------ */
  --royal:       #1f4e9c;  /* primary. sampled toward the logo blue */
  --royal-deep:  #163a75;  /* hover / pressed */
  --ink:         #23262a;  /* near-black text */
  --concrete:    #565b60;  /* secondary text. AA on paper and white */
  --line:        #d8d4cc;  /* hairline rules */
  --paper:       #f7f5f0;  /* weathered white page ground */
  --white:       #ffffff;  /* header, cards of content on paper */
  --slab:        #e7e4dd;  /* photo placeholder fill */

  /* ---- type scale --------------------------------------------- */
  --font-head: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --font-body: Georgia, "Times New Roman", serif;

  --step--1: 0.8125rem;                        /* small print, captions  */
  --step-0:  1.0625rem;                        /* body                   */
  --step-1:  1.25rem;                          /* ledes                  */
  --step-2:  clamp(1.5rem, 3.2vw, 2rem);       /* section headings       */
  --step-3:  clamp(2.125rem, 5.5vw, 3.5rem);   /* the big one            */

  /* ---- rhythm ------------------------------------------------- */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 3rem;
  --space-5: 5rem;

  --wrap: 68rem; /* page measure */
}

/* ---- reset, the short version ---------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { max-width: 100%; height: auto; display: block; }

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 var(--space-2);
}

p { margin: 0 0 var(--space-2); }

a { color: var(--royal); }
a:hover { color: var(--royal-deep); }

/* Small-caps utility label. Used for eyebrows, nav, buttons,
   captions. Georgia in letterspaced caps reads like print, not UI. */
.label {
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Accessible skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--royal);
  color: var(--white);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip-link:focus { left: 0; color: var(--white); }

/* =============================================================
   MICROBAR — thin blue strip above the header.
   Florida requires the contractor license number on every
   advertisement, and the website counts. It also lives in the
   footer; here it greets people before they scroll.
   ============================================================= */
.microbar {
  background: var(--royal);
  color: var(--white);
  padding: 0.4rem 0;
}
.microbar .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  justify-content: space-between;
}

/* =============================================================
   HEADER
   White so the white-background logo JPEG sits clean on it.
   ============================================================= */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: var(--space-2) 0;
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}
.site-header .logo img {
  width: 200px;
  height: auto;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin-left: auto;
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--royal); }
.site-nav a[aria-current="page"] {
  color: var(--royal);
  border-bottom-color: var(--royal);
}

/* =============================================================
   BUTTONS — square, flat, letterspaced. Like stamped signage.
   ============================================================= */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  text-decoration: none;
  border: 1px solid var(--royal);
  background: var(--royal);
  color: var(--white);
}
.btn:hover { background: var(--royal-deep); border-color: var(--royal-deep); color: var(--white); }

.btn--ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* On the blue band the roles flip */
.band--blue .btn {
  background: var(--white);
  border-color: var(--white);
  color: var(--royal);
}
.band--blue .btn:hover { background: var(--paper); border-color: var(--paper); color: var(--royal-deep); }

/* =============================================================
   HERO — asymmetric. Text column is wider than the photo column,
   and the photo hangs lower than the text on purpose.
   ============================================================= */
.hero { padding: var(--space-4) 0 var(--space-5); }
.hero__grid {
  display: grid;
  gap: var(--space-4);
}
.hero .eyebrow {
  color: var(--royal);
  border-left: 3px solid var(--royal);
  padding-left: 0.75rem;
  margin: 0 0 var(--space-2);
}
.hero h1 {
  font-size: var(--step-3);
  max-width: 16ch;
  margin-bottom: var(--space-3);
}
.hero .lede {
  font-size: var(--step-1);
  color: var(--concrete);
  max-width: 46ch;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

@media (min-width: 56rem) {
  .hero__grid {
    grid-template-columns: 7fr 5fr;
    align-items: start; /* let the photo keep its own height */
  }
  .hero__photo { margin-top: var(--space-4); } /* the deliberate drop */
}

/* =============================================================
   PHOTO SLOTS
   Every image slot works empty. When a real photo lands in
   /images it takes over via the <img> tag; until then the slab
   shows the label. object-fit: cover means uneven phone photos
   are fine, the frame decides the shape, not the file.
   ============================================================= */
figure.photo {
  margin: 0;
  border: 1px solid var(--line);
}
/* The frame owns the shape. Its contents are absolutely positioned
   so nothing inside can push the layout wider than the viewport. */
figure.photo .frame {
  position: relative;
  background: var(--slab);
  overflow: hidden;
}
figure.photo .slab {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--concrete);
  padding: var(--space-2);
}
figure.photo .frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
figure.photo figcaption {
  border-top: 1px solid var(--line);
  background: var(--white);
  color: var(--concrete);
  padding: 0.6rem 0.9rem;
}

/* Fixed frame shapes so mixed aspect ratios don't wreck the page */
.frame-tall     { aspect-ratio: 3 / 4; }
.frame-wide     { aspect-ratio: 16 / 10; }
.frame-standard { aspect-ratio: 4 / 3; }

/* =============================================================
   SECTIONS — shared bones
   ============================================================= */
.section { padding: var(--space-5) 0; }
.section--white { background: var(--white); border-block: 1px solid var(--line); }

.section .kicker {
  color: var(--royal);
  margin: 0 0 var(--space-1);
}
.section h2 { font-size: var(--step-2); }

/* =============================================================
   WHAT WE BUILD — narrow heading column beside a plain list.
   No cards, no icons. A ruled list like a spec sheet.
   ============================================================= */
.work-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.work-list li {
  border-top: 1px solid var(--line);
  padding: var(--space-2) 0;
}
.work-list li:last-child { border-bottom: 1px solid var(--line); }
.work-list a {
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.work-list a:hover .work-list__name { color: var(--royal); }
.work-list__name {
  font-family: var(--font-head);
  font-size: var(--step-1);
  display: block;
}
.work-list__note {
  color: var(--concrete);
  display: block;
  margin-top: 0.25rem;
}

@media (min-width: 56rem) {
  .split {
    display: grid;
    grid-template-columns: 4fr 8fr;
    gap: var(--space-4);
  }
}

/* =============================================================
   FAMILY — copy plus a big offset pull quote.
   The quote pushes right and breaks the margin on desktop.
   ============================================================= */
.family blockquote {
  margin: var(--space-4) 0 0;
  padding-left: var(--space-3);
  border-left: 3px solid var(--royal);
}
.family blockquote p {
  font-family: var(--font-head);
  font-size: var(--step-2);
  line-height: 1.3;
  margin-bottom: var(--space-2);
}
.family cite {
  font-style: normal;
  color: var(--concrete);
}

@media (min-width: 56rem) {
  .family__inner {
    display: grid;
    grid-template-columns: 6fr 6fr;
    gap: var(--space-4);
  }
  .family blockquote {
    margin-top: var(--space-5); /* sits lower than the copy on purpose */
  }
}

/* =============================================================
   RECENT WORK STRIP — three slots, three widths, three heights.
   Stacked on phones. Deliberately not a matched grid.
   ============================================================= */
.strip {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-3);
}
@media (min-width: 56rem) {
  .strip { grid-template-columns: 4fr 3fr 5fr; align-items: start; }
  .strip > :nth-child(2) { margin-top: var(--space-4); }
  .strip > :nth-child(3) { margin-top: var(--space-2); }
}
.strip-footer {
  margin-top: var(--space-3);
}

/* =============================================================
   BLUE BAND — the one loud moment on the page.
   ============================================================= */
.band--blue {
  background: var(--royal);
  color: var(--white);
  padding: var(--space-5) 0;
}
.band--blue h2 {
  font-size: var(--step-2);
  max-width: 22ch;
}
.band--blue p {
  max-width: 46ch;
}
.band--blue a { color: var(--white); }
.band__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin-top: var(--space-3);
}

/* =============================================================
   FOOTER — dark concrete. License line gets its own row,
   set apart, because Florida says it has to be there.
   ============================================================= */
.site-footer {
  background: var(--ink);
  color: #cfcbc4;
  padding: var(--space-5) 0 var(--space-3);
  font-size: var(--step--1);
}
.site-footer a { color: var(--white); }
.footer-grid {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
@media (min-width: 56rem) {
  .footer-grid { grid-template-columns: 5fr 4fr 3fr; }
}
.site-footer h3 {
  color: var(--white);
  font-size: var(--step-0);
  margin-bottom: var(--space-1);
}
.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-nav li { padding: 0.2rem 0; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }

address { font-style: normal; }

.license-line {
  border-top: 1px solid #43474c;
  border-bottom: 1px solid #43474c;
  padding: var(--space-2) 0;
  margin-bottom: var(--space-2);
  color: var(--white);
}
.colophon { color: #9d9992; }

/* =============================================================
   INNER PAGES — heads, services, gallery, forms, about.
   Everything below reuses the tokens at the top of this file.
   ============================================================= */

/* ---- page head: smaller than the home hero on purpose -------- */
.page-head { padding: var(--space-4) 0 var(--space-3); }
.page-head h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  max-width: 20ch;
  margin-bottom: var(--space-2);
}
.page-head .intro {
  font-size: var(--step-1);
  color: var(--concrete);
  max-width: 48ch;
  margin: 0;
}

/* =============================================================
   SERVICES — one ruled section per service. To add a service,
   copy a whole <section class="service"> block in services.html
   and edit the text. Add class="service--flip" to swap the photo
   to the left so the page doesn't zigzag on a fixed beat.
   ============================================================= */
.service {
  border-top: 1px solid var(--line);
  padding: var(--space-4) 0;
}
.service:last-of-type { border-bottom: 1px solid var(--line); }
.service h2 { font-size: var(--step-2); }
.service .service__body p { max-width: 52ch; }
.service ul {
  list-style: square;
  padding-left: 1.2rem;
  margin: var(--space-2) 0 0;
  color: var(--concrete);
}
.service li::marker { color: var(--royal); }
.service li { padding: 0.15rem 0; }

@media (min-width: 56rem) {
  .service__grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: var(--space-4);
    align-items: start;
  }
  .service--flip .service__grid { grid-template-columns: 5fr 7fr; }
  .service--flip .service__body { order: 2; }
}

/* =============================================================
   PROJECTS GALLERY — masonry via CSS columns, so phone photos
   of any shape stack cleanly. Two ways to use a slot:
   1. keep the .frame-* class for a uniform crop, or
   2. drop the frame class and let the photo keep its own shape.
   ============================================================= */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: var(--space-3) 0;
}
.filters button {
  font: inherit;
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}
.filters button:hover { border-color: var(--royal); color: var(--royal); }
.filters button[aria-pressed="true"] {
  background: var(--royal);
  border-color: var(--royal);
  color: var(--white);
}

.masonry {
  columns: 1;
  column-gap: var(--space-3);
}
@media (min-width: 40rem) { .masonry { columns: 2; } }
@media (min-width: 56rem) { .masonry { columns: 3; } }
.masonry figure.photo {
  break-inside: avoid;
  margin: 0 0 var(--space-3);
}
/* a frameless photo keeps its natural aspect ratio, whether it
   sits directly in the figure or inside a clickable button */
figure.photo > img,
figure.photo button.open img {
  position: static;
  width: 100%;
  height: auto;
}
.masonry figure.photo[hidden] { display: none; }

/* =============================================================
   CONTACT FORM — square fields, generous hit areas. The form
   posts to a static form service; see the comment in
   contact.html for wiring it up.
   ============================================================= */
.contact-grid {
  display: grid;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
}
@media (min-width: 56rem) {
  .contact-grid { grid-template-columns: 7fr 4fr; }
}
.form-row { display: grid; gap: var(--space-2); }
@media (min-width: 40rem) {
  .form-row--pair { grid-template-columns: 1fr 1fr; }
}
form .field { margin-bottom: var(--space-2); }
form label {
  display: block;
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 0.35rem;
}
form input,
form textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--concrete);
  padding: 0.7rem 0.8rem;
}
form textarea { min-height: 10rem; resize: vertical; }
form input:focus,
form textarea:focus {
  outline: 2px solid var(--royal);
  outline-offset: 1px;
}
form button.btn {
  font: inherit;
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
}
.form-note { color: var(--concrete); font-size: var(--step--1); }
/* honeypot field: hidden from people, present for bots */
.hp { position: absolute; left: -9999px; }

/* contact sidebar */
.reach { border: 1px solid var(--line); background: var(--white); padding: var(--space-3); }
.reach h2 { font-size: var(--step-1); }
.reach .big-phone {
  font-family: var(--font-head);
  font-size: var(--step-2);
  display: inline-block;
  margin-bottom: var(--space-2);
  text-decoration: none;
}

/* =============================================================
   ABOUT — narrative column beside an offset facts rail.
   ============================================================= */
.about-grid {
  display: grid;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
}
@media (min-width: 56rem) {
  .about-grid { grid-template-columns: 7fr 5fr; }
  .about-rail { margin-top: var(--space-5); } /* deliberately lower */
}
.about-grid .narrative p { max-width: 56ch; }
.facts {
  border: 1px solid var(--line);
  background: var(--white);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
}
.facts dl { margin: 0; }
.facts dt {
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--royal);
  margin-top: var(--space-2);
}
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 0.15rem 0 0; }

/* =============================================================
   TESTIMONIALS — real client quotes from the company brochure.
   One per page at most. Same rule-and-serif language as the
   pull quote on the home page, sized down a step.
   ============================================================= */
.testimonial {
  border-left: 3px solid var(--royal);
  padding-left: var(--space-3);
  margin: var(--space-4) 0;
  max-width: 44rem;
}
.testimonial p {
  font-family: var(--font-head);
  font-size: var(--step-1);
  line-height: 1.45;
  margin-bottom: var(--space-1);
}
.testimonial cite {
  font-style: normal;
  color: var(--concrete);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* =============================================================
   PROJECT DETAIL VIEW — click a gallery tile, get the story.
   Native <dialog>, no library. The button wraps the photo; the
   VIEW tag sits quiet in the corner until hover.
   ============================================================= */
.masonry button.open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
  font: inherit;
}
.masonry button.open .view-tag {
  position: absolute;
  right: 0;
  bottom: 0;
  background: var(--royal);
  color: var(--white);
  padding: 0.3rem 0.7rem;
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.85;
}
.masonry button.open:hover .view-tag,
.masonry button.open:focus-visible .view-tag { opacity: 1; }
.masonry button.open:focus-visible { outline: 2px solid var(--royal); outline-offset: 2px; }

dialog.project-dialog {
  border: 1px solid var(--line);
  border-top: 4px solid var(--royal);
  padding: 0;
  max-width: 46rem;
  width: calc(100% - 2rem);
  background: var(--white);
}
dialog.project-dialog::backdrop {
  background: rgb(35 38 42 / 0.6);
}
.detail { padding: var(--space-3); }
.detail .kicker { margin-bottom: var(--space-1); color: var(--royal); }
.detail h2 { font-size: var(--step-2); }
.detail__photos {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
}
@media (min-width: 40rem) {
  .detail__photos--pair { grid-template-columns: 1fr 1fr; align-items: start; }
}
.detail__photos img { border: 1px solid var(--line); }
.detail .testimonial { margin-bottom: 0; }
.dialog-close {
  position: sticky;
  bottom: 0;
  display: block;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 0.8rem;
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
}
.dialog-close:hover { background: var(--royal); color: var(--white); }
