/* SW Contractor Solutions — page styles.
   Page classes are kept distinct from the sample-site mockups inside #work. */
:root {
  --bg: #F6F4F0;
  --bg-2: #ECE8E1;
  --ink: #1C1B19;
  --muted: #6E6A64;
  --line: #E1DCD3;
  --cream: #E1DCD3;
  --taupe: #8A7A66;
  --soft: #EFEAE2;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
  --max: 1240px;
  --gutter: 48px;
  --hdr: 84px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--hdr); -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { display: block; max-width: 100%; }
em { font-style: italic; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--taupe); outline-offset: 3px; }

/* Section label (shared with #work and #how) */
.label { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 12px; }
.label::before { content: ""; width: 28px; height: 1px; background: currentColor; }

/* Buttons */
.sw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 26px; border-radius: 999px; font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer; border: 1px solid transparent; background: none; white-space: nowrap; transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease); }
.sw-btn:hover { transform: translateY(-1px); }
.sw-outline { border-color: var(--ink); color: var(--ink); height: 42px; padding: 0 22px; }
.sw-outline:hover { background: var(--ink); color: #fff; }
.sw-light { background: #fff; color: var(--ink); }
.sw-light:hover { background: var(--bg); }
.sw-ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.sw-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.sw-dark { background: var(--ink); color: #fff; }
.sw-dark:hover { background: #33312d; }
.sw-dark[disabled] { opacity: .6; cursor: wait; transform: none; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-row.center { justify-content: center; }
.play { width: 0; height: 0; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(246,244,240,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.hdr { height: var(--hdr); display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 22px; text-decoration: none; color: var(--ink); }
.brand-mark { font-family: var(--serif); font-size: 40px; line-height: 1; letter-spacing: -.02em; }
.brand-name { font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; }
.hdr-actions { display: flex; align-items: center; gap: 18px; }
.menu-btn { width: 44px; height: 44px; display: grid; place-content: center; gap: 6px; background: none; border: 0; cursor: pointer; }
.menu-btn i { display: block; width: 26px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), opacity .2s; }
.menu-btn[aria-expanded="true"] i:nth-of-type(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] i:nth-of-type(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] i:nth-of-type(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Menu overlay */
.menu { position: fixed; inset: var(--hdr) 0 0; z-index: 49; background: var(--bg); overflow-y: auto; animation: menuIn .35s var(--ease); }
.menu[hidden] { display: none; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-8px); } }
.menu-inner { min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding-top: 48px; padding-bottom: 48px; }
.menu ul { list-style: none; }
.menu li { border-top: 1px solid var(--line); }
.menu li:last-child { border-bottom: 1px solid var(--line); }
.menu ul a { display: block; padding: 14px 0; font-family: var(--serif); font-size: clamp(40px, 6vw, 72px); line-height: 1.05; text-decoration: none; transition: padding .3s var(--ease), color .3s; }
.menu ul a:hover { padding-left: 14px; color: var(--taupe); }
.menu-foot { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 40px; color: var(--muted); }
.menu-foot a { text-decoration: none; }
body.menu-open { overflow: hidden; }

/* Hero */
.page-hero { position: relative; min-height: min(88vh, 860px); display: flex; align-items: flex-end; color: #fff; background: #2a2622; overflow: hidden; }
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20,18,15,.72) 0%, rgba(20,18,15,.25) 55%, rgba(20,18,15,.12) 100%); }
.hero-inner { position: relative; z-index: 2; width: 100%; padding-top: 140px; padding-bottom: 64px; }
.page-hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 8.4vw, 124px); line-height: .98; letter-spacing: -.015em; max-width: 12.5em; }
.hero-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-top: 36px; }
.hero-row p { max-width: 420px; font-size: 17px; color: var(--bg); opacity: .92; }

/* Who we are */
.about { padding: 140px 0; }
.about-grid { display: grid; grid-template-columns: 220px 1fr; gap: 40px; }
.about .label { padding-top: 16px; align-self: start; }
.about-text { font-family: var(--serif); font-size: clamp(30px, 3.6vw, 50px); line-height: 1.18; letter-spacing: -.005em; max-width: 21em; }

/* Services */
.services { padding: 140px 0 120px; }
.svc-head { padding-left: 260px; margin-bottom: 64px; }
.services h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5.2vw, 72px); line-height: 1.03; letter-spacing: -.01em; max-width: 14em; }
.svc-head p { color: var(--muted); margin-top: 18px; }
.svc-row { display: grid; grid-template-columns: 220px 1fr 1fr; gap: 40px; align-items: center; padding: 38px 0; border-top: 1px solid var(--line); }
.svc-row:last-child { border-bottom: 1px solid var(--line); }
.svc-row h3 { grid-column: 2; font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3vw, 42px); line-height: 1.1; transition: transform .4s var(--ease); }
.svc-row:hover h3 { transform: translateX(8px); }
.svc-row p { color: var(--muted); font-size: 15px; max-width: 440px; }
.svc-row p span { display: block; margin-top: 6px; color: var(--ink); opacity: .75; font-size: 14px; }

/* AI search */
.ai { padding: 120px 0; }
.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 90px; align-items: center; }
.ai h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 4.6vw, 64px); line-height: 1.03; letter-spacing: -.01em; margin: 20px 0 22px; }
.ai .lead { color: var(--muted); font-size: 18px; max-width: 520px; }
.ai .checks { list-style: none; margin-top: 32px; border-top: 1px solid var(--line); }
.ai .checks li { padding: 15px 0; border-bottom: 1px solid var(--line); display: flex; gap: 16px; }
.ai .checks li span { color: var(--muted); font-size: 13px; padding-top: 2px; }
.ai-card { background: #fff; border-radius: 24px; padding: 30px; box-shadow: 0 40px 80px -40px rgba(28,27,25,.3), 0 0 0 1px rgba(28,27,25,.05); }
.ai-card .q { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.ai-card .q b { color: var(--ink); font-weight: 500; }
.ai-card .badge { display: inline-block; font-size: 12px; font-weight: 600; background: var(--soft); padding: 5px 12px; border-radius: 999px; margin: 20px 0 12px; }
.ai-card .bar { height: 9px; border-radius: 5px; background: #EFECE7; margin: 9px 0; transform-origin: left; transform: scaleX(0); transition: transform .9s var(--ease); }
.ai-card .pick { margin-top: 20px; border: 1px solid var(--ink); border-radius: 14px; padding: 14px; display: flex; gap: 14px; align-items: center; opacity: 0; transform: translateY(14px); transition: all .7s .8s var(--ease); }
.ai-card .pick .n { width: 44px; height: 44px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 22px; flex: none; }
.ai-card .pick b { display: block; font-weight: 600; font-size: 15px; }
.ai-card .pick span { font-size: 13px; color: var(--muted); }
.ai-card.in .bar { transform: scaleX(1); }
.ai-card.in .pick { opacity: 1; transform: none; }

/* Process */
.process { padding: 80px 0 140px; }
.process-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 90px; align-items: center; }
.pimg { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 6px; background: var(--bg-2); }
.pimg img { width: 100%; height: 100%; object-fit: cover; }
.process h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 4.4vw, 62px); line-height: 1.03; letter-spacing: -.01em; margin: 20px 0 34px; }
.pstep { display: grid; grid-template-columns: 52px 1fr; padding: 20px 0; border-top: 1px solid var(--line); }
.pstep:last-child { border-bottom: 1px solid var(--line); }
.pstep b { font-family: var(--serif); font-weight: 400; font-size: 26px; color: var(--taupe); line-height: 1.2; }
.pstep h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.1; margin-bottom: 2px; }
.pstep p { color: var(--muted); }

/* Scroll reveal (only hides things when JS is running) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* Audit CTA */
.audit { background: var(--ink); color: #fff; padding: 140px 0 120px; text-align: center; }
.audit .eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #A4A4A3; }
.audit h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 7vw, 100px); line-height: 1; letter-spacing: -.015em; margin: 22px auto 26px; max-width: 11em; }
.audit p { color: var(--cream); max-width: 560px; margin: 0 auto 36px; }

/* Footer */
.site-footer { background: var(--ink); color: var(--cream); padding: 40px 0 48px; border-top: 1px solid rgba(225,220,211,.12); }
.brand-light { color: #fff; }
.tagline { max-width: 460px; margin: 22px 0 64px; font-size: 16px; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.site-footer h4 { font-size: 13px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 22px; }
.site-footer ul { list-style: none; display: grid; gap: 10px; }
.site-footer ul a { text-decoration: none; opacity: .9; transition: opacity .2s; }
.site-footer ul a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.copy { margin-top: 72px; padding-top: 26px; border-top: 1px solid rgba(225,220,211,.12); font-size: 14px; opacity: .7; }

/* Audit modal */
.audit-modal { margin: auto; width: min(640px, calc(100% - 32px)); max-height: calc(100% - 32px); border: 0; border-radius: 20px; background: var(--bg); color: var(--ink); padding: 0; box-shadow: 0 40px 100px -30px rgba(0,0,0,.55); }
.audit-modal::backdrop { background: rgba(28,27,25,.55); backdrop-filter: blur(3px); }
.audit-modal[open] { animation: modalIn .35s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px); } }
.audit-form { padding: 36px; }
.modal-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 26px; }
.modal-head h2 { font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1; }
.x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
.fields label { display: grid; gap: 6px; font-size: 13px; font-weight: 500; }
.fields input { font: inherit; font-size: 16px; padding: 10px 0; border: 0; border-bottom: 1px solid #C9C2B7; background: transparent; color: var(--ink); border-radius: 0; }
.fields input:focus { outline: none; border-bottom-color: var(--ink); }
.fields input::placeholder { color: #A39E96; }
.fields input.bad { border-bottom-color: #B4442C; }
.fields .hp { position: absolute; left: -9999px; }
.form-msg { min-height: 1.4em; margin: 18px 0 14px; font-size: 14px; color: var(--muted); }
.form-msg.err { color: #B4442C; }
.form-msg.ok { color: #4F6B3E; }
.audit-form .sw-dark { width: 100%; }

/* Responsive */
@media (max-width: 960px) {
  :root { --gutter: 24px; --hdr: 72px; }
  .about-grid, .ai-grid, .process-grid { grid-template-columns: 1fr; gap: 28px; }
  .ai-grid, .process-grid { gap: 48px; }
  .svc-head { padding-left: 0; }
  .svc-row { grid-template-columns: 1fr 1fr; gap: 24px; }
  .svc-row h3 { grid-column: 1; }
}
@media (max-width: 680px) {
  :root { --gutter: 16px; --hdr: 64px; }
  .brand { gap: 14px; }
  .brand-mark { font-size: 32px; }
  .brand-name { font-size: 10px; letter-spacing: .18em; }
  .hdr-actions { gap: 6px; }
  .sw-outline { height: 38px; padding: 0 16px; font-size: 14px; }
  .page-hero { min-height: 82vh; }
  .hero-inner { padding-bottom: 40px; }
  .hero-row { flex-direction: column; align-items: flex-start; gap: 24px; margin-top: 24px; }
  .hero-row p { font-size: 16px; }
  .about, .services { padding: 88px 0; }
  .ai { padding: 72px 0; }
  .process { padding: 40px 0 88px; }
  .pimg { aspect-ratio: 4 / 3; }
  .svc-row { grid-template-columns: 1fr; gap: 10px; padding: 28px 0; }
  .audit { padding: 96px 0 88px; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-cols > div:last-child { grid-column: 1 / -1; }
  .fields { grid-template-columns: 1fr; gap: 14px; }
  .audit-form { padding: 26px 20px; }
  .modal-head h2 { font-size: 32px; }
}
@media (max-width: 380px) {
  .brand-name { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
