/* ===================================================================
   株式会社IA MIRACOLO コーポレートサイト 共通CSS
   =================================================================== */

:root {
  --bg:        #FAFAF9;  /* 背景: わずかに暖かい白 */
  --text:      #1F2A3A;  /* 本文: 濃紺 */
  --text-sub:  #5B6472;  /* 補助テキスト */
  --line:      #D9DCDE;  /* 罫線 */
  --accent:    #2F6E75;  /* アクセント: 彩度を抑えた青緑 */
  --accent-bg: #EEF3F3;  /* アクセント淡色 */
  --footer-bg: #1F2A3A;  /* フッター背景 */

  --font-heading: "Zen Old Mincho", serif;
  --font-body: "Noto Sans JP", sans-serif;
}

/* ------------------------------------------------------------------
   Reset / base
   ------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.03em;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 0.75em;
  color: var(--text);
}

p {
  margin: 0 0 1.2em;
}

ul, ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
}

/* Focus ring visible for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.6em;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  line-height: 1.3;
}

.logo:hover {
  text-decoration: none;
}

.logo-en {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

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

.nav-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--line);
  cursor: pointer;
  padding: 0;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  position: absolute;
  left: 50%;
  width: 20px;
  height: 1px;
  background-color: var(--text);
  transform: translateX(-50%);
  transition: transform 0.2s ease;
}

.nav-toggle-icon {
  top: 50%;
  margin-top: -0.5px;
}

.nav-toggle-icon::before {
  content: "";
  top: -7px;
}

.nav-toggle-icon::after {
  content: "";
  top: 7px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon {
  background-color: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
  top: 0;
  transform: translateX(-50%) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
  top: 0;
  transform: translateX(-50%) rotate(-45deg);
}

.site-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.05em;
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  border-bottom-color: var(--accent);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ------------------------------------------------------------------
   Main / sections
   ------------------------------------------------------------------ */
main {
  display: block;
}

.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}

.section:last-of-type {
  border-bottom: none;
}

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

.hero {
  padding: 72px 0 56px;
}

.hero h1 {
  font-size: 28px;
  margin-bottom: 0.5em;
}

.hero-lead {
  font-size: 16px;
  color: var(--text-sub);
  max-width: 40em;
}

.page-title {
  font-size: 26px;
}

/* ------------------------------------------------------------------
   Buttons (ghost)
   ------------------------------------------------------------------ */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border: 1px solid var(--text);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.05em;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
  text-decoration: none;
}

.btn-accent {
  border-color: var(--accent);
  color: var(--accent);
}

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

/* ------------------------------------------------------------------
   Card list (border-top divider, no shadows)
   ------------------------------------------------------------------ */
.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.card-list li {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}

.card-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.card-list a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-list h3 {
  font-size: 18px;
  margin-bottom: 0.4em;
}

.card-list a:hover h3 {
  color: var(--accent);
}

.card-list p {
  color: var(--text-sub);
  margin-bottom: 0;
}

/* Service detail blocks */
.service-block {
  border-top: 1px solid var(--line);
  padding: 40px 0;
}

.service-block:first-of-type {
  border-top: none;
  padding-top: 0;
}

.service-block h2 {
  font-size: 22px;
}

.service-block h3 {
  font-size: 15px;
  color: var(--accent);
  margin-top: 1.6em;
}

/* News list */
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-list li {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 24px;
  padding: 20px 0;
  align-items: baseline;
}

.news-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.news-list time {
  color: var(--text-sub);
  font-size: 14px;
  white-space: nowrap;
}

.news-list a {
  text-decoration: none;
  color: var(--text);
}

.news-list a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Article */
.article-meta time {
  color: var(--text-sub);
  font-size: 14px;
}

.article-title {
  font-size: 24px;
  margin-top: 0.3em;
}

.article-body p {
  white-space: pre-line;
}

.article-back {
  margin-top: 40px;
}

/* Definition list (company overview) */
.info-dl {
  border-top: 1px solid var(--line);
  margin: 0;
}

.info-dl > div {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  gap: 8px 24px;
}

.info-dl dt {
  width: 140px;
  flex-shrink: 0;
  font-weight: 500;
  color: var(--text-sub);
}

.info-dl dd {
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.info-dl dd ul {
  margin: 0;
  padding-left: 1.2em;
}

/* Dash list (— で始まる箇条書き。対応領域の例・お問い合わせ内容など) */
.dash-list {
  list-style: none;
  margin: 0 0 1.2em;
  padding: 0;
}

.dash-list li {
  padding: 6px 0 6px 1.2em;
  position: relative;
}

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

.contact-email {
  font-size: 18px;
  margin: 1.2em 0;
}

.contact-note {
  color: var(--text-sub);
  font-size: 14px;
}

/* Legal / privacy */
.legal-body h2 {
  font-size: 17px;
  margin-top: 1.8em;
}

.legal-body p {
  white-space: pre-line;
}

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */
.site-footer {
  background-color: var(--footer-bg);
  color: #FAFAF9;
  padding: 40px 0 28px;
}

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

.footer-logo {
  font-family: var(--font-heading);
  font-size: 18px;
  margin: 0;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.footer-nav a {
  color: #FAFAF9;
  font-size: 13px;
  text-decoration: none;
  letter-spacing: 0.04em;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.footer-copy {
  color: #9AA3AD;
  font-size: 12px;
  margin: 0;
}

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

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

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 69px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg);
    transform: translateX(100%);
    transition: transform 0.2s ease;
    overflow-y: auto;
  }

  .site-nav.is-open {
    transform: translateX(0);
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 12px 20px;
  }

  .site-nav li {
    border-bottom: 1px solid var(--line);
  }

  .site-nav a {
    display: block;
    padding: 16px 4px;
    font-size: 15px;
  }

  .hero h1 {
    font-size: 22px;
  }

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

  .info-dl > div {
    flex-direction: column;
    gap: 4px;
  }

  .info-dl dt {
    width: auto;
  }

  .news-list li {
    flex-direction: column;
    gap: 4px;
  }

  .footer-inner {
    padding: 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
