/* Sarasota Cabinets and Design, homepage concept.
   Design language: Nordic Minimal (structure, spacing, motion, restraint).
   Palette and type: THEIRS. Warm sand, taupe and near black sampled from
   sarasotacabinetsanddesign.com computed styles; Old Standard TT + Karla are
   the fonts their own site loads. No invented hues; their brand is monochrome
   plus one warm sand. No em dashes anywhere in this file. */

:root {
  /* their near blacks */
  --ink:        #161616;
  --ink-2:      #1b1b1b;
  --ink-3:      #232323;
  /* their lights */
  --paper:      #f7f7f7;
  --white:      #ffffff;
  /* their one warm accent, plus a deepened member of the same family */
  --sand:       #dfd3c4;
  --sand-deep:  #887152;
  --taupe:      #786f61;
  /* their greys */
  --grey:       #707070;
  --line:       #a4a4a4;

  --text-dark:        #161616;
  --text-body:        #5e5e5e;
  --text-muted:       #707070;
  --text-light:       rgba(255, 255, 255, 0.9);
  /* 0.58 -> 0.78: nav links and hero sub sit over a near-white ceiling
     photo and sampled 2.80:1 / 4.44:1 (rule 51) */
  --text-light-muted: rgba(255, 255, 255, 0.78);
  --hair-dark:        rgba(22, 22, 22, 0.12);
  --hair-light:       rgba(255, 255, 255, 0.16);

  --font-display: 'Old Standard TT', Georgia, serif;
  --font-body:    'Karla', -apple-system, BlinkMacSystemFont, sans-serif;

  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --wrap:  min(90%, 1100px);
  --wrapw: min(94%, 1320px);
  --pad:   clamp(3.5rem, 7vw, 6.5rem);
  --nav-h: 78px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
::selection { background: var(--sand); color: var(--ink); }

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ol, ul { list-style: none; }

.wrap  { width: var(--wrap);  margin-inline: auto; }
.wrap--wide { width: var(--wrapw); margin-inline: auto; }
.section { padding-block: var(--pad); }
.section--dark  { background: var(--ink); color: var(--text-light-muted); }
.section--paper { background: var(--paper); }

/* ---------- type ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--text-dark);
}
.section--dark h1,
.section--dark h2,
.section--dark h3 { color: var(--paper); }

h1 {
  font-size: clamp(2.7rem, 7vw, 5.3rem);
  line-height: 1.04;
}
h2 {
  font-size: clamp(1.95rem, 4vw, 3.05rem);
  line-height: 1.14;
}
h3 {
  font-size: 1.06rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.85rem;
  font-family: var(--font-body);
  font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--taupe);
}
.eyebrow::before {
  content: ""; width: 2rem; height: 1px;
  background: currentColor; opacity: 0.6; flex-shrink: 0;
}
.section--dark .eyebrow { color: var(--sand); }
.eyebrow--light { color: var(--sand); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.7rem;
  min-height: 48px;
  padding: 0.85rem 1.7rem;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  transition: background 0.45s var(--ease), color 0.45s var(--ease),
              border-color 0.45s var(--ease);
}
.btn__dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; opacity: 0.55;
  transition: transform 0.45s var(--ease);
}
.btn:hover .btn__dot { transform: translateX(3px); }

.btn--sand    { background: var(--sand); color: var(--ink); }
.btn--sand:hover { background: var(--white); }
.btn--outline { border-color: rgba(255, 255, 255, 0.35); color: var(--paper); }
.btn--outline:hover { border-color: var(--sand); color: var(--sand); }
.btn--ghost   { border-color: var(--hair-light); color: var(--paper); }
.btn--ghost:hover { border-color: var(--sand); color: var(--sand); }
.nav--solid .btn--ghost { border-color: var(--hair-dark); color: var(--ink); }
.nav--solid .btn--ghost:hover { border-color: var(--taupe); color: var(--taupe); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 400;
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}
/* The burger lives inside .nav, so .nav's z-index caps it. While the menu is
   open the whole bar has to rise above the overlay or the close control is
   unreachable (GEMINI rule 20). The bar goes transparent so it never covers
   the menu content underneath it. */
body.menu-open .nav { z-index: 460; }
body.menu-open .nav,
body.menu-open .nav--solid {
  background: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  border-bottom-color: transparent;
}
body.menu-open .brand__mark { filter: brightness(0) invert(1); }
body.menu-open .brand__name { color: var(--paper); }

.nav--solid {
  background: rgba(247, 247, 247, 0.94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom-color: var(--hair-dark);
}
.nav__inner {
  width: var(--wrapw); margin-inline: auto;
  min-height: var(--nav-h);
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem);
}
.brand { display: inline-flex; align-items: center; gap: 0.85rem; margin-right: auto; }
.brand__mark {
  height: 34px; width: auto; max-width: 26px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  transition: filter 0.5s var(--ease);
}
.nav--solid .brand__mark { filter: none; }
.brand__name {
  font-family: var(--font-display);
  font-size: 0.82rem; line-height: 1.25;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--paper);
  transition: color 0.5s var(--ease);
}
.nav--solid .brand__name { color: var(--ink); }

.nav__links { display: flex; gap: clamp(1.2rem, 2.4vw, 2.2rem); }
.nav__links a {
  position: relative;
  font-size: 0.78rem; font-weight: 400;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-light-muted);
  padding-block: 0.4rem;
  transition: color 0.4s var(--ease);
}
.nav--solid .nav__links a { color: var(--text-muted); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--sand-deep);
  transition: width 0.45s var(--ease);
}
.nav__links a:hover { color: var(--sand); }
.nav--solid .nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { width: 100%; }

.burger {
  display: none;
  position: relative; z-index: 460;
  width: 46px; height: 46px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.burger span {
  display: block; width: 22px; height: 1px;
  background: var(--paper);
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease), background 0.4s var(--ease);
}
.nav--solid .burger span { background: var(--ink); }
body.menu-open .burger span { background: var(--paper); }
body.menu-open .burger span:first-child { transform: translateY(3.5px) rotate(45deg); }
body.menu-open .burger span:last-child  { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- mobile menu ---------- */
.menu {
  position: fixed; inset: 0; z-index: 450;
  background: var(--ink);
  display: flex; flex-direction: column; justify-content: center;
  gap: 2.5rem;
  padding: calc(var(--nav-h) + 2rem) 8vw 3rem;
  opacity: 0; visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s var(--ease);
}
body.menu-open .menu { opacity: 1; visibility: visible; }
.menu__links { display: flex; flex-direction: column; gap: 0.4rem; }
.menu__links a {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 8vw, 2.6rem);
  line-height: 1.3;
  color: var(--paper);
  padding-block: 0.35rem;
}
.menu__links a:hover { color: var(--sand); }
.menu__foot {
  display: flex; flex-direction: column; gap: 0.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--hair-light);
}
.menu__foot a {
  font-size: 0.9rem; color: var(--text-light-muted);
  padding-block: 0.65rem;
}
.menu__foot a:hover { color: var(--sand); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  /* mid-band lifted (0.34 -> 0.56): hero eyebrow/sub sat in the thin part of the
     scrim over a near-white ceiling photo and read 4.44-4.45:1 (rule 51) */
  background: linear-gradient(to top,
    rgba(22, 22, 22, 0.9) 0%,
    rgba(22, 22, 22, 0.7) 42%,
    rgba(22, 22, 22, 0.56) 74%,
    rgba(22, 22, 22, 0.68) 100%);
}
.hero__inner {
  position: relative; z-index: 2;
  width: var(--wrapw); margin-inline: auto;
  padding-top: calc(var(--nav-h) + 4rem);
  padding-bottom: clamp(5.5rem, 11vw, 8rem);
}
/* Sized in rem, not ch: a ch max-width here would resolve against the body
   font and strangle the display-size h1. The h1 carries its own ch measure. */
.hero__copy { max-width: min(100%, 46rem); }
.hero h1 { color: var(--paper); margin-top: 1.5rem; max-width: 13ch; }
.hero__sub {
  margin-top: 1.5rem; max-width: 46ch;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  color: var(--text-light-muted);
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.4rem; }

.hero__rail {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  width: var(--wrapw); margin-inline: auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hair-light);
}
.hero__rail li {
  padding: 1.15rem 0.35rem;
  font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--text-light-muted);
  border-left: 1px solid var(--hair-light);
  text-align: center;
}
.hero__rail li:first-child { border-left: 0; }

/* ---------- approach ---------- */
.approach__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.approach__head { margin-top: 1.4rem; max-width: 14ch; }
.approach__body p {
  font-size: clamp(1.04rem, 1.5vw, 1.22rem);
  line-height: 1.8;
  color: var(--text-light);
}
.approach__owner {
  margin-top: 1.6rem; padding-top: 1.6rem;
  border-top: 1px solid var(--hair-light);
  font-size: 0.98rem !important;
  color: var(--text-light-muted) !important;
}

/* ---------- signature viewer ---------- */
.project__head { margin-top: 1.3rem; max-width: 18ch; }
.project__lede {
  margin-top: 1.2rem; max-width: 52ch;
  font-size: 1.03rem; color: var(--text-body);
}
.viewer { margin-top: clamp(2.4rem, 5vw, 3.6rem); }
.viewer__stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink-2);
  overflow: hidden;
}
.viewer__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transition: opacity 0.75s var(--ease);
}
.viewer__img.is-active { opacity: 1; }

.viewer__bar {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1.2rem, 3vw, 3rem);
  align-items: center;
  padding-top: 1.35rem;
  border-top: 1px solid var(--hair-dark);
  margin-top: 1.35rem;
}
.viewer__tabs { display: flex; gap: 0.4rem; }
.viewer__tab {
  display: inline-flex; align-items: center; gap: 0.55rem;
  min-height: 44px;
  padding: 0.6rem 1.15rem;
  background: none; border: 1px solid var(--hair-dark);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.viewer__tab:hover { color: var(--ink); border-color: var(--taupe); }
.viewer__tab.is-active {
  background: var(--ink); border-color: var(--ink); color: var(--paper);
}
/* opacity 0.6 pushed the inactive tab numeral to 2.30:1 on white (rule 51);
   hierarchy is carried by the smaller size instead */
.viewer__num { font-size: 0.62rem; letter-spacing: 0.1em; }
.viewer__caption {
  font-size: 0.96rem; color: var(--text-body);
  transition: opacity 0.4s var(--ease);
}
.viewer__caption.is-swapping { opacity: 0; }

/* ---------- pieces ---------- */
.pieces__head { margin-top: 1.3rem; }
.pieces__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.2rem, 2.6vw, 2rem);
  margin-top: clamp(2.4rem, 5vw, 3.4rem);
}
.piece__img { overflow: hidden; background: var(--ink-2); }
.piece__img img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform 1.2s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .piece:hover .piece__img img { transform: scale(1.04); }
}
.piece figcaption {
  margin-top: 0.9rem;
  font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- what we build ---------- */
.build__head { margin-top: 1.3rem; }
.build__grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--hair-light);
  border-left: 1px solid var(--hair-light);
  margin-top: clamp(2.4rem, 5vw, 3.4rem);
}
.svc {
  padding: clamp(1.5rem, 2.6vw, 2.1rem) clamp(1.1rem, 2vw, 1.6rem);
  border-right: 1px solid var(--hair-light);
  border-bottom: 1px solid var(--hair-light);
}
.svc__icon { width: 26px; height: 26px; color: var(--sand); }
.svc h3 { margin-top: 1.1rem; }
.svc p {
  margin-top: 0.5rem;
  font-size: 0.9rem; line-height: 1.6;
  color: var(--text-light-muted);
}
.build__note {
  margin-top: 1.8rem;
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--sand);
}

/* ---------- process ---------- */
.process__head { margin-top: 1.3rem; }
.process__list { margin-top: clamp(2.2rem, 4.5vw, 3rem); }
.step {
  display: grid; grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: baseline;
  padding-block: clamp(1.05rem, 2vw, 1.4rem);
  border-top: 1px solid var(--hair-dark);
}
.step:last-child { border-bottom: 1px solid var(--hair-dark); }
.step__num {
  font-family: var(--font-display);
  font-size: 0.95rem; letter-spacing: 0.1em;
  color: var(--sand-deep);
}
.step__text {
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 2vw, 1.5rem);
  line-height: 1.4;
  color: var(--text-dark);
}

/* ---------- team ---------- */
.team__head { margin-top: 1.3rem; }
.team__grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.2rem, 2.6vw, 2rem);
  margin-top: clamp(2.4rem, 5vw, 3.4rem);
}
.member__img { overflow: hidden; background: var(--ink-2); }
.member__img img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.member figcaption { display: flex; flex-direction: column; margin-top: 1rem; }
.member__name {
  font-family: var(--font-display);
  font-size: 1.15rem; color: var(--text-dark);
}
.member__role {
  margin-top: 0.25rem;
  font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--taupe);
}
.member__bio {
  margin-top: 0.7rem;
  font-size: 0.9rem; line-height: 1.6;
  color: var(--text-body);
}

/* ---------- cta ---------- */
.cta__inner { max-width: 44rem; }
.cta__head { margin-top: 1.3rem; }
.cta__sub {
  margin-top: 1.3rem; max-width: 46ch;
  font-size: clamp(1.02rem, 1.4vw, 1.14rem);
  color: var(--text-light-muted);
}
.cta__btns { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }

/* ---------- footer ---------- */
.foot { background: var(--ink-2); color: var(--text-light-muted); padding-block: clamp(3rem, 6vw, 4.5rem) 0; }
.foot__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.8rem, 4vw, 3rem);
  align-items: start;
}
.foot__brand img {
  height: 96px; width: auto; max-width: 150px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.82;
}
.foot__col { display: flex; flex-direction: column; }
.foot__label {
  font-size: 0.64rem; font-weight: 500;
  letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 0.7rem;
}
.foot__col a, .foot__col span {
  font-size: 0.9rem; line-height: 1.6;
  padding-block: 0.2rem;
  word-break: break-word;
}
.foot__col a { padding-block: 0.65rem; transition: color 0.4s var(--ease); }
.foot__col a:hover { color: var(--sand); }
.foot__base {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-block: 1.5rem;
  border-top: 1px solid var(--hair-light);
  font-size: 0.78rem;
}

/* ---------- 404 ---------- */
.error {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  background: var(--ink);
  padding-top: var(--nav-h);
}
.error__inner { max-width: 42rem; }
.error__code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 18vw, 11rem);
  line-height: 1;
  color: var(--sand);
  opacity: 0.22;
}
.error h1 { color: var(--paper); margin-top: 1rem; font-size: clamp(2.1rem, 5vw, 3.4rem); }
.error p {
  margin-top: 1.2rem; max-width: 44ch;
  color: var(--text-light-muted);
}
.error .btn { margin-top: 2.2rem; }

/* ---------- motion (scoped to html.js so no-JS shows everything) ---------- */
html.js .reveal { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; }
  .viewer__img, .viewer__caption, .piece__img img { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .build__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .nav__links, .nav__cta { display: none; }
  .burger { display: flex; }
  .pieces__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team__grid  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .approach__grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .approach__head { max-width: none; }
}
@media (max-width: 768px) {
  .hero { align-items: flex-end; }
  .hero__inner { padding-top: calc(var(--nav-h) + 3rem); padding-bottom: clamp(5rem, 16vw, 7rem); }
  .hero__copy { max-width: none; }
  .build__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .viewer__bar { grid-template-columns: 1fr; gap: 1rem; }
  .viewer__tabs {
    overflow-x: auto; flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .viewer__tabs::-webkit-scrollbar { display: none; }
  .viewer__tabs > * { flex-shrink: 0; }
}
@media (max-width: 620px) {
  /* The rail wraps to two rows here, so the hero copy needs to clear both
     or the last CTA sits on top of it. */
  .hero__inner { padding-bottom: 10rem; }
  .hero__rail { grid-template-columns: repeat(2, 1fr); }
  .hero__rail li:nth-child(3) { border-left: 0; }
  .hero__rail li:nth-child(-n + 2) { border-bottom: 1px solid var(--hair-light); }
  .hero__ctas .btn, .cta__btns .btn { width: 100%; justify-content: center; }
  .pieces__grid { grid-template-columns: 1fr; }
  .build__grid  { grid-template-columns: 1fr; }
  .step { grid-template-columns: 2.6rem minmax(0, 1fr); gap: 1rem; }
  .foot__grid { grid-template-columns: 1fr; }
  .viewer__stage { aspect-ratio: 4 / 3; }
}
@media (max-width: 420px) {
  .team__grid { grid-template-columns: 1fr; }
}
