/* Cabinet IQ of Portland, homepage concept
   Design language: Classic Authority (#5) for type, spacing, composition, motion ONLY.
   Palette: Cabinet IQ's real brand colors from cabinetiq.com CSS
   (sage #898f7a, warm off-whites #f6f6f3 / #e9e7e1 / #dad7ca / #cac6b7, ink #2b2a26). */

:root {
  --porcelain: #f6f6f3;
  --pearl: #e9e7e1;
  --stone: #dad7ca;
  --linen: #cac6b7;
  --ink: #2b2a26;
  --ink-deep: #1e1d1a;
  --sage: #898f7a;
  --sage-deep: #6d735f;
  --sage-on-dark: #a8ad9b;
  --text-dark: #2b2a26;
  --text-body: #4c4a44;
  --text-muted: #6b6963;
  --text-light: rgba(246, 246, 243, 0.92);
  --text-light-muted: rgba(246, 246, 243, 0.62);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Lato', Helvetica, Arial, sans-serif;
  --wrap: min(90%, 1100px);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --nav-h: 80px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-body);
  background: var(--porcelain);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.container { width: var(--wrap); margin-inline: auto; }

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--sage-deep);
  margin-bottom: 1.1rem;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.15;
  color: var(--text-dark);
}
.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-sub { margin-top: 1.1rem; font-size: 1.02rem; color: var(--text-muted); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.nav__inner {
  width: var(--wrap);
  margin-inline: auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.nav__brand { display: flex; align-items: center; gap: 0.7rem; padding-block: 0.55rem; }
.nav__logo { width: auto; height: 30px; max-width: 60px; object-fit: contain; filter: brightness(0) invert(1); transition: filter 0.35s var(--ease); }
.nav__brand-text {
  font-family: var(--font-display);
  font-size: 1.12rem;
  color: var(--text-light);
  transition: color 0.35s var(--ease);
  white-space: nowrap;
}
.nav__brand-text em { font-style: italic; }
.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__link {
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  color: var(--text-light-muted);
  transition: color 0.25s var(--ease);
}
.nav__link:hover { color: var(--text-light); }
.nav__cta {
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  padding: 0.65rem 1.35rem;
  border: 1px solid rgba(246, 246, 243, 0.55);
  border-radius: 999px;
  color: var(--text-light);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.nav__cta:hover { background: var(--porcelain); color: var(--ink); border-color: var(--porcelain); }
.nav--solid { background: var(--porcelain); box-shadow: 0 1px 0 rgba(43, 42, 38, 0.08); }
.nav--solid .nav__logo { filter: none; }
.nav--solid .nav__brand-text { color: var(--ink); }
.nav--solid .nav__link { color: var(--text-muted); }
.nav--solid .nav__link:hover { color: var(--ink); }
.nav--solid .nav__cta { border-color: var(--ink); color: var(--ink); }
.nav--solid .nav__cta:hover { background: var(--ink); color: var(--porcelain); }
.nav--solid .nav__burger span { background: var(--ink); }

.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 300;
  position: relative;
}
.nav__burger span { display: block; width: 24px; height: 1.5px; background: var(--porcelain); margin-inline: auto; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background 0.3s var(--ease); }
.nav__burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--ink-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu__inner { text-align: center; padding: 2rem; }
.mobile-menu__link {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 2.8rem);
  color: var(--text-light);
  padding: 0.55rem 0;
}
.mobile-menu__divider { width: 48px; height: 1px; background: var(--sage); margin: 1.4rem auto; }
.mobile-menu__cta {
  display: inline-block;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  background: var(--sage);
  color: #fff;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.mobile-menu__contact { margin-top: 1.6rem; font-size: 0.9rem; color: var(--text-light-muted); line-height: 1.8; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.hero__media { position: absolute; inset: 0; }
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30, 29, 26, 0.82) 0%, rgba(30, 29, 26, 0.45) 34%, rgba(30, 29, 26, 0.08) 62%, rgba(30, 29, 26, 0.18) 100%);
}
.hero__content {
  position: relative;
  z-index: 2;
  width: var(--wrap);
  margin-inline: auto;
  padding-bottom: clamp(4.5rem, 9vh, 7rem);
  max-width: 1100px;
}
.hero__eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--sage-on-dark);
  margin-bottom: 1.3rem;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 6.2vw, 4.6rem);
  line-height: 1.08;
  color: var(--porcelain);
  margin-bottom: 1.4rem;
}
.hero__title em { font-style: italic; color: var(--sage-on-dark); }
.hero__sub {
  max-width: 560px;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  font-weight: 300;
  color: var(--text-light);
  margin-bottom: 2.2rem;
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero__caption {
  position: absolute;
  z-index: 2;
  right: clamp(1rem, 4vw, 3rem);
  bottom: clamp(1.2rem, 3vh, 2rem);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text-light-muted);
  max-width: 100%;
}
.hero__caption-rule { width: 42px; height: 1px; background: var(--sage-on-dark); flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn-pill__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
}
.btn-pill__icon svg { width: 13px; height: 13px; }
.btn-pill--solid { background: var(--sage); color: #fff; }
.btn-pill--solid .btn-pill__icon { background: rgba(255, 255, 255, 0.18); }
.btn-pill--solid:hover { background: var(--sage-deep); }
.btn-pill--ghost { border: 1px solid rgba(246, 246, 243, 0.55); color: var(--text-light); }
.btn-pill--ghost .btn-pill__icon { border: 1px solid rgba(246, 246, 243, 0.4); }
.btn-pill--ghost:hover { background: var(--porcelain); color: var(--ink); border-color: var(--porcelain); }
.btn-pill--ghost-light { border: 1px solid rgba(246, 246, 243, 0.55); color: var(--text-light); }
.btn-pill--ghost-light .btn-pill__icon { border: 1px solid rgba(246, 246, 243, 0.4); }
.btn-pill--ghost-light:hover { background: var(--porcelain); color: var(--ink); border-color: var(--porcelain); }

/* ---------- Intro ---------- */
.intro { background: var(--ink); padding-block: clamp(4rem, 8vw, 6.5rem); }
.intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.intro .eyebrow { color: var(--sage-on-dark); }
.intro__headline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.18;
  color: var(--porcelain);
}
.intro__right p { color: var(--text-light-muted); font-weight: 300; font-size: 1.02rem; }
.intro__right p + p { margin-top: 1.2rem; }

/* ---------- Services ---------- */
.services { background: var(--porcelain); padding-block: clamp(4rem, 8vw, 6.5rem); }
.services__split {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
}
.services__col-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text-dark);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--stone);
  margin-bottom: 1.6rem;
}
.services__list { list-style: none; }
.services__list li {
  display: flex;
  gap: 1.3rem;
  padding-block: 1.15rem;
  border-bottom: 1px solid var(--pearl);
}
.services__list li:last-child { border-bottom: none; }
.services__num {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--sage);
  font-size: 1.05rem;
  flex-shrink: 0;
  padding-top: 0.15rem;
}
.services__list strong { display: block; font-weight: 700; color: var(--text-dark); font-size: 1.02rem; margin-bottom: 0.25rem; }
.services__list p { font-size: 0.94rem; color: var(--text-muted); }
.services__list--plain li { display: list-item; list-style: none; font-size: 0.98rem; color: var(--text-body); }
.services__list--plain li::before { content: ""; display: inline-block; width: 18px; height: 1px; background: var(--sage); margin-right: 0.8rem; vertical-align: middle; }
.services__note { margin-top: 1.4rem; font-size: 0.88rem; color: var(--text-muted); font-style: italic; }

/* ---------- Feature splits ---------- */
.feature { background: var(--pearl); padding-block: clamp(4rem, 8vw, 6.5rem); }
.feature--flip { background: var(--porcelain); }
.feature__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.feature__media { overflow: hidden; }
.feature__media img { width: 100%; height: 100%; max-height: 640px; object-fit: cover; }
.feature__text p { font-size: 1rem; margin-top: 1.1rem; }
.feature__text .section-title { margin-top: 0; }

/* ---------- Process ---------- */
.process { background: var(--ink); padding-block: clamp(4rem, 8vw, 6.5rem); }
.process .eyebrow { color: var(--sage-on-dark); }
.process .section-title { color: var(--porcelain); }
.process .section-sub { color: var(--text-light-muted); }
.process__steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  counter-reset: step;
}
.process__step {
  border-top: 1px solid rgba(246, 246, 243, 0.18);
  padding-top: 1.4rem;
}
.process__num {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--sage-on-dark);
  margin-bottom: 0.8rem;
}
.process__step h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.45rem;
  color: var(--porcelain);
  margin-bottom: 0.6rem;
}
.process__step p { font-size: 0.92rem; font-weight: 300; color: var(--text-light-muted); }

/* ---------- Work ---------- */
.work { background: var(--porcelain); padding-block: clamp(4rem, 8vw, 6.5rem); }
.work__index { width: var(--wrap); margin-inline: auto; }
.work__row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(2.2rem, 4.5vw, 3.6rem);
  border-top: 1px solid var(--stone);
}
.work__row--flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
.work__row--flip .work__row-media { order: 2; }
.work__row--flip .work__row-text { order: 1; }
.work__row-media { overflow: hidden; }
.work__row-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 0.8s var(--ease); }
.work__row:hover .work__row-media img { transform: scale(1.03); }
.work__row-num {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--sage);
  font-size: 1.05rem;
  margin-bottom: 0.7rem;
}
.work__row-text h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  color: var(--text-dark);
  margin-bottom: 0.8rem;
}
.work__row-text p { font-size: 0.97rem; color: var(--text-muted); }

/* ---------- Reviews ---------- */
.reviews { background: var(--ink-deep); padding-block: clamp(4rem, 8vw, 6.5rem); }
.reviews .eyebrow { color: var(--sage-on-dark); }
.reviews .section-title { color: var(--porcelain); }
.reviews__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.review {
  border-top: 1px solid rgba(246, 246, 243, 0.18);
  padding-top: 1.6rem;
}
.review p {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text-light);
}
.review footer {
  margin-top: 1.2rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--sage-on-dark);
}

/* ---------- About ---------- */
.about { background: var(--pearl); padding-block: clamp(4rem, 8vw, 6.5rem); }
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.about__role { margin-top: 0.9rem; font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: var(--sage-deep); }
.about__right p { font-size: 1rem; }
.about__right p + p { margin-top: 1.1rem; }

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(160deg, var(--ink) 0%, var(--ink-deep) 100%);
  padding-block: clamp(4.5rem, 9vw, 7rem);
  text-align: center;
}
.cta .eyebrow { color: var(--sage-on-dark); }
.cta__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  color: var(--porcelain);
  margin-bottom: 1.2rem;
}
.cta__sub { max-width: 520px; margin-inline: auto; color: var(--text-light-muted); font-weight: 300; margin-bottom: 2.2rem; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }
.cta__address { margin-top: 2rem; font-size: 0.88rem; letter-spacing: 0.1em; color: var(--text-light-muted); }

/* ---------- Footer ---------- */
.footer { background: var(--ink-deep); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; border-top: 1px solid rgba(246, 246, 243, 0.08); }
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3rem);
  padding-bottom: 2.5rem;
}
.footer__logo { width: auto; height: 34px; max-width: 70px; object-fit: contain; filter: brightness(0) invert(1); margin-bottom: 1rem; }
.footer__tagline { font-family: var(--font-display); font-style: italic; color: var(--text-light-muted); font-size: 0.98rem; max-width: 240px; }
.footer__col h4 {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage-on-dark);
  margin-bottom: 1rem;
}
.footer__col a { display: block; color: var(--text-light-muted); font-size: 0.92rem; padding-block: 0.3rem; transition: color 0.25s var(--ease); }
.footer__col a:hover { color: var(--porcelain); }
.footer__col p { color: var(--text-light-muted); font-size: 0.92rem; line-height: 1.8; }
.footer__bottom { border-top: 1px solid rgba(246, 246, 243, 0.08); padding-top: 1.6rem; }
.footer__bottom p { font-size: 0.8rem; color: rgba(246, 246, 243, 0.4); }

/* ---------- Reveal animation base ---------- */
.reveal, .reveal-hero { opacity: 0; }
html.no-js .reveal, html.no-js .reveal-hero { opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .process__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reviews__grid { grid-template-columns: 1fr; max-width: 620px; }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .hero:not([style]) {
    height: auto;
    min-height: 100svh;
    padding-top: 6rem;
  }
  .hero__content { padding-bottom: 5.5rem; }
  .hero__caption { display: none; }
  .intro__grid, .feature__grid, .about__grid, .services__split { grid-template-columns: 1fr; }
  .feature--flip .feature__media { order: -1; }
  .work__row, .work__row--flip { grid-template-columns: 1fr; gap: 1.4rem; }
  .work__row--flip .work__row-media { order: 0; }
  .work__row--flip .work__row-text { order: 1; }
  .footer__col a { padding-block: 0.65rem; }
}

@media (max-width: 480px) {
  .hero:not([style]) { padding-top: 5rem; }
  .process__steps { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__ctas .btn-pill { width: 100%; justify-content: center; }
  .cta__actions .btn-pill { width: 100%; justify-content: center; }
}
