:root {
  --ink: #182a4a;
  --ink-soft: #48608d;
  --paper: #ffffff;
  --line: #d8dde8;
  --shadow: 0 18px 60px rgba(24, 42, 74, 0.12);
  --max-page: 1460px;
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  background: var(--paper);
  font-family: "Century Gothic", "Futura", "Avenir Next", Arial, sans-serif;
  line-height: 1.4;
}

body {
  min-width: 320px;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.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 {
  position: relative;
  width: min(100%, var(--max-page));
  margin: 0 auto;
  padding: clamp(36px, 8vw, 112px) clamp(18px, 4vw, 42px) 24px;
}

.brand {
  display: grid;
  justify-items: end;
  gap: clamp(18px, 3vw, 34px);
  margin-left: auto;
  text-align: right;
}

.brand-name {
  max-width: 100%;
  color: var(--ink);
  font-size: clamp(2rem, 5.6vw, 4.7rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.95;
}

.brand-services {
  color: var(--ink-soft);
  font-size: clamp(1rem, 2.7vw, 2.35rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.2;
}

.site-nav {
  display: grid;
  grid-template-columns: 0.82fr 0.76fr 1.05fr 150px 1.05fr 0.8fr 1.15fr;
  align-items: start;
  gap: clamp(18px, 2.8vw, 44px);
  margin-top: clamp(56px, 7vw, 92px);
}

.nav-column {
  display: grid;
  justify-items: center;
  gap: 14px;
  min-width: 0;
  text-align: center;
}

.nav-column a,
.nav-heading,
.nav-expander {
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.6vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.22em;
  line-height: 1.1;
  transition: color 160ms ease, transform 160ms ease;
}

.nav-group {
  position: relative;
  padding-bottom: 18px;
  margin-bottom: -18px;
}

.nav-group-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.nav-expander {
  display: none;
}

.subnav {
  position: absolute;
  top: calc(100% - 2px);
  left: 50%;
  z-index: 2;
  display: grid;
  min-width: max-content;
  justify-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.subnav::before {
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 18px;
  content: "";
}

.nav-group:hover .subnav,
.nav-group:focus-within .subnav,
.nav-group.is-expanded .subnav {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.subnav a {
  font-size: clamp(0.9rem, 1.1vw, 1.26rem);
}

.nav-column-simple {
  gap: clamp(52px, 6vw, 92px);
}

.nav-column a:hover,
.nav-column a:focus-visible,
.nav-column a.is-active,
.nav-heading:hover,
.nav-heading:focus-visible,
.nav-heading.is-active,
.nav-expander:hover,
.nav-expander:focus-visible {
  color: var(--ink);
  transform: translateY(-1px);
}

.mark {
  display: grid;
  align-self: start;
  justify-items: center;
  width: clamp(112px, 10vw, 150px);
  aspect-ratio: 1;
  padding: 28px 12px 16px;
  color: var(--paper);
  background: var(--ink);
  box-shadow: var(--shadow);
}

.mark span {
  margin-top: auto;
  font-size: clamp(2.35rem, 4vw, 4.2rem);
  font-weight: 300;
  letter-spacing: 0;
  line-height: 0.8;
}

.mark small {
  font-size: clamp(0.62rem, 0.8vw, 0.8rem);
  font-weight: 700;
  line-height: 1;
}

.utility-nav {
  position: absolute;
  right: clamp(18px, 4vw, 42px);
  bottom: 2px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.search-button,
.social-link,
.menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.search-icon {
  position: relative;
  width: 27px;
  height: 27px;
  border: 4px solid currentColor;
  border-radius: 50%;
}

.search-icon::after {
  position: absolute;
  right: -13px;
  bottom: -10px;
  width: 17px;
  height: 4px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: center;
  content: "";
}

.social-link {
  border-radius: 7px;
  color: #ffffff;
  background: linear-gradient(#63a8dc, #17528e);
  font-family: Arial, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
}

.search-panel {
  position: absolute;
  right: clamp(18px, 4vw, 42px);
  bottom: -56px;
  z-index: 3;
  display: none;
  width: min(320px, calc(100vw - 36px));
  padding: 10px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.search-panel.is-open {
  display: block;
}

.search-panel input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
}

.hero {
  width: min(100%, var(--max-page));
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 42px) clamp(28px, 4vw, 52px);
}

.hero-label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 18px;
  margin: 14px 0 8px;
}

.hero-label p,
.hero-label h1 {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 700;
  letter-spacing: 0.1em;
}

.hero-label p {
  font-size: 0.84rem;
  text-transform: uppercase;
}

.hero-label h1 {
  justify-self: end;
  max-width: 760px;
  font-size: clamp(0.82rem, 1vw, 1rem);
  text-align: right;
}

.hero-image {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #edf2f8;
}

.hero-image img {
  width: 100%;
  aspect-ratio: 2.72 / 1;
  object-fit: cover;
  object-position: center 54%;
}

.hero-image figcaption {
  position: absolute;
  right: 18px;
  bottom: 14px;
  max-width: calc(100% - 36px);
  padding: 6px 10px;
  color: var(--paper);
  background: rgba(24, 42, 74, 0.72);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.site-footer {
  width: min(100%, var(--max-page));
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 42px) 34px;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  font-weight: 500;
  text-align: center;
}

.page-header {
  padding-bottom: clamp(28px, 5vw, 58px);
}

.portfolio-page {
  width: min(100%, var(--max-page));
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 42px) clamp(38px, 5vw, 72px);
}

.portfolio-masthead {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin: clamp(18px, 4vw, 58px) 0 clamp(28px, 5vw, 62px);
  color: var(--ink-soft);
  text-align: center;
}

.portfolio-masthead p,
.portfolio-masthead h1 {
  margin: 0;
}

.portfolio-masthead > p:first-child {
  font-size: clamp(1.8rem, 4vw, 3.7rem);
  font-weight: 800;
  letter-spacing: 0.22em;
  line-height: 1;
}

.portfolio-masthead h1 {
  font-size: clamp(1.05rem, 2vw, 1.65rem);
  font-weight: 800;
  letter-spacing: 0.24em;
}

.portfolio-intro {
  max-width: 620px;
  padding-top: 26px;
  color: var(--ink);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2.8vw, 34px);
}

.project-grid[hidden],
.content-list[hidden] {
  display: none;
}

.content-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.8vw, 34px);
  margin-bottom: clamp(30px, 5vw, 68px);
}

.detail-item {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: var(--ink);
}

.detail-item h2,
.detail-item p {
  margin: 0;
}

.detail-item h2 {
  color: var(--ink-soft);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.25;
}

.about-page .page-header {
  padding-bottom: 0;
}

.about-page .portfolio-page {
  position: relative;
  max-width: var(--max-page);
  min-height: clamp(620px, 58vw, 960px);
  margin-top: clamp(20px, 3vw, 42px);
  padding-top: clamp(56px, 8vw, 128px);
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.82)),
    url("../images/home/home-hero-best-market.png") center / cover no-repeat;
}

.about-page .portfolio-masthead {
  display: none;
}

.about-page .about-copy {
  position: relative;
  z-index: 1;
  grid-template-columns: 1fr;
  gap: clamp(24px, 3vw, 44px);
  max-width: none;
  margin: 0;
  padding: clamp(20px, 3vw, 42px) 0;
}

.about-page .detail-item {
  border-top: 0;
  padding: 0;
}

.about-page .detail-item p {
  max-width: none;
  padding: 0;
  color: var(--ink-soft);
  font-size: clamp(1.15rem, 2vw, 2rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.28;
}

.detail-item p {
  padding-top: 10px;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.detail-item a {
  display: inline-block;
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.project-card {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.project-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #202020;
}

.project-card-caption {
  color: var(--ink-soft);
  min-height: 66px;
}

.project-card-caption h2,
.project-card-caption p {
  margin: 0;
}

.project-card-caption h2 {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.25;
}

.project-card-caption p {
  padding-top: 3px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.page-footer {
  padding-top: 0;
}

.menu-toggle {
  display: none;
}

@media (max-width: 1040px) {
  .site-header {
    padding-top: 28px;
  }

  .brand {
    justify-items: center;
    padding: 0 56px;
    text-align: center;
  }

  .brand-services {
    letter-spacing: 0.12em;
  }

  .menu-toggle {
    position: absolute;
    top: 26px;
    left: 18px;
    z-index: 5;
    display: inline-grid;
    gap: 5px;
  }

  .menu-toggle span:not(.visually-hidden) {
    width: 28px;
    height: 2px;
    background: var(--ink);
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 4;
    display: none;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 26px;
    margin: 0;
    padding: 92px 24px 32px;
    overflow: auto;
    background: rgba(255, 255, 255, 0.98);
  }

  .site-header.nav-open .site-nav {
    display: grid;
  }

  .nav-column,
  .nav-column-simple {
    gap: 12px;
  }

  .nav-column a,
  .nav-heading,
  .nav-expander {
    font-size: 1.35rem;
    letter-spacing: 0.14em;
  }

  .nav-group {
    gap: 10px;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .nav-group-head {
    width: min(100%, 420px);
  }

  .nav-expander {
    position: relative;
    display: inline-grid;
    flex: 0 0 32px;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .nav-expander::before,
  .nav-expander::after {
    position: absolute;
    width: 16px;
    height: 2px;
    background: currentColor;
    content: "";
  }

  .nav-expander::after {
    transform: rotate(90deg);
    transition: transform 160ms ease;
  }

  .nav-group.is-expanded .nav-expander::after {
    transform: rotate(0deg);
  }

  .subnav {
    position: static;
    display: none;
    min-width: 0;
    gap: 12px;
    padding: 0 0 8px;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    transition: none;
  }

  .subnav::before {
    display: none;
  }

  .nav-group:hover .subnav,
  .nav-group:focus-within .subnav,
  .nav-group.is-expanded .subnav {
    transform: none;
  }

  .nav-group.is-expanded .subnav {
    display: grid;
  }

  .subnav a {
    font-size: 1rem;
  }

  .mark {
    order: -1;
    justify-self: center;
  }

  .utility-nav {
    top: 26px;
    right: 18px;
    bottom: auto;
    gap: 8px;
  }

  .social-link {
    display: none;
  }

  .search-panel {
    top: 78px;
    bottom: auto;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .brand {
    gap: 16px;
    padding: 0 48px;
  }

  .brand-name {
    font-size: clamp(1.5rem, 7vw, 2.35rem);
  }

  .brand-services {
    font-size: clamp(0.82rem, 4.5vw, 1.12rem);
  }

  .hero-label {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .hero-label h1 {
    justify-self: start;
    text-align: left;
  }

  .hero-image img {
    aspect-ratio: 1.18 / 1;
  }

  .hero-image figcaption {
    position: static;
    max-width: none;
    color: var(--ink-soft);
    background: transparent;
    padding: 10px 0 0;
  }

  .portfolio-masthead {
    margin-top: 22px;
  }

  .portfolio-masthead > p:first-child {
    font-size: clamp(1.55rem, 8vw, 2.4rem);
    letter-spacing: 0.16em;
  }

  .portfolio-masthead h1 {
    font-size: 1rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card img {
    aspect-ratio: 4 / 3;
  }
}
