/* =========================================================
   株式会社雅居 コーポレートサイト
   Palette: Navy (#0f1d3a) + Gold (#c4a062)
   Font: Noto Sans JP (gothic) / Marcellus (en accent)
   ========================================================= */

:root {
  --navy-900: #0b1730;
  --navy-800: #0f1d3a;
  --navy-700: #16294e;
  --navy-600: #1f365f;
  --gold: #c4a062;
  --gold-soft: #d8bd8a;
  --ink: #1b2233;
  --gray-600: #5c6678;
  --gray-300: #d7dbe2;
  --gray-100: #f5f6f9;
  --white: #ffffff;

  --maxw: 1120px;
  --gut: clamp(20px, 5vw, 48px);
  --header-h: 76px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: "Noto Sans JP", system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, dd { margin: 0; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.section { padding-block: clamp(64px, 10vw, 120px); }

.section__head { margin-bottom: clamp(32px, 5vw, 56px); }
.section__head--center { text-align: center; }
.section__head--center .section__desc { margin-inline: auto; }

.section__en {
  font-family: "Marcellus", serif;
  letter-spacing: 0.22em;
  color: var(--gold);
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.section__title {
  font-family: "Noto Serif JP", serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.35;
  color: var(--navy-800);
  position: relative;
}

.section__head:not(.section__head--center) .section__title::after {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  background: var(--gold);
  margin-top: 18px;
}

.section__desc {
  margin-top: 18px;
  max-width: 640px;
  color: var(--gray-600);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 15px 32px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }

.btn--primary { background: var(--gold); color: var(--navy-900); }
.btn--primary:hover { background: var(--gold-soft); }

.btn--ghost { border-color: rgba(255, 255, 255, 0.55); color: var(--white); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.site-header.is-scrolled {
  box-shadow: 0 6px 24px rgba(11, 23, 48, 0.08);
  border-bottom-color: var(--gray-300);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo img { height: 38px; width: auto; }

.nav__list { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); }
.nav__list > li > a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--navy-800);
  position: relative;
  padding-block: 6px;
}
.nav__list > li:not(.nav__cta) > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__list > li:not(.nav__cta) > a:hover::after { transform: scaleX(1); }

.nav__list > li.nav__cta > a {
  background: var(--navy-800);
  color: #fff;
  padding: 11px 22px;
  font-weight: 700;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.nav__list > li.nav__cta > a:hover { background: var(--gold); color: var(--navy-900); }

/* スマホのみ表示する改行 */
.sp-br { display: none; }

/* ---------- Hamburger ---------- */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 110;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  margin: 6px auto;
  background: var(--navy-800);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.nav-toggle.is-open span { background: var(--white); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  padding-top: var(--header-h);
}
.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(196, 160, 98, 0.22), transparent 55%),
    radial-gradient(90% 80% at 10% 90%, rgba(31, 54, 95, 0.65), transparent 60%),
    linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 45%, var(--navy-700) 100%);
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 120% at 70% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(120% 120% at 70% 30%, #000 30%, transparent 75%);
}

.hero__inner { position: relative; z-index: 2; padding-block: 60px; }
.hero__en {
  font-family: "Marcellus", serif;
  letter-spacing: 0.3em;
  color: var(--gold-soft);
  font-size: clamp(0.72rem, 1.6vw, 0.9rem);
  margin-bottom: 24px;
}
.hero__title {
  font-family: "Noto Serif JP", serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.28;
  letter-spacing: 0.02em;
}
.hero__title .accent { color: var(--gold); }
.hero__lead {
  margin-top: 26px;
  font-size: clamp(0.95rem, 2vw, 1.08rem);
  color: rgba(255, 255, 255, 0.82);
  max-width: 36em;
}
.hero__actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 16px; }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 2;
  font-family: "Marcellus", serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}
.hero__scroll span {
  width: 1px;
  height: 46px;
  background: linear-gradient(var(--gold), transparent);
  animation: scrollLine 1.8s var(--ease) infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- About ---------- */
.about { background: var(--white); }
.about__lead {
  max-width: 760px;
  font-size: clamp(1rem, 2.2vw, 1.18rem);
  color: var(--navy-700);
  margin-bottom: clamp(40px, 6vw, 64px);
  font-weight: 500;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 32px);
}
.feature {
  border: 1px solid var(--gray-300);
  border-top: 3px solid var(--gold);
  padding: clamp(26px, 3vw, 38px);
  background: var(--white);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.feature:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(11, 23, 48, 0.1); }
.feature__num {
  font-family: "Marcellus", serif;
  font-size: 1.6rem;
  color: var(--gold);
  letter-spacing: 0.05em;
}
.feature__title {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--navy-800);
  margin: 12px 0 12px;
}
.feature p { color: var(--gray-600); font-size: 0.95rem; }

/* ---------- Service ---------- */
.service { background: var(--gray-100); }
.service__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.4vw, 26px);
}
.card {
  background: var(--white);
  padding: clamp(28px, 3vw, 40px);
  position: relative;
  border: 1px solid var(--gray-300);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.3s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 20px 44px rgba(11, 23, 48, 0.12); border-color: transparent; }
.card:hover::before { transform: scaleY(1); }
.card__title {
  font-size: 1.16rem;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gray-300);
}
.card__text { color: var(--gray-600); font-size: 0.94rem; }

/* ---------- Company ---------- */
.company { background: var(--white); }
.company__table dl {
  border-top: 1px solid var(--gray-300);
}
.company__table .row {
  display: grid;
  grid-template-columns: 220px 1fr;
  border-bottom: 1px solid var(--gray-300);
}
.company__table dt {
  padding: 22px 24px 22px 0;
  font-weight: 700;
  color: var(--navy-800);
  background: linear-gradient(to right, transparent, transparent);
}
.company__table dd {
  padding: 22px 0 22px 24px;
  color: var(--gray-600);
  border-left: 1px solid var(--gray-300);
}

/* ---------- Contact ---------- */
.contact {
  position: relative;
  color: #fff;
  background:
    radial-gradient(100% 120% at 80% 0%, rgba(196, 160, 98, 0.2), transparent 55%),
    linear-gradient(135deg, var(--navy-900), var(--navy-700));
  text-align: center;
}
.contact__inner { max-width: 720px; }
.contact .section__en { color: var(--gold-soft); }
.contact__title { color: #fff; margin: 8px 0 22px; }
.contact__lead { color: rgba(255, 255, 255, 0.82); }
.contact__info {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.contact__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 240px;
  padding: 22px 28px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.contact__item:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--gold); transform: translateY(-3px); }
.contact__label {
  font-family: "Marcellus", serif;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  color: var(--gold-soft);
}
.contact__value { font-size: 1.3rem; font-weight: 700; }
.contact__note { margin-top: 26px; font-size: 0.78rem; color: rgba(255, 255, 255, 0.5); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255, 255, 255, 0.7); padding-top: 56px; }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer__brand img { height: 40px; width: auto; filter: brightness(0) invert(1); opacity: 0.92; }
.footer__addr { margin-top: 16px; font-size: 0.85rem; max-width: 28em; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: flex-start; }
.footer__nav a { font-size: 0.88rem; transition: color 0.2s var(--ease); }
.footer__nav a:hover { color: var(--gold-soft); }
.footer__copy {
  text-align: center;
  font-family: "Marcellus", serif;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.45);
  padding: 24px 0;
}

/* ---------- Reveal animation (only when JS is active) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .features, .service__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sp-br { display: inline; }

  /* ヒーローのScrollインジケーターとボタン群の重なりを防ぐ余白 */
  .hero__inner { padding-bottom: 96px; }

  .nav-toggle { display: block; }
  /* header uses backdrop-filter, which makes it the containing block for
     fixed children — so size against the viewport explicitly (vw/svh) */
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100svh;
    background: var(--navy-900);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
  }
  .nav.is-open { transform: translateX(0); }
  .nav__list {
    flex-direction: column;
    gap: 28px;
    text-align: center;
  }
  .nav__list > li > a { color: #fff; font-size: 1.1rem; }
  .nav__list > li:not(.nav__cta) > a::after { background: var(--gold); }
  .nav__list > li.nav__cta > a { background: var(--gold); color: var(--navy-900); padding: 14px 34px; }

  .company__table .row { grid-template-columns: 1fr; }
  .company__table dt { padding-bottom: 0; }
  .company__table dd { padding: 8px 0 22px; border-left: none; }
}

@media (max-width: 560px) {
  .features, .service__grid { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 auto; }
  .contact__item { min-width: 0; width: 100%; }
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
