/*
Theme Name: MESO Inc.
Theme URI: https://meso-inc.jp
Author: MESO Inc.
Description: Official website theme for MESO Inc. — Design & Connect
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: meso-inc
*/

/* ─────────── RESET & ROOT ─────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
  --bg:    #f5f4f1;
  --text:  #111;
  --muted: rgba(17,17,17,0.38);
  --line:  rgba(17,17,17,0.1);
  --left:  40px;
}

/* ─────────── BASE BODY ─────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Helvetica Neue', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* ─────────── HOME / FRONT PAGE ─────────── */
body.home {
  height: 100dvh;
  overflow: hidden;
}

/* ─────────── ABOUT PAGE ─────────── */
body.page-about {
  height: 100dvh;
  overflow: hidden;
}

/* ─────────── HEADER ─────────── */
.site-header {
  flex-shrink: 0;
  position: relative;
  z-index: 300;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 40px 18px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

/* agent-work uses sticky header */
body.page-agent-work .site-header {
  position: sticky;
  top: 0;
  padding: 18px 40px 18px 0;
}

/* about uses relative header with left 0 */
body.page-about .site-header {
  padding: 18px 40px 18px 0;
}

.site-logo { margin-left: -5px; }
.site-logo img {
  height: 28px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  gap: 32px;
  align-items: center;
}
.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.05em;
  transition: opacity 0.2s;
}
.site-nav a:hover { opacity: 0.4; }
.site-nav .active {
  border-bottom: 1px solid var(--text);
  padding-bottom: 1px;
}
.nav-disabled {
  opacity: 0.28 !important;
  pointer-events: none;
}

/* ── MENU BUTTON (mobile) ── */
.menu-btn {
  display: none;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0;
  transition: opacity 0.2s;
}
.menu-btn:hover { opacity: 0.45; }
.menu-btn .dot { font-size: 18px; line-height: 1; }

/* ── MOBILE MENU ── */
.mobile-menu {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 44px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
}
.mobile-menu a {
  color: var(--text);
  text-decoration: none;
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.1em;
  transition: opacity 0.2s;
}
.mobile-menu a:hover { opacity: 0.4; }
.mob-disabled { opacity: 0.25 !important; pointer-events: none; }

/* ─────────── FOOTER ─────────── */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  padding: 13px var(--left);
  display: flex;
  align-items: center;
  gap: 32px;
}
.site-footer a,
.site-footer span {
  color: var(--muted);
  text-decoration: none;
  font-size: 10px;
  letter-spacing: 0.07em;
  transition: opacity 0.2s;
}
.site-footer a:hover { opacity: 0.5; }
.footer-copy { margin-left: auto; }

/* ─────────── HOME HERO ─────────── */
body.home .hero {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--line);
  min-height: 0;
}
body.home .hero-col {
  overflow: hidden;
  background: var(--bg);
}
body.home .hero-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ─────────── ABOUT PAGE STYLES ─────────── */
body.page-about main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
}

body.page-about .text-side {
  padding: 60px var(--left);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

body.page-about .page-kicker {
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}

body.page-about h1 {
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin-bottom: 28px;
}

body.page-about .divider {
  width: 28px;
  height: 1px;
  background: rgba(17,17,17,0.2);
  margin-bottom: 28px;
}

body.page-about .about-lead {
  font-size: 13px;
  line-height: 2;
  color: var(--text);
  margin-bottom: 22px;
  max-width: 420px;
}

body.page-about .about-body {
  font-size: 12px;
  line-height: 2.1;
  color: var(--text);
  max-width: 420px;
  margin-bottom: 36px;
}

body.page-about .address-block { margin-bottom: 28px; }
body.page-about .address-block p {
  font-size: 11px;
  line-height: 1.9;
  color: var(--text);
}

body.page-about .link-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
body.page-about .link-block a {
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.05em;
  transition: opacity 0.2s;
  width: fit-content;
}
body.page-about .link-block a:hover { opacity: 0.45; }

body.page-about .img-side { overflow: hidden; }
body.page-about .img-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ─────────── AGENT WORK PAGE STYLES ─────────── */
body.page-agent-work main {
  flex: 1;
  padding: 64px 40px 80px;
}

body.page-agent-work .page-kicker {
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

body.page-agent-work h1 {
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

body.page-agent-work .intro {
  font-size: 13px;
  line-height: 2;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 52px;
}

/* BRAND GRID */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.brand-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.3s;
}
.brand-card:hover { transform: translateY(-4px); }
.brand-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s;
}
.brand-card:hover .brand-img { opacity: 0.82; }
.brand-meta { padding: 12px 0 0; }
.brand-country {
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.brand-name { font-size: 12px; font-weight: 400; letter-spacing: 0.07em; }

/* FADE IN — left to right stagger */
.fade-up {
  opacity: 0;
  transform: translateX(-18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.is-visible { opacity: 1; transform: none; }

/* header text: cascade top-to-bottom */
h1.fade-up          { transition-delay: 0.08s; }
.intro.fade-up      { transition-delay: 0.16s; }

/* grid row 1: left → right */
.brands-grid .brand-card:nth-child(1) { transition-delay: 0s; }
.brands-grid .brand-card:nth-child(2) { transition-delay: 0.12s; }
.brands-grid .brand-card:nth-child(3) { transition-delay: 0.24s; }
.brands-grid .brand-card:nth-child(4) { transition-delay: 0.36s; }
/* grid row 2: reset then left → right */
.brands-grid .brand-card:nth-child(5) { transition-delay: 0s; }
.brands-grid .brand-card:nth-child(6) { transition-delay: 0.12s; }
.brands-grid .brand-card:nth-child(7) { transition-delay: 0.24s; }

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 960px) {
  .brands-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  /* Header */
  .site-header { padding: 16px 20px 16px 0; }
  .site-logo img { transform: translateX(-22px); }
  .site-nav { display: none; }
  .menu-btn { display: flex; }

  /* Footer */
  .site-footer { padding: 12px 16px; gap: 16px; }
  .footer-copy { font-size: 8px; letter-spacing: 0.04em; }

  /* Home hero — single column */
  body.home .hero { grid-template-columns: 1fr; }

  /* About — stack vertically, allow scroll */
  body.page-about {
    overflow: auto;
    height: auto;
  }
  body.page-about main { grid-template-columns: 1fr; }
  body.page-about .img-side { height: 55vw; order: -1; }
  body.page-about .text-side {
    padding: 40px 20px 48px;
    border-right: none;
    justify-content: flex-start;
    overflow-y: visible;
  }

  /* Agent work */
  body.page-agent-work main { padding: 48px 20px 64px; }
  .brands-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

@media (max-width: 480px) {
  body.home .hero { grid-template-columns: 1fr; }
  body.home #col-right { display: none; }
}
