/* muggytea.com（MuggyTea のポートフォリオ）
   雰囲気は HeldLine の LP に寄せる: やさしく、やわらかく、押し付けがましくない。
   淡い背景と細い1段組み、角の丸いカード。強い色は茶の緑だけに絞る。 */

:root {
  color-scheme: light dark;
  --bg: #fafbfa;
  --bg-warm: #fff9f4;
  --bg-tea: #f0f6f2;
  --card: #ffffff;
  --text: #1e2833;
  --text-sub: #56616d;
  --text-light: #7c8590;
  --tea: #2e7a58;
  --tea-strong: #256548;
  --tea-soft: #e3f1e9;
  --on-tea: #ffffff;
  --border: #e5eae7;
  --border-strong: #d3dbd6;
  --danger: #b0473e;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 3px rgba(30, 40, 51, 0.04), 0 8px 24px rgba(30, 40, 51, 0.04);
  --font-ja: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  --font-en: "DM Sans", var(--font-ja);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151a18;
    --bg-warm: #1b1e1c;
    --bg-tea: #17201b;
    --card: #1d2420;
    --text: #e7ece9;
    --text-sub: #b1bbb5;
    --text-light: #8f9993;
    --tea: #7cc5a0;
    --tea-strong: #9ad6b6;
    --tea-soft: #213529;
    --on-tea: #0f1f18;
    --border: #2a332e;
    --border-strong: #3a4540;
    --danger: #f0938a;
    --shadow: none;
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font-ja);
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
  /* 上だけほんのり暖かく。ヒーローの下で地の色に溶ける */
  background-color: var(--bg);
  background-image: linear-gradient(180deg, var(--bg-warm) 0, var(--bg) 640px);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  /* 日本語を文節で折り返す（対応していないブラウザは通常の折り返し） */
  word-break: auto-phrase;
  text-wrap: pretty;
}

html[lang="en"] body {
  font-family: var(--font-en);
  line-height: 1.75;
}

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

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

a {
  color: var(--tea);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--tea-strong);
}

:focus-visible {
  outline: 2px solid var(--tea);
  outline-offset: 3px;
  border-radius: 6px;
}

/* リンクの途中で行が切れないように */
main p a {
  white-space: nowrap;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.45;
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

.measure {
  max-width: 34em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* 本文へ移動（キーボードで最初に出る） */

.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
}

.skip:focus {
  top: 12px;
}

/* ヘッダー（パシャべりの LP に近い形: 左に名前、右に SNS・言語・お問い合わせ。下に線） */

.site-header {
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
}

.wordmark {
  font-family: var(--font-en);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.wordmark:hover {
  color: var(--text);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.icon-link,
.lang-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  min-height: 40px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--text-sub);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.icon-link:hover,
.lang-link:hover {
  background: var(--tea-soft);
  color: var(--tea-strong);
}

.icon-link svg,
.lang-link svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

/* お問い合わせへ（同じページなら #contact へなめらかに移る） */
.nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-left: 8px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--tea);
  color: var(--on-tea);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--tea-strong);
  color: var(--on-tea);
}

/* ヒーロー */

.hero {
  padding: 56px 0 24px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(28px, 7.4vw, 46px);
  line-height: 1.4;
  letter-spacing: 0.04em;
}

html[lang="en"] .hero h1 {
  letter-spacing: -0.015em;
}

/* 見出しの切れ目を決める（スマホで2行になるときは文節の間で切る） */
.nobr {
  display: inline-block;
}

.tagline {
  margin-top: 14px;
  font-family: var(--font-en);
  font-size: clamp(17px, 4.4vw, 21px);
  font-weight: 700;
  letter-spacing: 0.005em;
  color: var(--tea);
}

.hero-lead {
  max-width: 28em;
  margin: 28px auto 0;
  font-size: clamp(15px, 3.9vw, 16.5px);
  line-height: 2;
  color: var(--text-sub);
}

html[lang="en"] .hero-lead {
  line-height: 1.8;
}

/* 各セクション */

.block {
  padding: 64px 0;
}

.block h2 {
  margin-bottom: 24px;
  font-size: clamp(21px, 5.2vw, 25px);
  letter-spacing: 0.03em;
}

html[lang="en"] .block h2 {
  letter-spacing: -0.01em;
}

.section-lead {
  color: var(--text-sub);
}

.tinted {
  background: var(--bg-tea);
}

.warm {
  background: var(--bg-warm);
}

/* 作ったもの */

.works {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.work {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.work img {
  width: 64px;
  height: 64px;
  border-radius: 15px;
}

.work h3 {
  margin: 2px 0 6px;
  font-size: 17px;
}

.work-desc {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--text-sub);
}

.work-meta {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-light);
}

.work-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.work-links a {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--tea-soft);
  color: var(--tea-strong);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  text-decoration: none;
}

.work-links a:hover {
  background: color-mix(in srgb, var(--tea-soft) 78%, var(--tea) 22%);
}

.more-works {
  margin-top: 28px;
  font-size: 14px;
  color: var(--text-sub);
}

/* MuggyTea について */

/* 日本語の目標の文は1行が長めなので、この節だけ少し広くとる */
.about .measure {
  max-width: 40em;
}

html[lang="en"] .about .measure {
  max-width: 34em;
}

.about p + p {
  margin-top: 30px;
  margin-top: 1lh;
}

.about .goal {
  margin: 30px 0;
  padding: 20px 24px;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: clamp(17px, 4.3vw, 19.5px);
  font-weight: 700;
  line-height: 1.85;
  color: var(--text);
}

/* お問い合わせ */

.contact-form {
  display: grid;
  gap: 20px;
  margin-top: 28px;
  padding: 28px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 14.5px;
  font-weight: 700;
}

.hint {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-light);
}

select,
textarea,
input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--bg);
  color: var(--text);
  font: inherit;
  /* 16px 未満だと iPhone が入力時に拡大する */
  font-size: 16px;
  line-height: 1.6;
}

select {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%237c8590' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

textarea {
  min-height: 9.5em;
  resize: vertical;
}

select:focus,
textarea:focus,
input[type="email"]:focus {
  outline: none;
  border-color: var(--tea);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tea) 22%, transparent);
}

.cf-turnstile {
  min-height: 65px;
}

.button {
  justify-self: start;
  padding: 12px 34px;
  border: 0;
  border-radius: 999px;
  background: var(--tea);
  color: var(--on-tea);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--tea) 24%, transparent);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--tea) 28%, transparent);
}

.button[disabled] {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.form-status {
  min-height: 1.6em;
  font-size: 14px;
  color: var(--text-sub);
}

.form-status[data-state="sent"] {
  font-weight: 700;
  color: var(--tea-strong);
}

.form-status[data-state="error"] {
  font-weight: 700;
  color: var(--danger);
}

/* 説明のページ（お問い合わせの情報の扱い・404） */

.page-title {
  margin-bottom: 24px;
  font-size: clamp(23px, 6vw, 30px);
  letter-spacing: 0.03em;
}

html[lang="en"] .page-title,
[lang="en"] .page-title {
  letter-spacing: -0.01em;
}

.doc h2 {
  margin: 36px 0 10px;
  font-size: 18px;
}

.doc p + p {
  margin-top: 14px;
}

.doc ul {
  margin: 0;
  padding-left: 1.3em;
}

.doc li + li {
  margin-top: 4px;
}

.doc .hint {
  margin-top: 32px;
}

/* フッター */

.site-footer {
  padding: 40px 0 48px;
  font-size: 13px;
  text-align: center;
  color: var(--text-light);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--text-sub);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--tea);
  text-decoration: underline;
}

@media (min-width: 640px) {
  .wrap {
    padding: 0 28px;
  }

  .header-inner {
    min-height: 80px;
  }

  .hero {
    padding: 88px 0 32px;
  }

  .block {
    padding: 80px 0;
  }

  .contact-form {
    padding: 32px;
  }
}

/* スマホ: 言語は地球のマークだけにして、1行に収める（文字は読み上げ用に残す） */
@media (max-width: 440px) {
  .header-nav {
    gap: 0;
  }

  .icon-link,
  .lang-link {
    min-width: 36px;
    padding: 0 7px;
  }

  .lang-link .lang-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .nav-cta {
    margin-left: 4px;
    padding: 0 13px;
  }
}

@media (max-width: 360px) {
  .wordmark {
    font-size: 17px;
  }

  .nav-cta {
    padding: 0 11px;
    font-size: 13px;
  }
}

@media (max-width: 420px) {
  .work {
    grid-template-columns: 52px 1fr;
    gap: 14px;
    padding: 18px;
  }

  .work img {
    width: 52px;
    height: 52px;
    border-radius: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }

  .button:hover {
    transform: none;
  }
}
