/* ============================================
   Tabi Yasuragi - Main Stylesheet
   ============================================ */

/* ---- CSS Variables ---- */
:root {
  --bg-primary: #F5F3EE;
  --bg-secondary: #EDEAE4;
  --text-primary: #1A2634;
  --text-secondary: #5A5A5A;
  --accent-rust: #A65D3A;
  --accent-green: #4A6B5A;
  --border-color: #D6D2CA;
  --error-color: #B54A3A;
  --white: #FFFFFF;
  --shadow-subtle: 0 1px 3px rgba(26, 38, 52, 0.06);
  --font-body: 'Noto Sans JP', 'Hiragino Sans', 'Meiryo', sans-serif;
  --font-en: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-content: 680px;
  --max-wide: 1100px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.lang-en {
  line-height: 1.6;
  letter-spacing: 0.01em;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-rust);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--accent-rust);
  outline-offset: 2px;
}

/* ---- Language Visibility ---- */
[data-lang] {
  display: none;
}

html[lang="ja"] [data-lang="ja"],
html[lang="en"] [data-lang="en"] {
  display: block;
}

html[lang="ja"] [data-lang="ja"].inline,
html[lang="en"] [data-lang="en"].inline {
  display: inline;
}

html[lang="ja"] [data-lang="ja"].inline-block,
html[lang="en"] [data-lang="en"].inline-block {
  display: inline-block;
}

html[lang="ja"] [data-lang="ja"].table-cell,
html[lang="en"] [data-lang="en"].table-cell {
  display: table-cell;
}

html[lang="ja"] [data-lang="ja"].flex,
html[lang="en"] [data-lang="en"].flex {
  display: flex;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  word-break: keep-all;
  overflow-wrap: break-word;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-top: 2rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.1rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }

p {
  margin-bottom: 1rem;
  max-width: var(--max-content);
}

.lang-en p {
  max-width: 720px;
}

/* ---- Layout ---- */
.container {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 3rem 0;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-rust);
  display: inline-block;
}

/* ---- Header & Navigation ---- */
.site-header {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-brand {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.site-brand a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}

.site-brand .tagline {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-primary);
  border-radius: 3px;
}

.nav-toggle:hover {
  border-color: var(--accent-rust);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.35rem 0.6rem;
  border-radius: 3px;
  transition: background-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  background-color: var(--bg-secondary);
  color: var(--accent-rust);
  text-decoration: none;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.5rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border-color);
}

.lang-toggle button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.25rem 0.4rem;
  color: var(--text-secondary);
  font-family: var(--font-body);
}

.lang-toggle button:hover {
  color: var(--accent-rust);
}

.lang-toggle button.active {
  color: var(--accent-rust);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  width: 100%;
  min-height: 420px;
  max-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-image.loaded {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(26, 38, 52, 0.35) 0%, rgba(26, 38, 52, 0.55) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 2rem;
  max-width: 800px;
}

.hero-content h1 {
  font-size: 2.25rem;
  color: var(--white);
  margin-bottom: 0.75rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.hero-content .tagline {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 1.5rem;
}

.hero-content .tagline-en {
  font-size: 0.95rem;
  opacity: 0.85;
  font-style: italic;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  border-radius: 3px;
}

.btn-primary {
  background-color: var(--accent-rust);
  color: var(--white);
}

.btn-primary:hover {
  background-color: #8a4d30;
  color: var(--white);
  text-decoration: none;
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent-rust);
  border: 1.5px solid var(--accent-rust);
}

.btn-secondary:hover {
  background-color: var(--accent-rust);
  color: var(--white);
  text-decoration: none;
}

.btn-green {
  background-color: var(--accent-green);
  color: var(--white);
}

.btn-green:hover {
  background-color: #3d5a4b;
  color: var(--white);
  text-decoration: none;
}

/* ---- Info Bands ---- */
.info-band {
  border: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  background-color: var(--white);
}

.info-band-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.info-band-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.info-band-item {
  display: flex;
  flex-direction: column;
}

.info-band-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.info-band-value {
  font-size: 0.9rem;
  font-weight: 500;
}

/* ---- Tables ---- */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border-color);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 700px;
}

.data-table thead {
  background-color: var(--accent-green);
  color: var(--white);
}

.data-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

.data-table tbody tr:hover {
  background-color: rgba(74, 107, 90, 0.04);
}

.data-table tbody tr:nth-child(even) {
  background-color: rgba(237, 234, 228, 0.4);
}

.rating {
  color: var(--accent-rust);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* ---- Steps / Process ---- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.step {
  text-align: center;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  background-color: var(--white);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--accent-rust);
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.step h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.step p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 auto;
}

/* ---- Photo Series (Story page) ---- */
.photo-series {
  margin: 2rem 0;
}

.photo-item {
  margin-bottom: 2.5rem;
}

.photo-item img {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.photo-caption {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.photo-caption [data-lang="en"] {
  font-style: italic;
  margin-top: 0.15rem;
}

/* ---- Service Tiers ---- */
.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.tier {
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  background-color: var(--white);
  display: flex;
  flex-direction: column;
}

.tier-featured {
  border-color: var(--accent-rust);
  border-width: 2px;
}

.tier h4 {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 0.25rem;
}

.tier .tier-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent-rust);
  margin-bottom: 1rem;
}

.tier ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  flex-grow: 1;
}

.tier ul li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  position: relative;
  padding-left: 1.25rem;
}

.tier ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent-rust);
}

/* ---- Forms ---- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.form-group .required::after {
  content: " *";
  color: var(--error-color);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  max-width: 500px;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-rust);
}

input.error,
select.error,
textarea.error {
  border-color: var(--error-color);
}

.error-msg {
  font-size: 0.8rem;
  color: var(--error-color);
  margin-top: 0.25rem;
  display: none;
}

.error-msg.show {
  display: block;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* ---- Accordion (FAQ) ---- */
.accordion {
  border: 1px solid var(--border-color);
  margin-bottom: 0.75rem;
  background-color: var(--white);
}

.accordion-header {
  width: 100%;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s;
}

.accordion-header:hover {
  background-color: var(--bg-secondary);
}

.accordion-header .icon {
  font-size: 1.2rem;
  color: var(--accent-rust);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.accordion.open .accordion-header .icon {
  transform: rotate(45deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion.open .accordion-body {
  max-height: 500px;
}

.accordion-content {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.accordion-content p {
  margin-bottom: 0.5rem;
}

.accordion-content p:last-child {
  margin-bottom: 0;
}

/* ---- Footer ---- */
.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-block h4 {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.footer-block p,
.footer-block address {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-style: normal;
}

.footer-block a {
  color: var(--accent-rust);
}

.footer-legal {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.footer-legal-links a {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.footer-legal-links a:hover {
  color: var(--accent-rust);
}

.copyright {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* ---- Cookie Consent ---- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--text-primary);
  color: var(--white);
  padding: 1.25rem 1.5rem;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
}

.cookie-text {
  font-size: 0.85rem;
  margin-bottom: 1rem;
  line-height: 1.6;
  opacity: 0.95;
}

.cookie-text a {
  color: #d4a574;
  text-decoration: underline;
}

.cookie-toggles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cookie-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.cookie-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-rust);
  cursor: pointer;
}

.cookie-toggle label {
  cursor: pointer;
  opacity: 0.9;
}

.cookie-toggle.disabled {
  opacity: 0.6;
}

.cookie-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cookie-buttons .btn {
  padding: 0.5rem 1.25rem;
  font-size: 0.8rem;
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

.divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 2rem 0;
}

.last-reviewed {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.note {
  background-color: rgba(74, 107, 90, 0.06);
  border-left: 3px solid var(--accent-green);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.note p {
  margin-bottom: 0.25rem;
}

.note p:last-child {
  margin-bottom: 0;
}

/* ---- Image fade-in ---- */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Thank You / 404 ---- */
.simple-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
}

.simple-page h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.simple-page p {
  margin: 0 auto 1.5rem;
  color: var(--text-secondary);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.1rem; }

  .hero {
    min-height: 300px;
  }

  .hero-content h1 {
    font-size: 1.6rem;
  }

  .hero-content .tagline {
    font-size: 0.9rem;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 0;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    width: 100%;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
  }

  .lang-toggle {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    width: 100%;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .site-brand {
    flex-grow: 1;
  }

  section {
    padding: 2rem 0;
  }

  .steps,
  .tiers,
  .info-band-grid {
    grid-template-columns: 1fr;
  }

  .footer-legal {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-toggles {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container,
  .container-narrow {
    padding: 0 1rem;
  }

  .hero-content {
    padding: 1.5rem 1rem;
  }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ---- Print ---- */
@media print {
  .site-header,
  .site-footer,
  .cookie-banner,
  .lang-toggle,
  .nav-toggle,
  .btn {
    display: none !important;
  }

  body {
    font-size: 11pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  section {
    padding: 1rem 0;
    page-break-inside: avoid;
  }
}
