/*
Theme Name: Sara
Theme URI: https://example.com/sara
Description: 和のトーン・余白・陰翳を大切にした個別セッションサイト用 WordPress ブロックテーマ（FSE）。Shippori Mincho × 木漏れ日カラーパレット。
Author: Sara
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sara
Template:
Tags: full-site-editing, block-themes, japanese, minimal, one-column
*/

/* ──────────────────────────────────────────────
   sara — Final design system
   final.css をそのまま統合。すべてのクラス名・変数名は
   final.css / final-primitives.jsx に完全準拠。
   ────────────────────────────────────────────── */

:root {
  --ink:      #2a2620;
  --ink-2:    #4a463f;
  --ink-3:    #7a7367;
  --ink-4:    #a8a195;
  --paper:    #f4f1ea;
  --paper-2:  #ebe7dd;
  --paper-3:  #dfdacd;
  --rule:     #c9c3b3;
  --rule-2:   #e0d9c8;
  --accent:   #a6864a;   /* refined gold — luxury accent */
  --accent-2: #8a6a44;   /* deeper bronze for fine rules */
  --moss:     #5e6b46;   /* very subtle green pulled from FV */
  --hover:    #476e4b;   /* interactive normal green */
  --hover-bg: #b89b5e;   /* interactive hover gold */

  --serif: "Shippori Mincho", "Noto Serif JP", serif;
  --mono:  "JetBrains Mono", ui-monospace, monospace;

  /* Unifying tone filter applied to every photo. */
  --photo-tone: saturate(0.72) brightness(0.98) contrast(0.96);
}

* { box-sizing: border-box; }

body, .hf {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
}

.hf .serif { font-family: var(--serif); }
.hf .mono  { font-family: var(--mono);  }

/* ── Top-level artboard ─────────────────────── */
.hf-page {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  position: relative;
  overflow: hidden;
}

/* ── Header / Nav ───────────────────────────── */
.hf-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  padding: 18px 56px;
  pointer-events: none;
}
/* Solid paper background for consistent header across all pages. */
.hf-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper);
  pointer-events: none;
  z-index: -1;
}
.hf-header > * { pointer-events: auto; }
.hf-header .logo {
  height: 64px;
  width: auto;
  display: block;
}
.hf-header nav {
  display: flex;
  gap: 36px;
  justify-self: end;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.28em;
  color: var(--ink-2);
}
.hf-header nav a { color: var(--hover); text-decoration: none; transition: color 160ms; }
.hf-header nav a:hover { color: var(--ink); text-decoration: none; }

/* Header on light/photo backgrounds keeps default; on dark we invert via class. */
.hf-header.on-dark .logo,
.hf-header.on-dark nav { color: var(--paper); }

/* ── Section primitives ─────────────────────── */
.hf-section {
  position: relative;
  padding: 120px 80px;
}
.hf-section.tight  { padding: 80px 80px; }
.hf-section.bg-2   { background: var(--paper-2); }
.hf-section.bg-3   { background: var(--paper-3); }

.hf-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 22px;
  display: inline-flex; align-items: center; gap: 14px;
}
.hf-eyebrow::before {
  content: "";
  display: inline-block;
  width: 32px; height: 1px;
  background: var(--accent);
}

.hf-h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 56px;
  letter-spacing: 0.14em;
  line-height: 1.55;
  margin: 0;
  color: var(--ink);
}
.hf-h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 32px;
  letter-spacing: 0.18em;
  line-height: 1.6;
  margin: 0 0 32px;
  color: var(--ink);
}
.hf-h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.16em;
  line-height: 1.7;
  margin: 0;
}
.hf-lede {
  font-family: var(--serif);
  font-size: 14px;
  line-height: 2.2;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}

/* Section number marker */
.hf-secnum {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.35em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.hf-secnum::before {
  content: "";
  display: inline-block;
  width: 18px; height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 12px;
  margin-bottom: 3px;
}

/* Vertical-text accent */
.hf-vtext {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--serif);
  letter-spacing: 0.5em;
}

/* ── Buttons ────────────────────────────────── */
.hf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 28px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--hover);
  background: transparent;
  border: 1px solid var(--hover);
  cursor: pointer;
  text-decoration: none;
  transition: background 200ms, color 200ms, border-color 200ms;
}
.hf-btn:hover { color: var(--hover-bg); border-color: var(--hover-bg); text-decoration: none; }
.hf-btn.solid {
  background: var(--hover);
  color: var(--paper);
}
.hf-btn.solid:hover { background: transparent; color: var(--hover-bg); border-color: var(--hover-bg); }
.hf-btn.small {
  padding: 9px 18px;
  font-size: 11px;
}
.hf-btn .arrow {
  display: inline-block;
  width: 14px; height: 1px;
  background: currentColor;
  position: relative;
}
.hf-btn .arrow::after {
  content: "";
  position: absolute;
  right: 0; top: 50%;
  width: 6px; height: 1px;
  background: currentColor;
  transform-origin: right center;
  transform: translateY(-50%) rotate(40deg);
}

/* ── Photo primitive ─────────────────────────── */
.hf-photo {
  position: relative;
  background: #d9d4c6;
  overflow: hidden;
  display: block;
}
.hf-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: var(--photo-tone);
}
.hf-photo .caption {
  position: absolute;
  bottom: 14px; left: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(244,241,234,0.85);
  text-transform: uppercase;
}

/* Empty placeholder */
.hf-photo.placeholder {
  background:
    repeating-linear-gradient(135deg, #e0d9c8 0 10px, #d4ccb8 10px 20px);
}
.hf-photo.placeholder::after {
  content: attr(data-label);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--ink-3);
  text-transform: uppercase;
}

/* ── Decorative line-art ─────────────────────── */
.hf-illust {
  display: block;
  pointer-events: none;
  opacity: 0.55;
  filter: brightness(0.95);
}
.hf-illust.muted { opacity: 0.35; }

/* ── Divider rules ─────────────────────────── */
.hf-rule {
  height: 1px;
  background: var(--rule);
  border: none;
  margin: 0;
}
.hf-rule.dashed {
  height: 0;
  border-top: 1px dashed var(--rule);
  background: none;
}
.hf-rule.dotted {
  height: 0;
  border-top: 1px dotted var(--ink-4);
  background: none;
}

/* Centered ornament divider */
.hf-ornament {
  display: flex; align-items: center; justify-content: center;
  gap: 24px;
  margin: 0 auto;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}
.hf-ornament::before,
.hf-ornament::after {
  content: "";
  display: block;
  width: 80px; height: 1px;
  background: linear-gradient(to right, transparent, var(--accent));
}
.hf-ornament::after { background: linear-gradient(to left, transparent, var(--accent)); }

/* ── Form controls ─────────────────────────── */
.hf-field {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}
.hf-field label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.hf-field .req {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-left: 10px;
  padding: 1px 6px;
  border: 1px solid var(--accent);
}
.hf-field input,
.hf-field textarea,
.hf-field select {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: 10px 0;
  outline: none;
  width: 100%;
}
.hf-field input:focus,
.hf-field textarea:focus,
.hf-field select:focus {
  border-bottom-color: var(--ink);
}
.hf-field textarea { resize: vertical; min-height: 120px; line-height: 1.9; }
.hf-field .hint {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  line-height: 1.8;
}

/* ── Footer ─────────────────────────────────── */
.hf-footer {
  background: var(--hover); /* #476e4b — green (final-primitives.jsx) */
  color: var(--paper);
  padding: 80px 80px 40px;
  font-family: var(--serif);
}
.hf-footer .grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(244,241,234,0.18);
}
.hf-footer .logo {
  height: 72px;
  width: auto;
  display: block;
  margin-bottom: 22px;
}
.hf-footer .tagline {
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.08em;
  color: rgba(244,241,234,0.65);
  max-width: 280px;
}
.hf-footer h4 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: rgba(244,241,234,0.5);
  text-transform: uppercase;
  margin: 0 0 18px;
  font-weight: 400;
}
.hf-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hf-footer ul a {
  color: rgba(244,241,234,0.85);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: color 160ms;
}
.hf-footer ul a:hover { color: #cfe6cf; text-decoration: none; }
.hf-footer .bottom {
  margin-top: 28px;
  display: flex; justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(244,241,234,0.5);
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

/* ── FAQ accordion ─────────────────────────── */
.hf-faq-item {
  border-top: 1px solid var(--rule);
  padding: 28px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 24px;
  cursor: pointer;
}
.hf-faq-item .q {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.12em;
  color: var(--ink);
}
.hf-faq-item .toggle {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink-3);
  user-select: none;
}
.hf-faq-item.open .toggle { color: var(--ink); }
.hf-faq-item .a {
  grid-column: 1 / -1;
  margin-top: 16px;
  font-size: 13px;
  line-height: 2.1;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  max-width: 740px;
  white-space: pre-line;
}

/* ── Tag / pill ──────────────────────────── */
.hf-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--ink-3);
  text-transform: uppercase;
}

/* ── Mobile scope ─────────────────────────── */
.hf-mobile { font-size: 14px; }
.hf-mobile .hf-h1 { font-size: 28px; letter-spacing: 0.1em; }
.hf-mobile .hf-h2 { font-size: 20px; letter-spacing: 0.14em; margin-bottom: 20px; }
.hf-mobile .hf-section { padding: 64px 28px; }
.hf-mobile .hf-section.tight { padding: 48px 28px; }
.hf-mobile .hf-header { padding: 18px 22px; grid-template-columns: 1fr auto; }
.hf-mobile .hf-header .logo { height: 48px; }
.hf-mobile .hf-header nav { display: none; }
.hf-mobile .hf-footer { padding: 48px 28px 24px; }
.hf-mobile .hf-footer .grid { grid-template-columns: 1fr; gap: 32px; }

/* ── WP block overrides ──────────────────────── */
.wp-block-post-content {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 2.2;
  color: var(--ink-2);
}
.wp-block-post-content p { margin-bottom: 1.8em; }
.wp-block-post-content h2 { font-size: 22px; letter-spacing: 0.16em; margin: 2em 0 1em; }
.wp-block-post-content h3 { font-size: 18px; letter-spacing: 0.12em; margin: 1.8em 0 0.8em; }
.wp-block-separator { border: none; border-top: 1px dashed var(--rule); margin: 48px 0; }

/* ── FAQ interactive (vanilla JS) ──────────── */
/* Handled by inline script in front-page.html */

/* ── Responsive ─────────────────────────────── */
@media (max-width: 960px) {
  .hf-section { padding: 80px 40px; }
  .hf-section.tight { padding: 56px 40px; }
  .hf-header { padding: 20px 28px; }
  .hf-header nav { gap: 20px; font-size: 12px; }
  .hf-h1 { font-size: 36px; }
  .hf-h2 { font-size: 24px; }
  .hf-footer { padding: 56px 40px 32px; }
  .hf-footer .grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ── Mobile overrides (inline style reset) ───────────────
   front-page.html uses inline styles → need !important     */
@media (max-width: 640px) {
  .hf-section { padding: 64px 24px !important; }
  .hf-section.tight { padding: 48px 24px !important; }

  /* Header */
  .hf-header { padding: 12px 20px !important; min-height: unset !important; }
  .hf-header nav { display: none !important; }
  .hf-header .logo { height: 28px !important; }

  /* FV */
  #fv { height: 520px !important; }
  #fv > div[style*="left:80px"] {
    left: 24px !important;
    bottom: 48px !important;
    max-width: 90vw !important;
  }
  .hf-h1 { font-size: 28px !important; letter-spacing: 0.08em !important; line-height: 1.6 !important; }
  .hf-h2 { font-size: 20px !important; letter-spacing: 0.1em !important; }

  /* すべてのインラインgridを1カラムに */
  .hf-section > div[style*="grid-template-columns"],
  .hf-section > div > div[style*="grid-template-columns"],
  section[style*="grid-template-columns"] {
    display: block !important;
  }

  /* VALUES — セクションヘッダー（タイトル＋リード横並び） */
  #values-header,
  div[style*="align-items:flex-end"][style*="justify-content:space-between"] {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
    margin-bottom: 40px !important;
  }
  div[style*="align-items:flex-end"][style*="justify-content:space-between"] .hf-lede {
    max-width: 100% !important;
  }

  /* VALUES — 各ロウ */
  div[style*="grid-template-columns:1fr 1fr"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 32px !important;
  }
  div[style*="grid-template-columns:1fr 1fr"] > div { order: unset !important; }

  /* EMPATHY 3カラム */
  div[style*="grid-template-columns:80px 1fr 80px"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    max-width: 100% !important;
  }
  div[style*="grid-template-columns:80px 1fr 80px"] > div:first-child,
  div[style*="grid-template-columns:80px 1fr 80px"] > div:last-child { display: none !important; }

  /* SESSIONS 4カラム */
  div[style*="grid-template-columns:80px 280px 1fr 200px"] {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 16px !important;
  }
  div[style*="grid-template-columns:80px 280px 1fr 200px"] > div:first-child { display: none !important; }
  div[style*="grid-template-columns:80px 280px 1fr 200px"] > .hf-photo {
    grid-column: 1; grid-row: 1;
    aspect-ratio: 1/1 !important;
  }
  div[style*="grid-template-columns:80px 280px 1fr 200px"] > div:nth-child(3) {
    grid-column: 1 / -1; grid-row: 2;
  }
  div[style*="grid-template-columns:80px 280px 1fr 200px"] > div:last-child {
    grid-column: 2; grid-row: 1;
    text-align: left !important;
  }

  /* PRICING */
  div[style*="grid-template-columns:1fr 1.4fr"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 40px !important;
  }

  /* FLOW */
  div[style*="grid-template-columns:1fr 1.6fr"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 48px !important;
  }

  /* FAQ */
  div[style*="grid-template-columns:1fr 2fr"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 32px !important;
  }

  /* PROFILE */
  div[style*="grid-template-columns:1.1fr 1fr"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 40px !important;
  }

  /* JOURNAL */
  div[style*="grid-template-columns:1.4fr 1fr"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 40px !important;
  }

  /* ブログ記事リスト */
  a[style*="grid-template-columns:100px 1fr"] { gap: 14px !important; }

  /* 各セクションの左右padding上書き */
  section[style*="padding:160px 80px"],
  section[style*="padding:120px 80px"],
  section[style*="padding:160px 80px 120px"] {
    padding: 64px 24px !important;
  }

  /* ボタン群 */
  div[style*="display:flex"][style*="gap:14px"] {
    flex-direction: column !important;
    gap: 12px !important;
  }
  div[style*="justify-content:center"][style*="gap:14px"] {
    flex-direction: column !important;
    align-items: center !important;
  }

  /* フッター */
  .hf-footer { padding: 48px 24px 24px !important; }
  .hf-footer .grid { grid-template-columns: 1fr !important; }
}

/* ── Contact Form 7 ───────────────────────────── */
.sara-form-wrap .wpcf7 { font-family: var(--serif); }
.sara-form-wrap p { margin-bottom: 28px; }
.sara-form-wrap label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--ink-3);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.sara-form-wrap input[type="text"],
.sara-form-wrap input[type="email"],
.sara-form-wrap input[type="tel"],
.sara-form-wrap textarea,
.sara-form-wrap select {
  width: 100%;
  padding: 14px 16px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 0;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.sara-form-wrap input:focus,
.sara-form-wrap textarea:focus {
  border-color: var(--accent);
}
.sara-form-wrap textarea { min-height: 180px; resize: vertical; }
.sara-form-wrap input[type="submit"] {
  display: inline-block;
  padding: 14px 48px;
  background: var(--hover);
  color: #fff;
  border: none;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: opacity 0.2s;
}
.sara-form-wrap input[type="submit"]:hover { opacity: 0.85; }
.sara-form-wrap .wpcf7-not-valid-tip {
  font-family: var(--mono);
  font-size: 11px;
  color: #b05555;
  margin-top: 4px;
  display: block;
}
.sara-form-wrap .wpcf7-response-output {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 14px 16px;
  margin-top: 24px;
  border: 1px solid var(--rule);
  color: var(--ink-2);
}
