/* AR Construction and Remodeling LLC
   Gold is sampled from the official logo. Type is San Francisco on Apple
   devices and Inter, its closest open equivalent, everywhere else. */
:root {
  --black: #000;
  --panel: #161513;
  --panel-raised: #201e1b;
  --line: #3a352d;
  --ivory: #f4eee2;
  --muted: #bdb4a5;
  --gold: #ca9731;
  --gold-light: #e5bd66;
  --display: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  --body: var(--display);
  --wrap: 1360px;
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(72px, 10vw, 144px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 110px; background: var(--black); }
body { margin: 0; background: var(--black); color: var(--ivory); font: 400 1.0625rem/1.65 var(--body); -webkit-font-smoothing: antialiased; }
img { display: block; width: 100%; height: auto; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; letter-spacing: -.03em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.6vw, 4.25rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 3.1rem); }
h3 { font-size: 1.4rem; line-height: 1.2; letter-spacing: -.02em; }
:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--section); }
.muted { color: var(--muted); }
.skip { position: absolute; left: 16px; top: -80px; z-index: 50; padding: 12px 20px; background: var(--gold); color: #000; }
.skip:focus { top: 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 28px; border: 1px solid var(--gold); border-radius: 4px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-gold { background: var(--gold); color: #000; }
.btn-gold:hover { background: var(--gold-light); border-color: var(--gold-light); }
.btn-line { border-color: rgba(244, 238, 226, .6); color: var(--ivory); background: rgba(0, 0, 0, .35); }
.btn-line:hover { border-color: var(--gold-light); color: var(--gold-light); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Header */
.header { position: sticky; top: 0; z-index: 20; pointer-events: none; }
.header .wrap > * { pointer-events: auto; }
.header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 104px; }
.brand { flex: none; display: block; }
.brand img { width: 121px; height: 86px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) { padding: 12px 16px; border-radius: 4px; text-decoration: none; font-weight: 500; transition: color .2s; }
.nav a:not(.btn):hover { color: var(--gold-light); }
.nav a[aria-current] { background: var(--panel-raised); color: var(--gold-light); }
.nav .btn { margin-left: 12px; min-height: 48px; padding-inline: 22px; white-space: nowrap; }
.menu { display: none; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 4px; background: none; color: var(--ivory); cursor: pointer; place-items: center; }
.menu svg { width: 24px; height: 24px; }

/* Hero: inset photographic panel */
.hero { position: relative; display: grid; align-items: end; min-height: min(760px, calc(100svh - 128px)); border-radius: 8px; overflow: hidden; isolation: isolate; background: #000; }
.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media { z-index: -2; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); overflow: hidden; border-radius: 6px; }
.hero-media img { object-fit: cover; object-position: 50% 100%; animation: settle 1.4s var(--ease) both; }
.hero::before { content: ""; position: absolute; inset: -2px; z-index: -1; background: linear-gradient(90deg, rgba(0,0,0,.8) 0%, rgba(0,0,0,.62) 45%, rgba(0,0,0,.05) 85%), linear-gradient(0deg, rgba(0,0,0,.4), transparent 50%); }
.hero-copy { max-width: 860px; padding: clamp(24px, 5vw, 72px); }
.hero-copy p { max-width: 56ch; margin: 24px 0 32px; font-size: clamp(1.0625rem, 1.4vw, 1.25rem); }
@keyframes settle { from { transform: scale(1.06); } to { transform: none; } }
.page-head { padding-block: clamp(48px, 7vw, 96px); }
.page-head p { max-width: 60ch; margin-top: 20px; font-size: 1.1875rem; color: var(--muted); }

/* About: the photograph takes the roof shape from the logo */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 112px); align-items: center; }
.about p { max-width: 56ch; margin: 28px 0 32px; font-size: 1.1875rem; color: var(--muted); }
.gable { position: relative; aspect-ratio: 1 / 1.12; filter: none; }
.gable img { position: absolute; inset: 0; height: 100%; object-fit: cover; clip-path: polygon(50% 3.5%, 100% 28.5%, 100% 100%, 0 100%, 0 28.5%); }
.gable svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.gable path { fill: none; stroke: var(--gold); stroke-width: 3; vector-effect: non-scaling-stroke; }

/* Services */
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head p { max-width: 56ch; margin-top: 16px; color: var(--muted); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.service-panel { display: flex; flex-direction: column; border-radius: 8px; overflow: hidden; background: var(--panel); }
.service-panel > img { aspect-ratio: 3 / 2; object-fit: cover; }
.service-panel div { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: clamp(24px, 3vw, 44px); }
.service-panel h3 { font-size: clamp(1.6rem, 2.4vw, 2.2rem); }
.service-panel ul { width: 100%; margin: 20px 0 32px; columns: 2; column-gap: 28px; color: var(--muted); }
.service-panel li { padding-block: 6px; break-inside: avoid; }
.service-panel .btn { margin-top: auto; }
.cards { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.card { grid-column: span 4; border-radius: 8px; overflow: hidden; background: var(--panel); }
.card.wide { grid-column: span 6; }
.card img { aspect-ratio: 4 / 3; object-fit: cover; }
.card div { padding: 28px; }
.card p { margin-top: 10px; color: var(--muted); }
.card.text { border: 1px solid var(--line); background: none; }
.alt { background: var(--panel); }
.alt .card { background: var(--panel-raised); }
.alt .card.text { background: none; }

/* Projects */
.gallery { columns: 3; column-gap: 20px; }
.gallery li { margin-bottom: 20px; break-inside: avoid; }
.shot { display: block; width: 100%; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--panel); color: inherit; font: inherit; text-align: left; cursor: zoom-in; }
.shot span { display: block; padding: 16px 20px; transition: color .2s; }
.shot:hover span { color: var(--gold-light); }
.preview { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 20px; }
.preview .shot { height: 100%; }
.preview img { height: clamp(320px, 38vw, 540px); object-fit: cover; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.filters button { min-height: 48px; padding: 10px 24px; border: 1px solid var(--line); border-radius: 4px; background: none; color: var(--ivory); font: 500 1rem var(--body); cursor: pointer; }
.filters button:hover { border-color: var(--gold); }
.filters [aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #000; }
dialog { width: min(1200px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 8px; background: var(--panel); color: var(--ivory); overflow: hidden; }
dialog::backdrop { background: rgba(0, 0, 0, .88); }
dialog img { height: calc(100dvh - 120px); object-fit: contain; background: #000; }
.viewer-bar { display: flex; align-items: center; gap: 8px; min-height: 72px; padding: 10px 14px; }
.viewer-bar p { flex: 1; line-height: 1.3; }
.viewer-bar button { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border: 1px solid var(--line); border-radius: 4px; background: none; color: inherit; cursor: pointer; }
.viewer-bar button:hover { border-color: var(--gold); color: var(--gold-light); }
.viewer-bar svg { width: 22px; height: 22px; }

/* Before and after sliders */
.gap { height: clamp(48px, 6vw, 88px); }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); max-width: 1160px; margin-inline: auto; }
.compare-item { margin: 0; }
.compare { position: relative; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: var(--panel); user-select: none; }
.compare img { position: absolute; inset: 0; height: 100%; object-fit: cover; pointer-events: none; }
.compare-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: var(--gold); pointer-events: none; }
.compare-line span { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--gold); color: #000; transform: translate(-50%, -50%); }
.compare-line svg { width: 28px; height: 28px; }
.tag { position: absolute; top: 16px; padding: 6px 14px; border-radius: 4px; background: rgba(0, 0, 0, .8); font-weight: 600; font-size: .9375rem; pointer-events: none; }
.tag-before { left: 16px; }
.tag-after { right: 16px; background: var(--gold); color: #000; }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; -webkit-appearance: none; appearance: none; }
.compare input::-webkit-slider-thumb { -webkit-appearance: none; width: 1px; height: 100%; }
.compare input::-moz-range-thumb { width: 1px; height: 100%; border: 0; }
.compare:has(input:focus-visible) { outline: 3px solid var(--gold-light); outline-offset: 3px; }
.compare-item figcaption { padding-top: 20px; }
.compare-item p { margin-top: 8px; color: var(--muted); }

/* Contact and footer */
.contact { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; padding: clamp(28px, 6vw, 88px); border-radius: 8px; background: var(--gold); color: #000; }
.contact p { max-width: 46ch; margin-top: 20px; font-size: 1.125rem; }
.contact :focus-visible { outline-color: #000; }
.ways a { display: flex; align-items: center; gap: 18px; min-height: 76px; padding: 12px 0; border-top: 1px solid rgba(0, 0, 0, .4); text-decoration: none; }
.ways li:last-child a { border-bottom: 1px solid rgba(0, 0, 0, .4); }
.ways svg { width: 26px; height: 26px; flex: none; }
.ways strong { display: block; font: 600 1.3rem/1.2 var(--display); letter-spacing: -.02em; }
.ways span { min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
.ways a:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.footer { padding-block: clamp(56px, 7vw, 96px) 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.4fr; gap: 48px; }
.footer-grid img { width: 250px; }
.footer h2 { margin-bottom: 14px; font-size: 1.25rem; }
.footer li a, .footer li span { display: inline-block; padding-block: 8px; color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.footer li a:hover { color: var(--gold-light); }
.legal { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9375rem; }
.callbar { display: none; }

/* Motion */
.header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--black); transform-origin: top; transition: transform .28s var(--ease); pointer-events: auto; }
.header.compact::before { transform: scaleY(.73); }
.brand { transform-origin: left center; transition: transform .28s var(--ease); }
.header.compact .brand { transform: translateY(-14px) scale(.76); }
.nav, .menu { transition: transform .28s var(--ease); }
.header.compact .nav { transform: translateY(-14px); }
.gable svg { clip-path: inset(-20px -20px -20px -20px); transition: clip-path 1.1s var(--ease) .15s; }
.gable svg.undrawn { clip-path: inset(-20px 50% -20px 50%); }
.btn, .filters button, .viewer-bar button { transition: background-color .2s, color .2s, border-color .2s, transform .15s var(--ease); }
.btn:active, .filters button:active, .viewer-bar button:active { transform: scale(.97); }
.shot img { transition: transform .45s var(--ease); }
.shot span { position: relative; background: var(--panel); }
@media (hover: hover) { .shot:hover img { transform: scale(1.025); } }
:root[data-vt="filter"] .header { view-transition-name: site-header; }
:root[data-vt="filter"] .callbar { view-transition-name: site-callbar; }
::view-transition-group(site-header), ::view-transition-group(site-callbar) { z-index: 10; }
::view-transition-group(*) { animation-duration: .32s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
::view-transition-old(*), ::view-transition-new(*) { animation-duration: .24s; }
::view-transition-old(photo), ::view-transition-new(photo) { width: 100%; height: 100%; object-fit: contain; }

@media (max-width: 960px) {
  .header.compact .brand { transform: translateY(-11px) scale(.76); }
  .header.compact .menu { transform: translateY(-11px); }
  .header.compact .nav { transform: none; }
  .js .header.compact .nav { top: 73%; }
  .js .menu { display: grid; }
  .js .nav { position: absolute; inset: 100% 0 auto; display: none; flex-direction: column; align-items: stretch; padding: 12px var(--gutter) 28px; background: var(--black); border-bottom: 1px solid var(--line); }
  .js .nav.open { display: flex; }
  .js .nav a:not(.btn) { padding: 16px 12px; font-size: 1.25rem; }
  .js .nav .btn { margin: 12px 0 0; }
  html:not(.js) .header .wrap, html:not(.js) .nav { flex-wrap: wrap; }
  .header .wrap { min-height: 84px; }
  .brand img { width: 98px; height: 70px; }
  .about, .contact { grid-template-columns: 1fr; }
  .card, .card.wide { grid-column: span 6; }
  .gallery { columns: 2; }
  .preview { grid-template-columns: 1fr 1fr; }
  .preview li:first-child { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .duo, .preview, .footer-grid, .compare-grid { grid-template-columns: 1fr; }
  .card, .card.wide { grid-column: 1 / -1; }
  .gallery { columns: 1; }
  .preview img { height: 340px; }
  .hero { min-height: calc(100svh - 170px); }
  .hero::before { background: linear-gradient(0deg, rgba(0,0,0,.88) 25%, rgba(0,0,0,.45)); }
  .hero .actions .btn { width: 100%; }
  .service-panel ul { columns: 1; }
  .ways strong { font-size: 1.15rem; }
  .ways a { gap: 14px; font-size: 1rem; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  html { scroll-padding-bottom: 88px; }
  .callbar { position: fixed; inset: auto 0 0; z-index: 15; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--black); border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; transition: none !important; }
}
