:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-alt: #ededf1;
  --accent: #0071e3;
  --accent-soft: rgba(0, 113, 227, 0.12);
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --shadow-lg: 0 28px 80px rgba(17, 37, 63, 0.12);
  --shadow-sm: 0 12px 35px rgba(17, 37, 63, 0.08);
  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 12px;
  --page-padding: clamp(24px, 5vw, 92px);
  --section-padding-y: clamp(80px, 12vw, 140px);
  --hero-top-offset: clamp(112px, 26vw, 168px);
  --properties-card-width: clamp(320px, 32vw, 440px);
  --properties-card-gap: clamp(24px, 3vw, 36px);
  --properties-track-padding-x: clamp(48px, 6vw, 96px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Noto Serif JP', serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

.hero {
  position: relative;
  min-height: 100vh;
  padding: var(--hero-top-offset) var(--page-padding) 120px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-color: #f3f5fa;
  background-image:
    linear-gradient(165deg, rgba(255, 255, 255, 0.9) 0%, rgba(234, 238, 247, 0.82) 55%, rgba(36, 64, 118, 0.28) 100%),
    url('img/hero.webp');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  color: var(--text);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 44px var(--page-padding) 12px;
  z-index: 10;
  background:
    linear-gradient(180deg, rgba(245, 247, 250, 0.42) 0%, rgba(240, 242, 248, 0.18) 100%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(210, 213, 220, 0.45);
}

section[id] {
  scroll-margin-top: clamp(132px, 24vw, 220px);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  color: var(--text);
}

.logo img {
  width: clamp(184px, 22vw, 280px);
  max-width: 100%;
  height: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.nav-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.hero-content {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-tagline::before {
  content: "";
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(1.8rem, 6vw, 3.6rem);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  white-space: nowrap;
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0;
}

.hero-cta {
  align-self: flex-start;
  padding: 14px 30px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.06em;
  box-shadow: 0 18px 35px rgba(0, 113, 227, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 25px 45px rgba(0, 113, 227, 0.35);
  text-decoration: none;
}

main {
  background: var(--bg);
  padding: 0 var(--page-padding);
}

.section-heading {
  max-width: 680px;
  margin-bottom: 48px;
}

.services .section-heading {
  max-width: none;
  width: 100%;
}

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-heading h2,
.message-text h2 {
  margin: 0 0 16px 0;
  font-size: 1.5rem;
  color: var(--text);
}

.section-heading p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.services,
.message,
.company {
  margin-left: calc(-1 * var(--page-padding));
  margin-right: calc(-1 * var(--page-padding));
  padding: var(--section-padding-y) var(--page-padding);
}

.services,
.company {
  background-color: #ffffff;
}

.properties-gallery {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.properties-gallery__viewport {
  position: relative;
  overflow: hidden;
}

.properties-gallery__viewport::before,
.properties-gallery__viewport::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(32px, 5vw, 64px);
  pointer-events: none;
  z-index: 1;
}

.properties-gallery__viewport::before {
  left: 0;
  background: linear-gradient(90deg, var(--surface) 0%, rgba(255, 255, 255, 0));
}

.properties-gallery__viewport::after {
  right: 0;
  background: linear-gradient(270deg, var(--surface) 0%, rgba(255, 255, 255, 0));
}

.properties-gallery__track {
  display: flex;
  gap: var(--properties-card-gap);
  overflow-x: auto;
  padding: 16px var(--properties-track-padding-x);
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--properties-track-padding-x);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 113, 227, 0.45) rgba(210, 213, 220, 0.25);
}

.properties-gallery__track::-webkit-scrollbar {
  height: 10px;
}

.properties-gallery__track::-webkit-scrollbar-track {
  background: rgba(210, 213, 220, 0.25);
  border-radius: 999px;
}

.properties-gallery__track::-webkit-scrollbar-thumb {
  background: rgba(0, 113, 227, 0.45);
  border-radius: 999px;
}

.properties-gallery__item {
  flex: 0 0 var(--properties-card-width);
  aspect-ratio: 4 / 3;
  margin: 0;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid rgba(210, 213, 220, 0.6);
  box-shadow: var(--shadow-sm);
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
}

.properties-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-md) - 8px);
  display: block;
}

.properties-gallery__control {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(210, 213, 220, 0.7);
  background: rgba(255, 255, 255, 0.85);
  color: var(--accent);
  font-size: 1.6rem;
  line-height: 1;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.properties-gallery__control--prev {
  justify-self: end;
}

.properties-gallery__control--next {
  justify-self: start;
}

.properties-gallery__control:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(17, 37, 63, 0.18);
  background: rgba(255, 255, 255, 0.95);
}

.properties-gallery__control[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}

.properties-gallery__control span {
  margin-top: -2px;
}

.message {
  position: relative;
}

.message-content {
  display: grid;
  gap: 48px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: stretch;
}

.message-text p {
  color: var(--text-muted);
  margin: 0 0 18px 0;
}

.message-media {
  display: grid;
  gap: 24px;
  height: 100%;
}

.message-photo {
  border-radius: var(--radius-lg);
  min-height: 320px;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.22), rgba(69, 150, 255, 0.12)), url('img/ceo.webp') center/cover;
  box-shadow: var(--shadow-lg);
}

.company-wrapper {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: stretch;
}

.company-map {
  display: flex;
}

.company-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(210, 213, 220, 0.6);
  box-shadow: var(--shadow-sm);
}

.company-table th,
.company-table td {
  padding: 20px 24px;
  text-align: left;
  font-size: 0.98rem;
  vertical-align: top;
}

.company-table th {
  width: 28%;
  color: var(--text-muted);
  font-weight: 500;
  background: rgba(242, 243, 247, 0.9);
}

.company-table tr + tr {
  border-top: 1px solid rgba(226, 227, 232, 0.9);
}

.company-map iframe {
  flex: 1;
  width: 100%;
  min-height: 360px;
  height: 100%;
  border: none;
  border-radius: var(--radius-md);
  filter: grayscale(0.1) contrast(1.05) saturate(0.95);
  box-shadow: var(--shadow-lg);
}

.footer {
  padding: 48px clamp(24px, 5vw, 92px);
  background: #f2f4f6;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid rgba(210, 213, 220, 0.6);
}

.footer a {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
}

@media (min-width: 769px) {
  :root {
    --hero-top-offset: clamp(168px, 20vw, 240px);
  }
}

@media (max-width: 768px) {
  :root {
    --properties-card-width: clamp(240px, 82vw, 320px);
    --properties-card-gap: clamp(16px, 5vw, 28px);
    --properties-track-padding-x: clamp(20px, 8vw, 36px);
  }

  .site-header {
    padding: 36px var(--page-padding) 10px;
  }

  .navbar {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }

  .hero-content {
    gap: 16px;
  }

  .nav-links {
    gap: 18px;
  }

  .properties-gallery {
    gap: 8px;
  }

  .properties-gallery__track {
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
