/* Colors come from the Saturnia Isles home: white counters, warm plaster walls, and wood slats. Dusty blue and cream complement them. */
:root {
  --quartz: #f8f6f2;
  --plaster: #ebe6dd;
  --ink: #26221e;
  --ink-soft: #5d554c;
  --blue: #537089;
  --slat: #79502f;
  --cream: #f7ead7;
  --line: rgba(38, 34, 30, .18);
  --line-dark: rgba(248, 246, 242, .5);
  --display: 'Tenor Sans', 'Optima', 'Gill Sans', sans-serif;
  --body: 'Hanken Grotesk', 'Segoe UI', sans-serif;
  --gutter: clamp(1.25rem, 4.5vw, 4.5rem);
  --section: clamp(4.5rem, 9vw, 8.5rem);
  --header: 5.25rem;
  --ease: cubic-bezier(.22, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--quartz); color: var(--ink); font: 400 1.0625rem/1.65 var(--body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--slat); outline-offset: 4px; }
.on-dark :focus-visible { outline-color: var(--cream); }

h1, h2, h3 { font-family: var(--display); font-weight: 400; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 4.7vw, 4.75rem); line-height: 1.06; letter-spacing: -.02em; }
h2 { font-size: clamp(2rem, 3.6vw, 3.4rem); line-height: 1.12; letter-spacing: -.015em; }
h3 { font-size: 1.45rem; line-height: 1.25; }
p { text-wrap: pretty; }

.wrap { max-width: 96rem; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.plaster { background: var(--plaster); }
.on-dark { background: var(--blue); color: var(--quartz); }
.lead { max-width: 36rem; font-size: 1.1875rem; line-height: 1.6; color: var(--ink-soft); }
.on-dark .lead { color: var(--quartz); }
.section-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.5rem clamp(2rem, 6vw, 6rem); align-items: end; margin-bottom: clamp(2.25rem, 4.5vw, 4rem); }
.skip { position: absolute; left: 1rem; top: -5rem; z-index: 60; padding: .75rem 1rem; background: var(--ink); color: var(--quartz); }
.skip:focus { top: 1rem; }

/* Buttons and links */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: .75rem 1.75rem; border: 1px solid var(--blue); background: var(--blue); color: var(--quartz); text-decoration: none; font-weight: 500; transition: background .3s, color .3s, border-color .3s; }
.btn:hover { background: var(--slat); border-color: var(--slat); }
.on-dark .btn { background: var(--cream); border-color: var(--cream); color: var(--ink); }
.on-dark .btn:hover { background: var(--ink); border-color: var(--ink); color: var(--quartz); }
.link { display: inline-block; padding-block: .3rem; text-decoration: none; font-weight: 500; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size .4s var(--ease); }
.link:hover { background-size: 35% 1px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2rem; }

/* Header */
#site-header { position: sticky; top: 0; z-index: 40; min-height: var(--header); background: var(--quartz); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: var(--header); }
.logo { display: inline-flex; align-items: center; gap: .9rem; text-decoration: none; }
.logo svg { width: 2.5rem; height: 2.5rem; flex: none; fill: var(--slat); }
.logo-name { display: block; font: 400 1.22rem/1.1 var(--display); letter-spacing: .15em; text-transform: uppercase; }
.logo-sub { display: block; margin-top: .3rem; font-size: .78rem; line-height: 1; color: var(--ink-soft); white-space: nowrap; }
.nav { display: flex; align-items: center; gap: clamp(1.5rem, 2.6vw, 2.75rem); }
.nav a { padding-block: .6rem; text-decoration: none; font-weight: 500; font-size: 1rem; }
.nav a:not(.btn):hover, .nav a[aria-current]:not(.btn) { color: var(--slat); }
.nav a[aria-current]:not(.btn) { box-shadow: 0 1px 0 var(--slat); }
.nav .btn { min-height: 2.875rem; padding: .5rem 1.35rem; }
.menu-btn { display: none; min-height: 2.75rem; padding: .4rem 1rem; border: 1px solid var(--line); background: none; font-weight: 500; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: min(calc(100svh - var(--header)), 58rem); }
.hero-text { display: flex; flex-direction: column; justify-content: center; gap: 1.75rem; padding: 3.5rem clamp(2rem, 4vw, 4.5rem) 3.5rem max(var(--gutter), calc((100vw - 96rem) / 2 + var(--gutter))); }
.hero-media { position: relative; min-height: 30rem; }
.hero-media .ba, .hero-media .ba-stage { position: absolute; inset: 0; aspect-ratio: auto; }

/* Before and after */
.ba-stage { position: relative; overflow: hidden; aspect-ratio: 5 / 4; background: var(--plaster); user-select: none; -webkit-user-select: none; touch-action: pan-y; cursor: pointer; }
.ba-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-after { position: absolute; inset: 0; clip-path: inset(0 100% 0 0); will-change: clip-path; }
.ba.comparing .ba-stage { cursor: ew-resize; }
.ba-tag { position: absolute; top: 1.25rem; z-index: 3; padding: .4rem .95rem; background: var(--blue); color: var(--quartz); font-size: .9375rem; font-weight: 500; line-height: 1.4; transition: opacity .35s; pointer-events: none; }
.ba-tag-before { left: 1.25rem; }
.ba-tag-after { right: 1.25rem; background: var(--cream); color: var(--ink); }
.ba-tag.off { opacity: 0; }
.ba-handle { position: absolute; top: 0; bottom: 0; left: 50%; z-index: 4; width: 3.5rem; margin-left: -1.75rem; padding: 0; border: 0; background: linear-gradient(var(--quartz), var(--quartz)) center / 2px 100% no-repeat; cursor: ew-resize; touch-action: none; }
.ba-handle::after { content: ''; position: absolute; top: 50%; left: 50%; width: 3.5rem; height: 3.5rem; margin: -1.75rem; border-radius: 50%; background: var(--quartz) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2326221e' stroke-width='1.6'%3E%3Cpath d='M9 7l-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E") center / 1.6rem no-repeat; }
.ba-handle:focus-visible { outline: none; }
.ba-handle:focus-visible::after { box-shadow: 0 0 0 3px var(--blue), 0 0 0 6px var(--cream); }
.ba-replay { position: absolute; right: 1.25rem; bottom: 1.25rem; z-index: 4; min-height: 2.75rem; padding: .5rem 1.1rem; border: 0; background: var(--quartz); color: var(--ink); font-size: 1rem; font-weight: 500; transition: opacity .4s, background .3s; }
.ba-replay:hover { background: var(--blue); color: var(--quartz); }
.ba-replay:disabled { opacity: 0; }

.ba-show { display: grid; grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem); gap: clamp(1.75rem, 3.5vw, 3.5rem); align-items: end; }
.ba-show .ba-stage { max-height: min(80svh, 56rem); width: 100%; }
.ba-panel { display: grid; gap: 2rem; }
.ba-rooms { border-top: 1px solid var(--line-dark); }
.ba-rooms button { display: block; width: 100%; padding: 1rem 0; border: 0; border-bottom: 1px solid var(--line-dark); background: none; text-align: left; font: 400 1.45rem/1.3 var(--display); color: var(--quartz); transition: color .3s, padding .4s var(--ease); }
.ba-rooms button:hover { padding-left: 1rem; }
.ba-rooms button[aria-pressed=true] { color: var(--quartz); padding-left: 1rem; box-shadow: inset 3px 0 0 var(--cream); }
.ba-note { min-height: 3.3em; color: var(--quartz); }
.ba-controls { display: grid; grid-template-columns: 1fr 1fr; gap: .625rem; }
.ba-controls button { min-height: 3.125rem; padding: .5rem .75rem; border: 1px solid var(--line-dark); background: none; color: var(--quartz); font-weight: 500; transition: background .25s, color .25s, border-color .25s; }
.ba-controls button:hover { border-color: var(--cream); }
.ba-controls button[aria-pressed=true] { background: var(--cream); border-color: var(--cream); color: var(--ink); }
.ba-controls .wide { grid-column: 1 / -1; }

/* Featured project and project cards */
.project-card { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(1.75rem, 3.5vw, 3.5rem); align-items: end; text-decoration: none; }
.project-card + .project-card { margin-top: clamp(3.5rem, 7vw, 7rem); }
.frame { overflow: hidden; background: var(--plaster); }
.frame img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 1.2s var(--ease); }
a:hover .frame img, .shot:hover img { transform: scale(1.025); }
.project-card h3 { margin-bottom: .75rem; font-size: clamp(1.9rem, 3vw, 2.9rem); }
.project-card p { color: var(--ink-soft); }
.project-card .link { margin-top: 1.5rem; color: var(--ink); }

/* Services */
.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.25rem, 2vw, 2rem); }
.services img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.services h3 { margin: 1.4rem 0 .6rem; }
.services p { color: var(--ink-soft); }

/* Process */
.process { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: step; border-top: 1px solid var(--line); }
.process li { counter-increment: step; padding: 1.75rem 2rem 0 0; }
.process li::before { content: counter(step); display: block; margin-bottom: 1.75rem; font: 400 1.25rem/1 var(--display); color: var(--slat); }
.process h3 { margin-bottom: .6rem; }
.process p { color: var(--ink-soft); }

/* Team */
.team { display: grid; grid-template-columns: repeat(2, minmax(0, 26rem)); gap: clamp(1.5rem, 4vw, 4rem); }
.team a { display: block; text-decoration: none; }
.portrait { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
/* Brightens Alex's photo, which was taken in lower light. Remove this line when you replace the photo. */
.portrait[src*="alex-figueroa"] { filter: brightness(1.1); }
.team h3 { margin-top: 1.4rem; font-size: 1.75rem; }
.team p { color: var(--ink-soft); }
.team .link { margin-top: .9rem; color: var(--ink); }
.team-split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.team-split .section-head { display: block; margin: 0; }
.team-split .lead { margin-top: 1.5rem; }

.profile { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 7rem); align-items: center; }
.profile-text { max-width: 42rem; }
.role { margin: .9rem 0 2rem; font-size: 1.25rem; color: var(--slat); }
.profile-text p + p { margin-top: 1.1rem; }
.profile-text .actions { margin-top: 2.25rem; }
.focus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 6vw, 6rem); }
.focus li { padding-block: 1.6rem; border-top: 1px solid var(--line); }
.focus h3 { margin-bottom: .4rem; }
.focus p { color: var(--ink-soft); }

/* Inner pages */
.page-head { padding-block: clamp(3.5rem, 7vw, 6.5rem) clamp(2.5rem, 4.5vw, 4rem); }
.page-head .lead { margin-top: 1.5rem; }
.project-hero img { width: 100%; height: min(78svh, 54rem); object-fit: cover; }
.story { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 2.5rem clamp(2rem, 6vw, 6rem); }
.story-text { display: grid; gap: 1.25rem; max-width: 44rem; font-size: 1.1875rem; }
.facts div { padding-block: 1rem; border-top: 1px solid var(--line); }
.facts dt { font-size: .9375rem; color: var(--ink-soft); }

/* Gallery */
.gallery-group + .gallery-group { margin-top: clamp(3.5rem, 6vw, 6rem); }
.gallery-group h3 { margin-bottom: 1.5rem; font-size: clamp(1.5rem, 2.2vw, 2rem); }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.75rem, 1.4vw, 1.5rem); }
.shot { overflow: hidden; padding: 0; border: 0; background: var(--plaster); cursor: zoom-in; }
.shot img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 1.2s var(--ease); }
.shot:nth-child(odd):first-child, .shot:only-child { grid-column: 1 / -1; }
.gallery[data-even] .shot:first-child { grid-column: auto; }
.gallery:not([data-even]) .shot:first-child img { aspect-ratio: 2 / 1; }

.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #131a20; color: var(--quartz); }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lightbox::backdrop { background: #131a20; }
.lb-top, .lb-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem var(--gutter); }
.lightbox img { width: 100%; height: 100%; object-fit: contain; }
.lightbox button { min-height: 2.75rem; padding: .4rem 1.1rem; border: 1px solid var(--line-dark); background: none; color: inherit; font-weight: 500; white-space: nowrap; }
.lightbox button:hover { background: var(--cream); border-color: var(--cream); color: var(--ink); }
.lb-caption { max-width: 48rem; text-align: center; font-size: 1rem; }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 7vw, 8rem); }
.contact-lines { display: grid; margin-top: 2.5rem; }
.contact-lines div { padding-block: 1.1rem; border-top: 1px solid var(--line); }
.contact-lines dt { font-size: .9375rem; color: var(--ink-soft); }
.contact-lines dd { font-family: var(--display); font-size: clamp(1.15rem, 1.8vw, 1.45rem); overflow-wrap: anywhere; }
.contact-lines a { text-decoration: none; }
.contact-lines a:hover { color: var(--slat); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; margin-bottom: .45rem; font-weight: 500; }
.form label span { color: var(--ink-soft); font-weight: 400; }
.form input, .form select, .form textarea { width: 100%; min-height: 3.25rem; padding: .75rem 1rem; border: 1px solid rgba(38, 34, 30, .5); border-radius: 0; background: #fff; }
.form textarea { min-height: 9.5rem; resize: vertical; }
.form-note { color: var(--ink-soft); font-size: 1rem; }
.form-status { padding: 1rem 1.25rem; background: var(--plaster); }

/* Closing call to action and footer */
.cta { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem clamp(2rem, 6vw, 6rem); align-items: end; }
.cta .lead { margin-bottom: 1.75rem; }
#site-footer { background: var(--blue); color: var(--quartz); }
.foot { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 2.5rem; padding-block: 4rem 3rem; border-top: 1px solid var(--line-dark); }
#site-footer .logo { color: var(--quartz); }
#site-footer .logo svg { fill: var(--cream); }
#site-footer .logo-sub { color: var(--quartz); }
.foot ul { display: grid; gap: .25rem; align-content: start; }
.foot li { padding-block: .1rem; }
.foot ul a { display: inline-block; padding-block: .3rem; text-decoration: none; overflow-wrap: anywhere; }
.foot ul a:hover { text-decoration: underline; text-underline-offset: .3em; }
.legal { display: flex; flex-wrap: wrap; gap: .5rem 2rem; padding-bottom: 2rem; font-size: .9375rem; }

@media (max-width: 64rem) {
  .services, .process { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; }
  .process { border-top: 0; }
  .process li { margin-right: 1.5rem; padding-right: 0; border-top: 1px solid var(--line); }
  .ba-show { grid-template-columns: minmax(0, 1fr); }
  .ba-panel { gap: 1.5rem; }
  .ba-note { min-height: 0; }
  .team-split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 52rem) {
  :root { --header: 4.5rem; }
  .menu-btn { display: block; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: .75rem var(--gutter) 1.75rem; background: var(--quartz); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding-block: .9rem; border-bottom: 1px solid var(--line); font: 400 1.4rem/1.3 var(--display); box-shadow: none; }
  .nav .btn { margin-top: 1.25rem; min-height: 3.25rem; }
  .logo { gap: .7rem; }
  .logo svg { width: 2.1rem; height: 2.1rem; }
  .logo-name { font-size: 1rem; }
  .logo-sub { font-size: .75rem; }

  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-text { gap: 1.25rem; padding: 2.25rem var(--gutter) 2rem; }
  .hero-media { min-height: 0; aspect-ratio: 1; }
  .section-head, .project-card, .profile, .story, .contact, .cta, .foot { grid-template-columns: minmax(0, 1fr); }
  .ba-show .ba-stage { width: calc(100% + 2 * var(--gutter)); max-width: none; margin-inline: calc(-1 * var(--gutter)); }
  .ba-tag { top: .875rem; }
  .ba-tag-before { left: .875rem; }
  .ba-tag-after { right: .875rem; }
  .project-hero img { height: 62svh; }
  .lb-bottom { flex-wrap: wrap; }
  .lb-caption { order: -1; width: 100%; }
}

@media (max-width: 34rem) {
  .services, .process, .focus, .form { grid-template-columns: minmax(0, 1fr); }
  .services img { aspect-ratio: 3 / 2; }
  .process li { margin-right: 0; }
  .process li::before { margin-bottom: .9rem; }
  .team { gap: 1rem; }
  .team h3 { font-size: 1.3rem; }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery .shot:first-child img { aspect-ratio: 3 / 2 !important; }
  .hero-text .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
