/* ============================================
   HIRO カイロプラクティック LP - Design Tokens
   ============================================ */

:root {
  /* Brand colors - パンフレット踏襲 */
  --green-primary: #7BA05B;
  --green-deep: #5C8345;
  --green-light: #A8C490;
  --green-pale: #E8EFD9;
  --green-mist: #F2F6E9;

  --accent-orange: #E8924A;
  --accent-coral: #D9785C;

  --line-green: #06C755;

  /* Neutrals */
  --cream: #FAF8F2;
  --cream-deep: #F1ECDD;
  --paper: #FEFDF8;
  --ink: #2C3424;
  --ink-soft: #4A5240;
  --ink-mute: #7A7E70;
  --line-soft: #D8D4C0;
  --line-dot: #C4C8B5;

  /* Typography */
  --font-serif: "Noto Serif JP", "Yu Mincho", "游明朝", serif;
  --font-sans: "Noto Sans JP", "Hiragino Sans", "ヒラギノ角ゴシック", sans-serif;
  --font-en: "Cormorant Garamond", "Noto Serif JP", serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Layout */
  --max-w: 1100px;
  --section-y: clamp(64px, 10vw, 120px);

  /* Shadow */
  --shadow-soft: 0 6px 28px rgba(60, 70, 40, 0.08);
  --shadow-card: 0 12px 36px rgba(60, 70, 40, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ============================================
   Site nav (sticky, in-page anchors)
   ============================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(254, 253, 248, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.site-nav.scrolled {
  background: rgba(254, 253, 248, 0.95);
  border-bottom-color: var(--line-soft);
}
.site-nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-deep);
  font-size: 15px;
  font-weight: 600;
  flex-shrink: 0;
}
.site-nav-brand svg { width: 22px; height: 22px; }
.site-nav-brand-sub {
  font-size: 11px;
  color: var(--ink-mute);
  font-weight: 500;
  margin-left: 6px;
  letter-spacing: 0.04em;
}
.site-nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  margin-right: 8px;
  flex-wrap: nowrap;
}
.site-nav-links a {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ink-soft);
  border-radius: 6px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.15s ease, background 0.15s ease;
}
.site-nav-links a:hover {
  color: var(--green-deep);
  background: var(--green-mist);
}
.site-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--line-green);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}
.site-nav-cta:hover { background: #05a847; transform: translateY(-1px); }
.site-nav-cta svg { width: 16px; height: 16px; }

@media (max-width: 900px) {
  .site-nav { display: none; }
}

section[id], footer[id] { scroll-margin-top: 72px; }

/* ============================================
   Mobile menu (hamburger + drawer)
   ============================================ */
.mobile-menu-toggle { display: none; }
.mobile-menu { display: none; }

@media (max-width: 900px) {
  .mobile-menu-toggle {
    display: block;
    position: fixed;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(254, 253, 248, 0.94);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    border-radius: 50%;
    border: 1px solid var(--line-soft);
    box-shadow: 0 2px 12px rgba(60,70,40,0.08);
    z-index: 60;
    cursor: pointer;
  }
  .mobile-menu-toggle span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 2px;
    margin-left: -10px;
    background: var(--ink);
    border-radius: 1px;
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
  }
  .mobile-menu-toggle span:nth-child(1) { transform: translateY(-7px); }
  .mobile-menu-toggle span:nth-child(2) { transform: translateY(0); }
  .mobile-menu-toggle span:nth-child(3) { transform: translateY(6px); }
  .mobile-menu-toggle.open span:nth-child(1) { transform: translateY(0) rotate(45deg); }
  .mobile-menu-toggle.open span:nth-child(2) { opacity: 0; }
  .mobile-menu-toggle.open span:nth-child(3) { transform: translateY(0) rotate(-45deg); }

  .mobile-menu {
    display: block;
    position: fixed;
    inset: 0;
    background: var(--paper);
    z-index: 55;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.28s ease, visibility 0.28s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-menu.open { visibility: visible; opacity: 1; }
  .mobile-menu-inner {
    padding: 88px 28px 56px;
    max-width: 100%;
    box-sizing: border-box;
  }
  .mobile-menu-brand {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--green-deep);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 32px;
    padding: 0 0 20px;
    border-bottom: 1px solid var(--line-soft);
    line-height: 1.2;
  }
  .mobile-menu-brand small {
    font-size: 11px;
    color: var(--ink-mute);
    font-weight: 500;
    letter-spacing: 0.06em;
  }
  .mobile-menu-links {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
  }
  .mobile-menu-links li + li { margin-top: 0; }
  .mobile-menu-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 4px;
    font-size: 17px;
    color: var(--ink);
    border-bottom: 1px dashed var(--line-dot);
    font-family: var(--font-serif);
    font-weight: 500;
    letter-spacing: 0.04em;
  }
  .mobile-menu-links a::after {
    content: "→";
    color: var(--green-light);
    font-family: var(--font-en);
    font-size: 16px;
    transition: transform 0.2s ease, color 0.2s ease;
  }
  .mobile-menu-links a:active { color: var(--green-deep); }
  .mobile-menu-links a:active::after { color: var(--green-primary); transform: translateX(3px); }
  .mobile-menu-cta {
    display: block;
    padding: 18px 24px;
    background: var(--line-green);
    color: #fff;
    text-align: center;
    border-radius: 999px;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.04em;
  }
  body.menu-open { overflow: hidden; }
}

/* ============================================
   Background paper texture (subtle)
   ============================================ */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(123,160,91,0.04) 0, transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(232,146,74,0.04) 0, transparent 40%);
}

main { position: relative; z-index: 1; }

/* ============================================
   Typography helpers
   ============================================ */
.serif { font-family: var(--font-serif); font-weight: 500; }
.en { font-family: var(--font-en); font-style: italic; letter-spacing: 0.02em; }
.mono { font-family: var(--font-mono); }

.eyebrow {
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--green-deep);
  text-transform: lowercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--green-primary);
}

/* ============================================
   Section frame (dotted, like printed brochure)
   ============================================ */
.section {
  padding: var(--section-y) 24px;
  position: relative;
}
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.5;
  margin: 12px 0 8px;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.section-sub {
  color: var(--ink-soft);
  font-size: 15px;
  margin-bottom: 48px;
  max-width: 640px;
}

/* Dotted divider (matches brochure feel) */
.dotted-line {
  border: none;
  border-top: 1.5px dashed var(--line-dot);
  margin: 0;
}

/* Hand-drawn underline */
.handwritten-mark {
  background-image: linear-gradient(transparent 60%, rgba(232,146,74,0.35) 60%);
  padding: 0 4px;
}

/* Tag chip — brochure style */
.brochure-tag {
  display: inline-block;
  padding: 6px 18px;
  background: var(--paper);
  border: 1px solid var(--green-primary);
  border-radius: 2px;
  color: var(--green-deep);
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  position: relative;
}
.brochure-tag::before,
.brochure-tag::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-primary);
  transform: translateY(-50%);
}
.brochure-tag::before { left: -3px; }
.brochure-tag::after { right: -3px; }

/* Corner registration marks (印刷物っぽさ) */
.corner-marks::before,
.corner-marks::after {
  content: "+";
  position: absolute;
  font-family: var(--font-mono);
  color: var(--line-soft);
  font-size: 14px;
  pointer-events: none;
}
.corner-marks::before { top: 16px; left: 16px; }
.corner-marks::after { bottom: 16px; right: 16px; }

/* ============================================
   Image placeholders (striped, brochure stock)
   ============================================ */
.img-ph {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(123,160,91,0.10) 0,
      rgba(123,160,91,0.10) 8px,
      rgba(123,160,91,0.04) 8px,
      rgba(123,160,91,0.04) 16px
    ),
    var(--green-pale);
  border: 1px solid rgba(123,160,91,0.25);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  text-align: center;
  letter-spacing: 0.04em;
  overflow: hidden;
}
.img-ph::after {
  content: attr(data-label);
  padding: 4px 10px;
  background: rgba(254,253,248,0.85);
  border: 1px dashed var(--line-dot);
  border-radius: 2px;
  max-width: 80%;
}
.img-ph.warm {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(232,146,74,0.10) 0,
      rgba(232,146,74,0.10) 8px,
      rgba(232,146,74,0.04) 8px,
      rgba(232,146,74,0.04) 16px
    ),
    #FBE9D8;
  border-color: rgba(232,146,74,0.25);
}
.img-ph.neutral {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(60,70,40,0.06) 0,
      rgba(60,70,40,0.06) 8px,
      rgba(60,70,40,0.02) 8px,
      rgba(60,70,40,0.02) 16px
    ),
    var(--cream-deep);
  border-color: var(--line-soft);
}

/* ============================================
   Buttons — phone & LINE
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.btn:active { transform: translateY(0); }

.btn-tel {
  background: var(--paper);
  color: var(--green-deep);
  border-color: var(--green-primary);
}
.btn-tel:hover { background: var(--green-mist); }

.btn-line {
  background: var(--line-green);
  color: #fff;
}
.btn-line:hover { background: #05a847; }

.btn-ghost {
  background: transparent;
  color: var(--green-deep);
  border-color: var(--line-soft);
}

.btn .icon { width: 22px; height: 22px; flex-shrink: 0; }

/* ============================================
   Floating CTA bar (mobile + desktop side)
   ============================================ */
.float-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  gap: 0;
  padding: 0;
  background: var(--paper);
  box-shadow: 0 -8px 24px rgba(60,70,40,0.12);
  border-top: 1px solid var(--line-soft);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.float-cta.visible { transform: translateY(0); }
.float-cta a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  font-size: 13px;
  font-weight: 700;
  gap: 4px;
  border-right: 1px solid var(--line-soft);
}
.float-cta a:last-child { border-right: none; }
.float-cta a small { display: block; font-size: 10px; opacity: 0.7; font-weight: 500; }
.float-cta .icon { width: 22px; height: 22px; }
.float-cta a.tel { color: var(--green-deep); }
.float-cta a.line { background: var(--line-green); color: #fff; }
.float-cta a.line small { opacity: 0.85; }

@media (min-width: 900px) {
  .float-cta {
    left: auto;
    right: 24px;
    bottom: 24px;
    flex-direction: column;
    width: 88px;
    padding: 8px;
    gap: 6px;
    border-radius: 16px;
    border: 1px solid var(--line-soft);
  }
  .float-cta a {
    border-right: none;
    border-bottom: none;
    border-radius: 12px;
    padding: 14px 6px;
    font-size: 11px;
  }
  .float-cta a.line { border-radius: 12px; }
}

/* ============================================
   Reusable: pill, marquee
   ============================================ */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--green-mist);
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 500;
}
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green-primary);
}

/* ============================================
   Animations
   ============================================ */
@keyframes float-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-soft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(123,160,91,0.4); }
  50% { box-shadow: 0 0 0 12px rgba(123,160,91,0); }
}
.animate-in { animation: float-in 0.8s ease both; }

/* ============================================
   Responsive helpers
   ============================================ */
@media (max-width: 768px) {
  body { padding-bottom: 72px; } /* account for fixed CTA */
  .section { padding: 48px 20px; }
}

/* ============================================
   Theme variations (Tweaks-driven)
   ============================================ */
body[data-theme="warm"] {
  --green-primary: #B8956A;
  --green-deep: #8B6E4E;
  --green-light: #D4B894;
  --green-pale: #F2E8D8;
  --green-mist: #F8F2E8;
  --accent-orange: #C66D3D;
  --cream: #FBF6EE;
  --cream-deep: #F0E5D0;
}

body[data-theme="mono"] {
  --green-primary: #4A5240;
  --green-deep: #2C3424;
  --green-light: #7A7E70;
  --green-pale: #E5E5DD;
  --green-mist: #F0F0EA;
  --accent-orange: #C66D3D;
}
