/* ==========================================================================
   Enginic — Design System
   炎（情熱）のロゴモチーフを軸に、和紙のような温かい紙面へ
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@500;600;700;800&family=Zen+Kaku+Gothic+New:wght@400;500;700;900&display=swap');

:root {
  /* Color */
  --paper: #F8F5EF;
  --paper-alt: #EFE7D9;
  --ink: #211C1A;
  --ink-soft: #6B6259;
  --ember: #781D1D;
  --ember-deep: #4A1212;
  --ember-tint: rgba(120, 29, 29, 0.07);
  --gold: #9C6B32;
  --gold-tint: rgba(156, 107, 50, 0.14);
  --line: #DED2BC;
  --white: #FFFFFF;

  /* Type */
  --display: 'Shippori Mincho', serif;
  --body: 'Zen Kaku Gothic New', 'Hiragino Sans', sans-serif;

  /* Layout */
  --max: 1160px;
  --edge: clamp(20px, 5vw, 64px);
  --radius: 2px;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
  letter-spacing: 0.02em;
}

p { margin: 0 0 1em; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--edge);
  padding-right: var(--edge);
}

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

/* ---------- Eyebrow / section labels ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--body);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.28em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--gold);
  display: block;
}
.eyebrow .jp {
  font-family: var(--display);
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
}

.section-title {
  font-size: clamp(26px, 3.4vw, 38px);
  margin-bottom: 0.6em;
}

.lede {
  font-size: clamp(15px, 1.6vw, 17.5px);
  color: var(--ink-soft);
  max-width: 42em;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 245, 239, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 108px;
}
.brand img { height: 56px; width: auto; }
.nav-links {
  display: flex;
  gap: clamp(18px, 2.4vw, 40px);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14.5px;
  font-weight: 500;
}
.nav-links a {
  position: relative;
  padding: 6px 0;
  color: var(--ink);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--ember);
  transition: right 0.25s ease;
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { right: 0; }
.nav-links a[aria-current="page"] { color: var(--ember); }

.nav-cta {
  border: 1px solid var(--ink);
  color: var(--ink) !important;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.03em;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.nav-cta:hover { background: var(--ink); color: var(--paper) !important; border-color: var(--ink); }
.nav-cta::after { display: none !important; }

.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links:not(.mobile-open) { display: none; }
  .nav-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 26px;
    color: var(--ink);
    cursor: pointer;
  }
  .nav-links {
    position: absolute;
    top: 108px; left: 0; right: 0;
    background: var(--paper);
    flex-direction: column;
    padding: 20px var(--edge) 30px;
    border-bottom: 1px solid var(--line);
  }
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(60px, 10vw, 120px) 0 clamp(70px, 9vw, 110px);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
}
.hero-copy .eyebrow { margin-bottom: 26px; }
.hero h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.55;
}
.hero h1 em {
  font-style: normal;
  color: var(--ember);
}
.hero-copy .lede { margin-top: 26px; }
.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.btn-primary { background: var(--ember); color: var(--white); }
.btn-primary:hover { background: var(--ember-deep); transform: translateY(-1px); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }

.hero-mark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
}
.hero-mark .glow {
  position: absolute;
  inset: -10%;
  background: radial-gradient(circle at 50% 45%, var(--ember-tint) 0%, rgba(156,107,50,0.10) 45%, transparent 72%);
  filter: blur(6px);
  animation: ember-breathe 5.5s ease-in-out infinite;
}
.hero-mark img {
  position: relative;
  width: 58%;
  filter: drop-shadow(0 18px 40px rgba(74, 18, 18, 0.18));
  animation: ember-flicker 6.5s ease-in-out infinite;
}
@keyframes ember-breathe {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
@keyframes ember-flicker {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.015); }
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-mark { max-width: 240px; margin: 0 auto; order: -1; }
}

/* ---------- Generic page hero (inner pages) ---------- */
.page-hero {
  padding: clamp(56px, 8vw, 90px) 0 clamp(40px, 6vw, 60px);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(30px, 4.4vw, 46px); }
.page-hero .lede { margin-top: 20px; }
.page-hero-slim { padding-bottom: clamp(28px, 4vw, 40px); }

/* About: Mission / Vision statement */
.statement {
  display: grid;
  gap: clamp(40px, 6vw, 72px);
}
.statement-block {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: clamp(16px, 3vw, 40px);
  align-items: start;
}
.statement-label {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--gold);
  font-weight: 700;
  padding-top: 0.5em;
  text-transform: uppercase;
}
.statement-text {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(24px, 3.6vw, 40px);
  line-height: 1.7;
  color: var(--ink);
  margin: 0;
}
@media (max-width: 640px) {
  .statement-block { grid-template-columns: 1fr; gap: 10px; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 100px) 0; }
.section-alt { background: var(--paper-alt); }
.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* Mission / Vision / Value */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 10px;
}
.pillar {
  background: var(--paper);
  padding: clamp(28px, 3.4vw, 44px);
}
.pillar h3 {
  font-size: 14px;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 16px;
  text-transform: uppercase;
}
.pillar p { color: var(--ink-soft); font-size: 15.5px; margin: 0; }
.pillar.pillar-wide { grid-column: 1 / -1; }

.pillar-value .pillar-lead {
  color: var(--ink-soft);
  font-size: 15px;
  margin: 0 0 20px;
}
.value-list-inline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.value-list-inline li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.value-list-inline li:last-child { border-bottom: none; }
.value-list-inline .num {
  font-family: var(--display);
  color: var(--ember);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.value-list-inline li > span:last-child {
  color: var(--ink);
  font-size: 15.5px;
}

@media (max-width: 720px) {
  .pillar-grid { grid-template-columns: 1fr; }
}

.value-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.value-list li {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.value-list .num {
  font-family: var(--display);
  color: var(--ember);
  font-size: 20px;
  font-weight: 700;
}
.value-list p { margin: 0; color: var(--ink-soft); }

/* Services */
.service-list {
  margin-top: 10px;
  border-top: 1px solid var(--line);
}
.service-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: clamp(16px, 3vw, 40px);
  padding: clamp(28px, 4vw, 44px) 0;
  border-bottom: 1px solid var(--line);
}
.service-item .num {
  font-family: var(--display);
  font-size: 40px;
  color: var(--ember);
  line-height: 1;
}
.service-item h3 {
  font-size: clamp(19px, 2.2vw, 23px);
  margin-bottom: 12px;
}
.service-item p { color: var(--ink-soft); margin: 0; font-size: 15.5px; }

@media (max-width: 640px) {
  .service-item { grid-template-columns: 1fr; }
  .service-item .num { color: var(--gold); }
}

/* Company info table */
.info-table {
  margin-top: 10px;
  border-top: 1px solid var(--line);
}
.info-table .row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.info-table dt {
  font-weight: 700;
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0.04em;
}
.info-table dd { margin: 0; color: var(--ink-soft); }

@media (max-width: 640px) {
  .info-table .row { grid-template-columns: 1fr; gap: 6px; }
}

/* Officers */
.officer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(30px, 4vw, 60px);
  margin-top: 20px;
}
.officer-grid-sm {
  max-width: 80%;
}
.officer-card { }
.officer-photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 24px;
  position: relative;
}
.officer-photo img { width: 100%; height: 100%; object-fit: cover; }
.officer-photo::after {
  content: '';
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(33,28,26,0.08);
}
.officer-role {
  font-size: 12.5px;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
}
.officer-name {
  font-size: clamp(21px, 2.4vw, 26px);
  margin-bottom: 14px;
}
.officer-bio { color: var(--ink-soft); font-size: 15px; }

@media (max-width: 720px) {
  .officer-grid { grid-template-columns: 1fr; }
}

/* CTA band */
.cta-band {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(50px, 8vw, 90px) 0;
  text-align: center;
}
.cta-band h2 {
  color: var(--white);
  font-family: var(--body);
  font-weight: 500;
  letter-spacing: 0.08em;
  font-size: clamp(23px, 3.2vw, 32px);
  margin-bottom: 20px;
}
.cta-band p { color: rgba(248,245,239,0.7); margin-bottom: 32px; }
.cta-band .btn-primary { background: var(--ember); }
.cta-band .btn-ghost { border-color: rgba(248,245,239,0.5); color: var(--paper); }
.cta-band .btn-ghost:hover { background: var(--paper); color: var(--ink); }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 50px 0 34px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
  padding-bottom: 34px;
}
.footer-brand img { height: 44px; width: auto; margin-bottom: 14px; }
.footer-address { color: var(--ink-soft); font-size: 13px; margin: 0; }
.footer-brand p { color: var(--ink-soft); font-size: 13.5px; max-width: 26em; margin: 0; }
.footer-links { display: flex; gap: 50px; flex-wrap: wrap; }
.footer-col h4 {
  font-family: var(--body);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.footer-col a:hover { color: var(--ember); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  font-size: 12.5px;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Blog ---------- */
.post-grid {
  display: grid;
  gap: 0;
  margin-top: 10px;
  border-top: 1px solid var(--line);
}
.post-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: clamp(16px, 3vw, 40px);
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.post-row time { color: var(--ink-soft); font-size: 13.5px; letter-spacing: 0.02em; }
.post-row h3 { font-size: 18.5px; margin-bottom: 6px; }
.post-row a:hover h3 { color: var(--ember); }
.post-row .excerpt { color: var(--ink-soft); font-size: 14.5px; margin: 0; }
.post-tag {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
}
@media (max-width: 640px) {
  .post-row { grid-template-columns: 1fr; gap: 6px; }
}

.post-article {
  max-width: 760px;
  margin: 0 auto;
}
.post-article h1 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 18px; }
.post-meta { color: var(--ink-soft); font-size: 13.5px; margin-bottom: 40px; }
.post-body h2 { font-size: 23px; margin: 1.6em 0 0.6em; }
.post-body h3 { font-size: 18.5px; margin: 1.4em 0 0.5em; }
.post-body p { color: var(--ink-soft); }
.post-body a { color: var(--ember); text-decoration: underline; text-underline-offset: 3px; }
.post-body ul, .post-body ol { color: var(--ink-soft); padding-left: 1.3em; }
.post-body img { border-radius: var(--radius); margin: 1.6em 0; }
.post-body blockquote {
  margin: 1.8em 0;
  padding: 4px 0 4px 24px;
  border-left: 2px solid var(--ember);
  color: var(--ink-soft);
  font-style: italic;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 40px;
}
.back-link:hover { color: var(--ember); }

/* ---------- Contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(30px, 5vw, 70px);
  margin-top: 10px;
}
.contact-info dl { margin: 0; }
.contact-info .row {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.contact-info dt {
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 6px;
}
.contact-info dd { margin: 0; color: var(--ink-soft); }
.form-frame-wrap {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.form-frame-wrap iframe {
  width: 100%;
  height: 1500px;
  border: none;
  display: block;
}
@media (max-width: 860px) {
  .contact-layout { grid-template-columns: 1fr; }
}

/* Access page */
.access-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(30px, 5vw, 70px);
  margin-top: 10px;
  align-items: start;
}
.access-map {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-alt);
}
.access-map iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
@media (max-width: 860px) {
  .access-layout { grid-template-columns: 1fr; }
}

/* ---------- 404 ---------- */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 0;
}
.error-page h1 { font-size: clamp(60px, 10vw, 120px); color: var(--ember); }

/* ---------- Pricing page ---------- */
.pricing-lead {
  font-size: 16px;
  color: var(--ink);
  margin: 0 0 32px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.pricing-lead strong { color: var(--ember); }

.pricing-formula {
  display: flex;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 40px;
}
.formula-block {
  background: var(--paper-alt);
  padding: clamp(20px, 2.8vw, 34px) clamp(24px, 3.2vw, 44px);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.formula-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}
.formula-body {
  font-size: clamp(14px, 1.6vw, 16px);
  color: var(--ink);
  line-height: 1.8;
}
.formula-body strong { color: var(--ember); }

@media (max-width: 640px) {
  .pricing-formula { flex-direction: column; }
}

.pricing-table-wrap {
  overflow-x: auto;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(13px, 1.4vw, 15px);
  min-width: 600px;
}
.pricing-table thead th {
  background: var(--ink);
  color: var(--paper);
  padding: 13px 16px;
  text-align: center;
  font-family: var(--body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.pricing-table tbody tr {
  border-bottom: 1px solid var(--line);
}
.pricing-table tbody tr:last-child { border-bottom: none; }
.pricing-table tbody tr:nth-child(even) { background: var(--paper-alt); }
.pricing-table td {
  padding: 14px 16px;
  color: var(--ink-soft);
  vertical-align: middle;
  line-height: 1.65;
  text-align: center;
}
.pricing-table .num-cell {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}
.pricing-table .quote-cell { color: var(--gold); }
.pricing-table .decision-cell {
  text-align: center;
  vertical-align: middle;
  color: var(--ink);
  font-weight: 600;
  background: var(--ember-tint);
  border-left: 2px solid var(--ember);
}
.pricing-table .decision-cell strong { color: var(--ember); font-size: 17px; }
.sub-note { font-size: 12px; color: var(--ink-soft); font-weight: 400; }

.pricing-subtitle {
  font-size: clamp(18px, 2vw, 22px);
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.pricing-notes {
  margin-top: 20px;
  padding: 20px 24px;
  background: var(--paper-alt);
  border-left: 2px solid var(--line);
}
.pricing-notes p {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 6px;
}
.pricing-notes p:last-child { margin: 0; }

.included-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.included-list li {
  padding: 14px 0 14px 28px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  position: relative;
  font-size: 15.5px;
}
.included-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 22px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ember);
  opacity: 0.5;
}

/* Value list compact (inside statement block) */
.value-list-compact {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: val;
}
.value-list-compact li {
  counter-increment: val;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(17px, 2vw, 22px);
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 16px;
  line-height: 1.65;
}
.value-list-compact li:last-child { border-bottom: none; }
.value-list-compact li::before {
  content: "0" counter(val);
  font-family: var(--display);
  color: var(--ember);
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Blue text link */
.link-blue {
  color: #1a6dcc;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link-blue:hover { color: #12539c; }
