/*
Theme Name: Rooted Corporate
Theme URI: https://rooted.jp
Description: 株式会社Rooted コーポレートサイト子テーマ
Author: 株式会社Rooted
Author URI: https://rooted.jp
Template: xeory_extension
Version: 1.0.0
*/

/* ===== Design Tokens ===== */
:root {
  --color-primary: #051AB9;
  --color-primary-hover: #0414A0;
  --color-accent: #009FB3;
  --color-bg-primary: #FFFFFF;
  --color-bg-section: #F7F9FC;
  --color-text: #1A1A1A;
  --color-text-light: #6B7280;
  --color-border: #E5E7EB;
  --content-max: 1100px;
  --section-pad: 96px;
}

/* ===== Base Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
  background: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: var(--content-max); margin: 0 auto; padding: 0 24px; }

/* ===== Typography ===== */
.eyebrow {
  font-family: 'Inter', sans-serif;
  font-weight: 500; font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 20px;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--color-accent); }

h1, h2, h3, h4 {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700; color: var(--color-text);
  line-height: 1.35; margin: 0; letter-spacing: 0.01em;
}
h2 { font-size: clamp(26px, 3vw, 34px); }
h3 { font-size: 18px; }
p { margin: 0; }

/* ===== Navigation ===== */
.nav { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--color-border); }
.nav-inner { max-width: var(--content-max); margin: 0 auto; padding: 0 24px; height: 96px; display: flex; align-items: center; justify-content: space-between; }
.nav-logo img { height: 56px; width: auto; }
.nav-menu { display: flex; align-items: center; gap: 32px; font-size: 14px; font-weight: 500; }
.nav-menu a { color: var(--color-text); padding: 6px 0; border-bottom: 1.5px solid transparent; transition: border-color .15s ease, color .15s ease; }
.nav-menu a:hover { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.nav-menu a.cta { background: var(--color-primary); color: #fff; padding: 8px 18px; border-radius: 4px; border: none; }
.nav-menu a.cta:hover { background: var(--color-primary-hover); color: #fff; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer; padding: 8px;
  width: 40px; height: 40px; position: relative;
  flex-direction: column; justify-content: center; align-items: center; gap: 6px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--color-text);
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 28px; border-radius: 4px; font-size: 15px; font-weight: 700; transition: background .15s ease, color .15s ease, border-color .15s ease; white-space: nowrap; }
.btn-primary { background: var(--color-primary); color: #fff; border: 1.5px solid var(--color-primary); }
.btn-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }
.btn-secondary { background: transparent; color: var(--color-primary); border: 1.5px solid var(--color-primary); }
.btn-secondary:hover { background: rgba(5, 26, 185, 0.08); }
.btn-inverse { background: #fff; color: var(--color-primary); border: 1.5px solid #fff; }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ===== Sections ===== */
section.block { padding: var(--section-pad) 0; }
section.bg-section { background: var(--color-bg-section); }
.section-head { margin-bottom: 56px; max-width: 720px; }
.section-head p.sub { margin-top: 18px; color: var(--color-text-light); font-size: 16px; line-height: 1.9; }

/* ===== Contact CTA ===== */
.cta-block { background: var(--color-primary); color: #fff; padding: 96px 0; }
.cta-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.cta-block .eyebrow { color: rgba(255,255,255,0.7); }
.cta-block .eyebrow::before { background: rgba(255,255,255,0.5); }
.cta-block h2 { color: #fff; margin-bottom: 16px; font-size: clamp(28px, 3.4vw, 38px); }
.cta-block p { color: rgba(255,255,255,0.85); font-size: 16px; line-height: 1.85; max-width: 520px; }
.cta-actions { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }

/* ===== Footer ===== */
footer[role="contentinfo"] { background: #1A1A1A; color: #fff; padding: 72px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 2fr; gap: 48px; margin-bottom: 56px; }
.footer-brand img { height: 36px; width: auto; margin-bottom: 20px; }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 13.5px; line-height: 1.85; max-width: 320px; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-col h4 { font-family: 'Inter', sans-serif; font-size: 11px; color: rgba(255,255,255,0.5); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255,255,255,0.85); font-size: 14px; transition: color .15s ease; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-family: 'Inter', sans-serif; font-size: 12px; color: rgba(255,255,255,0.5); }
.footer-bottom .legal { display: flex; gap: 20px; }

/* ===== Contact Form (CF7) ===== */
.wpcf7-form label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 20px;
}
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background: #fff;
  margin-top: 6px;
  transition: border-color .15s ease;
}
.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(5, 26, 185, 0.08);
}
.wpcf7-form textarea { min-height: 180px; resize: vertical; }
.wpcf7-form input[type="submit"] {
  display: block;
  margin: 0 auto;
  padding: 13px 48px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease;
}
.wpcf7-form input[type="submit"]:hover { background: var(--color-primary-hover); }
.wpcf7-not-valid-tip { color: #dc2626; font-size: 13px; margin-top: 4px; }
.wpcf7-not-valid { border-color: #dc2626 !important; }
.wpcf7-form .wpcf7-acceptance { font-weight: 400; }
.wpcf7-form .wpcf7-response-output { border-radius: 4px; font-size: 14px; }
.wpcf7-form .wpcf7-spinner { display: none; }
.wpcf7-form.submitting .wpcf7-spinner { display: inline-block; visibility: visible; }
.wpcf7-form > p:last-of-type { text-align: center; margin: 0; padding: 0; }

/* ===== Inner page: English subtitle ===== */
.lead-en {
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--color-text-light);
  margin-bottom: 24px;
}

/* ===== Inner page: post-content standard elements ===== */
.page-content { padding: var(--section-pad) 0; }
.post-content p { margin-bottom: 1.2em; }
.post-content h2 { margin: 2em 0 0.8em; }
.post-content h3 { margin: 1.6em 0 0.6em; }
.post-content ul, .post-content ol { margin: 0 0 1.2em; padding-left: 1.5em; }
.post-content li { margin-bottom: 0.4em; }
.post-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.5em; }
.post-content th, .post-content td { padding: 10px 14px; border: 1px solid var(--color-border); text-align: left; }
.post-content th { background: var(--color-bg-section); font-weight: 700; }

/* ===== reCAPTCHA badge (hidden per Google guidelines; branding text kept in form) ===== */
.grecaptcha-badge { visibility: hidden !important; }

/* ===== Override parent theme residual styles ===== */
#header, #gnav, #gnav-sp, #header-nav-btn, #header-right,
#header-fnav-area, .breadcrumb-area { display: none !important; }
#content { padding: 0; }
#main { float: none; width: 100%; }
.main-inner { margin-right: 0; }
#footer { border-top: none; }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  :root { --section-pad: 80px; }
}

@media (max-width: 900px) {
  :root { --section-pad: 64px; }

  /* Hide desktop nav, show toggle */
  .nav-menu { display: none; flex-direction: column; align-items: stretch; gap: 0; position: absolute; top: 96px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--color-border); padding: 16px 24px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
  .nav-menu.is-open { display: flex; }
  .nav-menu a { padding: 12px 0; font-size: 15px; border-bottom: none; }
  .nav-menu a.cta { text-align: center; margin-top: 8px; }
  .nav-toggle { display: flex; }

  .cta-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  .footer-links { grid-template-columns: 1fr; }
}
