/* Southland Painting Co. preview. Layout modelled on oahupropainters.com (split hero with an
   overlapping credentials card, slash-separated service tabs, square buttons, case-study block). */
:root {
  --bg: #f5f2ec;
  --paper: #ffffff;
  --ink: #1c1f24;
  --muted: #5a5f66;
  --navy: #24364f;
  --navy-dark: #172539;
  --navy-press: #101b2a;
  --line: rgba(0, 0, 0, .1);
  --star: #b4781e;
  --err: #a5321f;
  --wrap: 1200px;
  --pad: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Mona Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}
body.lb-open { overflow: hidden; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; font-stretch: 112%; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: 34px; }
h3 { font-size: 22px; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons: square, solid navy, background swap on hover (as on the reference) */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 24px;
  font: inherit; font-size: 14px; font-weight: 600; font-stretch: 108%;
  text-transform: uppercase; letter-spacing: .03em; text-decoration: none;
  border: 1.5px solid var(--navy); border-radius: 0; cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .1s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-solid { background: var(--navy); color: #fff; }
.btn-line { background: transparent; color: var(--navy); }
.btn-quiet { background: transparent; color: var(--muted); border-color: transparent; padding: 0 12px; }
.btn:active { transform: translateY(1px); }
.btn-solid:active { background: var(--navy-press); border-color: var(--navy-press); }
.btn-line:active { background: var(--navy-press); color: #fff; }
.btn:focus-visible, .tab:focus-visible, .g-item:focus-visible, .lb-btn:focus-visible, .icon-btn:focus-visible,
a:focus-visible, .check input:focus-visible + span, .seg input:focus-visible + span {
  outline: 2px solid var(--navy); outline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) {
  .btn-solid:hover { background: var(--navy-dark); border-color: var(--navy-dark); }
  .btn-line:hover { background: var(--navy); color: #fff; }
  .btn-quiet:hover { color: var(--ink); }
  .main-nav a:hover, .header-phone:hover { color: var(--navy); text-decoration-color: currentColor; }
  .text-link:hover { text-decoration-color: currentColor; }
  .tab:hover { color: var(--ink); }
  .g-item:hover img { transform: scale(1.03); }
  .cred:hover strong { text-decoration-color: currentColor; }
  .contact-list a:hover, .socials a:hover { color: var(--navy-dark); }
  .socials a:hover { background: var(--navy); color: #fff; }
  .check:hover span, .seg label:hover span { border-color: rgba(0,0,0,.35); }
  .lb-btn:hover { background: rgba(255,255,255,.16); }
  .topbar a:hover { text-decoration-color: currentColor; }
}

/* Top bar + header */
.topbar { background: var(--navy); color: #fff; font-size: 14px; text-align: center; }
.topbar p { padding: 8px 0; }
.topbar a { font-weight: 600; text-decoration: underline; text-decoration-color: rgba(255,255,255,.4); text-underline-offset: 3px; transition: text-decoration-color .2s; }
.site-header { position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 28px; height: 76px; }
.wordmark { font-size: 21px; font-weight: 650; font-stretch: 118%; text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; margin-right: auto; }
.wordmark span { font-weight: 400; color: var(--muted); }
.main-nav { display: flex; gap: 26px; font-size: 15px; }
.main-nav a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 6px; transition: color .2s, text-decoration-color .2s; }
.main-nav .nav-estimate { display: none; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-phone { font-weight: 600; font-size: 15px; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 6px; transition: color .2s, text-decoration-color .2s; white-space: nowrap; }
.header-cta { min-height: 46px; }
.icon-btn { display: none; width: 46px; height: 46px; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--navy); cursor: pointer; padding: 0; }
.menu-btn { flex-direction: column; gap: 5px; background: var(--navy); color: #fff; }
.menu-btn span { display: block; width: 20px; height: 2px; background: currentColor; transition: transform .25s ease, opacity .2s ease; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero { padding: 64px 0 0; background: var(--bg); }
.hero-grid { display: grid; grid-template-columns: 1fr 600px; gap: 0 56px; position: relative; padding-bottom: 64px; }
.hero-copy { align-self: center; padding: 0 0 24px; }
.hero h1 { font-size: 46px; }
.hero-copy > p { margin-top: 20px; font-size: 19px; color: var(--muted); max-width: 440px; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-photo { margin: 0; }
.hero-photo img { width: 600px; aspect-ratio: 4 / 3; object-fit: cover; }
.cred-card {
  position: absolute; right: calc(var(--pad) + 28px); bottom: 32px;
  display: flex; align-items: center; gap: 28px;
  background: var(--paper); border: 1px solid var(--line);
  padding: 22px 28px; font-size: 15px; line-height: 1.4;
}
.cred { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--muted); }
.cred strong { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: text-decoration-color .2s; }
.stars { color: var(--star); display: inline-flex; }
.cred-rule { width: 1px; align-self: stretch; background: var(--line); }

/* Services with slash tabs */
.services { padding: 112px 0 104px; border-bottom: 1px solid var(--line); }
.services-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 48px; }
.tabs { display: flex; align-items: baseline; gap: 14px; }
.tab { font: inherit; font-size: 26px; font-stretch: 112%; font-weight: 500; color: #8a8e94; background: none; border: 0; padding: 0 0 6px; cursor: pointer; position: relative; transition: color .2s; }
.tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--navy); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.tab.is-active { color: var(--ink); }
.tab.is-active::after { transform: scaleX(1); }
.tab-slash { color: #b9bcc0; font-size: 24px; }
.panel { display: grid; grid-template-columns: 440px 1fr; gap: 64px; align-items: center; }
.panel[hidden] { display: none; }
.panel.is-entering { animation: panelIn .35s ease both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.panel img { width: 440px; aspect-ratio: 4 / 5; object-fit: cover; }
.panel-body h3 { font-size: 28px; margin-bottom: 24px; }
.svc-note { margin: -12px 0 32px; color: var(--muted); font-size: 16px; max-width: 460px; }
.svc-list { list-style: none; margin: 0 0 36px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.svc-list li { padding: 14px 0; border-top: 1px solid var(--line); font-size: 18px; }
.svc-list li:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }

/* Cabinets case study */
.cabinets { padding: 112px 0; }
.cab-grid { display: grid; grid-template-columns: 1fr 300px 300px; gap: 28px; align-items: end; }
.cab-copy { align-self: center; padding-right: 36px; }
.cab-copy > p { margin-top: 16px; color: var(--muted); max-width: 400px; }
.cab-copy blockquote { margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.cab-copy blockquote p { font-size: 18px; }
.cab-copy cite { display: block; margin-top: 10px; font-style: normal; font-size: 14px; color: var(--muted); }
.cab-photo { margin: 0; }
.cab-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.cab-photo figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }
.cab-photo:last-child { transform: translateY(-48px); }

/* Gallery */
.work { padding: 104px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.work-head, .rev-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.text-link { font-size: 15px; font-weight: 600; color: var(--navy); text-decoration: underline; text-decoration-color: rgba(36,54,79,.3); text-underline-offset: 5px; transition: text-decoration-color .2s; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.g-item { display: block; width: 100%; padding: 0; border: 0; background: #ddd; cursor: zoom-in; overflow: hidden; aspect-ratio: 1; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }

/* Reviews */
.reviews { padding: 104px 0; }
.rev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.rev-head { grid-column: 1 / -1; padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.review { margin: 0; }
.review blockquote { margin: 0; }
.review p { font-size: 19px; line-height: 1.55; }
.review figcaption { margin-top: 16px; font-size: 14px; color: var(--muted); }

/* Estimate form: numbered steps (from nolanpainting.com scheduler), boxed inputs */
.estimate { padding: 104px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.est-grid { display: grid; grid-template-columns: 360px 1fr; gap: 72px; align-items: start; }
.est-intro p { margin-top: 16px; color: var(--muted); }
.est-intro a { color: var(--navy); font-weight: 600; white-space: nowrap; }
.est-form { border: 1px solid var(--line); padding: 36px 40px 40px; background: var(--bg); }
.steps { list-style: none; margin: 0 0 32px; padding: 0 0 20px; display: flex; gap: 28px; border-bottom: 1px solid var(--line); font-size: 15px; color: #8a8e94; }
.steps li { display: flex; align-items: center; gap: 10px; transition: color .25s; }
.steps li span { width: 28px; height: 28px; display: inline-grid; place-items: center; border: 1.5px solid currentColor; font-size: 13px; font-weight: 600; transition: background-color .25s, color .25s, border-color .25s; }
.steps li.is-current { color: var(--ink); }
.steps li.is-current span { background: var(--navy); border-color: var(--navy); color: #fff; }
.steps li.is-done { color: var(--navy); }
.step { border: 0; margin: 0; padding: 0; min-width: 0; }
.step.is-entering, .done.is-entering { animation: panelIn .3s ease both; }
.field { margin-bottom: 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.label em { color: var(--err); font-style: normal; }
.opt { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="tel"], input[type="email"], input[type="date"], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--paper); border: 1px solid rgba(0,0,0,.18); border-radius: 0;
  padding: 12px 14px; min-height: 50px; transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2324364f' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(36,54,79,.15); }
.field.has-err input { border-color: var(--err); }
.err { display: none; margin-top: 6px; font-size: 14px; color: var(--err); }
.field.has-err .err { display: block; }
.checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.check, .seg label { position: relative; cursor: pointer; }
.check input, .seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check span, .seg span {
  display: flex; align-items: center; min-height: 50px; padding: 0 14px; gap: 10px;
  background: var(--paper); border: 1px solid rgba(0,0,0,.18); font-size: 15px;
  transition: border-color .2s, background-color .2s, color .2s; user-select: none;
}
.check span::before { content: ""; width: 16px; height: 16px; flex: none; border: 1.5px solid rgba(0,0,0,.35); background: var(--paper) no-repeat center / 10px; transition: background-color .15s, border-color .15s; }
.check input:checked + span { border-color: var(--navy); background: #eef1f5; }
.check input:checked + span::before { background-color: var(--navy); border-color: var(--navy); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l3 3 5-6' stroke='white' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); }
.seg { display: flex; }
.seg label { flex: 1; }
.seg label + label span { border-left: 0; }
.seg span { justify-content: center; }
.seg input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.step-nav { display: flex; justify-content: flex-end; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.done { padding: 24px 0 8px; outline: none; }
.done h3 { font-size: 26px; }
.done p { margin: 14px 0 28px; color: var(--muted); max-width: 520px; }

/* Contact */
.contact { padding: 88px 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 48px; align-items: start; }
.contact h2 { font-size: 28px; }
.area { margin-top: 10px; color: var(--muted); }
.contact-list { margin: 0; display: grid; gap: 0; }
.contact-list div { display: grid; grid-template-columns: 96px 1fr; padding: 12px 0; border-top: 1px solid var(--line); }
.contact-list div:last-child { border-bottom: 1px solid var(--line); }
.contact-list dt { font-size: 14px; color: var(--muted); padding-top: 2px; }
.contact-list dd { margin: 0; }
.contact-list a { color: var(--navy); font-weight: 600; text-decoration: none; transition: color .2s; overflow-wrap: normal; }
.contact-side { display: grid; gap: 20px; justify-items: start; }
.socials { display: flex; gap: 10px; }
.socials a { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--navy); transition: background-color .2s, color .2s; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0 36px; font-size: 14px; color: var(--muted); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(12, 16, 22, .92); display: grid; place-items: center; opacity: 0; transition: opacity .25s ease; }
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lb-figure { margin: 0; transform: scale(.97); transition: transform .25s ease; }
.lightbox.is-open .lb-figure { transform: none; }
.lb-figure img { max-width: min(88vw, 1000px); max-height: 85vh; width: auto; height: auto; object-fit: contain; }
.lb-btn { position: absolute; width: 48px; height: 48px; display: grid; place-items: center; border: 0; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; transition: background-color .2s; }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; margin-top: -24px; }
.lb-next { right: 20px; top: 50%; margin-top: -24px; }

/* Tablet */
@media (max-width: 1100px) {
  .main-nav { gap: 18px; }
  .header-phone { display: none; }
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 0 40px; }
  .hero-photo img { width: 100%; }
  .hero h1 { font-size: 44px; }
  .hero-grid { padding-bottom: 56px; }
  .hero-copy { padding-bottom: 0; }
  .cred-card { position: static; grid-column: 1 / -1; justify-self: start; margin-top: 32px; }
  .svc-list { grid-template-columns: 1fr; }
  .svc-list li:nth-last-child(2) { border-bottom: 0; }
  .panel { grid-template-columns: 1fr 1fr; gap: 40px; }
  .panel img { width: 100%; }
  .cab-grid { grid-template-columns: 1fr 1fr; }
  .cab-copy { grid-column: 1 / -1; padding: 0 0 16px; }
  .cab-copy > p { max-width: 560px; }
  .est-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .contact-side { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; align-items: center; }
}
@media (max-width: 900px) {
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--pad) 24px;
    visibility: hidden; opacity: 0; transform: translateY(-8px); pointer-events: none;
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
  }
  .main-nav.is-open { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition: opacity .25s ease, transform .25s ease; }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .main-nav .nav-estimate { display: block; border-bottom: 0; color: var(--navy); font-weight: 600; }
  .header-cta { display: none; }
  .icon-btn { display: inline-flex; }
  .header-actions { gap: 6px; }
}

/* Phone */
@media (max-width: 680px) {
  :root { --pad: 16px; }
  body { font-size: 16px; }
  h2 { font-size: 27px; }
  .topbar { font-size: 13px; }
  .header-row { height: 64px; }
  .wordmark { font-size: 18px; }
  html { scroll-padding-top: 72px; }
  .hero { padding: 0; }
  .hero-grid { display: block; padding: 0; position: relative; }
  .hero .wrap { padding: 0; }
  .hero-photo { position: relative; }
  .hero-photo img { width: 100%; aspect-ratio: 4 / 3.4; }
  .hero-copy { padding: 28px var(--pad) 8px; }
  .hero h1 { font-size: 34px; }
  .hero-copy > p { font-size: 17px; margin-top: 14px; }
  .hero-buttons { margin-top: 24px; flex-direction: column; }
  .hero-buttons .btn { width: 100%; }
  .hero-grid { display: flex; flex-direction: column; }
  .hero-photo { order: -1; }
  .cred-card { position: static; margin: 20px var(--pad) 0; flex-direction: column; align-items: stretch; gap: 14px; padding: 18px 20px; }
  .cred-rule { width: auto; height: 1px; }
  .services, .cabinets, .work, .reviews, .estimate { padding: 64px 0; }
  .hero + .services { margin-top: 48px; }
  .services-head { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 28px; padding-bottom: 20px; }
  .tab { font-size: 21px; }
  .panel { grid-template-columns: 1fr; gap: 24px; }
  .panel img { aspect-ratio: 4 / 3; }
  .panel-body h3 { display: none; }
  .svc-list { grid-template-columns: 1fr; margin-bottom: 28px; }
  .svc-list li { font-size: 17px; padding: 12px 0; }
  .svc-list li:nth-last-child(2) { border-bottom: 0; }
  .panel-body .btn { width: 100%; }
  .cab-grid { gap: 14px; }
  .cab-photo:last-child { transform: none; }
  .cab-photo figcaption { font-size: 13px; }
  .work-head, .rev-head { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 24px; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 8px; }
  .rev-grid { grid-template-columns: 1fr; }
  .rev-head { margin-bottom: 28px; }
  .review + .review { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--line); }
  .review p { font-size: 17px; }
  .est-form { padding: 24px 18px 24px; margin: 0 calc(var(--pad) * -1); border-left: 0; border-right: 0; min-height: 0; }
  .steps { gap: 14px; font-size: 14px; }
  .steps li span { width: 26px; height: 26px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .checks { grid-template-columns: 1fr 1fr; }
  .step-nav .btn-solid { flex: 1; }
  .contact { padding: 64px 0; }
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .contact-side { grid-auto-flow: row; }
  .lb-prev, .lb-next { top: auto; bottom: 24px; margin-top: 0; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
