/* Atta Girl Renovations: styled after the original Google Site (Gentium title, Lato body, photo banners). */
:root {
  --text: #212121;
  --muted: #5f5f5f;
  --link: #1d6fa5;
  --brand: #4a2422;      /* the leather-book burgundy from the logo */
  --brand-tan: #c9b28c;
  --line: #e4e4e4;
  --max: 1160px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Lato, "Segoe UI", Arial, sans-serif; font-size: 16px; line-height: 1.6; color: var(--text); background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }

/* ---- Header (sits over the banner like the Google Site) */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 10px 24px; }
.site-header .logo img { width: 120px; height: auto; }
.site-header nav > ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; align-items: center; }
.site-header nav a { color: #fff; text-decoration: none; font-weight: 300; padding: 6px 10px; display: inline-block; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.site-header nav a:hover { text-decoration: underline; }
.site-header nav a[aria-current="page"] { font-weight: 700; }
.has-sub { position: relative; }
.sub-toggle { background: none; border: 0; color: #fff; cursor: pointer; font-size: 14px; padding: 4px; margin-left: -8px; }
.sub { display: none; position: absolute; right: 0; top: 100%; background: #fff; list-style: none; margin: 0; padding: 8px 0; min-width: 330px; max-height: 70vh; overflow-y: auto; box-shadow: 0 6px 24px rgba(0,0,0,.25); border-radius: 4px; }
.sub a { color: var(--text) !important; text-shadow: none !important; display: block !important; padding: 7px 18px !important; font-size: 15px; font-weight: 400 !important; }
.sub a:hover { background: #f3f3f3; text-decoration: none !important; }
.sub a[aria-current="page"] { font-weight: 700 !important; }
.has-sub:hover .sub, .has-sub:focus-within .sub, .has-sub.open .sub { display: block; }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; box-shadow: 0 1px 2px rgba(0,0,0,.4); }

/* ---- Banner */
.banner { position: relative; min-height: 260px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 90px 24px 40px; background-size: cover; background-position: center; background-color: #22343d; color: #fff; }
.banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.6), rgba(0,0,0,.38) 45%, rgba(0,0,0,.38)); }
.banner.tall { min-height: 340px; }
.banner.short { min-height: 230px; }
.banner h1 { position: relative; margin: 0; font-family: "Gentium Book Plus", "Gentium Basic", Georgia, serif; font-weight: 400; letter-spacing: 2px; line-height: 1.15; font-size: clamp(2rem, 5.2vw, 4.2rem); text-shadow: 0 2px 8px rgba(0,0,0,.35); }
.banner.short h1 { font-size: clamp(1.7rem, 3.6vw, 3rem); max-width: 1000px; }

main { max-width: var(--max); margin: 0 auto; padding: 36px 24px 24px; }
h2 { font-weight: 300; font-size: 2rem; color: #37708f; margin: 28px 0 10px; }

/* ---- Home tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.tile { text-decoration: none; color: var(--text); text-align: center; }
.tile-img { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: #eee; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.tile:hover .tile-img img { transform: scale(1.03); }
.tile-label { display: inline-block; margin-top: 10px; text-decoration: underline; font-size: 15px; }

/* ---- Text pages */
.prose p { margin: 0 0 1em; }
.prose.narrow { max-width: 820px; margin: 0 auto; }
.prose h2 { font-size: 1.4rem; }
.two-col { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
.side-photo { margin: 0; }
.button { display: inline-block; background: var(--brand); color: #fff; padding: 10px 22px; border-radius: 4px; text-decoration: none; }
.button:hover { background: #5e302d; }

/* ---- Contact */
.form-wrap { max-width: 820px; margin: 10px auto 0; }
.form-wrap iframe { width: 100%; height: 1150px; border: 0; }
.form-alt { text-align: center; color: var(--muted); font-size: 14px; }

/* ---- Previous Work list */
.project { display: grid; grid-template-columns: minmax(0, 460px) 1fr; gap: 36px; align-items: start; padding: 24px 0; }
.project + .project { border-top: 1px solid var(--line); }
.project-img img { width: 100%; }
.project h2 { margin: 0 0 8px; font-size: 2.2rem; }
.project h2 a { color: #37708f; }

/* ---- Project photo pages */
.crumb { margin: 0 0 8px; color: var(--muted); }
.crumb a { text-decoration: none; }
.lead { max-width: 900px; }
.gallery-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.photo { display: block; overflow: hidden; background: #eee; max-height: 420px; }
.photo img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: opacity .2s; }
.photo:hover img { opacity: .9; }

/* ---- Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 94vw; max-height: 88vh; width: auto; height: auto; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 40px; cursor: pointer; padding: 10px 18px; opacity: .85; }
.lightbox button:hover { opacity: 1; }
.lb-close { top: 6px; right: 10px; }
.lb-prev { left: 6px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 6px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #ccc; font-size: 14px; }

/* ---- Footer */
.site-footer { text-align: center; color: var(--text); padding: 30px 20px 40px; font-size: 15px; }
.site-footer p { margin: 2px 0; }

/* ---- Small screens */
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .site-header nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.25); max-height: calc(100vh - 80px); overflow-y: auto; }
  .site-header.open nav { display: block; }
  .site-header nav > ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0; }
  .site-header nav a { color: var(--text); text-shadow: none; display: block; padding: 10px 22px; }
  .has-sub { display: flex; flex-wrap: wrap; }
  .has-sub > a { flex: 1; }
  .sub-toggle { color: var(--text); padding: 8px 22px; margin: 0; }
  .sub { position: static; box-shadow: none; min-width: 0; width: 100%; max-height: none; padding: 0 0 8px 12px; display: none; }
  .has-sub:hover .sub, .has-sub:focus-within .sub { display: none; }
  .has-sub.open .sub { display: block; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .two-col { grid-template-columns: 1fr; }
  .side-photo { max-width: 360px; margin: 0 auto; }
  .project { grid-template-columns: 1fr; gap: 12px; }
  .project h2 { font-size: 1.7rem; }
  .photo { flex-basis: 100% !important; max-height: none; }
}

/* ---- Contact form (posts to /api/contact) */
.contact-form { display: grid; gap: 16px; max-width: 640px; margin-top: 14px; }
.contact-form label { display: grid; gap: 6px; font-weight: 700; font-size: .95rem; }
.contact-form .optional { font-weight: 400; color: var(--muted); }
.contact-form input, .contact-form textarea { font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid #cfcfcf; border-radius: 4px; background: #fff; color: var(--text); }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--link); outline-offset: 1px; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form button { cursor: pointer; border: 0; font: inherit; font-weight: 700; padding: 11px 30px; }
.cf-note { display: none; padding: 12px 16px; border-radius: 4px; }
.cf-note:target { display: block; }
.cf-note.ok { background: #e8f5ec; color: #1f6b3a; border: 1px solid #b9dfc5; }
.cf-note.err { background: #fdecea; color: #8a1f17; border: 1px solid #f3c2bd; }
