:root {
  --ink: #000;
  --muted-ink: #555;
  --rule: #cdcccc;
  --link: #397994;
  --content-width: 1200px;
  --text-width: 900px;
  --rhythm: 3rem;
  --page-gutter: clamp(1rem, 4vw, 2.5rem);
}

* {
  box-sizing: border-box;
}

html {
  background: #fff;
  color: var(--ink);
  font-family: "Rubik", sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

body {
  margin: 0;
  min-width: 320px;
  background: #fff;
  overflow-x: hidden;
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header,
.section-rule,
.content-wrap {
  width: min(calc(100% - (var(--page-gutter) * 2)), var(--content-width));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--rhythm);
  margin-top: 2rem;
  padding-top: env(safe-area-inset-top);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 1.34rem;
  min-width: 0;
}

.brand-logo-link {
  flex: 0 0 auto;
}

.brand-logo {
  width: 90px;
  height: auto;
}

.site-title {
  margin: 0;
  font-family: "Roboto", sans-serif;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 500;
  line-height: 1.1;
}

.site-title a {
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.menu-toggle,
.menu-close {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
}

.menu-toggle {
  display: none;
  padding: 0;
  width: 44px;
  height: 44px;
}

.menu-icon {
  display: grid;
  gap: 4px;
  width: 24px;
  padding: 3px 0;
}

.menu-icon span {
  display: block;
  height: 1.5px;
  background: currentColor;
}

.nav-panel {
  display: block;
}

.menu-backdrop {
  display: none;
}

.menu-close {
  display: none;
  width: 44px;
  height: 44px;
}

.menu-close svg {
  display: block;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: clamp(0.72rem, 1.2vw, 0.8rem);
  line-height: 1.2;
}

.nav-list a {
  text-decoration: none;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.nav-list a:focus-visible,
.menu-toggle:focus-visible,
.menu-close:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.section-rule {
  height: 1px;
  border: 0;
  margin-top: var(--rhythm);
  margin-bottom: 0;
  background: var(--rule);
}

.content-wrap {
  max-width: var(--text-width);
  margin-top: var(--rhythm);
  padding-bottom: 54.08px;
  overflow-wrap: anywhere;
}

h1,
h2 {
  max-width: var(--text-width);
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 300;
  line-height: 1.2;
}

p {
  margin: 0;
}

.intro-copy {
  margin-top: var(--rhythm);
  text-align: center;
  text-wrap: pretty;
}

.room-grid,
.storage-grid {
  display: grid;
  gap: var(--rhythm);
  margin-top: var(--rhythm);
}

.room-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

figure {
  margin: 0;
}

.room-grid img,
.storage-grid img {
  width: 100%;
}

.storage-section {
  margin-top: var(--rhythm);
}

.storage-copy p {
  max-width: var(--text-width);
  margin-top: var(--rhythm);
  font-size: 16px;
  line-height: 25.6px;
  text-wrap: pretty;
}

.storage-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

figcaption {
  margin: 0.36rem 0 0.72rem;
  color: var(--muted-ink);
  font-size: 0.72rem;
  line-height: 1.6;
  text-align: center;
}

.site-footer {
  width: min(calc(100% - (var(--page-gutter) * 2)), var(--text-width));
  margin: var(--rhythm) auto 0;
  padding: 16px 0;
  color: var(--link);
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

.site-footer hr {
  height: 1px;
  margin: 0 0 16px;
  border: 0;
  background: var(--rule);
}

.site-footer p {
  color: #0869ae;
}

.listing-page > h1,
.contact-page > h1 {
  text-align: center;
}

.door-grid,
.gallery-grid,
.finish-grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin-top: var(--rhythm);
}

.door-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.door-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.door-grid figcaption {
  text-align: left;
}

.door-grid figcaption strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
}

.door-grid figcaption span {
  color: var(--muted-ink);
}

.finish-grid {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1rem;
}

.finish-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.gallery-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.home-hero {
  max-width: 42rem;
}

.home-hero h1 {
  font-size: clamp(2.3rem, 6vw, 4rem);
  line-height: 1.16;
}

.home-hero h1 strong {
  color: #826f6b;
  font-weight: 400;
}

.home-hero p {
  max-width: 36rem;
  margin-top: 1.25rem;
  color: var(--muted-ink);
}

.contact-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-top: 1.5rem;
  padding: 0.65rem 1.25rem;
  background: #b7c8cf;
  color: #fff;
  text-decoration: none;
}

.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--rhythm);
  margin-top: 4rem;
}

.home-feature-grid figure {
  display: grid;
  grid-template-columns: minmax(5rem, 40%) 1fr;
  align-items: center;
  gap: 1rem;
}

.home-feature-grid figure img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.home-feature-grid figcaption {
  color: #2b3a4d;
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-align: left;
}

.home-feature-grid figcaption span {
  color: #b7c8cf;
  font-size: 0.72em;
  letter-spacing: 0;
}

.home-image {
  grid-column: 1 / -1;
  width: 100%;
  max-height: 32rem;
  object-fit: cover;
}

.about-page h2,
.contact-page h2 {
  margin-top: 2.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
}

.about-page p {
  max-width: 48rem;
  margin-top: 1rem;
  color: var(--muted-ink);
}

.about-collage,
.about-image {
  width: 100%;
  margin-top: var(--rhythm);
}

.about-collage img,
.about-image {
  width: 100%;
  max-height: 34rem;
  object-fit: cover;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(12rem, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(2rem, 7vw, 5rem);
  margin-top: var(--rhythm);
}

.contact-grid address {
  color: var(--muted-ink);
  font-style: normal;
  line-height: 1.8;
}

.contact-grid address strong {
  color: var(--ink);
}

.contact-grid address a {
  color: var(--link);
}

.contact-form {
  display: grid;
  gap: 0.5rem;
}

.contact-form label {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  min-height: 44px;
  margin-top: 0.75rem;
  padding: 0.65rem 1.25rem;
  border: 0;
  background: var(--link);
  color: #fff;
  cursor: pointer;
  font: inherit;
}

.form-note {
  color: var(--muted-ink);
  font-size: 0.8rem;
}

@media (min-width: 782px) {
  .site-header,
  .section-rule {
    width: min(calc(100% - (var(--page-gutter) * 2)), 1140px);
  }

  .site-header {
    display: block;
  }

  .site-nav {
    justify-content: flex-start;
    margin-top: 1.5rem;
  }
}

@media (max-width: 1023px) {
  .menu-toggle {
    display: block;
  }

  .nav-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(20rem, calc(100vw - 2rem));
    max-height: calc(100dvh - 2rem);
    z-index: 10;
    display: block;
    overflow-y: auto;
    padding: 0.75rem 1rem 1.25rem;
    background: #fff;
    border: 1px solid #dedede;
    border-radius: 14px;
    box-shadow: 0 14px 34px rgb(0 0 0 / 14%);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translate(-50%, -50%) scale(0.98);
    transition: opacity 160ms ease-out, transform 160ms ease-out, visibility 160ms ease-out;
  }

  .nav-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
  }

  .menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9;
    display: block;
    background: rgb(255 255 255 / 34%);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 160ms ease-out, visibility 160ms ease-out;
  }

  .menu-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .menu-close {
    display: block;
    margin-left: auto;
    padding: 0;
  }

  .nav-list {
    display: grid;
    gap: 0.15rem;
    justify-items: center;
    margin-top: 0.75rem;
    font-size: 1rem;
    line-height: 1.35;
  }

  .nav-list a {
    display: grid;
    min-height: 44px;
    place-items: center;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
  }

  .nav-list a:hover,
  .nav-list a:focus-visible {
    background: #f3f3f3;
    text-decoration: none;
  }

  body.menu-open {
    overflow: hidden;
  }
}

@media (max-width: 781px) {
  .site-header {
    display: block;
  }

  .brand-lockup {
    align-items: flex-start;
    gap: clamp(0.75rem, 4vw, 1.34rem);
  }

  .brand-logo {
    width: 70.7px;
  }

  .site-title {
    max-width: 14ch;
    padding-top: 0.4rem;
  }

  .site-nav {
    justify-content: flex-start;
    margin-top: 54.08px;
  }

  .section-rule {
    margin-top: var(--rhythm);
  }

  .content-wrap {
    margin-top: var(--rhythm);
  }

  .room-grid,
  .storage-grid {
    grid-template-columns: 1fr;
  }

  .home-feature-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .home-image {
    grid-column: auto;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .room-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .storage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  html {
    font-size: 16px;
  }

  .site-header {
    margin-top: 1.25rem;
  }

  .brand-logo {
    width: 62px;
  }

  .site-nav {
    margin-top: 2.5rem;
  }

  .section-rule,
  .content-wrap {
    margin-top: 2rem;
  }

  h1,
  h2 {
    font-size: clamp(1.8rem, 9vw, 2.2rem);
  }

  .intro-copy {
    margin-top: 2rem;
    font-size: 0.95rem;
  }

  .room-grid,
  .storage-grid,
  .storage-section {
    margin-top: 2rem;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .nav-panel {
    max-height: calc(100dvh - 1.5rem);
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1.25rem;
    margin-top: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
