/* ========================================
   ファミリア保険相談室 — Style
   Theme: やわらかい、安心、昭和のぬくもり
   ======================================== */

:root {
  --primary: #8B6F5E;
  --primary-dark: #6B5244;
  --accent: #C4956A;
  --accent-light: #D4AD88;
  --bg: #FDF6F0;
  --bg-warm: #F7ECE1;
  --bg-cream: #FAF0E6;
  --text: #4A3F37;
  --text-light: #7A6E64;
  --text-faint: #A89B90;
  --white: #FFFFFF;
  --border: #E8D8CA;
  --shadow: rgba(139, 111, 94, 0.08);
  --radius: 24px;
  --radius-sm: 12px;
  --radius-xs: 8px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Quicksand', 'Noto Sans JP', sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.9;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

/* ── Sample Banner ── */
.sample-banner {
  background: var(--primary);
  color: var(--white);
  text-align: center;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1000;
}

/* ── Header ── */
.header {
  position: fixed;
  top: 29px;
  left: 0;
  right: 0;
  z-index: 900;
  background: rgba(253, 246, 240, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.header.scrolled {
  top: 0;
  box-shadow: 0 2px 20px var(--shadow);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark svg {
  display: block;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-name {
  font-family: 'Zen Kurenaido', 'Noto Sans JP', sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--primary);
  letter-spacing: 0.1em;
}

.logo-sub {
  font-size: 10px;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

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

.nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  letter-spacing: 0.02em;
  position: relative;
}

.nav a:not(.nav-cta):hover {
  color: var(--primary);
}

.nav a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav a:not(.nav-cta):hover::after {
  width: 100%;
}

.nav-cta {
  background: var(--primary);
  color: var(--white) !important;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(253, 246, 240, 0.88) 0%,
    rgba(253, 246, 240, 0.75) 40%,
    rgba(196, 149, 106, 0.25) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 120px 24px 80px;
  max-width: 700px;
}

.hero-envelope {
  position: relative;
  margin-bottom: 40px;
}

.hero-letter {
  background: var(--white);
  border-radius: var(--radius);
  padding: 48px 40px 40px;
  box-shadow:
    0 4px 40px rgba(139, 111, 94, 0.12),
    0 1px 3px rgba(139, 111, 94, 0.08);
  text-align: left;
  position: relative;
  border: 1px solid var(--border);
}

.hero-letter::before {
  content: '';
  position: absolute;
  top: 0;
  left: 40px;
  right: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary), var(--accent));
  border-radius: 0 0 4px 4px;
  opacity: 0.5;
}

.hero-greeting {
  font-family: 'Zen Kurenaido', 'Noto Sans JP', sans-serif;
  font-size: 16px;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: 0.15em;
}

.hero-letter h1 {
  font-family: 'Zen Kurenaido', 'Noto Sans JP', sans-serif;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 400;
  line-height: 1.7;
  color: var(--primary-dark);
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}

.hero-body {
  font-size: 14px;
  line-height: 2.2;
  color: var(--text-light);
  margin-bottom: 24px;
}

.hero-signature {
  text-align: right;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.hero-signature span {
  font-family: 'Zen Kurenaido', 'Noto Sans JP', sans-serif;
  font-size: 16px;
  color: var(--primary);
  letter-spacing: 0.15em;
}

.hero-cta {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 16px 40px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 20px rgba(139, 111, 94, 0.25);
  transition: all 0.3s ease;
}

.hero-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 111, 94, 0.3);
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.hero-scroll span {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  text-transform: uppercase;
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: var(--accent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ── Section Common ── */
.section {
  padding: 100px 0;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-label.center {
  text-align: center;
}

.section-title {
  font-family: 'Zen Kurenaido', 'Noto Sans JP', sans-serif;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 400;
  line-height: 1.6;
  color: var(--primary-dark);
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}

.section-title.center {
  text-align: center;
}

.section-sub {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.9;
}

.section-sub.center {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

/* ── About Section ── */
.section-about {
  background: var(--bg);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: center;
}

.about-photo-area {
  position: relative;
}

.about-photo-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 40px var(--shadow);
  border: 6px solid var(--white);
  transform: rotate(-2deg);
  transition: transform 0.5s ease;
}

.about-photo-frame:hover {
  transform: rotate(0deg);
}

.about-photo-frame img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}

.about-years {
  position: absolute;
  bottom: -16px;
  right: -16px;
  background: var(--white);
  border-radius: 50%;
  width: 100px;
  height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px var(--shadow);
  border: 3px solid var(--bg-warm);
  transform: rotate(8deg);
}

.about-years-num {
  font-family: 'Quicksand', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.about-years-text {
  font-size: 10px;
  color: var(--text-light);
  text-align: center;
  line-height: 1.3;
}

.about-story p {
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text);
  line-height: 2.1;
}

.about-profiles {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.about-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-warm);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
}

.about-profile-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Zen Kurenaido', 'Noto Sans JP', sans-serif;
  font-size: 16px;
  color: var(--primary);
  flex-shrink: 0;
}

.about-profile div:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.about-profile strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
}

.about-profile span {
  font-size: 12px;
  color: var(--text-light);
}

/* ── Consultations Section ── */
.section-consultations {
  background: var(--bg-warm);
}

.consult-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.consult-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.consult-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-light), var(--accent));
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.consult-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--shadow);
}

.consult-card:hover::after {
  transform: scaleX(1);
}

.consult-card-icon {
  margin-bottom: 16px;
}

.consult-card h3 {
  font-family: 'Zen Kurenaido', 'Noto Sans JP', sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.consult-voice {
  font-size: 13px;
  color: var(--accent);
  font-style: italic;
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 2px solid var(--accent-light);
  line-height: 1.8;
}

.consult-card > p:last-child {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.9;
}

/* ── Flow Section ── */
.section-flow {
  background: var(--bg);
}

.flow-timeline {
  max-width: 600px;
  margin: 56px auto 0;
  position: relative;
}

.flow-timeline::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 23px;
  width: 2px;
  bottom: 24px;
  background: repeating-linear-gradient(
    to bottom,
    var(--border) 0px,
    var(--border) 6px,
    transparent 6px,
    transparent 12px
  );
}

.flow-step {
  display: flex;
  gap: 28px;
  margin-bottom: 40px;
  position: relative;
}

.flow-step:last-child {
  margin-bottom: 0;
}

.flow-step-marker {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.flow-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--accent);
  font-family: 'Quicksand', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.flow-step:hover .flow-step-num {
  background: var(--accent);
  color: var(--white);
  transition: all 0.3s ease;
}

.flow-step-content {
  padding-top: 4px;
}

.flow-step-label {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.flow-step-content h3 {
  font-family: 'Zen Kurenaido', 'Noto Sans JP', sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.flow-step-content p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.9;
}

.flow-note {
  text-align: center;
  margin-top: 48px;
  padding: 20px;
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-light);
}

.flow-note strong {
  color: var(--primary);
}

/* ── Letters Section ── */
.section-letters {
  background: var(--bg-warm);
  position: relative;
  overflow: hidden;
}

.section-letters::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.04;
}

.letters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 48px;
}

.letter-card {
  position: relative;
}

.letter-card-inner {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  border: 1px solid var(--border);
  position: relative;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  /* subtle paper texture via gradient */
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      rgba(200, 180, 160, 0.06) 27px,
      rgba(200, 180, 160, 0.06) 28px
    );
  background-size: 100% 28px;
}

.letter-card:hover .letter-card-inner {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px var(--shadow);
}

.letter-stamp {
  position: absolute;
  top: 16px;
  right: 20px;
  opacity: 0.5;
}

.letter-body {
  font-size: 14px;
  line-height: 2;
  color: var(--text);
  flex: 1;
  margin-bottom: 20px;
}

.letter-from {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.letter-author {
  font-weight: 600;
  font-size: 14px;
  color: var(--primary);
}

.letter-detail {
  font-size: 12px;
  color: var(--text-faint);
}

/* ── Contact Section ── */
.section-contact {
  background: var(--bg);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: start;
}

.contact-message p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 2;
  margin-bottom: 16px;
}

.contact-info {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact-info-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info-label {
  font-size: 11px;
  color: var(--text-faint);
  display: block;
}

.contact-info-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-dark);
}

.contact-form-area {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 32px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px var(--shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-family: 'Quicksand', 'Noto Sans JP', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  transition: all 0.3s ease;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.12);
  background: var(--white);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-faint);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-submit {
  width: 100%;
  padding: 16px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-family: 'Quicksand', 'Noto Sans JP', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.06em;
}

.form-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(139, 111, 94, 0.25);
}

.form-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 12px;
}

/* ── Footer ── */
.footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 0 24px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: start;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}

.footer-name {
  font-family: 'Zen Kurenaido', 'Noto Sans JP', sans-serif;
  font-size: 18px;
  color: var(--white);
  display: block;
  margin-bottom: 8px;
  letter-spacing: 0.08em;
}

.footer-brand p {
  font-size: 12px;
  line-height: 1.8;
  opacity: 0.6;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-bottom {
  text-align: center;
  font-size: 11px;
  opacity: 0.4;
}

/* ── Scroll Animations ── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ── Responsive ── */
.sp-only {
  display: none;
}

@media (max-width: 900px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-photo-area {
    max-width: 360px;
    margin: 0 auto;
  }

  .consult-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .letters-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sp-only {
    display: inline;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg);
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 0;
    box-shadow: -4px 0 24px var(--shadow);
    transition: right 0.35s ease;
    z-index: 800;
  }

  .nav.open {
    right: 0;
  }

  .nav a {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    width: 100%;
    font-size: 15px;
  }

  .nav a::after {
    display: none;
  }

  .nav-cta {
    margin-top: 16px;
    text-align: center;
    border-bottom: none !important;
  }

  .hamburger {
    display: flex;
    z-index: 850;
  }

  .hero-content {
    padding: 100px 16px 60px;
  }

  .hero-letter {
    padding: 32px 24px 28px;
  }

  .hero-letter::before {
    left: 24px;
    right: 24px;
  }

  .section {
    padding: 72px 0;
  }

  .consult-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .consult-card {
    padding: 24px 20px;
  }

  .flow-timeline::before {
    left: 19px;
  }

  .flow-step {
    gap: 20px;
  }

  .flow-step-num {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 24px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 12px 20px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .header-inner {
    height: 56px;
  }

  .logo-name {
    font-size: 16px;
  }

  .hero-letter h1 {
    font-size: 20px;
  }

  .hero-body {
    font-size: 13px;
  }

  .hero-body br {
    display: none;
  }

  .section-title {
    font-size: 22px;
  }

  .contact-form-area {
    padding: 28px 20px;
  }

  .about-years {
    width: 80px;
    height: 80px;
    bottom: -12px;
    right: -8px;
  }

  .about-years-num {
    font-size: 26px;
  }
}
