/* ==========================================================
   みらい司法書士法人 - watercolor / kobako-design inspired
   ========================================================== */

:root {
  --navy: #1a2f5c;
  --navy-dark: #142648;
  --gold: #d4b878;
  --gold-soft: #e8d4a4;
  --cream: #faf6ed;
  --cream-2: #f6eedb;
  --cream-3: #f0e8d3;
  --ink: #2d2d2d;
  --muted: #6f6a5d;
  --line: #e5dec7;
  --font-jp: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-en: "Cormorant Garamond", serif;
  --container: 1100px;
  --radius: 16px;
  --radius-lg: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-jp);
  font-weight: 400;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.9;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.03em;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img, svg { max-width: 100%; display: block; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }

.sp-only { display: none; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  transition: all 0.25s ease;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
}
.btn .arrow { font-size: 16px; line-height: 1; opacity: 0.9; }
.btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-dark); }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-pill { background: var(--navy); color: #fff; padding: 12px 22px; font-size: 13px; }
.btn-pill:hover { background: var(--navy-dark); }
.btn.small { padding: 11px 20px; font-size: 12.5px; }
.btn.big { padding: 22px 56px; font-size: 15px; }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 100;
  border-bottom: 1px solid transparent;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 92px;
  gap: 24px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark svg { width: 46px; height: 46px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-jp { font-size: 17px; font-weight: 600; color: var(--navy); letter-spacing: 0.06em; }
.logo-en { font-family: var(--font-en); font-size: 10.5px; color: var(--muted); letter-spacing: 0.1em; margin-top: 3px; font-style: italic; }

.main-nav ul { display: flex; gap: 30px; }
.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  padding: 8px 2px;
  position: relative;
  transition: color 0.2s;
  white-space: nowrap; /* never wrap label internally */
}
.main-nav a:hover { color: var(--navy); }
.main-nav a.active { color: var(--navy); }
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 50%; transform: translateX(-50%);
  bottom: 0;
  width: 24px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}
.header-cta { padding: 13px 22px; font-size: 13px; }

/* ============ Hero ============ */
.hero {
  position: relative;
  background: #ffffff;
  padding: 30px 0 140px;
  overflow: hidden;
}
.hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 100px;
  display: block;
  z-index: 1;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 30px;
  align-items: center;
  position: relative;
}
.hero-copy { padding-right: 20px; }
.hero h1 {
  font-size: 40px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.55;
  letter-spacing: 0.05em;
  margin-bottom: 28px;
}
.hero h1 .hl {
  background: linear-gradient(transparent 60%, var(--gold-soft) 60%);
  padding: 0 4px;
}
.hero-lead {
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 40px;
  line-height: 2;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-actions .btn { min-width: 190px; }

.hero-illust { position: relative; z-index: 2; }
.hero-illust img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============ Section Titles ============ */
.section-title {
  text-align: center;
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
}
.section-title.left { align-items: flex-start; text-align: left; margin-bottom: 32px; }
.section-title .ja {
  font-size: 26px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.12em;
}
.section-title.small .ja { font-size: 20px; letter-spacing: 0.1em; }
.section-title .rule {
  width: 36px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}
.leaf-deco {
  position: absolute;
  right: 50%;
  margin-right: -120px;
  top: 8px;
  width: 80px;
  opacity: 0.9;
}

/* ============ Reasons ============ */
.reasons { padding: 64px 0 72px; background: var(--cream); }
.reasons .container { max-width: 880px; }
.reasons .section-title { margin-bottom: 44px; }
.reasons .section-title .ja { font-size: 22px; letter-spacing: 0.14em; }
.reasons .section-title .rule { width: 28px; }
.reasons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 760px;
  margin: 0 auto;
}
.reason { text-align: center; padding: 0 4px; }
.reason-icon {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.reason-icon svg { width: 44px; height: 44px; }
.reason h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
  letter-spacing: 0.1em;
}
.reason p {
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.95;
  letter-spacing: 0.02em;
}

/* ============ Services ============ */
.services { padding: 80px 0 100px; background: var(--cream-2); position: relative; }
.services .container { max-width: 1200px; }
.services .section-title .ja { position: relative; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 26px;
}
.service-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 26px 26px;
  text-align: center;
  border: 1px solid #f0e7cf;
  transition: transform 0.25s, box-shadow 0.25s;
  position: relative;
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(180, 150, 80, 0.14);
}
.svc-icon { margin-bottom: 16px; display: flex; justify-content: center; }
.service-card h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
  letter-spacing: 0.08em;
}
.service-card p {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.9;
  margin-bottom: 18px;
  min-height: 78px;
  text-align: left;
}
.service-card .more {
  font-size: 11px;
  color: var(--navy);
  font-weight: 500;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  align-self: flex-start;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
}
.service-card .more:hover { color: var(--gold); }

/* ============ Representative Preview ============ */
.rep-preview {
  padding: 84px 0 92px;
  background: linear-gradient(180deg, var(--cream-2) 0%, var(--cream) 100%);
  position: relative;
  overflow: hidden;
}
.rep-preview .container { max-width: 1100px; position: relative; z-index: 2; }
.rep-preview-inner {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 60px;
  align-items: center;
}
.rep-photo-wrap {
  position: relative;
}
.rep-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, #f6eedb, #ead9b0);
  box-shadow: 0 16px 36px rgba(160, 130, 60, 0.18);
}
.rep-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.rep-photo.no-img::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 38%, rgba(255,255,255,0.7), transparent 35%),
    radial-gradient(circle at 30% 80%, rgba(212,184,120,0.4), transparent 50%);
}
.rep-photo.no-img::after {
  content: "代表写真（差替予定）";
  position: absolute;
  left: 50%; bottom: 24px;
  transform: translateX(-50%);
  font-size: 11px;
  color: rgba(26,47,92,0.5);
  letter-spacing: 0.1em;
  background: rgba(255,255,255,0.75);
  padding: 4px 12px;
  border-radius: 50px;
}
.rep-badge {
  position: absolute;
  right: -18px;
  top: 26px;
  background: var(--navy);
  color: #fff;
  border-radius: 14px;
  padding: 10px 18px;
  text-align: center;
  box-shadow: 0 8px 22px rgba(26, 47, 92, 0.25);
  z-index: 3;
  line-height: 1.2;
}
.rep-badge .badge-en {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.22em;
  margin-bottom: 3px;
}
.rep-badge .badge-jp {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
}
.rep-copy { padding-right: 8px; }
.rep-en {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.rep-name {
  font-size: 30px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.rep-name small {
  font-size: 12.5px;
  color: #999;
  letter-spacing: 0.1em;
  font-weight: 400;
}
.rep-role {
  font-size: 12.5px;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 22px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.rep-role::before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}
.rep-intro {
  font-size: 14px;
  line-height: 2;
  color: var(--ink);
  margin-bottom: 26px;
}
.rep-intro strong { color: var(--navy); }

/* leaf deco for rep-preview */
.rep-preview .rep-leaf {
  position: absolute;
  right: -40px;
  bottom: 20px;
  width: 140px;
  opacity: 0.28;
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 820px) {
  .rep-preview { padding: 60px 0 70px; }
  .rep-preview-inner { grid-template-columns: 1fr; gap: 36px; }
  .rep-photo-wrap { max-width: 300px; margin: 0 auto; }
  .rep-copy { padding-right: 0; text-align: center; }
  .rep-name { font-size: 26px; justify-content: center; }
  .rep-role { justify-content: center; }
  .rep-role::before { display: none; }
}
@media (max-width: 480px) {
  .rep-name { font-size: 22px; }
  .rep-intro { font-size: 13px; }
  .rep-preview .rep-leaf { display: none; }
}

/* ============ About ============ */
.about { padding: 90px 0; background: var(--cream); }
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-illust {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(160, 130, 60, 0.12);
}
.about-illust img {
  width: 100%;
  height: auto;
  display: block;
}
.about-copy .section-title { margin-bottom: 28px; }
.about-copy p {
  font-size: 14px;
  line-height: 2.1;
  margin-bottom: 32px;
  color: var(--ink);
}

/* ============ Info Block (news + access) ============ */
.info-block { padding: 30px 0 90px; background: var(--cream); }
.info-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  align-items: stretch;
}
.info-grid > .news,
.info-grid > .access {
  background: var(--cream-2);
  border-radius: var(--radius-lg);
  padding: 36px 36px 32px;
  border: 1px solid #efe5cb;
  display: flex;
  flex-direction: column;
}
.info-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}
.info-head .section-title { margin-bottom: 0; }
.more-link {
  font-size: 12px;
  color: var(--navy);
  letter-spacing: 0.08em;
  padding: 6px 16px;
  border: 1px solid var(--navy);
  border-radius: 999px;
}
.more-link:hover { background: var(--navy); color: #fff; }

.news-list { border-top: 1px solid #ddd0a8; }
.news-list li {
  display: grid;
  grid-template-columns: 90px 86px 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px 4px;
  border-bottom: 1px solid #ddd0a8;
  font-size: 13px;
}
.news-list time { color: var(--muted); font-size: 12px; }
.tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 999px;
  text-align: center;
  letter-spacing: 0.05em;
}
.tag-info { background: #fff; color: var(--navy); border: 1px solid #d8c898; }
.tag-column { background: var(--gold-soft); color: #7a5a1a; }
.news-list a { color: var(--ink); transition: color 0.2s; }
.news-list a:hover { color: var(--gold); }

/* access */
.access .access-line { font-size: 13.5px; margin-bottom: 12px; line-height: 1.9; }
.access .access-line strong { font-weight: 600; color: var(--navy); }
.access-addr {
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.95;
  margin-bottom: 20px;
}
.access-addr .addr-note {
  font-size: 11px;
  color: var(--muted);
}
/* Access map (sits inside the .access card and grows to match the news card height) */
.access-map {
  margin: 22px 0 0;
  flex: 1;
  min-height: 220px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #faf6ed;
  border: 1px solid #ecdfbd;
}
.access-map img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #faf6ed;
}

/* ============ Contact CTA ============ */
.contact-cta {
  background: var(--cream-2);
  padding: 80px 0 90px;
  position: relative;
  overflow: hidden;
}
.contact-cta .container { position: relative; z-index: 2; }
.contact-cta .section-title { margin-bottom: 14px; }
.contact-cta .section-title .ja { font-size: 24px; letter-spacing: 0.12em; }
.contact-lead {
  text-align: center;
  font-size: 13.5px;
  color: var(--ink);
  margin-bottom: 36px;
  letter-spacing: 0.04em;
}

/* card */
.contact-card {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid #ecdfbd;
  box-shadow: 0 12px 32px rgba(160, 130, 60, 0.10);
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: stretch;
  padding: 36px 24px;
}
.contact-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px 28px;
}
.contact-option-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.contact-option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}
.contact-option-label { line-height: 1; }

.contact-tel {
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin-bottom: 6px;
  font-feature-settings: "palt";
}
.contact-hours {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.contact-form-note {
  font-size: 12.5px;
  color: var(--ink);
  margin-bottom: 14px;
  line-height: 1.7;
}
.contact-form-btn {
  padding: 14px 30px;
  font-size: 13.5px;
  letter-spacing: 0.1em;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(26, 47, 92, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.contact-form-btn:hover {
  background: var(--navy-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(26, 47, 92, 0.25);
}

/* vertical divider between options */
.contact-divider {
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, #e5dec7 20%, #e5dec7 80%, transparent 100%);
  align-self: stretch;
}


/* ============ Footer ============ */
.site-footer { background: var(--cream); padding-top: 36px; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 24px;
}
.footer-nav { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-nav a { font-size: 13px; color: var(--ink); }
.footer-nav a:hover { color: var(--navy); }
.copyright {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

/* ============ Mobile fixed CTA ============ */
.mobile-cta {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 10px;
  gap: 10px;
  z-index: 200;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.08);
}
.mc-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.mc-tel { background: var(--gold); color: #fff; }
.mc-form { background: var(--navy); color: #fff; }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .container { padding: 0 20px; }
  .services-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .hero h1 { font-size: 34px; }
  .main-nav ul { gap: 18px; }
  .main-nav a { font-size: 13px; }
}

/* iPad-ish range — collapse the header into a 2-row layout with a
   horizontally-scrollable nav so labels never wrap internally */
@media (max-width: 960px) {
  .site-header { background: #fff; }
  .header-inner { height: auto; padding: 14px 0; gap: 10px; flex-wrap: wrap; }
  .main-nav { order: 3; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .main-nav ul { justify-content: flex-start; gap: 4px; padding-bottom: 4px; flex-wrap: nowrap; }
  .main-nav a { font-size: 13px; padding: 4px 10px; }
  .logo-jp { font-size: 16px; }
  .logo-en { font-size: 10px; }
  .header-cta { padding: 10px 18px; font-size: 12px; }
}

@media (max-width: 820px) {
  .container { padding: 0 16px; }
  .main-nav ul { gap: 2px; }
  .main-nav a { font-size: 12px; padding: 4px 7px; }
  .logo-jp { font-size: 15px; }
  .logo-en { font-size: 9px; }
  .header-cta { display: none; }

  .hero { padding: 30px 0 90px; }
  .hero-wave { height: 60px; }
  .hero-inner { grid-template-columns: 1fr; gap: 20px; }
  .hero-copy { padding-right: 0; text-align: center; }
  .hero h1 { font-size: 26px; line-height: 1.6; }
  .hero-actions { justify-content: center; }
  .hero-actions .btn { min-width: 0; flex: 1; max-width: 200px; }
  .hero-illust { order: -1; max-width: 460px; margin: 0 auto; }

  .sp-only { display: inline; }

  .reasons, .services, .about, .info-block { padding: 60px 0; }
  .reasons-grid { grid-template-columns: 1fr; gap: 36px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card p { min-height: 0; }

  .about-inner { grid-template-columns: 1fr; gap: 32px; }
  .about-copy .section-title { align-items: center; text-align: center; }

  .info-grid { grid-template-columns: 1fr; gap: 24px; }
  .info-grid > .news,
  .info-grid > .access { padding: 28px 24px; }

  .contact-cta { padding: 56px 0 64px; }
  .contact-cta .section-title .ja { font-size: 20px; }
  .contact-lead { font-size: 12.5px; margin-bottom: 24px; padding: 0 16px; }

  .contact-card {
    grid-template-columns: 1fr;
    padding: 28px 22px;
    gap: 0;
  }
  .contact-option { padding: 18px 8px; }
  .contact-option-tel { padding-top: 4px; }
  .contact-option-form { padding-bottom: 4px; }

  .contact-divider {
    width: auto;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e5dec7 20%, #e5dec7 80%, transparent 100%);
    margin: 4px 0;
  }

  .contact-tel { font-size: 28px; }
  .contact-form-btn { width: 100%; max-width: 320px; padding: 14px 20px; }

  /* access map: on mobile, give it a fixed comfortable height inside the card */
  .access-map { min-height: 0; height: auto; flex: 0 0 auto; margin-top: 20px; }
  .access-map img { aspect-ratio: 4 / 3; height: auto; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-nav { justify-content: center; gap: 14px; }

  /* show mobile CTA + leave space for it */
  .mobile-cta { display: flex; }
  body { padding-bottom: 78px; }
  .site-footer { padding-bottom: 12px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 22px; }
  .section-title .ja { font-size: 22px; }
  .services-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .service-card { padding: 22px 12px 18px; }
  .service-card p { font-size: 11px; }
  .tel a { font-size: 26px; }
  .leaf-deco { display: none; }
}
