/* ============================================================
   WALDBAUER MANAGEMENT
   Monochrome editorial. Photography first, chrome minimal.
   ============================================================ */

:root {
  --bg: #f4f4f2;
  --surface: #ffffff;
  --ink: #141414;
  --ink-soft: #5c5c5c;
  --line: #dcdcd8;
  --header-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.14em;
}

.brand span { font-weight: 400; color: var(--ink-soft); }

.brand-logo {
  height: 38px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  gap: clamp(14px, 3vw, 34px);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav a {
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.site-nav a:hover { border-color: var(--ink); }

.site-nav a.active { border-color: var(--ink); font-weight: 600; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: clamp(4px, 1.5vw, 18px);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.lang-switch a {
  padding: 5px 12px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  border-bottom: none;
}

.lang-switch a:hover { color: var(--ink); border-bottom: none; }

.lang-switch a.active {
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  border-bottom: none;
}

/* ---------- Home: category split ---------- */

.home-hero {
  min-height: calc(100dvh - var(--header-h));
  display: flex;
  flex-direction: column;
}

.home-title {
  padding: clamp(36px, 6vw, 72px) 24px clamp(24px, 4vw, 48px);
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
}

.home-title h1 {
  font-size: clamp(34px, 6.5vw, 84px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.02;
  text-transform: uppercase;
}

.home-title p {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: clamp(14px, 1.4vw, 17px);
  max-width: 46ch;
}

.category-split {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  min-height: 58vh;
}

.category-card {
  position: relative;
  overflow: hidden;
  display: block;
  min-height: 500px;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-card:hover img { transform: scale(1.04); }

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.45), transparent 45%);
}

.category-card .label {
  position: absolute;
  left: 28px;
  bottom: 24px;
  z-index: 2;
  color: #fff;
  font-size: clamp(24px, 3.4vw, 44px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.category-card .count {
  position: absolute;
  right: 28px;
  bottom: 32px;
  z-index: 2;
  color: rgb(255 255 255 / 0.85);
  font-size: 13px;
  letter-spacing: 0.1em;
}

/* ---------- Models grid ---------- */

.page-head {
  padding: clamp(32px, 5vw, 64px) 0 clamp(20px, 3vw, 36px);
}

.page-head h1 {
  font-size: clamp(30px, 4.5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.cat-switch {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.cat-switch a {
  padding: 9px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
}

.cat-switch a:hover { background: var(--ink); color: var(--bg); }

.cat-switch a.active { background: var(--ink); color: var(--bg); }

.model-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 20px;
  padding-bottom: 90px;
}

.model-card { display: block; }

.model-card .photo {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--line);
}

.model-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.model-card:hover img { transform: scale(1.05); }

.model-card .meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 12px;
}

.model-card .name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.model-card .height {
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---------- Model detail ---------- */

.detail {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(300px, 5fr);
  gap: clamp(28px, 4vw, 64px);
  padding: clamp(28px, 4vw, 56px) 0 40px;
}

.detail .main-photo {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--line);
}

.detail .main-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info { padding-top: 6px; }

.detail-info .back {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 22px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.detail-info .back:hover { color: var(--ink); border-color: var(--ink); }

.detail-info h1 {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 26px;
}

.stats {
  border-top: 1px solid var(--line);
  margin-bottom: 30px;
}

.stats .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
}

.stats .key {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.stats .val {
  font-size: 16px;
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--bg);
  padding: 14px 30px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.btn:hover { opacity: 0.85; }
.btn:active { transform: scale(0.98); }

.btn svg { width: 17px; height: 17px; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-flow: dense;
  gap: 16px;
  padding-bottom: 90px;
}

/* 横長写真は横2マス分のワイド枠で表示（切れ防止） */
.gallery figure.wide {
  grid-column: span 2;
  aspect-ratio: 3 / 2;
}

.gallery figure {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  cursor: pointer;
  background: var(--line);
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.gallery figure:hover img { transform: scale(1.04); }

.section-title {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.not-found {
  padding: 120px 0;
  text-align: center;
}

.not-found p { color: var(--ink-soft); margin-bottom: 24px; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgb(10 10 10 / 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 100%;
  max-height: 92dvh;
  object-fit: contain;
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 26px;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.lightbox .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 34px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 18px;
  font-family: inherit;
}

.lightbox .prev { left: 8px; }
.lightbox .next { right: 8px; }

/* ---------- Contact ---------- */

.contact-wrap {
  min-height: calc(100dvh - var(--header-h) - 120px);
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  padding: clamp(36px, 6vw, 80px) 0;
}

.contact-photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--line);
}

.contact-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-info h1 {
  font-size: clamp(32px, 4.5vw, 58px);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  line-height: 1.05;
  margin-bottom: 18px;
}

.contact-info > p {
  color: var(--ink-soft);
  max-width: 44ch;
  margin-bottom: 34px;
}

.contact-lines { margin-bottom: 36px; border-top: 1px solid var(--line); }

.contact-lines .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
}

.contact-lines .key {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.contact-lines .val { font-size: 15px; font-weight: 500; }

.contact-lines a.val:hover { text-decoration: underline; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.site-footer a:hover { color: var(--ink); }

/* ---------- Reveal on load ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  .reveal:nth-child(2) { animation-delay: 0.06s; }
  .reveal:nth-child(3) { animation-delay: 0.12s; }
  .reveal:nth-child(4) { animation-delay: 0.18s; }
  .reveal:nth-child(5) { animation-delay: 0.24s; }
  .reveal:nth-child(6) { animation-delay: 0.3s; }

  @keyframes rise {
    to { opacity: 1; transform: none; }
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .model-grid { grid-template-columns: repeat(2, 1fr); gap: 22px 14px; }
  .detail { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .contact-wrap { grid-template-columns: 1fr; }
  .contact-photo { max-height: 52vh; aspect-ratio: auto; }
  .contact-photo img { max-height: 52vh; }
}

@media (max-width: 820px) {
  .site-header { height: auto; }
  .site-header .container {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding-top: 12px;
    padding-bottom: 10px;
    row-gap: 8px;
  }
  .brand { font-size: 15px; letter-spacing: 0.1em; }
  .brand-logo { height: 32px; }
  .lang-switch { margin-left: 0; justify-self: end; }
  .site-nav {
    grid-column: 1 / -1;
    font-size: 12px;
    gap: 18px;
  }
}

@media (max-width: 640px) {
  .category-split { grid-template-columns: 1fr; }
  .category-card { min-height: 320px; }
  .site-footer .container { flex-direction: column; align-items: flex-start; }
}
