/* ─────────────────────────────────
   MICROMEDIA JAPAN — Main Stylesheet
   ───────────────────────────────── */

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

:root {
  --red:    #C41230;
  --red-dk: #1a0505;
  --red-md: #7a0a18;
  --red-bg: #fdf5f5;
  --white:  #ffffff;
  --gray:   #888888;
  --border: #e8d0d0;
  --text:   #333333;
  --font:   'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
}

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

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

/* ── Utility ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.section { padding: 80px 0; }
.section--light { background: var(--red-bg); }

.section-title {
  font-size: 2rem; font-weight: 700; color: var(--text);
  text-align: center; margin-bottom: 8px; letter-spacing: .05em;
}
.section-sub {
  font-size: .85rem; color: var(--red); text-align: center;
  text-transform: uppercase; letter-spacing: .18em; margin-bottom: 12px;
  font-weight: 600;
}

.btn {
  display: inline-block; padding: 14px 36px;
  background: var(--red); color: var(--white);
  font-size: .95rem; font-weight: 600; letter-spacing: .08em;
  border: 2px solid var(--red); cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--red-md); border-color: var(--red-md); }

.btn-outline {
  background: transparent; border: 2px solid var(--text); color: var(--text);
}
.btn-outline:hover { background: var(--text); color: var(--white); }

.btn-outline--white {
  border-color: var(--white); color: var(--white);
}
.btn-outline--white:hover { background: var(--white); color: var(--red); }

.btn-outline--red {
  border-color: var(--red); color: var(--red);
}
.btn-outline--red:hover { background: var(--red); color: var(--white); }

/* ── Top bar ── */
.topbar {
  background: var(--red-dk); color: rgba(255,255,255,.8);
  font-size: .8rem; padding: 7px 0;
}
.topbar .container {
  display: flex; justify-content: space-between; align-items: center;
}
.topbar-links { display: flex; gap: 16px; }
.topbar-links a { color: var(--red); font-weight: 600; }
.topbar-links a:hover { color: #fff; }

/* ── Header ── */
.site-header {
  background: var(--white); border-bottom: 3px solid var(--red);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 80px; gap: 24px;
}

.site-logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-mark img { width: 48px; height: 48px; }
.logo-text { line-height: 1.25; }
.logo-ja  { display: block; font-size: .72rem; color: var(--gray); }
.logo-en  { display: block; font-size: .95rem; font-weight: 700; color: var(--text); }
.logo-en--white { color: rgba(255,255,255,.9); }

.primary-nav .nav-list { list-style: none; display: flex; gap: 0; }
.primary-nav .nav-list li a {
  display: block; padding: 0 16px; line-height: 80px;
  font-size: .85rem; font-weight: 600; color: var(--text);
  border-bottom: 3px solid transparent; transition: border-color .2s, color .2s;
}
.primary-nav .nav-list li a:hover,
.primary-nav .nav-list li.current-menu-item a { border-bottom-color: var(--red); color: var(--red); }

.header-contact { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.header-tel { font-size: 1.2rem; font-weight: 700; color: var(--red); letter-spacing: .04em; }
.header-hours { font-size: .7rem; color: var(--gray); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none;
  border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: var(--text);
  transition: transform .25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ── */
.hero {
  position: relative; height: 580px; overflow: hidden;
  background: linear-gradient(135deg, var(--red-dk) 0%, var(--red-md) 55%, var(--red) 100%);
  display: flex; align-items: center;
}
.hero-bg-pattern {
  position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(
    45deg, rgba(255,255,255,.04) 0px, rgba(255,255,255,.04) 1px,
    transparent 1px, transparent 40px
  );
}
.hero-inner { display: flex; align-items: center; width: 100%; height: 100%; }
.hero-content { position: relative; z-index: 2; max-width: 540px; }
.hero-label {
  font-size: .82rem; color: rgba(255,255,255,.6); letter-spacing: .2em;
  font-weight: 600; margin-bottom: 18px;
}
.hero-catch {
  font-size: 2.9rem; font-weight: 900; color: var(--white);
  line-height: 1.2; margin-bottom: 20px; letter-spacing: .03em;
}
.hero-catch em { color: rgba(255,200,200,1); font-style: normal; }
.hero-sub {
  font-size: 1.05rem; color: rgba(255,255,255,.8);
  line-height: 1.9; margin-bottom: 36px;
}
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-image-area {
  position: absolute; right: 0; top: 0; bottom: 0; width: 44%;
  overflow: hidden;
}
.hero-image-photo { width: 100%; height: 100%; object-fit: cover; }
.hero-deco { width: 100%; height: 100%; object-fit: cover; }

/* ── Ticker ── */
.ticker { background: var(--red); color: var(--white); padding: 11px 0; overflow: hidden; }
.ticker-inner { display: flex; align-items: center; }
.ticker-label {
  background: var(--red-dk); padding: 4px 20px;
  font-size: .8rem; font-weight: 700; white-space: nowrap; margin-right: 24px;
  flex-shrink: 0;
}
.ticker-track { display: flex; gap: 48px; font-size: .85rem; overflow: hidden; }
.ticker-item { display: flex; gap: 12px; white-space: nowrap; }
.ticker-item a { color: var(--white); }
.ticker-date { opacity: .75; }

/* ── Business cards ── */
.biz-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin-top: 48px;
}
.biz-card {
  background: var(--white); border: 1px solid var(--border);
  overflow: hidden; transition: box-shadow .25s, transform .25s;
}
.biz-card:hover { box-shadow: 0 8px 24px rgba(196,18,48,.12); transform: translateY(-4px); }

.biz-card-img {
  height: 180px; display: flex; align-items: center; justify-content: center;
  border-bottom: 3px solid var(--red);
}
.biz-card-img--realestate { background: #3d0a10; }
.biz-card-img--cafe       { background: #5a1020; }
.biz-card-img--consulting  { background: #2d0508; }

.biz-card-body { padding: 24px; }
.biz-card-num { font-size: .75rem; color: var(--red); font-weight: 700; letter-spacing: .15em; margin-bottom: 8px; }
.biz-card-title { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.biz-card-desc { font-size: .87rem; color: var(--gray); line-height: 1.7; }
.biz-card-link {
  display: inline-block; margin-top: 16px;
  font-size: .82rem; color: var(--red); font-weight: 600;
  border-bottom: 1px solid var(--red);
}

/* ── Philosophy ── */
.philosophy-wrap {
  display: flex; gap: 60px; align-items: flex-start; margin-top: 48px;
}
.philosophy-text { flex: 1; }
.philosophy-text h3 { font-size: 1.55rem; color: var(--text); margin-bottom: 20px; line-height: 1.5; }
.philosophy-text p { font-size: .92rem; color: #555; line-height: 2; margin-bottom: 12px; }
.philosophy-values { flex: 1; display: flex; flex-direction: column; gap: 16px; }
.value-item {
  display: flex; align-items: flex-start; gap: 20px;
  padding: 20px 24px; background: var(--white); border-left: 4px solid var(--red);
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.value-num { font-size: 2rem; font-weight: 900; color: var(--red); line-height: 1; min-width: 40px; }
.value-body h4 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.value-body p  { font-size: .85rem; color: var(--gray); line-height: 1.7; }

/* ── CEO ── */
.ceo-wrap { display: flex; gap: 60px; align-items: flex-start; margin-top: 48px; }
.ceo-photo {
  width: 240px; flex-shrink: 0; overflow: hidden;
  border-top: 4px solid var(--red);
}
.ceo-photo img { width: 100%; height: 300px; object-fit: cover; object-position: 20% center; }
.ceo-body { flex: 1; }
.ceo-label { font-size: .78rem; color: var(--red); letter-spacing: .15em; font-weight: 600; margin-bottom: 8px; }
.ceo-name { font-size: 1.8rem; font-weight: 900; color: var(--text); margin-bottom: 4px; }
.ceo-name-en { font-size: .88rem; color: var(--gray); margin-bottom: 24px; }
.ceo-body p { font-size: .93rem; line-height: 2.1; color: #555; margin-bottom: 12px; }

/* ── News ── */
.news-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 28px; margin: 48px 0 40px;
}
.news-card { background: var(--white); border: 1px solid var(--border); overflow: hidden; transition: box-shadow .2s; }
.news-card:hover { box-shadow: 0 4px 16px rgba(196,18,48,.1); }
.news-card-link-wrap { display: block; }
.news-card-img { height: 170px; overflow: hidden; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.news-card:hover .news-card-img img { transform: scale(1.04); }
.news-card-img-placeholder { width: 100%; height: 100%; background: #f0dede; }
.news-card-body { padding: 16px; }
.news-card-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.news-tag { background: var(--red); color: var(--white); font-size: .7rem; padding: 2px 10px; font-weight: 600; }
.news-date { font-size: .78rem; color: var(--gray); }
.news-card-title { font-size: .92rem; font-weight: 600; color: var(--text); line-height: 1.6; }
.news-center { text-align: center; }

/* News list (index.php) */
.page-header { text-align: center; padding: 60px 0 40px; }
.news-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); margin: 0 0 40px; }
.news-list-item { background: var(--white); }
.news-list-link {
  display: flex; gap: 24px; padding: 24px;
  transition: background .2s;
}
.news-list-link:hover { background: var(--red-bg); }
.news-list-thumb { width: 160px; flex-shrink: 0; height: 100px; overflow: hidden; }
.news-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-list-body { flex: 1; }
.news-list-title { font-size: 1rem; font-weight: 600; color: var(--text); margin: 8px 0 8px; }
.news-list-excerpt { font-size: .85rem; color: var(--gray); }

/* ── CTA ── */
.cta-section {
  background: var(--red-dk); padding: 80px 0; text-align: center;
}
.cta-section h2 { font-size: 1.9rem; color: var(--white); margin-bottom: 14px; }
.cta-section p  { font-size: .97rem; color: rgba(255,255,255,.75); margin-bottom: 36px; line-height: 1.9; }
.cta-btns { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

/* ── Single post ── */
.main-content { padding: 60px 0 80px; }
.single-header { margin-bottom: 32px; }
.single-title { font-size: 1.6rem; font-weight: 700; color: var(--text); margin-top: 12px; }
.single-thumb { margin-bottom: 32px; border-radius: 2px; overflow: hidden; }
.single-content { font-size: .95rem; line-height: 2; }
.single-content p { margin-bottom: 1.2em; }
.single-content h2 { font-size: 1.3rem; border-left: 4px solid var(--red); padding-left: 12px; margin: 2em 0 1em; }
.single-nav { margin-top: 48px; }

/* ── Page ── */
.page-title { font-size: 1.8rem; font-weight: 700; color: var(--text); padding: 60px 0 40px; border-bottom: 2px solid var(--border); margin-bottom: 40px; }
.entry-content { font-size: .95rem; line-height: 2; }
.entry-content p { margin-bottom: 1.2em; }
.entry-content h2 { font-size: 1.3rem; border-left: 4px solid var(--red); padding-left: 12px; margin: 2em 0 1em; color: var(--text); }

/* ── Footer ── */
.site-footer { background: var(--red-dk); color: rgba(255,255,255,.7); }
.footer-top {
  padding: 60px 0;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
}
.footer-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.footer-logo-icon { width: 48px; height: 48px; }
.footer-address {
  font-size: .82rem; line-height: 2; color: rgba(255,255,255,.5);
  font-style: normal;
}
.footer-col h4 { font-size: .82rem; color: var(--red); font-weight: 700; margin-bottom: 16px; letter-spacing: .1em; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: rgba(255,255,255,.6); font-size: .82rem; }
.footer-col ul li a:hover { color: var(--red); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; }
.footer-bottom small { font-size: .77rem; color: rgba(255,255,255,.35); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-size: .77rem; color: rgba(255,255,255,.35); }
.footer-bottom-links a:hover { color: var(--red); }

/* ── Contact form ── */
.contact-intro {
  text-align: center; color: #555; font-size: .95rem;
  line-height: 1.9; margin-top: 8px; margin-bottom: 48px;
}
.contact-thanks {
  background: #f0fff4; border: 1px solid #6ee7a0; border-left: 4px solid #22c55e;
  padding: 24px 28px; margin-bottom: 40px; font-weight: 600; color: #166534;
}
.contact-error {
  background: #fff5f5; border: 1px solid var(--border); border-left: 4px solid var(--red);
  padding: 24px 28px; margin-bottom: 40px; color: var(--red); font-weight: 600;
}
.contact-form { max-width: 760px; margin: 0 auto 48px; }
.form-row { display: flex; gap: 20px; }
.form-group { margin-bottom: 24px; }
.form-group--half { flex: 1; }
.form-group label {
  display: block; font-size: .88rem; font-weight: 600;
  color: var(--text); margin-bottom: 8px;
}
.required { color: var(--red); margin-left: 4px; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  width: 100%; padding: 12px 16px;
  border: 1px solid var(--border); background: var(--white);
  font-family: var(--font); font-size: .93rem; color: var(--text);
  transition: border-color .2s, box-shadow .2s;
  appearance: none; border-radius: 0;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(196,18,48,.1);
}
.form-group select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; cursor: pointer; }
.form-group textarea { resize: vertical; min-height: 160px; }
.form-privacy { display: flex; align-items: flex-start; }
.checkbox-label { display: flex; align-items: center; gap: 10px; font-size: .9rem; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--red); flex-shrink: 0; }
.checkbox-label a { color: var(--red); border-bottom: 1px solid var(--red); }
.form-submit { text-align: center; margin-top: 8px; }
.btn--large { padding: 16px 60px; font-size: 1rem; }
.contact-info-box {
  max-width: 760px; margin: 0 auto;
  border-top: 1px solid var(--border); padding-top: 32px;
}
.contact-info-box h3 { font-size: 1rem; color: var(--text); margin-bottom: 12px; }
.contact-info-box p { font-size: .9rem; color: #555; line-height: 2; }
.contact-info-box a { color: var(--red); }

/* ── Footer nav list ── */
.footer-nav-list { list-style: none; }
.footer-nav-list li { margin-bottom: 10px; }
.footer-nav-list li a { color: rgba(255,255,255,.6); font-size: .82rem; }
.footer-nav-list li a:hover { color: var(--red); }

/* ── Scroll animation ── */
.fade-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity .5s ease, transform .5s ease;
}
.fade-up.is-visible { opacity: 1; transform: translateY(0); }
.site-header.is-scrolled { box-shadow: 0 4px 16px rgba(0,0,0,.12); }

/* ── Pagination ── */
.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 40px; }
.page-numbers {
  display: inline-block; padding: 8px 14px;
  border: 1px solid var(--border); font-size: .85rem; color: var(--text);
}
.page-numbers.current { background: var(--red); color: var(--white); border-color: var(--red); }
.page-numbers:hover:not(.current) { background: var(--red-bg); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .primary-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-contact { display: none; }
  .hero-image-area { display: none; }
  .hero { height: auto; padding: 80px 0; }
  .hero-inner { padding-left: 24px !important; }
  .hero-catch { font-size: 2.2rem; }

  .biz-grid { grid-template-columns: 1fr; max-width: 480px; margin-left: auto; margin-right: auto; }
  .philosophy-wrap, .ceo-wrap { flex-direction: column; }
  .ceo-photo { width: 100%; max-width: 280px; }
  .news-grid { grid-template-columns: 1fr; max-width: 480px; margin-left: auto; margin-right: auto; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 60px 0; }
  .section-title { font-size: 1.6rem; }
  .hero-catch { font-size: 1.8rem; }
  .hero-btns { flex-direction: column; align-items: flex-start; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom-inner { flex-direction: column; gap: 12px; text-align: center; }

  /* Mobile nav */
  .primary-nav.is-open {
    display: block; position: fixed; inset: 80px 0 0 0;
    background: var(--red-dk); z-index: 99; overflow-y: auto;
  }
  .primary-nav.is-open .nav-list { flex-direction: column; }
  .primary-nav.is-open .nav-list li a {
    line-height: 1; padding: 20px 24px; border-bottom: 1px solid rgba(255,255,255,.08);
    color: var(--white); font-size: 1rem;
  }
  .primary-nav.is-open .nav-list li a:hover { background: rgba(255,255,255,.06); }
}
