/*
Theme Name: MIYITECH Home (Bilingual)
Theme URI: https://www.miyitech.jp/
Author: MIYI Co., Ltd.
Author URI: https://www.miyitech.jp/
Description: Minimal bilingual (JA/EN) WordPress theme for MIYITECH homepage.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: miyitech-home
Tags: custom-background, custom-logo, one-column, translation-ready
*/

:root { color-scheme: light; }

/* =========================================================
   Base reset (WP-safe, minimal)
   ========================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

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

a { text-decoration: none; }
a:focus { outline: 2px solid rgba(37,99,235,.35); outline-offset: 2px; }

html, body { height: 100%; }
body{
  margin:0 !important;
  padding:0 !important;
  min-height:100vh !important;
  display:flex !important;
  flex-direction:column !important;
  background:#fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* WP common outer containers -> flex column (sticky footer friendly) */
#page, .site, .site-wrapper, .site-content{
  flex:1 0 auto;
  display:flex;
  flex-direction:column;
  min-height:100vh;
}
#content, .site-main, main{ flex:1 0 auto; }

/* footer always at bottom */
.site-footer, footer{
  margin-top:auto !important;
  width:100%;
}
.site-footer{ padding-left:0 !important; padding-right:0 !important; }

/* =========================================================
   MIYITECH Global UI Kit (Reusable)
   ========================================================= */

/* ---------- Design Tokens ---------- */
:root{
  --myi-ink:#111827;
  --myi-muted:#6b7280;
  --myi-line:#e5e7eb;
  --myi-bg:#ffffff;
  --myi-soft:#f9fafb;
  --myi-accent:#2563eb;

  /* deep hero palette */
  --myi-hero-from:#0f172a;
  --myi-hero-mid:#111827;
  --myi-hero-to:#0b1220;

  --myi-shadow:0 20px 50px rgba(15,23,42,.12);
  --myi-shadow-strong:0 26px 70px rgba(15,23,42,.45);

  --myi-radius-xl:24px;
  --myi-radius-lg:16px;
  --myi-radius-md:14px;
}

/* ---------- Section baseline ---------- */
.myi-section{
  font-family:system-ui,-apple-system,"Noto Sans JP",Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  color:var(--myi-ink);
  background:var(--myi-bg);
}
.myi-soft{ background:var(--myi-soft); }
.myi-muted{ color:var(--myi-muted) !important; }

.myi-section h1, .myi-section h2, .myi-section h3, .myi-section h4, .myi-section h5{
  color:var(--myi-ink);
  line-height:1.25;
  margin:0;
}
.myi-section h2{
  margin:0 0 8px;
  font-size:clamp(20px,2.4vw,26px);
  font-weight:780;
}
.myi-section h3{
  margin:0 0 8px;
  font-size:18px;
  font-weight:750;
}
.myi-section p{
  margin:.45em 0;
  line-height:1.9;
  font-size:14px;
  color:var(--myi-muted);
}

/* ---------- Containers ---------- */
.myi-wrap{
  max-width:1120px;
  margin:0 auto;
  padding:40px 20px 56px;
}
@media (max-width:720px){
  .myi-wrap{ padding:28px 14px 44px; }
}

/* ---------- i18n hooks (site uses html[data-lang="ja|en"]) ---------- */
.myi-i18n [data-ja], .myi-i18n [data-en]{ display:none !important; }
html[data-lang="ja"] .myi-i18n [data-ja]{ display:block !important; }
html[data-lang="en"] .myi-i18n [data-en]{ display:block !important; }

/* inline bilingual helper */
.myi-i18n .ib [data-ja], .myi-i18n .ib [data-en]{ display:none !important; }
html[data-lang="ja"] .myi-i18n .ib [data-ja]{ display:inline !important; }
html[data-lang="en"] .myi-i18n .ib [data-en]{ display:inline !important; }

/* =========================================================
   Unified HERO (one system across pages)
   Usage:
   <div class="myi-hero" style="--hero-bg:url('...')">
     <div class="myi-hero-inner">...</div>
   </div>
   ========================================================= */
.myi-hero{
  --hero-min-h: 420px;
  --hero-min-h-sp: 300px;
  --hero-bg: none;

  border-radius:var(--myi-radius-xl);
  overflow:hidden;
  position:relative;
  min-height:var(--hero-min-h);
  box-shadow:var(--myi-shadow-strong);
  border:1px solid rgba(148,163,184,.24);
  color:#e5e7eb;

  background:
    radial-gradient(1000px 520px at 10% -15%, rgba(96,165,250,.26), transparent 60%),
    radial-gradient(900px 420px at 90% 0%, rgba(37,99,235,.22), transparent 55%),
    linear-gradient(135deg, var(--myi-hero-from) 0%, var(--myi-hero-mid) 55%, var(--myi-hero-to) 100%);
}
.myi-hero::after{
  content:"";
  position:absolute; inset:0;
  background-image: var(--hero-bg);
  background-size:cover;
  background-position:center;
  opacity:.55;
  transform: scale(1.02);
  pointer-events:none;
}
.myi-hero::before{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(
    90deg,
    rgba(2,32,70,.62) 0%,
    rgba(2,32,70,.38) 45%,
    rgba(0,16,45,.62) 100%
  );
  pointer-events:none;
}
.myi-hero > *{ position:relative; z-index:1; }

.myi-hero-inner{
  padding:28px 26px 24px;
  min-height:var(--hero-min-h);
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  gap:14px;
}
@media(max-width:900px){
  .myi-hero{ min-height:var(--hero-min-h-sp); }
  .myi-hero-inner{ min-height:var(--hero-min-h-sp); padding:20px 18px 18px; }
}

.myi-hero-center{ justify-content:center !important; }

.myi-hero-top{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:flex-end;
  justify-content:space-between;
}

.myi-hero-title{
  margin:0;
  font-size:clamp(22px,3.2vw,32px);
  font-weight:850;
  letter-spacing:.06em;
  color:#fff !important;
  text-shadow: 0 2px 14px rgba(0,0,0,.55);
}
.myi-hero-desc{
  margin:0;
  max-width:900px;
  line-height:1.9;
  font-size:14px;
  color:#e5e7eb !important;
  opacity:.95;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.myi-hero-desc-wide{ max-width: 760px; }

/* Eyebrow */
.myi-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:6px 12px;
  border-radius:999px;
  font-size:11px;
  letter-spacing:.14em;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.18);
  color:#e5e7eb;
  width:fit-content;
  backdrop-filter: blur(6px);
}
.myi-eyebrow-dot{
  width:4px;height:4px;border-radius:999px;
  background:rgba(255,255,255,.55);
}
.myi-eyebrow-sep{ opacity:.55; }

/* Chips */
.myi-chips{ display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.myi-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 10px;
  border-radius:999px;
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
  white-space:nowrap;
  color:#e5e7eb;
}
.myi-chip-dot{
  width:6px;height:6px;border-radius:999px;background:#60a5fa;
  box-shadow:0 0 0 4px rgba(96,165,250,.18);
}

/* Hero actions */
.myi-hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:8px;
}

/* =========================================================
   Buttons (reusable)
   ========================================================= */
.myi-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.65);
  padding:9px 18px;
  font-size:13px;
  font-weight:650;
  text-decoration:none;
  color:#e5e7eb;
  background:rgba(15,23,42,.45);
  backdrop-filter: blur(6px);
  transition:.18s ease;
  white-space:nowrap;
}
.myi-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 24px rgba(0,0,0,.35);
}
.myi-btn-primary{
  border-color:rgba(255,255,255,.35);
  background:linear-gradient(135deg,#60a5fa,#2563eb);
  color:#fff;
  box-shadow:0 10px 24px rgba(37,99,235,.35);
}

/* Ensure secondary button text is visible in hero */
.myi-hero .myi-btn:not(.myi-btn-primary){
  color:#e5e7eb !important;
  border-color:rgba(255,255,255,.45);
}
.myi-hero .myi-btn:not(.myi-btn-primary):hover{
  color:#fff !important;
  background:rgba(15,23,42,.65);
}

/* =========================================================
   Cards (reusable)
   ========================================================= */
.myi-cards{
  margin-top:22px;
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:18px;
  justify-items: stretch;
}
@media (max-width: 1100px){
  .myi-cards{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .myi-cards{ grid-template-columns: 1fr; }
}

.myi-card{
  background:#fff;
  border:1px solid var(--myi-line);
  border-radius:var(--myi-radius-lg);
  box-shadow:0 10px 28px rgba(148,163,184,.18);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  height:100%;
}
.myi-card:hover{
  transform: translateY(-3px);
  box-shadow:0 18px 40px rgba(15,23,42,.16);
  border-color:rgba(37,99,235,.22);
}
.myi-card-pad{ padding:18px 18px 16px; }

/* company card */
.myi-company-card{
  width:100%;
  height:200px;
  text-align:center;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:6px;
}
.myi-company-card img{
  width:100px;
  height:auto;
  margin-bottom:6px;
}
.myi-company-card h5{
  margin:0;
  font-size:14px;
  font-weight:800;
  letter-spacing:.02em;
  color:var(--myi-ink);
}
.myi-company-card p{
  margin:0;
  font-size:12px;
  color:var(--myi-muted);
  line-height:1.6;
}

/* make whole card clickable + avoid theme link quirks */
.myi-link{
  display:block;
  color:inherit !important;
  text-decoration:none !important;
}
.myi-link:visited{ color:inherit !important; }
.myi-link:hover{ text-decoration:none !important; }
.entry-content a.myi-link img{ display:block; }

/* =========================================================
   FAQ / details (reusable; stable)
   ========================================================= */
.myi-faq{
  margin-top:18px;
  display:grid;
  gap:10px;
}
.myi-faq details{
  border:1px solid var(--myi-line);
  border-radius:14px;
  background:#fff;
  padding:12px 14px;
  box-shadow:0 10px 24px rgba(148,163,184,.12);
}
.myi-faq summary{
  cursor:pointer;
  font-weight:800;
  font-size:13.5px;
  color:var(--myi-ink);
}
.myi-faq details p{
  margin:10px 0 0;
  color:var(--myi-muted);
  font-size:13.2px;
  line-height:1.85;
}

/* =========================================================
   Grid system (12 -> 8 -> 4)
   ========================================================= */
.myi-grid{ display:grid; gap:24px; grid-template-columns:repeat(12,1fr); }
.myi-span-12{ grid-column:span 12; }
.myi-span-8{ grid-column:span 8; }
.myi-span-6{ grid-column:span 6; }
.myi-span-4{ grid-column:span 4; }

@media (max-width:1024px){
  .myi-grid{ grid-template-columns:repeat(8,1fr); }
  .myi-span-8,.myi-span-6,.myi-span-4{ grid-column:span 8; }
}
@media (max-width:720px){
  .myi-grid{ grid-template-columns:repeat(4,1fr); }
  .myi-span-12,.myi-span-8,.myi-span-6,.myi-span-4{ grid-column:span 4; }
}

/* =========================================================
   Content blocks
   ========================================================= */
.myi-soft-card{
  border-radius:18px;
  border:1px solid var(--myi-line);
  background:var(--myi-soft);
  padding:18px 18px 14px;
}
.myi-white-card{
  border-radius:18px;
  border:1px solid var(--myi-line);
  background:#fff;
  padding:18px 18px 16px;
  box-shadow:0 8px 20px rgba(15,23,42,.04);
}

.myi-info-list{ list-style:none; margin:10px 0 0; padding:0; font-size:13px; }
.myi-info-item{
  display:flex;
  gap:10px;
  padding:6px 0;
  border-bottom:1px dashed var(--myi-line);
}
.myi-info-label{
  min-width:92px;
  color:var(--myi-muted);
}

.myi-tags{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.myi-tag{
  font-size:11px;
  border-radius:999px;
  border:1px solid var(--myi-line);
  padding:3px 8px;
  background:#f9fafb;
  color:#4b5563;
}

/* =========================================================
   Gentle anti-theme override (content area only)
   ========================================================= */
.entry-content .myi-section,
.page .myi-section{
  box-sizing:border-box;
}
.entry-content .myi-section *{ box-sizing:border-box; }

/* =========================================================
   Utilities
   ========================================================= */
.myi-center{ text-align:center; }
.myi-mt-12{ margin-top:12px; }
.myi-mt-18{ margin-top:18px; }
.myi-mt-24{ margin-top:24px; }
.myi-mt-26{ margin-top:26px; }
.myi-mt-32{ margin-top:32px; }
.myi-mb-12{ margin-bottom:12px; }
.myi-mb-18{ margin-bottom:18px; }
.myi-mb-24{ margin-bottom:24px; }
.myi-hide{ display:none !important; }
/* =========================
   HERO layout: left + right panel (Group / About style)
   ========================= */
   .myi-hero-grid{
    display:grid;
    grid-template-columns: 1.65fr .95fr;
    gap:18px;
    align-items:stretch;
  }
  @media (max-width: 980px){
    .myi-hero-grid{ grid-template-columns: 1fr; gap:14px; }
  }
  
  .myi-hero-main{ min-width:0; }
  
  /* bottom pills */
  .myi-hero-pills{
    margin-top:14px;
    display:flex;
    flex-wrap:wrap;
    gap:10px;
  }
  .myi-pill{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:8px 12px;
    border-radius:999px;
    border:1px solid rgba(255,255,255,.18);
    background:rgba(255,255,255,.08);
    backdrop-filter: blur(6px);
    color:#e5e7eb;
    font-size:12.5px;
    line-height:1.55;
  }
  .myi-pill-label{ opacity:.85; letter-spacing:.08em; }
  .myi-pill-text{ opacity:.95; }
  
  /* right panel card */
  .myi-hero-panel{
    border-radius:22px;
    border:1px solid rgba(255,255,255,.18);
    background: rgba(15,23,42,.35);
    box-shadow: 0 18px 46px rgba(0,0,0,.28);
    backdrop-filter: blur(10px);
    overflow:hidden;
    min-height: 100%;
  }
  .myi-hero-panel-head{
    padding:14px 14px 10px;
    border-bottom:1px solid rgba(255,255,255,.12);
  }
  .myi-hero-panel-kicker{
    font-size:12px;
    letter-spacing:.18em;
    text-transform:uppercase;
    opacity:.75;
    margin-bottom:10px;
  }
  .myi-hero-panel-brand{
    display:flex;
    gap:12px;
    align-items:center;
  }
  .myi-hero-panel-logo{
    width:44px;
    height:44px;
    border-radius:10px;
    object-fit:cover;
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.14);
  }
  .myi-hero-panel-title{
    font-weight:850;
    color:#fff;
    letter-spacing:.02em;
  }
  .myi-hero-panel-sub{
    font-size:12px;
    color:#e5e7eb;
    opacity:.85;
    line-height:1.55;
    margin-top:2px;
  }
  
  .myi-hero-panel-body{
    padding:12px 14px 14px;
  }
  .myi-hero-panel-text{
    margin:0;
    color:#e5e7eb;
    opacity:.9;
    font-size:13px;
    line-height:1.85;
    text-shadow: 0 2px 10px rgba(0,0,0,.25);
  }
  .myi-hero-panel-actions{
    margin-top:12px;
    display:flex;
    flex-wrap:wrap;
    gap:10px;
  }
  /* =========================
   Cookie Consent (Pro-lite)
   ========================= */

.myi-cookie{
  position:fixed;
  left:16px; right:16px; bottom:16px;
  z-index:9999;
  display:flex;
  justify-content:center;
}

.myi-cookie-card{
  width:min(1120px, 100%);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;

  padding:14px 16px;
  border-radius:16px;
  border:1px solid rgba(148,163,184,.28);
  background:rgba(255,255,255,.88);
  backdrop-filter:blur(10px);
  box-shadow:0 18px 50px rgba(15,23,42,.18);
}

.myi-cookie-title{
  font-weight:800;
  font-size:13px;
  letter-spacing:.04em;
  color:var(--myi-ink);
  margin-bottom:4px;
}

.myi-cookie-desc{
  font-size:12.5px;
  line-height:1.6;
  color:var(--myi-muted);
}

.myi-cookie-link{
  color:var(--myi-accent);
  text-decoration:none;
  border-bottom:1px solid rgba(37,99,235,.25);
}
.myi-cookie-link:hover{ border-bottom-color:rgba(37,99,235,.6); }

.myi-cookie-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.myi-btn-ghost{
  background:#fff;
  color:var(--myi-ink);
  border:1px solid var(--myi-line);
}

@media (max-width:720px){
  .myi-cookie-card{ flex-direction:column; align-items:flex-start; }
  .myi-cookie-actions{ width:100%; justify-content:flex-start; }
}

/* Modal */
.myi-cookie-modal{
  position:fixed;
  inset:0;
  z-index:10000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  background:rgba(2,6,23,.55);
}

.myi-cookie-modal-card{
  width:min(560px, 100%);
  border-radius:18px;
  background:#fff;
  border:1px solid var(--myi-line);
  box-shadow:0 30px 80px rgba(0,0,0,.35);
  padding:14px 14px 12px;
}

.myi-cookie-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:6px 6px 10px;
  border-bottom:1px solid var(--myi-line);
}

.myi-cookie-modal-title{
  font-weight:850;
  font-size:14px;
  color:var(--myi-ink);
}

.myi-cookie-x{
  width:34px; height:34px;
  border-radius:10px;
  border:1px solid var(--myi-line);
  background:#fff;
  cursor:pointer;
  font-size:18px;
  line-height:1;
}

.myi-cookie-opts{ padding:12px 6px 6px; display:grid; gap:10px; }

.myi-cookie-opt{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:10px 10px;
  border-radius:14px;
  border:1px solid var(--myi-line);
  background:#f9fafb;
}
.myi-cookie-opt input{ margin-top:3px; }

.myi-cookie-opt-title{ font-weight:800; font-size:13px; color:var(--myi-ink); }
.myi-cookie-opt-desc{ margin-top:2px; font-size:12.5px; color:var(--myi-muted); line-height:1.55; }

.myi-cookie-modal-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  padding:10px 6px 2px;
  border-top:1px solid var(--myi-line);
  margin-top:10px;
}
