/* ===========================================================
   株式会社サニーグレイス - Shared Stylesheet
   =========================================================== */

:root {
  --orange: #F08A1F;
  --orange-deep: #D9741A;
  --orange-soft: #FFF4E8;
  --blue: #1E5AA8;
  --blue-deep: #154381;
  --sky: #5AA7D6;
  --sky-soft: #EAF4FB;
  --bg: #E8F4FB;
  --bg-soft: #FAFAF8;
  --bg-warm: #FBF7F1;
  --text: #1A1F2A;
  --text-muted: #5C6470;
  --text-soft: #8A8F99;
  --line: #ECECEC;
  --line-soft: #F4F4F2;
  --green-line: #06C755;

  --max-w: 1200px;
  --gutter: 24px;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-pill: 999px;

  --shadow-card: 0 2px 24px rgba(20, 30, 60, 0.06);
  --shadow-hover: 0 8px 32px rgba(20, 30, 60, 0.10);

  --font-jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Menlo", "Consolas", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-jp);
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.02em;
  padding-bottom: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
  margin: 0;
}

p {
  margin: 0;
}

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: 120px 0;
}

.section-tight {
  padding: 80px 0;
}

.section-soft {
  background: var(--bg-soft);
}

.section-warm {
  background: var(--bg-warm);
}

.section-sky {
  background: var(--sky-soft);
}

/* ---------- Section heads ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--orange);
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 500;
}

.section-title {
  font-size: 38px;
  letter-spacing: 0.06em;
  line-height: 1.5;
  margin-bottom: 12px;
}

.section-title .accent {
  color: var(--orange);
}

.section-lead {
  color: var(--text-muted);
  font-size: 15px;
  margin-top: 16px;
  max-width: 640px;
}

.section-head {
  margin-bottom: 64px;
}

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

.section-head.center .section-lead {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.08em;
  padding: 16px 28px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 4px 16px rgba(240, 138, 31, 0.25);
}
.btn-primary:hover {
  background: var(--orange-deep);
  box-shadow: 0 8px 22px rgba(240, 138, 31, 0.35);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--text);
  background: var(--bg-soft);
}

.btn-blue {
  background: var(--blue);
  color: #fff;
}
.btn-blue:hover {
  background: var(--blue-deep);
}

.btn-block {
  width: 100%;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
  z-index: 80;
}
.site-header__inner {
  height: 116px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: nowrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand__logo {
  height: 78px;
  width: auto;
  max-width: none;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.brand__logo--footer {
  height: 94px;
}
.brand__mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #FFD27A, var(--orange) 65%, var(--orange-deep));
  position: relative;
  flex-shrink: 0;
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(240, 138, 31, 0.35);
}
.brand__name {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand__name strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.brand__name span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.nav a {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text);
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  transition: color .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .15s ease;
  white-space: nowrap;
  font-weight: 500;
}
.nav a:hover {
  color: #fff;
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: 0 4px 12px rgba(240, 138, 31, 0.25);
  transform: translateY(-1px);
}
.nav a.is-active {
  color: #fff;
  background: var(--orange);
  border-color: var(--orange);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.header-cta .btn {
  padding: 10px 18px;
  font-size: 13px;
  white-space: nowrap;
}

.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  position: relative;
}
.hamburger span::before,
.hamburger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 1.5px;
  background: var(--text);
}

/* Mobile menu */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #fff;
  z-index: 90;
  padding: 80px 24px 40px;
  overflow-y: auto;
}
.mobile-nav.is-open { display: block; }
.mobile-nav__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: none;
  cursor: pointer;
  font-size: 20px;
}
.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
}
.mobile-nav li {
  border-bottom: 1px solid var(--line-soft);
}
.mobile-nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 4px;
  font-size: 16px;
}
.mobile-nav a::after {
  content: "→";
  color: var(--orange);
}
.mobile-nav__cta {
  display: grid;
  gap: 12px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #1A1F2A;
  color: #C9CCD2;
  padding: 80px 0 32px;
  font-size: 14px;
}
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 64px;
}
.footer-brand .brand__name strong { color: #fff; }
.footer-brand .brand__name span { color: #7A8093; }
.footer-brand p {
  margin-top: 20px;
  font-size: 13px;
  line-height: 2;
  color: #9CA0AC;
}
.footer-col h4 {
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.2em;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-weight: 500;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.footer-col a {
  color: #C9CCD2;
  font-size: 13px;
}
.footer-bottom {
  border-top: 1px solid #2A2F3A;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #7A8093;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
}

/* ---------- Photo placeholders ---------- */
.photo {
  background: repeating-linear-gradient(
    45deg,
    #F2F0EC 0px, #F2F0EC 8px,
    #FAF8F4 8px, #FAF8F4 16px
  );
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo--warm {
  background: repeating-linear-gradient(
    45deg,
    #FFE8CE 0px, #FFE8CE 8px,
    #FFF4E8 8px, #FFF4E8 16px
  );
}
.photo--sky {
  background: repeating-linear-gradient(
    45deg,
    #D7E9F6 0px, #D7E9F6 8px,
    #EAF4FB 8px, #EAF4FB 16px
  );
}
.photo--dark {
  background: repeating-linear-gradient(
    45deg,
    #2A323D 0px, #2A323D 8px,
    #353D49 8px, #353D49 16px
  );
  color: #C9CCD2;
}
.photo__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.88);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}
.photo--dark .photo__label {
  background: rgba(0, 0, 0, 0.4);
  color: #C9CCD2;
  border-color: rgba(255, 255, 255, 0.1);
}

/* ---------- Mobile-fixed CTA bar ---------- */
.mobile-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  z-index: 70;
  padding: 8px 8px env(safe-area-inset-bottom, 8px);
  grid-template-columns: 1fr;
  gap: 6px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}
.mobile-cta a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  border-radius: var(--r-md);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.08em;
  gap: 4px;
  font-weight: 500;
  min-height: 56px;
}
.mobile-cta a.quote { background: var(--orange); }
.mobile-cta a svg { width: 20px; height: 20px; }

/* ---------- Breadcrumb ---------- */
.crumb {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  padding: 24px 0 0;
}
.crumb a:hover { color: var(--orange); }
.crumb .sep { margin: 0 8px; color: var(--text-soft); }

/* ---------- Page hero (sub pages) ---------- */
.page-hero {
  padding: 60px 0 80px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line-soft);
}
.page-hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}
.page-hero__inner .photo {
  aspect-ratio: 4/3;
}
.page-hero h1 {
  font-size: 46px;
  letter-spacing: 0.06em;
  margin: 16px 0 24px;
}
.page-hero .lead {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 2;
}

/* ---------- Cards generic ---------- */
.card {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  padding: 36px 32px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: transparent;
}

/* ---------- Sub-page shared blocks ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: transparent;
}
.feature__no {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--orange);
  letter-spacing: 0.2em;
}
.feature h3 {
  font-size: 22px;
  letter-spacing: 0.06em;
}
.feature p {
  color: var(--text-muted);
  line-height: 2;
  font-size: 14px;
}
.feature__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--orange-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
}
.feature__icon svg { width: 22px; height: 22px; }

/* split text/image rows */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.split.reverse > div:first-child { order: 2; }
.split .photo { aspect-ratio: 4/3; }
.split-num {
  font-family: var(--font-mono);
  color: var(--orange);
  letter-spacing: 0.2em;
  font-size: 12px;
  margin-bottom: 16px;
}
.split h3 {
  font-size: 30px;
  letter-spacing: 0.06em;
  margin-bottom: 24px;
  line-height: 1.5;
}
.split p {
  color: var(--text-muted);
  line-height: 2;
  font-size: 15px;
}

/* stat row */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.stat {
  padding: 40px;
  border-right: 1px solid var(--line);
  text-align: center;
}
.stat:last-child { border-right: 0; }
.stat__num {
  font-family: var(--font-mono);
  font-size: 44px;
  color: var(--orange);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.stat__num small {
  font-size: 16px;
  color: var(--text-muted);
  margin-left: 4px;
}
.stat__label {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* timeline / flow */
.flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  position: relative;
}
.flow::before {
  content: "";
  position: absolute;
  top: 36px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: var(--line);
  z-index: 0;
}
.flow-step {
  text-align: center;
  position: relative;
  z-index: 1;
}
.flow-step__no {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  color: var(--orange);
  font-size: 18px;
  letter-spacing: 0.1em;
  font-weight: 500;
}
.flow-step.active .flow-step__no { background: var(--orange); color: #fff; border-color: var(--orange); }
.flow-step h4 {
  font-size: 16px;
  margin-bottom: 8px;
  letter-spacing: 0.06em;
}
.flow-step p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
  padding: 0 8px;
}

@media (max-width: 960px) {
  .feature-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split.reverse > div:first-child { order: 0; }
  .split h3 { font-size: 22px; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .stat__num { font-size: 32px; }
  .flow { grid-template-columns: 1fr; gap: 24px; }
  .flow::before { display: none; }
}

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }

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

/* On narrower desktop widths, drop the English ID line so the brand stays one line */
@media (max-width: 1280px) {
  .brand__logo { height: 60px; }
  .nav { gap: 5px; }
  .nav a { font-size: 12.5px; padding: 7px 9px; }
}
@media (max-width: 1180px) {
  .site-header .header-cta .btn-ghost { display: none; }
  .nav { gap: 4px; }
  .nav a { font-size: 12px; padding: 7px 8px; letter-spacing: 0.02em; }
}
@media (max-width: 1024px) {
  .brand__logo { height: 54px; }
  .nav a { padding: 6px 7px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .section { padding: 80px 0; }
  .section-head { margin-bottom: 40px; }
  .section-title { font-size: 28px; }
  .page-hero__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .page-hero h1 { font-size: 32px; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .nav { display: none; }
  .header-cta .btn-ghost { display: none; }
  .header-cta .btn-primary { display: none; }
  .hamburger { display: inline-flex; }
  .mobile-cta { display: grid; }
  body { padding-bottom: 72px; }
}

@media (max-width: 560px) {
  :root { --gutter: 20px; }
  .section { padding: 64px 0; }
  .section-title { font-size: 24px; letter-spacing: 0.04em; }
  .page-hero h1 { font-size: 26px; }
  .site-header__inner { height: 84px; }
  .brand__logo { height: 57px; }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 40px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }
}
