/* ==========================================================================
   MARUHA TEA GROUP — 50 YEARS OF TEA
   ========================================================================== */

:root {
  /* Color */
  --c-green: #0F3D2E;
  --c-ivory: #F8F6EF;
  --c-text: #1A1A1A;
  --c-rule: rgba(15, 61, 46, 0.2);
  --c-rule-strong: rgba(15, 61, 46, 0.34);
  --c-muted: rgba(26, 26, 26, 0.72);

  /* Font */
  --ff-en: "Source Serif 4", "Times New Roman", serif;
  --ff-ja: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --ff-mix: "Source Serif 4", "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;

  /* Layout */
  --max-width: 1360px;
  --gutter: clamp(22px, 7vw, 108px);
  --indent: clamp(0px, 4.6vw, 72px); /* FV / MISSION の追加インデント */

  /* Section spacing */
  --space-fv-top: clamp(96px, 11vw, 160px);
  --space-fv-bottom: clamp(104px, 12vw, 176px);
  --space-section: clamp(72px, 7.6vw, 112px);
  --space-supply: clamp(64px, 6.4vw, 92px);
  --space-mission: clamp(136px, 15vw, 224px);

  /* Type scale */
  --fs-body: 17px;
  --fs-small: 15px;
  --fs-label: 12px;
  --fs-h1: clamp(40px, 4.45vw, 66px);
  --fs-h2: clamp(30px, 3vw, 44px);
  --fs-mission: clamp(24px, 2.8vw, 40px);

  --lh-body: 2;
  --ls-label: 0.24em;

  --header-h: 104px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 24px;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--c-ivory);
  color: var(--c-text);
  font-family: var(--ff-ja);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  letter-spacing: 0.04em;
  font-feature-settings: "palt" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-break: strict;
  text-wrap: pretty;
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

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

:focus-visible {
  outline: 1px solid var(--c-green);
  outline-offset: 4px;
}

[lang="en"] { font-family: var(--ff-en); }

i[lang="la"] {
  font-family: var(--ff-en);
  font-style: italic;
  letter-spacing: 0.01em;
  white-space: nowrap; /* 学名を分割しない */
}

/* --------------------------------------------------------------------------
   日本語の改行ルール（どの画面幅でも文節の途中で改行しない）
   - 対応ブラウザ（Chrome / Edge）：word-break: auto-phrase
   - 未対応ブラウザ（Safari / Firefox）：HTML に BudouX で挿入した <wbr> の位置でのみ改行
     （keep-all で文字間の改行を止め、<wbr>・空白・改行指定の位置で折り返す）
   - 1文節が行幅を超える場合のみ overflow-wrap: anywhere で強制改行（はみ出し防止）
   -------------------------------------------------------------------------- */
:is(.fv-title, .fv-text, .lead-ja, .sub-ja, .column-ja, .column p,
    .split-text, .company-tag, .footer-note) {
  word-break: auto-phrase;
  overflow-wrap: anywhere;
}
@supports not (word-break: auto-phrase) {
  :is(.fv-title, .fv-text, .lead-ja, .sub-ja, .column-ja, .column p,
      .split-text, .company-tag, .footer-note) {
    word-break: keep-all;
  }
}

.br-pc { display: inline; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--c-ivory);
  color: var(--c-green);
  font-size: var(--fs-small);
}
.skip-link:focus { top: 16px; }

.container {
  width: 100%;
  max-width: calc(var(--max-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --------------------------------------------------------------------------
   Shared typography
   -------------------------------------------------------------------------- */

.heading-en {
  font-family: var(--ff-en);
  font-size: var(--fs-h2);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: 0.015em;
  color: var(--c-green);
}

.sub-ja,
.lead-ja {
  font-family: var(--ff-ja);
  font-weight: 400;
  color: var(--c-green);
  letter-spacing: 0.12em;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--ff-en);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  line-height: 1;
  color: var(--c-green);
  padding-block: 8px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.text-link .arrow {
  font-size: 14px;
  letter-spacing: 0;
  transition: transform 0.3s ease;
}
.text-link:hover { border-bottom-color: var(--c-rule-strong); }
.text-link:hover .arrow { transform: translateX(3px); }

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

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--c-rule);
  background: var(--c-ivory);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
}

/* SVG の viewBox にクリアスペースが含まれるため、見た目幅 ≒ 200px になるよう指定 */
.header-logo {
  display: block;
  width: 232px;
  margin-left: -15px; /* viewBox 左のクリアスペース分を視覚補正（SVG 自体は編集しない） */
}
.header-logo img { width: 100%; height: auto; }

.header-brand {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.2vw, 32px);
}

/* サイト種別表示（ロゴの一部ではない） */
.site-type {
  padding: 6px 0 6px clamp(20px, 2.2vw, 32px);
  border-left: 1px solid var(--c-rule);
  font-size: 10.5px;
  line-height: 1.4;
  letter-spacing: 0.3em;
  color: var(--c-green);
  white-space: nowrap;
}

.site-nav ul {
  display: flex;
  gap: clamp(28px, 3.2vw, 52px);
}
.site-nav a {
  display: inline-block;
  padding-block: 8px;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--c-green);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.site-nav a:hover { border-bottom-color: var(--c-rule-strong); }

.menu-toggle { display: none; }

/* --------------------------------------------------------------------------
   FV
   -------------------------------------------------------------------------- */

.fv {
  position: relative;
  overflow: hidden;
  padding-top: var(--space-fv-top);
  padding-bottom: var(--space-fv-bottom);
}

.fv-curve {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.fv-curve path {
  fill: none;
  stroke: var(--c-green);
  stroke-width: 1;
  stroke-opacity: 0.22;
  vector-effect: non-scaling-stroke;
}

.fv-body {
  position: relative;
  padding-left: var(--indent);
}

.fv-eyebrow {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.26em;
  color: var(--c-green);
}

.fv-title {
  margin-top: clamp(40px, 4vw, 56px);
  font-family: var(--ff-ja);
  font-size: var(--fs-h1);
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: var(--c-green);
  white-space: nowrap;
}

.fv-text {
  max-width: 40em;
  margin-top: clamp(40px, 3.8vw, 56px);
  font-size: var(--fs-body);
  line-height: 2.1;
  letter-spacing: 0.08em;
  color: var(--c-text);
}

/* --------------------------------------------------------------------------
   Sections (common)
   -------------------------------------------------------------------------- */

.section > .container {
  position: relative;
}
/* 各セクションを細い罫線でつなぐ */
.section > .container::before,
.mission > .container::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  border-top: 1px solid var(--c-rule);
}
.mission > .container { position: relative; }

.section { padding-block: 0; }
.section > .container {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}

/* --------------------------------------------------------------------------
   Tea & Phytotherapy
   -------------------------------------------------------------------------- */

.phyto-head {
  position: relative;
  text-align: center;
}
.phyto-head .heading-en {
  font-size: clamp(34px, 3.4vw, 50px);
}
.phyto-head .lead-ja {
  margin-top: 18px;
  font-size: clamp(18px, 1.6vw, 23px);
  line-height: 1.8;
  letter-spacing: 0.16em;
}
.phyto-head .lead-en {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.8;
  letter-spacing: 0.08em;
  color: var(--c-muted);
}
.phyto-more {
  position: absolute;
  right: 0;
  bottom: 0;
}

.columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(56px, 5.6vw, 80px);
  padding-top: clamp(48px, 4.4vw, 64px);
  border-top: 1px solid var(--c-rule);
}

.column {
  padding: 4px clamp(28px, 3.9vw, 60px) 8px;
}
.column + .column { border-left: 1px solid var(--c-rule); }

.column-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 400;
  color: var(--c-green);
}
.column-en {
  font-size: 21px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.24em;
}
.column-ja {
  font-family: var(--ff-ja);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: 0.24em;
}
.column p {
  margin-top: 28px;
  font-size: var(--fs-small);
  line-height: 2.05;
  letter-spacing: 0.06em;
}

/* --------------------------------------------------------------------------
   Supply
   -------------------------------------------------------------------------- */

.supply > .container {
  padding-top: var(--space-supply);
  padding-bottom: var(--space-supply);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: clamp(40px, 5vw, 80px);
  align-items: start;
}
.split-head .sub-ja,
.group-head .sub-ja {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.8;
}
.split-text {
  max-width: 36em;
  padding-top: 10px;
  font-size: 16px;
  line-height: 2.1;
  letter-spacing: 0.06em;
}

/* --------------------------------------------------------------------------
   Our Group
   -------------------------------------------------------------------------- */

.group-grid {
  display: grid;
  grid-template-columns: minmax(0, 3.6fr) minmax(0, 8.4fr);
  column-gap: clamp(40px, 5vw, 80px);
  align-items: start;
}

.companies {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.company {
  padding: 4px clamp(20px, 2.2vw, 32px) 6px;
  border-left: 1px solid var(--c-rule);
}
/* 正規ロゴ。MARUHA ワードマーク部分の高さを --wordmark-h に揃える。
   ワードマークは各SVGの viewBox 内で高さ 667 単位、左クリアスペース 332 単位。
   各ロゴの viewBox 高さを --vb-h（HTML側）で渡し、表示高さを算出する（SVG自体は編集しない） */
.company-name {
  --wordmark-h: 22.6px;
  font-size: 0;
}
.company-name img {
  width: auto;
  height: calc(var(--wordmark-h) * var(--vb-h) / 667);
  margin-left: calc(var(--wordmark-h) * -332 / 667);
}
.company-tag {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: 0.05em;
}

.group-more {
  display: flex;
  justify-content: flex-end;
  margin-top: clamp(40px, 3.6vw, 52px);
}

/* --------------------------------------------------------------------------
   OUR MISSION
   -------------------------------------------------------------------------- */

.mission > .container {
  padding-top: var(--space-mission);
  padding-bottom: var(--space-mission);
}

.mission-body {
  text-align: center;
}

.mission-label {
  font-family: var(--ff-en);
  font-size: var(--fs-label);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.32em;
  color: var(--c-green);
}

.mission-ja {
  margin-top: clamp(48px, 4.8vw, 72px);
  font-size: var(--fs-mission);
  font-weight: 300;
  line-height: 1.95;
  letter-spacing: 0.1em;
  color: var(--c-green);
}
/* 理念は正式表記の改行位置で固定（和文3行・英文4行）。各行の中では折り返さない */
.mission-ja,
.mission-en { white-space: nowrap; }

.mission-en {
  margin: clamp(36px, 3.6vw, 52px) auto 0;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--c-green);
}

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

.site-footer {
  border-top: 1px solid var(--c-rule);
  color: var(--c-green);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px 48px;
  padding-top: 52px;
}

.footer-domain {
  font-size: 15px;
  letter-spacing: 0.12em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.footer-links {
  justify-content: flex-end;
  gap: 28px;
}

.footer-links a {
  display: inline-block;
  padding-block: 6px;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.1em;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.footer-links a.is-caps {
  font-size: 12px;
  letter-spacing: var(--ls-label);
}
.site-footer a[href]:hover { border-bottom-color: var(--c-rule-strong); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px 48px;
  padding-block: 44px 48px;
}

.footer-note {
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: 0.08em;
  color: var(--c-green);
}
.footer-note-link {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin-left: 24px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.footer-note-link .arrow {
  font-family: var(--ff-en);
  letter-spacing: 0;
}

.copyright {
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.16em;
  color: var(--c-green);
}
.copyright small { font-size: inherit; }

/* ==========================================================================
   Tablet
   ========================================================================== */

@media (max-width: 1080px) {
  .group-grid {
    grid-template-columns: 1fr;
    row-gap: 48px;
  }
  .company:first-child { border-left: 0; padding-left: 0; }
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 767px) {
  :root {
    --gutter: 22px;
    --indent: 0px;
    --fs-body: 15px;
    --fs-small: 15px;
    --header-h: 72px;
    --space-fv-top: 72px;
    --space-fv-bottom: 104px;
    --space-section: 80px;
    --space-supply: 72px;
    --space-mission: 128px;
    --fs-mission: 22px;
  }

  html { scroll-padding-top: 8px; }

  .br-pc { display: none; }

  /* Header / mobile menu */
  .header-logo {
    width: 164px;
    margin-left: -11px;
  }
  .header-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .header-inner { padding-block: 16px; }
  .site-type {
    margin-top: 8px;
    padding: 0;
    border-left: 0;
    font-size: 8.5px;
    letter-spacing: 0.26em;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 0 0 16px;
    margin-right: -2px;
    background: none;
    border: 0;
    font-family: var(--ff-en);
    font-size: 11px;
    letter-spacing: 0.28em;
    color: var(--c-green);
    cursor: pointer;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-ivory);
    border-bottom: 1px solid var(--c-rule);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
  }
  .site-header.is-open .site-nav {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.25s ease;
  }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 24px;
  }
  .site-nav li + li { border-top: 1px solid var(--c-rule); }
  .site-nav a {
    display: block;
    padding-block: 18px;
    font-size: 16px;
    border-bottom: 0;
  }

  /* FV */
  .fv-curve { display: none; }

  .fv-eyebrow {
    font-size: 12.5px;
    letter-spacing: 0.24em;
  }
  .fv-title {
    margin-top: 36px;
    /* 2行を保つため、画面幅から算出（12字＋字間） */
    font-size: min(30px, calc((100vw - 44px) / 13));
    font-weight: 400;
    line-height: 1.65;
    letter-spacing: 0.04em;
  }
  .fv-text {
    margin-top: 36px;
    line-height: 2.05;
    letter-spacing: 0.06em;
  }

  /* Tea & Phytotherapy */
  .phyto-head .heading-en { font-size: 32px; }
  .phyto-head .lead-ja {
    margin-top: 14px;
    font-size: 17px;
    letter-spacing: 0.1em;
  }
  .phyto-head .lead-en {
    max-width: 22em;
    margin-inline: auto;
    font-size: 14px;
    letter-spacing: 0.04em;
  }
  .phyto-more {
    position: static;
    margin-top: 28px;
  }

  .columns {
    grid-template-columns: 1fr;
    margin-top: 48px;
    padding-top: 0;
  }
  .column {
    padding: 40px 0 40px;
  }
  .column + .column {
    border-left: 0;
    border-top: 1px solid var(--c-rule);
  }
  .column:last-child { padding-bottom: 0; }
  .column-en { font-size: 18px; }
  .column-ja { font-size: 15px; }
  .column p { margin-top: 20px; }

  /* Supply */
  .split {
    grid-template-columns: 1fr;
    row-gap: 32px;
  }
  .heading-en { font-size: 30px; }
  .split-head .sub-ja,
  .group-head .sub-ja { margin-top: 10px; font-size: 15px; }
  .split-text { padding-top: 0; font-size: 15px; }

  /* Our Group */
  .group-grid { row-gap: 40px; }
  .companies { grid-template-columns: 1fr; }
  .company,
  .company:first-child {
    padding: 28px 0 30px;
    border-left: 0;
    border-top: 1px solid var(--c-rule);
  }
  .company:last-child { border-bottom: 1px solid var(--c-rule); }
  .company-tag { margin-top: 10px; }
  .company-name { --wordmark-h: 21.6px; }
  .group-more { justify-content: flex-start; margin-top: 32px; }

  /* OUR MISSION */
  .mission-ja {
    /* 最長行（14字）が 360px 幅でも1行に収まるよう画面幅から算出 */
    font-size: min(var(--fs-mission), calc((100vw - 44px) / 15.2));
    margin-top: 44px;
    line-height: 2.05;
    letter-spacing: 0.08em;
  }
  .mission-en {
    margin-top: 36px;
    font-size: 15px;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    padding-top: 48px;
  }
  .footer-links {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 10px 40px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    padding-block: 40px 44px;
  }
  .footer-note-link {
    display: flex;
    width: max-content;
    margin: 8px 0 0;
  }
}
