/* =====================================================================
 * Marriage Agency Harmony - common.css
 * Clean rebuild. No The7 / no WPBakery dependency.
 * Brand palette extracted from the legacy site:
 *   accent #bc8c96 (rose), accent-soft #f5eff0, gray #9aa2a9,
 *   text   #514f4e / #595857, light-bg #f0f2f4
 * ===================================================================== */

:root{
  --accent:        #bc8c96;
  --accent-soft:   #f5eff0;
  --accent-dark:   #a97881;
  --text:          #1f1d1c;
  --text-soft:     #514f4e;
  --gray:          #9aa2a9;
  --gray-soft:     #e9ecee;
  --bg:            #ffffff;
  --bg-2:          #f0f2f4;
  --line:          #e6dcdf;

  --font-jp:  "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-en:  "Lora", "Times New Roman", serif;
  --font-script: "Alex Brush", "Lora", cursive;

  --container: 1180px;
  --container-narrow: 920px;

  --section-y:  88px;
  --section-y-sm: 56px;
}

/* -------------------- base -------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.mah-body{
  margin: 0;
  font-family: var(--font-jp);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a   { color: var(--accent-dark); text-decoration: none; }
a:hover { color: var(--accent); }
p   { margin: 0 0 1em; }

/* -------------------- layout helpers -------------------- */
.mah-container       { width: 100%; max-width: var(--container);        margin: 0 auto; padding: 0 24px; }
.mah-container-narrow{ width: 100%; max-width: var(--container-narrow); margin: 0 auto; padding: 0 24px; }
.mah-section         { padding: var(--section-y) 0; }
.mah-section-sm      { padding: var(--section-y-sm) 0; }
.mah-bg-soft         { background: var(--accent-soft); }
.mah-bg-gray         { background: var(--bg-2); }
.mah-text-center     { text-align: center; }

/* -------------------- typography -------------------- */
.mah-eyebrow{
  font-family: var(--font-en);
  font-size: 14px; letter-spacing: .12em;
  color: var(--accent);
  text-transform: uppercase;
  margin: 0 0 12px;
}
.mah-h-main{
  font-family: var(--font-en);
  font-weight: 600;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.3;
  color: var(--text);
  margin: 0 0 20px;
}
.mah-h-main.mah-on-accent { color: var(--accent); }
.mah-h-script{
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(48px, 8vw, 110px);
  line-height: 1.05;
  color: #ffffff;
  margin: 0;
}
.mah-h-section{
  font-family: var(--font-en);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.4;
  color: var(--accent);
  margin: 0 0 30px;
  text-align: center;
}
.mah-lead{
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.9;
  color: var(--text-soft);
  margin: 0 0 24px;
}
.mah-divider-icon{
  display: block; text-align: center; color: var(--accent); margin: 0 0 14px;
  font-size: 28px;
}

/* -------------------- header -------------------- */
.mah-header{
  position: sticky; top: 0; left: 0; right: 0;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 100;
}
.mah-header-inner{
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; padding: 0 24px;
  max-width: 1340px; margin: 0 auto;
}
.mah-logo img { height: 44px; width: auto; }
.mah-nav{ display: flex; gap: 28px; align-items: center; }
.mah-nav a{
  font-family: var(--font-en); font-size: 14px; color: var(--text);
  letter-spacing: .04em; position: relative;
}
.mah-nav a:hover{ color: var(--accent); }
.mah-nav a::after{
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--accent); transform: scaleX(0); transition: transform .25s;
}
.mah-nav a:hover::after{ transform: scaleX(1); }

.mah-burger{ display: none; }

@media (max-width: 900px){
  .mah-nav{ display: none; position: absolute; top: 72px; left: 0; right: 0; background:#fff; flex-direction: column; gap: 0; padding: 14px 24px 24px; border-bottom: 1px solid var(--line); }
  .mah-nav.is-open{ display: flex; }
  .mah-nav a{ padding: 12px 0; border-bottom: 1px solid var(--line); width: 100%; }
  .mah-nav a:last-child{ border-bottom: 0; }
  .mah-burger{
    display: inline-flex; flex-direction: column; gap: 5px;
    width: 36px; height: 36px; padding: 8px; border: 0; background: transparent; cursor: pointer;
  }
  .mah-burger span{ display: block; width: 100%; height: 2px; background: var(--text); }
}

/* -------------------- hero -------------------- */
.mah-hero{
  position: relative; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  background-color: #2a1820;
  background-size: cover; background-position: center;
  color: #fff; text-align: center; padding: 120px 24px;
}
.mah-hero::after{
  content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); z-index: 0;
}
.mah-hero > *{ position: relative; z-index: 1; }
.mah-hero .mah-hero-top{
  font-family: var(--font-en); font-size: clamp(22px, 2.4vw, 34px); margin: 0 0 16px;
  color: #ffffff; font-weight: 400; line-height: 1.4;
}
.mah-hero .mah-h-script .ac{ color: var(--accent); }
.mah-hero .mah-hero-sub{
  font-family: inherit; color: #fff; opacity: .9;
  font-size: clamp(15px, 1.4vw, 20px); margin: 28px auto 0; max-width: 720px;
}
.mah-hero .mah-hero-sub .ac{ color: var(--accent); font-weight: 600; }

/* -------------------- announcement / counters -------------------- */
.mah-announce{ text-align: center; padding: 56px 24px; }
.mah-announce .mah-eyebrow{ font-family: inherit; letter-spacing: 0; text-transform: none; }
.mah-announce h3{
  font-family: var(--font-en); color: var(--accent); font-weight: 600;
  font-size: clamp(22px, 2.4vw, 30px); margin: 12px 0 26px;
}
.mah-countdown{
  display: flex; justify-content: center; gap: 22px; flex-wrap: wrap;
  font-family: var(--font-en);
}
.mah-countdown div{ text-align: center; min-width: 90px; }
.mah-countdown .v{ font-size: clamp(40px, 6vw, 80px); line-height: 1; color: var(--text); font-weight: 500; }
.mah-countdown .l{ display:block; margin-top: 6px; font-size: 14px; color: var(--text-soft); }

/* dark announce (over photo) */
.mah-announce-dark{
  background-color: #2a1820;
  background-size: cover; background-position: center;
  position: relative;
}
.mah-announce-dark::after{ content:""; position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.mah-announce-dark > *{ position: relative; z-index: 1; }
.mah-announce-dark h3{ color: var(--accent); font-family: var(--font-script); font-size: clamp(40px, 6vw, 64px); margin-bottom: 10px; }
.mah-announce-dark .date{ color: #fff; font-family: var(--font-en); font-size: clamp(38px, 6vw, 80px); }

/* -------------------- couple row (Russian woman & Japanese Man) -------------------- */
.mah-couple{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
  max-width: 880px; margin: 0 auto; padding: 56px 24px;
}
.mah-couple .person{ text-align: center; }
.mah-couple .photo{
  width: clamp(150px, 22vw, 240px); aspect-ratio: 1/1; border-radius: 50%;
  overflow: hidden; margin: 0 auto 18px;
}
.mah-couple .photo img{ width: 100%; height: 100%; object-fit: cover; }
.mah-couple .label{ font-family: var(--font-en); font-size: 20px; margin: 0 0 4px; color: var(--text); }
.mah-couple .name { color: var(--text-soft); font-size: 15px; margin: 0; }
.mah-couple .heart{ color: var(--accent); opacity: .5; font-size: 20px; margin-top: 14px; }
.mah-couple .amp{
  font-family: var(--font-en); font-weight: 600; color: rgba(188,140,150,.3);
  font-size: clamp(60px, 9vw, 140px); line-height: 1;
}
@media (max-width: 720px){
  .mah-couple{ grid-template-columns: 1fr; gap: 8px; }
  .mah-couple .amp{ font-size: 64px; }
}

/* -------------------- welcome / text block -------------------- */
.mah-welcome{ padding: var(--section-y) 24px; max-width: 880px; margin: 0 auto; }
.mah-welcome h2{
  text-align: center; font-family: var(--font-en); color: var(--text); font-weight: 600;
  font-size: clamp(24px, 2.6vw, 32px); margin: 0 0 8px;
}
.mah-welcome .sub{ text-align: center; color: var(--accent); font-weight: 600; margin: 0 0 30px; }
.mah-welcome p{ font-size: 15px; line-height: 2; color: var(--text-soft); }
.mah-signature{ margin-top: 26px; color: var(--text-soft); font-size: 14px; }

/* -------------------- section: service / contents / requirements -------------------- */
.mah-2col{
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}
.mah-2col img{ border-radius: 6px; }
@media (max-width: 900px){
  .mah-2col{ grid-template-columns: 1fr; gap: 32px; }
}

.mah-list-ol{ padding-left: 1.4em; }
.mah-list-ol li{ margin-bottom: 8px; color: var(--text-soft); }

/* social icons row */
.mah-socials{
  display: flex; gap: 10px; align-items: center; margin-top: 16px;
}
.mah-socials a{
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  transition: background .2s, color .2s;
}
.mah-socials a:hover{ background: var(--accent); color: #fff; }
.mah-socials a svg{ width: 18px; height: 18px; fill: currentColor; }

/* -------------------- staff carousel (3 across) -------------------- */
.mah-staff-block{ padding: var(--section-y) 0; }
.mah-staff-block h3{
  text-align: center; font-family: var(--font-en); font-weight: 600;
  color: var(--accent); margin: 0 0 36px; font-size: clamp(22px, 2.4vw, 28px);
}
.mah-staff-block.is-director h3{ color: var(--gray); }
.mah-staff-grid{
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
  max-width: 720px; margin: 0 auto; padding: 0 24px;
}
.mah-staff-grid figure{ text-align: center; margin: 0; }
.mah-staff-grid .photo{
  width: 150px; height: 150px; border-radius: 50%;
  overflow: hidden; margin: 0 auto 14px;
}
.mah-staff-grid .photo img{ width: 100%; height: 100%; object-fit: cover; }
.mah-staff-grid figcaption{
  font-family: var(--font-en); font-weight: 600; font-size: 18px; color: var(--text);
}
@media (max-width: 720px){
  .mah-staff-grid{ grid-template-columns: 1fr; gap: 30px; }
}

/* -------------------- about gentlemen cards (4 cards) -------------------- */
.mah-cards-4{
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px;
}
.mah-cards-4 .card{ }
.mah-cards-4 .card h4{
  font-family: var(--font-en); font-weight: 600; font-size: 22px;
  margin: 0 0 14px; color: var(--text);
}
.mah-cards-4 .card p{ color: var(--text-soft); font-size: 15px; line-height: 1.9; }
.mah-cards-4 .card .accent{ color: var(--accent); }
@media (max-width: 800px){
  .mah-cards-4{ grid-template-columns: 1fr; }
}

/* -------------------- CTA / contact / company profile -------------------- */
.mah-cta-band{
  text-align: center; padding: var(--section-y) 24px;
  background-color: #2a1820; background-size: cover; background-position: center;
  color: #fff; position: relative;
}
.mah-cta-band::after{ content:""; position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.mah-cta-band > *{ position: relative; z-index: 1; }
.mah-cta-band h3{
  font-family: var(--font-script); color: #fff; margin: 0 0 16px;
  font-size: clamp(40px, 6vw, 64px); font-weight: 400;
}
.mah-cta-band p{ color: #fff; max-width: 680px; margin: 0 auto 24px; }
.mah-cta-band .mah-signature{ color: var(--accent); font-size: 14px; }

.mah-btn{
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 32px; border-radius: 4px;
  background: var(--accent); color: #fff;
  font-family: var(--font-en); font-size: 16px; font-weight: 600;
  letter-spacing: .04em; transition: background .2s, transform .2s;
  border: 0; cursor: pointer;
}
.mah-btn:hover{ background: var(--accent-dark); color: #fff; transform: translateY(-1px); }
.mah-btn-lg{ padding: 18px 44px; font-size: 18px; }

/* contact / company block */
.mah-contact-grid{
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start;
  padding: var(--section-y) 0;
}
.mah-contact-grid h2{
  font-family: var(--font-en); font-weight: 600; color: var(--accent);
  font-size: clamp(24px, 2.6vw, 32px); margin: 0 0 18px;
}
.mah-contact-grid p, .mah-contact-grid ul{ color: var(--text-soft); font-size: 15px; line-height: 1.9; }
.mah-contact-grid .accent{ color: var(--accent); }
@media (max-width: 900px){
  .mah-contact-grid{ grid-template-columns: 1fr; gap: 32px; }
}

/* -------------------- blog carousel (TOP) -------------------- */
.mah-blog-band{ padding: var(--section-y) 0; background: var(--bg-2); }
.mah-blog-band h2{
  text-align: center; font-family: var(--font-en); font-weight: 600;
  color: var(--gray); margin: 0 0 8px; font-size: clamp(24px, 2.6vw, 32px);
}
.mah-blog-band .sub{ text-align: center; color: var(--text-soft); margin: 0 0 40px; }
.mah-blog-grid{
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
}
.mah-blog-card{
  background: #fff; border-radius: 6px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.mah-blog-card:hover{ transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.mah-blog-card .thumb{ aspect-ratio: 1/1; overflow: hidden; }
.mah-blog-card .thumb img{ width: 100%; height: 100%; object-fit: cover; }
.mah-blog-card .body{ padding: 20px; flex: 1; display: flex; flex-direction: column; }
.mah-blog-card .date{ font-family: var(--font-en); font-size: 12px; color: var(--gray); margin: 0 0 8px; }
.mah-blog-card .title{
  font-size: 16px; font-weight: 600; line-height: 1.5; color: var(--text);
  margin: 0 0 12px; flex: 1;
}
.mah-blog-card .title a{ color: inherit; }
.mah-blog-card .title a:hover{ color: var(--accent); }
.mah-blog-card .more{
  font-family: var(--font-en); font-size: 13px; color: var(--accent);
  display: inline-flex; align-items: center; gap: 4px;
}
@media (max-width: 900px){ .mah-blog-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px){ .mah-blog-grid{ grid-template-columns: 1fr; } }

/* -------------------- single post -------------------- */
.mah-single{ padding: 56px 0; }
.mah-single article{
  max-width: 800px; margin: 0 auto; padding: 0 24px;
}
.mah-single h1{
  font-size: clamp(22px, 2.6vw, 30px); line-height: 1.5;
  margin: 0 0 12px; color: var(--text); font-weight: 700;
}
.mah-single .meta{
  font-family: var(--font-en); font-size: 13px; color: var(--gray);
  margin-bottom: 30px; display: flex; gap: 18px; flex-wrap: wrap;
}
.mah-single .featured{ margin: 0 0 30px; }
.mah-single .content img{ margin: 16px 0; border-radius: 4px; }
.mah-single .content p { margin: 0 0 1.3em; }
.mah-single .content a { color: var(--accent-dark); border-bottom: 1px solid currentColor; }
.mah-single .content a:hover { color: var(--accent); }
.mah-single .terms{ margin: 30px 0 0; font-size: 13px; color: var(--gray); display: flex; gap: 8px; flex-wrap: wrap; }
.mah-single .terms a{
  background: var(--accent-soft); color: var(--accent-dark);
  padding: 4px 10px; border-radius: 100px; font-size: 12px;
}
.mah-single .terms a:hover{ background: var(--accent); color: #fff; }

/* -------------------- archive / search list -------------------- */
.mah-archive{ padding: 56px 0; }
.mah-archive-title{
  text-align: center; font-family: var(--font-en); font-weight: 600;
  color: var(--accent); font-size: clamp(22px, 2.4vw, 30px); margin: 0 0 36px;
}
.mah-pagination{
  margin: 40px 0 0; text-align: center;
}
.mah-pagination .page-numbers{
  display: inline-block; padding: 8px 14px; margin: 0 2px;
  border-radius: 3px; background: #fff; color: var(--text-soft);
  border: 1px solid var(--line);
}
.mah-pagination .page-numbers.current,
.mah-pagination .page-numbers:hover{ background: var(--accent); color: #fff; border-color: var(--accent); }

/* -------------------- registration form page -------------------- */
.mah-form-page{ padding: var(--section-y) 0; }
.mah-form-page h1{
  text-align: center; font-family: var(--font-en); font-weight: 600;
  color: var(--accent); font-size: clamp(26px, 3vw, 36px); margin: 0 0 16px;
}
.mah-form-page .lead{ text-align: center; max-width: 720px; margin: 0 auto 40px; color: var(--text-soft); }
.mah-form-page .content{ max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* CF7 normalization */
.wpcf7-form p { margin-bottom: 14px; }
.wpcf7-form label { display: block; font-size: 14px; color: var(--text); margin-bottom: 6px; font-weight: 500; }
.wpcf7-form input[type=text],
.wpcf7-form input[type=email],
.wpcf7-form input[type=tel],
.wpcf7-form input[type=url],
.wpcf7-form input[type=number],
.wpcf7-form input[type=date],
.wpcf7-form select,
.wpcf7-form textarea{
  width: 100%; padding: 12px 14px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 4px; background: #fff;
  font-family: inherit; color: var(--text);
}
.wpcf7-form textarea{ min-height: 140px; resize: vertical; }
.wpcf7-form .wpcf7-submit{ font-family: var(--font-en); }

/* -------------------- 404 -------------------- */
.mah-404{ padding: 120px 24px; text-align: center; }
.mah-404 .code{
  font-family: var(--font-en); font-size: clamp(80px, 14vw, 160px);
  color: var(--accent); line-height: 1; margin: 0;
}
.mah-404 p{ color: var(--text-soft); margin: 16px auto 30px; max-width: 520px; }

/* -------------------- footer -------------------- */
.mah-footer{
  background: #2a1820; color: #d6c6c9; text-align: center;
  padding: 56px 24px;
}
.mah-footer img{ height: 64px; margin: 0 auto 18px; }
.mah-footer .links{ margin: 18px 0; }
.mah-footer .links a{ color: #d6c6c9; margin: 0 14px; font-size: 14px; }
.mah-footer .links a:hover{ color: var(--accent); }
.mah-footer small{ color: #8e7a7e; font-size: 13px; }

/* -------------------- scroll-top button (refined) -------------------- */
.mah-totop{
  position: fixed; right: 28px; bottom: 28px;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.85);
  color: var(--accent);
  display: none;
  align-items: center; justify-content: center;
  border: 1px solid rgba(188,140,150,.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px -8px rgba(31,29,28,.18), 0 1px 0 rgba(255,255,255,.6) inset;
  cursor: pointer;
  z-index: 90;
  opacity: 0; transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease, background .25s, color .25s, border-color .25s, box-shadow .25s;
}
.mah-totop.is-visible{ display: inline-flex; opacity: 1; transform: translateY(0); }
.mah-totop:hover{
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 10px 22px -6px rgba(188,140,150,.55);
  transform: translateY(-3px);
}
.mah-totop:active{ transform: translateY(0); }

/* Hairline arrow drawn in CSS (no SVG dependency) */
.mah-totop::before{
  content: "";
  width: 11px; height: 11px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(-45deg) translate(-1px, 1px);
  display: block;
}
.mah-totop svg{ display: none; }   /* hide legacy svg if still in markup */

@media (max-width: 720px){
  .mah-totop{ right: 18px; bottom: 18px; width: 42px; height: 42px; }
  .mah-totop::before{ width: 9px; height: 9px; }
}

/* -------------------- responsive section padding -------------------- */
@media (max-width: 720px){
  :root{ --section-y: 60px; --section-y-sm: 40px; }
  .mah-header-inner{ height: 60px; }
  .mah-logo img{ height: 36px; }
}

/* -------------------- Astra parent overrides -------------------- *
 * Astra adds .ast-narrow-container / .ast-separate-container and a wrapping
 * #primary > .ast-article-single that hijacks layout. Force-center our content.
 */
body.mah-body #content,
body.mah-body main.mah-main{
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--bg);
}
body.mah-body .mah-single,
body.mah-body .mah-archive,
body.mah-body .mah-404,
body.mah-body .mah-form-page{
  width: 100%;
}
body.mah-body .mah-single > article,
body.mah-body article.ast-article-single{
  max-width: 800px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  float: none !important;
}
/* Astra single article wraps our section; flatten it */
body.mah-body article.ast-article-single .mah-single{
  padding: 0;
}
body.mah-body article.ast-article-single .mah-single > article{
  padding: 0;
}
/* Center images inside single-post content */
body.mah-body .mah-single .content img,
body.mah-body .mah-single .featured img{
  margin-left: auto !important;
  margin-right: auto !important;
  display: block;
}

/* -------------------- Hide Astra's built-in scroll-top (we use our own .mah-totop) -------------------- */
#ast-scroll-top { display: none !important; }
