/* ============================================
   The Triangle Hub Miyazaki - Styles
   Modern Minimal / Warm Sand & Charcoal
   ============================================ */

:root {
  --bg: #fafaf7;
  --bg-soft: #f3efe8;
  --ink: #1f1d1a;
  --ink-soft: #5a574f;
  --muted: #8a877e;
  --line: #e6e1d6;
  --accent: #b88a5a;
  --accent-dark: #8a6438;
  --dark: #1f1d1a;
  --white: #ffffff;
  --max: 1240px;
  --transition: 0.3s ease;
  --font-jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-serif: "Cormorant Garamond", "Hiragino Mincho ProN", serif;
}

html[lang="ko"] body { font-family: "Noto Sans KR", var(--font-jp); }
html[lang="zh"] body { font-family: "Noto Sans TC", var(--font-jp); }

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-jp);
  font-weight: 300;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================
   Header
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: all var(--transition);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.brand-logo {
  height: 68px;
  width: auto;
  display: block;
  transition: opacity 0.2s ease;
}

.brand-text { white-space: nowrap; }

.brand:hover .brand-logo {
  opacity: 0.85;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13px;
  letter-spacing: 0.05em;
  font-weight: 400;
  text-transform: uppercase;
}

.nav a {
  color: var(--ink-soft);
  transition: color var(--transition);
  position: relative;
}

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

.nav-cta {
  background: var(--ink);
  color: var(--white) !important;
  padding: 8px 18px;
  border-radius: 999px;
  letter-spacing: 0.08em;
}

.nav-cta:hover { background: var(--accent-dark); }

.lang-switcher {
  display: flex;
  gap: 4px;
  font-size: 11px;
}

.lang-switcher button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 6px 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.05em;
  border-radius: 4px;
  transition: all var(--transition);
}

.lang-switcher button:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.lang-switcher button.active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  overflow: hidden;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.6s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
  animation: heroZoom 8s ease-out forwards;
}

@keyframes heroZoom {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.45) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 24px;
  animation: fadeUp 1.4s ease-out;
}

.hero-eyebrow {
  font-size: 12px;
  letter-spacing: 0.4em;
  font-weight: 400;
  margin-bottom: 24px;
  opacity: 0.9;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 14px;
  letter-spacing: 0.2em;
  font-weight: 300;
  opacity: 0.95;
}

.hero-dots {
  position: absolute;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 12px;
  padding: 0;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 0;
  transition: all 0.4s ease;
}

.hero-dot:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: scale(1.15);
}

.hero-dot.active {
  background: var(--white);
  border-color: var(--white);
  width: 28px;
  border-radius: 5px;
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 24px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.hero-scroll span {
  width: 2px;
  height: 8px;
  background: var(--white);
  border-radius: 1px;
  animation: scrollDot 2s infinite;
}

@keyframes scrollDot {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50% { opacity: 0; transform: translateY(12px); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Sections
   ============================================ */
.section {
  padding: 120px 0;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 16px;
}

.eyebrow-light { color: rgba(184,138,90,0.95); }

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 32px;
  letter-spacing: 0.01em;
}

.section-title-light { color: var(--white); }

.lead {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.9;
  color: var(--ink-soft);
  max-width: 720px;
}

.section-about { padding-top: 140px; }

/* ============================================
   Highlights
   ============================================ */
.section-highlights { background: var(--bg-soft); }

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 56px;
}

.card {
  background: var(--white);
  padding: 40px 28px;
  border: 1px solid var(--line);
  transition: all var(--transition);
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(31, 29, 26, 0.06);
}

.card-num {
  font-family: var(--font-serif);
  font-size: 32px;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 14px;
  color: var(--ink);
}

.card p {
  font-size: 14px;
  font-weight: 300;
  color: var(--ink-soft);
  line-height: 1.8;
}

/* ============================================
   Gallery
   ============================================ */
/* カテゴリーカード（2列×3行） */
.gallery-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 56px;
}

.cat-card {
  position: relative;
  aspect-ratio: 4 / 3;
  border: none;
  padding: 0;
  margin: 0;
  background: var(--bg-soft);
  cursor: pointer;
  overflow: hidden;
  font-family: inherit;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px rgba(31, 29, 26, 0.12);
}

.cat-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.cat-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.65) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 32px;
  color: var(--white);
}

.cat-card-name {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.cat-card-more {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
  transition: transform 0.3s ease;
}

.cat-card:hover .cat-card-more {
  transform: translateX(4px);
  opacity: 1;
}

.cat-card-empty {
  background: var(--bg-soft);
  border: 1px dashed var(--line);
}

.cat-card-empty:hover { transform: none; box-shadow: none; }

.cat-card-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-soft);
}

.cat-card-placeholder .cat-card-name { color: var(--ink); }

.cat-card-coming {
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
}

/* カテゴリー詳細ビュー（モーダル表示） */
.gallery-detail {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  overflow-y: auto;
  padding: 40px 16px;
  animation: galleryModalFade 0.25s ease-out;
}
.gallery-detail[hidden] { display: none; }

@keyframes galleryModalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.gallery-detail-panel {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--bg);
  border-radius: 14px;
  padding: 28px 32px 36px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

body.gallery-modal-open { overflow: hidden; }

.gallery-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 0;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.gallery-back {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 9px 18px;
  font-size: 12px;
  letter-spacing: 0.05em;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s ease;
}

.gallery-back:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--bg-soft);
}

.gallery-detail-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  margin: 0;
  text-align: right;
}

.gallery-hero {
  position: relative;
  width: 100%;
  background: var(--bg-soft);
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.gallery-hero-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  transition: opacity 0.25s ease;
}

.gallery-hero-img:hover { opacity: 0.92; }

.gallery-hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: background 0.2s ease, transform 0.2s ease;
  padding: 0;
  z-index: 2;
}

.gallery-hero-nav:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-50%) scale(1.08);
}

.gallery-hero-prev { left: 14px; }
.gallery-hero-next { right: 14px; }

@media (max-width: 720px) {
  .gallery-hero-nav { width: 40px; height: 40px; font-size: 24px; }
  .gallery-hero-prev { left: 8px; }
  .gallery-hero-next { right: 8px; }
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 110px;
  gap: 8px;
}

.g-item {
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.g-item:hover { transform: translateY(-2px); }

.g-item.is-active {
  border-color: var(--accent);
}

.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.g-item.g-hidden { display: none; }

.gallery-empty {
  display: none;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  padding: 60px 20px;
  font-weight: 300;
}

.gallery-empty.visible { display: block; }

@media (max-width: 720px) {
  .gallery-categories { grid-template-columns: 1fr; gap: 14px; }
  .cat-card-name { font-size: 22px; }
  .cat-card-overlay { padding: 22px 24px; }
  .gallery-detail-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .gallery-detail-title { text-align: left; font-size: 22px; }
}

.g-item {
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--bg-soft);
}

.g-item.g-tall { grid-row: span 2; }

.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.g-item:hover img { transform: scale(1.05); }

/* ============================================
   Reviews
   ============================================ */
.section-reviews { padding-bottom: 100px; }

.reviews-hint {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 24px;
  font-weight: 300;
}

.reviews-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 40px max(32px, calc((100vw - var(--max)) / 2 + 32px)) 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

.reviews-track:active { cursor: grabbing; }

.reviews-track::-webkit-scrollbar { height: 6px; }
.reviews-track::-webkit-scrollbar-track { background: transparent; }
.reviews-track::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 3px;
}

.review-card {
  flex: 0 0 380px;
  scroll-snap-align: start;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.review-card:hover {
  box-shadow: 0 16px 32px rgba(31, 29, 26, 0.06);
  transform: translateY(-2px);
}

.review-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.review-rating {
  font-size: 16px;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 500;
}

.review-source {
  font-size: 11px;
  letter-spacing: 0.05em;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
}

.review-source-airbnb {
  background: #fff0f0;
  color: #d2425a;
}

.review-source-booking {
  background: #eaf3ff;
  color: #1c5eb5;
}

.review-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
  font-weight: 400;
}

.review-text {
  font-size: 14px;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.85;
  flex: 1;
}

.review-divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}

.review-translation {
  font-size: 13px;
  font-weight: 300;
  color: var(--ink-soft);
  line-height: 1.85;
}

.review-translation-label {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-weight: 500;
  margin-right: 8px;
  padding: 2px 8px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  vertical-align: 1px;
}

@media (max-width: 720px) {
  .review-card { flex: 0 0 86vw; padding: 24px 22px; }
  .reviews-track { padding: 32px 20px 24px; gap: 14px; }
}

/* ============================================
   Details
   ============================================ */
.section-details { background: var(--bg-soft); }

.spec-list {
  margin-top: 56px;
  border-top: 1px solid var(--line);
}

.spec-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  gap: 24px;
}

.spec-row dt {
  font-size: 13px;
  letter-spacing: 0.1em;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
}

.spec-row dd {
  font-size: 16px;
  font-weight: 300;
  color: var(--ink);
}

/* ============================================
   Access
   ============================================ */
.access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 56px;
  align-items: stretch;
}

.access-info {
  display: flex;
  flex-direction: column;
}

.access-address-label {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 12px;
}

.access-address {
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 4px;
}

.access-address-en {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 32px;
  letter-spacing: 0.02em;
}

.access-list {
  list-style: none;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

.access-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.access-list li span {
  color: var(--ink-soft);
  font-weight: 300;
}

.access-list li strong {
  color: var(--ink);
  font-weight: 500;
}

.access-map {
  min-height: 380px;
  background: var(--bg-soft);
  overflow: hidden;
  border: 1px solid var(--line);
}

.access-map iframe { width: 100%; height: 100%; }

/* ============================================
   Booking
   ============================================ */
.section-book {
  background: var(--dark);
  color: var(--white);
  text-align: center;
}

.book-lead {
  font-size: 16px;
  font-weight: 300;
  color: rgba(255,255,255,0.75);
  max-width: 600px;
  margin: 0 auto 56px;
  line-height: 1.9;
}

.book-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
}

.book-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 28px 32px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.04);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.book-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-2px);
}

.book-btn-label {
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 8px;
}

.book-btn-name {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 4px;
}

.book-btn-arrow {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  color: rgba(255,255,255,0.6);
  transition: all var(--transition);
}

.book-btn:hover .book-btn-arrow {
  color: var(--white);
  transform: translateY(-50%) translateX(4px);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: #14130f;
  color: rgba(255,255,255,0.6);
  padding: 60px 0 40px;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-address {
  font-size: 13px;
  margin-bottom: 24px;
}

.footer-copy {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
}

/* ============================================
   Lightbox
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.active { display: flex; }

.lb-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition);
}

.lb-close:hover, .lb-prev:hover, .lb-next:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
}

.lb-close { top: 24px; right: 24px; }
.lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 24px; top: 50%; transform: translateY(-50%); }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
    grid-auto-rows: 95px;
  }
  .access-grid { grid-template-columns: 1fr; gap: 40px; }
  .nav { display: none; }
}

@media (max-width: 720px) {
  .container { padding: 0 20px; }
  .header-inner { padding: 10px 20px; gap: 12px; }
  .brand-logo { height: 48px; }
  .brand-text { display: none; }
  .lang-switcher button { padding: 5px 7px; font-size: 10px; }
  .section { padding: 80px 0; }
  .grid-4 { grid-template-columns: 1fr; }
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 75px;
    gap: 6px;
  }
  .g-item.g-tall { grid-row: span 1; }
  .spec-row { grid-template-columns: 1fr; gap: 6px; padding: 18px 0; }
  .book-buttons { grid-template-columns: 1fr; }
  .hero { min-height: 540px; }
  .hero-title { font-size: 56px; }
}
