/*
Theme Name: MetaNight
Author: Your Name
Description: A custom theme for MetaNight Inc.
Version: 1.1
*/

/* --- Basic Setup & Variables --- */
:root {
    --color-black: #000000;
    --color-white: #FFFFFF;
    --color-gray-dark: #333333;
    --color-gray-light: #F5F5F5;
    --font-primary-jp: 'Noto Sans JP', sans-serif;
    --font-primary-en: 'Montserrat', sans-serif;
    --font-display: 'Bebas Neue', cursive;
    --section-v-padding: 8rem;
    --diagonal-height: 60px;

    /* Typography Scale */
    --font-size-h1: 3.052rem; /* 49.63px */
    --font-size-h2: 2.441rem; /* 39.06px */
    --font-size-h3: 1.953rem; /* 31.25px */
    --font-size-h4: 1.563rem; /* 25.00px */
    --font-size-h5: 1.25rem;  /* 20.00px */
    --font-size-base: 1rem;      /* 16.00px */
    --font-size-sm: 0.8rem;    /* 12.80px */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-primary-jp);
    background-color: var(--color-black); /* Base color for overlaps */
    color: var(--color-gray-dark);
    font-size: var(--font-size-base);
    line-height: 1.7;
}

h1, .h1 { font-size: var(--font-size-h1); }
h2, .h2 { font-size: var(--font-size-h2); }
h3, .h3 { font-size: var(--font-size-h3); }
h4, .h4 { font-size: var(--font-size-h4); }
h5, .h5 { font-size: var(--font-size-h5); }
p { font-size: var(--font-size-base); }
small { font-size: var(--font-size-sm); }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: normal; line-height: 1.3; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* --- Admin Bar Fix --- */
body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }

/* --- Header --- */
.site-header { position: fixed; top: 0; left: 0; width: 100%; background-color: var(--color-black); box-shadow: 0 2px 4px rgba(0,0,0,0.1); z-index: 1000; }
.header-container { max-width: 1200px; margin: 0 auto; padding: 1rem; display: flex; justify-content: space-between; align-items: center; }
.site-logo img { display: block; height: 48px; }
.site-title.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.main-navigation { flex: 1 1 auto; text-align: right; }
.nav-menu { list-style: none; display: flex; justify-content: flex-end; gap: 2rem; }
.nav-menu a { font-family: var(--font-primary-jp); font-size: var(--font-size-sm); color: var(--color-white); text-transform: uppercase; letter-spacing: 0.1em; position: relative; padding: 0.5rem 0; transition: color 0.3s; }
.nav-menu a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: var(--color-white); transition: width 0.3s ease; }
.nav-menu a:hover { color: var(--color-gray-light); }
.nav-menu a:hover::after { width: 100%; }

/* --- Section Layout & Diagonal Cut --- */
main { display: block; }
main > section, .site-footer {
    position: relative;
    padding: var(--section-v-padding) 0;
}
main > section {
    margin-top: calc(0px - var(--diagonal-height));
    clip-path: polygon(0 var(--diagonal-height), 100% 0, 100% 100%, 0% 100%);
}
main > section:first-child,
.hero {
    margin-top: 0;
    clip-path: none;
}
.site-footer {
    clip-path: none;
}
main > section:last-of-type, .site-footer {
    margin-top: calc(0px - var(--diagonal-height));
}
main > section:last-of-type,
.site-footer {
     clip-path: polygon(0 var(--diagonal-height), 100% 0, 100% 100%, 0% 100%) !important;
}
main > section:last-of-type {
     padding-bottom: var(--section-v-padding);
}
.site-footer {
    padding-bottom: 3rem;
    background-color: var(--color-black);
}

/* --- Background Colors --- */
.section-white { background-color: var(--color-white); }
.section-black { background-color: var(--color-black); }

/* --- Hero Section --- */
.hero {
  height: 800px;
  padding: 0;
  color: #fff;
  z-index: 1;
  background-color: transparent;
  position: relative;
}
.hero .hero-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: url("https://metanight.co.jp/wp-content/uploads/2025/10/meta_hp_top_sp_nologo_251021.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}
@media (min-width: 768px) {
  .hero .hero-bg {
    background-image: url("https://metanight.co.jp/wp-content/uploads/2025/10/meta_hp_top_pc_nologo_251021.jpg");
  }
}
.hero .hero-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 1;
}
.hero-content {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  padding: 0 1rem;
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  z-index: 2;
}

.hero-heading {
  display: inline-block;
}

.hero-message {
  font-size: var(--font-size-h1);
  font-family: var(--font-primary-jp);
  font-weight: 700;
  letter-spacing: .1em;
  margin: 0;
}

.typewriter{
  position: relative;
  display: inline-block;
  white-space: nowrap;
  line-height: 1.2;
}
.typewriter .cursor{
  display: inline-block;
  width: 0;
  height: 1em;
  border-right: .12em solid #fff;
  animation: caretBlink 0.75s steps(1) infinite;
  transform: translateY(.08em);
}
@keyframes caretBlink { 50% { border-color: transparent; } }

.hero-subtitle{
  font-family: var(--font-primary-en);
  font-size: var(--font-size-sm);
  letter-spacing: .06em;
  margin: .75rem 0 0;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity .5s ease,
    transform .5s ease;
  will-change: opacity, transform;
}
.hero-subtitle.show{
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce){
  .typewriter .cursor{ animation: none; border-right: 0; }
  .hero-subtitle{
    transition: none;
  }
}

/* --- Mission Section --- */
.mission-section {
    color: var(--color-white);
}
.mission-content-split {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}
.mission-highlight-wrapper {
  width: 100%;
  text-align: center;
  border-bottom: 2px solid var(--color-white);
  padding: 0 0 2rem;
}
.mission-highlight {
  font-size: var(--font-size-h3);
  font-weight: 700;
  font-family: var(--font-primary-jp);
  line-height: 1.5;
  margin: 0;
  text-align: center;
}
.mission-text {
  width: 100%;
  text-align: center;
}
.mission-text p {
  margin-bottom: 1.5em;
}
.mission-text p:last-child {
  margin-bottom: 0;
}

/* --- Content Styling --- */
.section-title { font-size: var(--font-size-h2); text-align: center; margin-bottom: 3rem; position: relative; padding-bottom: 1rem; }
.section-title::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 60px; height: 2px; }
.section-footer { text-align: center; margin-top: 3rem; }
.more-link { display: inline-block; padding: 1rem 2rem; border: 2px solid; font-size: var(--font-size-sm); text-transform: uppercase; letter-spacing: 0.1em; transition: all 0.3s ease; }

.section-black { color: var(--color-white); }
.section-black .section-title::after { background-color: var(--color-white); }
.section-black .more-link { border-color: var(--color-white); }
.section-black .more-link:hover { background-color: var(--color-white); color: var(--color-black); }
.section-black .news-date { color: var(--color-gray-light); }
.section-black .news-card, .section-black .cta-card { background-color: #1a1a1a; }
.section-black .service-card { background: transparent; border: 1px solid #444; }
.section-black .message-quote::before { color: #444; }
.section-black .cta-card:hover { background-color: var(--color-white); color: var(--color-black); }
.section-black .news-link::after { background-color: var(--color-white); }

.section-white { color: var(--color-black); }
.section-white .section-title::after { background-color: var(--color-black); }
.section-white .more-link { border-color: var(--color-black); }
.section-white .more-link:hover { background-color: var(--color-black); color: var(--color-white); }
.section-white .news-card, .section-white .service-card, .section-white .cta-card { background-color: var(--color-white); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.section-white .message-quote::before { color: var(--color-gray-light); }
.section-white .cta-card:hover { background-color: var(--color-black); color: var(--color-white); }
.section-white .news-link::after { background-color: var(--color-black); }

/* --- Components --- */
.news-grid, .services-grid, .cta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.news-card, .service-card { transition: transform 0.3s ease; }
.news-card:hover, .service-card:hover { transform: translateY(-5px); }
.news-thumbnail img { width: 100%; height: 200px; object-fit: cover; }
.news-content, .service-card, .cta-card { padding: 1.5rem; }
.news-date { font-size: var(--font-size-sm); margin-bottom: 0.5rem; display: block; }
.news-title { font-size: var(--font-size-h5); margin-bottom: 1rem; }
.news-excerpt, .service-description, .cta-description { font-size: var(--font-size-sm); }
.news-link { display: inline-block; padding-bottom: 2px; position: relative; }
.news-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 1px; }
.service-card, .cta-card { text-align: center; padding: 2rem; }
.service-title, .cta-title { font-size: var(--font-size-h4); }
.service-icon { font-size: var(--font-size-h2); margin-bottom: 1.5rem; }
.message-content { max-width: 1200px; margin: 0 auto; }
.message-text { text-align: left; }
.message-quote { font-size: var(--font-size-h5); font-weight: 700; margin-bottom: 2rem; position: relative; line-height: 1.5; }
.message-quote::before { content: '"'; font-size: 3rem; line-height: 1; position: absolute; left: -0.6em; top: 0; color: var(--color-gray-light); }
.message-body { margin-bottom: 2rem; }
.message-signature { font-weight: 700; text-align: right; }

/* --- Services Section --- */
.service-content-split {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}
.service-text-content {
    flex: 2;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
.service-text-content p {
    margin-bottom: 1.5em;
}
.service-text-content p:last-child {
    margin-bottom: 0;
}
.service-main-copy {
    font-size: var(--font-size-h3);
	font-family: var(--font-primary-jp);
    font-weight: 700;
    line-height: 1.7;
	max-width: 800px;
    margin-bottom: 1.5em;
    margin: 0 auto;
	text-align: center;
}
.achievements-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 0;
}
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.achievement-group {
    display: grid;
    grid-template-columns: auto minmax(0, 320px) auto;
    align-items: center;
    gap: 1.25rem;
}
.laurel {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}
.laurel-img {
    max-width: 75px;
    width: 100%;
    height: auto;
    display: block;
    transform-origin: center;
}
.achievement {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: 16px;
    backdrop-filter: blur(2px);
}
.achievement p {
    margin: 0;
    white-space: nowrap;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-0.2em);
}
.achievement [class$="-title"] {
    grid-column: 1 / -1;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.25;
    height: 1.25em;
}
.achievement [class$="-subtitle"] {
    grid-column: 1 / -1;
    font-size: 0.9rem;
    opacity: .8;
    line-height: 1.25;
    height: 3.5em;
}
.achievement [class$="-number"] {
    position: relative;
    display: block;
    text-align: center;
    height: 2em;
    line-height: 1;
}
.achievement [class$="-number"] .num {
    grid-column: 1 / -1;
    font-size: 2.5rem;
    font-weight: 800;
}
.achievement [class$="-number"] .unit {
    position: absolute;
    left: 100%;
    bottom: 0;
    margin-left: 0.25em;
    font-size: 1rem;
    font-weight: 700;
    line-height: 0.3;
    white-space: nowrap;
}
.achievement-period {
    width: 100%;
    text-align: right;
    font-size: var(--font-size-sm);
    line-height: 1.5;
    margin-top: 1rem;
    opacity: .75;
}

/* --- Message Section (for Front Page) --- */
.home .message-content {
    max-width: 1200px;
    margin: 0 auto;
}
.home .message-quote {
    font-size: var(--font-size-base);
    font-weight: 700;
    line-height: 1.7;
    margin-bottom: 2rem;
    padding: 1.8rem;
    border-left: 4px solid var(--color-black);
    background-color: var(--color-gray-light);
    text-align: left;
}
.home .message-body {
    text-align: left;
}
.home .message-body p {
    margin-bottom: 1.5em;
}
.home .message-signature {
    font-weight: 700;
    text-align: right;
    margin-top: 2rem;
}

/*
================================================
RECRUIT PAGE STYLES (page-recruit.php)
================================================
*/

/* Apply background colors directly to sections on recruit page */
body.page-template-page-recruit .page-hero {
    padding: 6rem 0;
    padding-top: 10rem;
    background-color: var(--color-gray-dark);
    color: var(--color-white);
    text-align: center;
}
body.page-template-page-recruit .vision-section {
    background-color: var(--color-white);
}
body.page-template-page-recruit .job-description-section {
    background-color: var(--color-black);
}
body.page-template-page-recruit .process-section {
    background-color: var(--color-white);
}
body.page-template-page-recruit .cta-section-simple {
    background-color: var(--color-black);
}
body.page-template-page-recruit .vision-content p{
    max-width: 1200px;
    margin: 1.2rem 0;
    text-align: center;
}
body.page-template-page-recruit .vision-highlight {
    font-size: var(--font-size-h4);
    font-weight: 700;
    margin-bottom: 2rem;
}
body.page-template-page-recruit .job-listing {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #1a1a1a;
    padding: 3rem;
    border-radius: 8px;
}
body.page-template-page-recruit .job-details {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1.5rem 2rem;
}
body.page-template-page-recruit .job-details dt {
    font-weight: 700;
    font-size: var(--font-size-base);
    text-align: right;
    border-right: 2px solid var(--color-white);
    padding-right: 2rem;
}
body.page-template-page-recruit .job-details dd {
    text-align: left;
}
body.page-template-page-recruit .process-section {
    position: relative;
}
body.page-template-page-recruit .process-flow {
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding: 2rem 0;
}
body.page-template-page-recruit .process-flow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 4px;
    background: #e0e0e0;
}
body.page-template-page-recruit .process-step {
    margin-bottom: 2.5rem;
    position: relative;
    padding-left: 60px;
}
body.page-template-page-recruit .process-step::before {
    content: attr(data-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-black);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-h5);
    font-weight: 700;
    border: 4px solid var(--color-white);
    outline: 2px solid var(--color-black);
}
body.page-template-page-recruit .process-number {
   display: none;
}
body.page-template-page-recruit .process-title {
    font-size: var(--font-size-h4);
    margin-bottom: 0.5rem;
    text-align: left;
}
body.page-template-page-recruit .process-description {
    text-align: left;
}
body.page-template-page-recruit .process-note {
    text-align: center;
    margin-top: 2rem;
    font-size: var(--font-size-sm);
    color: var(--color-gray-dark);
}
body.page-template-page-recruit .cta-section-simple {
    text-align: center;
    padding: 6rem 0;
}
body.page-template-page-recruit .cta-section-simple .cta-title {
    font-size: var(--font-size-h2);
}
body.page-template-page-recruit .cta-section-simple .cta-message {
    font-size: var(--font-size-h5);
    margin: 1rem 0 2rem;
}
body.page-template-page-recruit .cta-section-simple .cta-button {
    display: inline-block;
    background-color: var(--color-white);
    color: var(--color-black);
    padding: 1rem 3rem;
    font-size: var(--font-size-base);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 5px;
    transition: all 0.3s ease;
}
body.page-template-page-recruit .cta-section-simple .cta-button:hover {
    background-color: #f0f0f0;
    transform: translateY(-3px);
}
body.page-template-page-recruit .process-title{
  margin:0;
  line-height:46px;
}

/* --- Footer --- */
.site-footer { color: var(--color-white); padding: var(--section-v-padding) 0 2rem; background-color: var(--color-black); }
.footer-content { margin-top: 1.5rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.footer-logo img { height: 36px; }
.footer-info { font-size: var(--font-size-sm); }

.footer-inner { max-width: 1200px; margin: 0.5rem auto; padding: 0 1rem; width: 100%; }
.footer-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; align-items: start; }
.footer-group { min-width: 0; justify-self: center; width: max-content; }
.footer-heading { margin: 0 0 .5rem; font-size: var(--font-size-base); letter-spacing: 0.1em; text-transform: uppercase; opacity: .7; font-family: var(--font-primary-en); text-align: left; }

.footer-list { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: .25rem; text-align: left; }
.footer-list a { display: inline-block; position: relative; padding: .5rem 0; min-height: 36px; font-size: var(--font-size-sm); line-height: 1.7; color: inherit; text-decoration: none; font-family: var(--font-primary-jp); transition: color 0.3s; }
.footer-list a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: var(--color-white); transition: width 0.3s ease; }
.footer-list a:hover { color: var(--color-gray-light); }
.footer-list a:hover::after { width: 100%; }

.footer-bottom { margin-top: 0.25rem; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.footer-bottom .privacy { display: inline-block; position: relative; padding: .5rem 0; line-height: 1.8; font-size: var(--font-size-sm); opacity: .7; text-decoration: none; transition: color 0.3s; }
.footer-bottom .privacy::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: var(--color-white); transition: width 0.3s ease; }
.footer-bottom .privacy:hover, .footer-bottom .privacy:focus { text-decoration: underline; }

.footer-copy { font-size: var(--font-size-sm); opacity: .7; }

/* --- Archive & Single Post Styles --- */

/* Archive Pages General */
.archive-section {
    background-color: var(--color-white);
}

/* Featured Post */
.featured-post-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}
.featured-post-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    color: inherit;
    text-decoration: none;
}
.featured-post-thumbnail img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
}
.featured-post-label {
    font-family: var(--font-primary-en);
    font-size: var(--font-size-sm);
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #888;
}
.featured-post-date {
    font-size: var(--font-size-sm);
    margin-top: 1rem;
    display: block;
}
.featured-post-title {
    font-size: var(--font-size-h2);
    margin: 0.5rem 0 1rem;
}
.featured-post-excerpt {
    line-height: 1.7;
}


/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}
.grid-post-link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.grid-post-thumbnail {
    position: relative;
    overflow: hidden;
}
.grid-post-thumbnail img, .grid-post-thumbnail-placeholder {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.4s ease;
}
.grid-post-thumbnail-placeholder {
    background-color: #333;
}
.grid-post-link:hover .grid-post-thumbnail img {
    transform: scale(1.05);
}
.grid-post-date {
    font-size: var(--font-size-sm);
    color: #aaa;
}
.grid-post-title {
    font-size: var(--font-size-h5);
	margin-top: 0.25rem;
}

/* Pagination */
.pagination {
    margin-top: 4rem;
    text-align: center;
}
.pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}
.pagination .page-numbers {
    display: block;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    color: var(--color-gray-dark);
    font-size: var(--font-size-sm);
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background-color: var(--color-black);
    color: var(--color-white);
    border-color: var(--color-black);
}

/* Single Post */
.page-subtitle-small {
    font-size: var(--font-size-h5);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}
.page-title-large {
    font-size: var(--font-size-h1);
    margin-bottom: 1rem;
}
.post-date {
    font-family: var(--font-primary-en);
    font-weight: 700;
}
.container-narrow {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}
.post-thumbnail-single {
    margin-bottom: 3rem;
}
.post-thumbnail-single img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}
.post-content {
    line-height: 1.8;
}
.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 2em;
    margin-bottom: 1em;
}
.post-content p {
    margin-bottom: 1.5em;
}
.post-content a {
    color: var(--color-black);
    text-decoration: underline;
}

/* --- Fron-page News/Column card link styles --- */
.home .news-card {
    padding: 0; /* Remove padding from article to allow link to fill it */
}
.home .news-card-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}
/* For cards in white sections */
.home .section-white .news-card-link {
    background-color: var(--color-white);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.home .section-white .news-card-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
/* For cards in black sections (like COLUMN) */
.home .section-black .news-card-link {
    background-color: #1a1a1a;
}
.home .section-black .news-card-link:hover {
    background-color: #333;
    transform: translateY(-5px);
}
.home .news-card .news-content {
    padding: 1.5rem;
}

/*
================================================
Front Page Contact Form
================================================
*/
.contact-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.contact-form-wrapper .wpcf7-form p {
    margin-bottom: 1.5rem;
}

.contact-form-wrapper .wpcf7-form-control:not(.wpcf7-submit) {
    width: 100%;
    background-color: #1a1a1a;
    border: 1px solid #444;
    color: var(--color-white);
    padding: 1rem;
    font-size: var(--font-size-base);
    font-family: var(--font-primary-jp);
    border-radius: 5px;
    transition: border-color 0.3s ease;
}

.contact-form-wrapper .wpcf7-form-control:not(.wpcf7-submit):focus {
    outline: none;
    border-color: var(--color-white);
}

.contact-form-wrapper .wpcf7-submit {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 2rem auto 0;
    background-color: var(--color-white);
    color: var(--color-black);
    border: none;
    padding: 1.2rem 2rem;
    font-size: var(--font-size-base);
    font-weight: 700;
    font-family: var(--font-primary-jp);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-form-wrapper .wpcf7-submit:hover {
    background-color: #f0f0f0;
    transform: translateY(-3px);
}

/* Hide CF7 spinner */
.contact-form-wrapper .wpcf7 .ajax-loader {
    display: none;
}

/*
================================================
COMPANY PAGE STYLES (page-company.php)
================================================
*/
body.page-template-page-company .page-hero {
    padding: 6rem 0;
    padding-top: 10rem;
    background-color: var(--color-gray-dark);
    color: var(--color-white);
    text-align: center;
}

.company-mission-text {
    font-size: var(--font-size-h3);
    font-weight: 700;
    font-family: var(--font-primary-jp);
    line-height: 1.7;
    max-width: 800px;
    margin: 3rem auto;
	text-align: center;
}

.company-vision-text {
    font-size: var(--font-size-h3);
    font-weight: 700;
    font-family: var(--font-primary-jp);
    line-height: 1.7;
    max-width: 800px;
    margin: 3rem auto;
	text-align: center;
}

.company-value-text {
    font-size: var(--font-size-h3);
    font-weight: 700;
    font-family: var(--font-primary-jp);
    line-height: 1.7;
    max-width: 800px;
    margin: 3rem auto 0;
	text-align: center;
}

.company-value-sub-text {
    font-size: var(--font-size-h4);
    font-weight: 700;
    font-family: var(--font-primary-jp);
    line-height: 1.7;
    max-width: 800px;
    margin: 1rem auto;
	text-align: center;
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 2rem auto 0;
}

.principle-card {
    background-color: #1a1a1a;
    padding: 2.5rem 2rem;
    border-radius: 8px;
    text-align: left;
}

.principle-card .principle-title {
    font-size: var(--font-size-h4);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
    border-bottom: 1px solid #444;
}

.principle-card .principle-description {
    line-height: 1.8;
}

.company-info-list {
    max-width: 900px;
    margin: 2rem auto 0;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    background-color: var(--color-gray-light);
    padding: 3rem;
    border-radius: 8px;
}

.company-info-list dt,
.company-info-list dd {
  font-size: var(--font-size-base);
  font-family: var(--font-primary-jp);
  line-height: 1.7;
  display: flex;
  align-items: center;
}

.company-info-list dt {
  text-align: right;
  font-weight: 700;
  padding-right: 2rem;
  border-right: 2px solid var(--color-gray-dark);
  justify-content: flex-end;
}

.company-info-list dd {
  text-align: left;
  justify-content: flex-start;
}

.company-section .directors-info {
  display: grid;
  grid-template-columns: 250px 1fr;
  column-gap: 2rem;
  align-items: center;
  align-content: center;
}

.company-section .directors-info + .directors-info {
  margin-top: 3rem;
}

.company-section .directors-info > img {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}

.company-section .directors-name {
  font-size: var(--font-size-h4);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.company-section .directors-position {
  font-size: var(--font-size-h5);
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
  opacity: 0.95;
}

.company-section .directors-profile {
  font-size: var(--font-size-base);
  line-height: 1.8;
  color: #ddd;
}

.company-section .directors-info > p {
  grid-column: 2;
}

body.page-template-page-company .company-section .directors-info:last-of-type {
  margin-bottom: 1.5rem;
}

.company-name-story-highlight {
    font-size: var(--font-size-h4);
    font-family: var(--font-primary-jp);
    font-weight: 700;
    line-height: 1.7;
    max-width: 800px;
    margin: 1.2rem auto;
	text-align: center;
}

.company-name-story {
    font-size: var(--font-size-base);
    font-family: var(--font-primary-jp);
    line-height: 1.7;
    max-width: 800px;
    margin: 1.2rem auto;
	text-align: center;
}

/*
================================================
Mobile & Tablet Responsive Styles
================================================
*/

/* --- Hamburger Menu --- */
.hamburger-menu {
    display: none; /* Hidden by default */
    position: relative;
    z-index: 1010; /* Above header, below menu overlay */
    width: 44px;
    height: 44px;
    margin-right: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
}
.hamburger-box {
    position: relative;
    display: inline-block;
    width: 30px;
    height: 24px;
}
.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--color-white);
    border-radius: 4px;
    transition: transform 0.3s ease, top 0.3s ease, bottom 0.3s ease;
}
.hamburger-inner {
    top: 50%;
    transform: translateY(-50%);
}
.hamburger-inner::before {
    top: -10px;
}
.hamburger-inner::after {
    bottom: -10px;
}

/* Active State (X mark) */
.hamburger-menu.is-active .hamburger-inner {
    transform: rotate(45deg);
}
.hamburger-menu.is-active .hamburger-inner::before {
    top: 0;
    transform: rotate(-90deg);
}
.hamburger-menu.is-active .hamburger-inner::after {
    bottom: 0;
    transform: rotate(0deg); /* This will be hidden behind the main bar */
    opacity: 0;
}

/* --- General Responsive Adjustments --- */
body.no-scroll {
    overflow: hidden;
}

/* Breakpoint: Tablet & smaller (< 1024px) */
@media (max-width: 1024px) {
    :root {
        /* Adjust base font size for smaller viewports */
        --font-size-h1: 2.488rem;
        --font-size-h2: 2.074rem;
        --font-size-h3: 1.728rem;
        --font-size-h4: 1.44rem;
        --font-size-h5: 1.2rem;
    }

    /* Show hamburger */
    .hamburger-menu {
        display: block;
    }

    /* Hide PC nav and prep mobile nav container */
    .main-navigation {
        flex: none; /* Do not take up space in the header flexbox */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.98);
        z-index: 1005;
        display: flex;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
    }

    /* Show mobile nav when active */
    .main-navigation.is-active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    /* Style mobile nav menu items */
    .nav-menu {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
    }
    .nav-menu a {
        font-size: var(--font-size-h4);
        font-family: var(--font-display);
        letter-spacing: 0.1em;
    }
    .nav-menu a::after {
        display: none; /* Remove underline effect */
    }

    /* Adjust page layout */
    :root {
        --section-v-padding: 6rem;
    }
    .service-content-split {
        flex-direction: column;
        gap: 3rem;
    }
    
    /* Archive pages */
    .featured-post-card {
        grid-template-columns: 1fr;
    }
    .featured-post-thumbnail img {
        height: 300px;
    }
}

/* Breakpoint: Mobile (< 767px) - Overrides tablet styles */
@media (max-width: 767px) {
    :root {
        /* Further adjust font sizes for mobile */
        --font-size-h1: 1.783rem;
        --font-size-h2: 1.5235rem;
        --font-size-h3: 1.33425rem;
        --font-size-h4: 1.194rem;
        --font-size-h5: 1.0875rem;
        --section-v-padding: 4rem;
        --diagonal-height: 40px;
    }

    .container {
        padding: 0 1.5rem;
    }
    
    /* Header */
    .site-logo img {
        height: 40px;
    }
    .header-container {
        padding: 0.75rem 1.5rem;
    }

    /* Hero */
    .hero {
        height: 600px;
    }
    .hero-content {
        justify-content: center;
        text-align: center;
        padding: 1.5rem;
    }
	.hero-subtitle{
		font-size: 0.75rem
	}
	
	/* Mission */
	.mission-text {
		text-align: left;
	}
	
	/* Service */
	.service-main-text {
		text-align: left;
	}
	
	/* Achievements */
    .achievement-group {
        --laurel-w: 45px;
        --laurel-gap: 0rem;
        position: relative;
        display: block;
        padding: 0.75rem calc(var(--laurel-w) + var(--laurel-gap));
    }
    .achievement-group .laurel {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
        z-index: 0;
    }
    .achievement-group .laurel-left { left: 0; }
    .achievement-group .laurel-right { right: 0; }
    .achievement-group .laurel-img {
        width: var(--laurel-w);
        height: auto;
        display: block;
    }
    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        max-width: 330px;
        margin: 0 auto;
        padding: 0 0;
        --num-box: 8ch;
        --left-box: 10rem;
    }
    .achievement {
        position: relative;
        z-index: 1;
        border: none;
        backdrop-filter: none;
        gap: 0;
        display: grid;
        grid-template-columns: var(--left-box) var(--num-box);
        grid-template-rows: auto auto;
        align-items: center;
        column-gap: 0.5rem;
        text-align: center;
    }
    .achievement [class$="-title"] {
        grid-column: 1;
        grid-row: 1;
        justify-self: center;
        align-self: start;
        text-align: center;
        width: var(--left-box);
        height: auto;
        line-height: 2;
    }
    .achievement [class$="-subtitle"] {
        grid-column: 1;
        grid-row: 2;
        justify-self: center;
        align-self: end;
        text-align: center;
        width: var(--left-box);
        height: auto;
        line-height: 1.2;
        opacity: .85;
    }
    .achievement [class$="-number"] {
        grid-column: 2;
        grid-row: 1 / span 2;
        justify-self: center;
        display: inline-flex;
        align-items: flex-end;
        justify-content: center;
        gap: 0.25rem;
        width: var(--num-box);
        height: var(--laurel-w);
        line-height: 1;
        text-align: center;
    }
    .achievement [class$="-number"] .num {
        display: block;
        font-weight: 800;
        letter-spacing: 0;
        line-height: 1.1;
        text-align: center;
    }
    .achievement [class$="-number"] .unit {
        position: static;
        margin: 0;
        font-weight: 700;
        line-height: 1;
        white-space: nowrap;
		transform: translateY(-0.3em);
    }
    
    /* Recruit Page */
    body.page-template-page-recruit .job-details {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    body.page-template-page-recruit .job-details dt {
        text-align: left;
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid #444;
        padding-bottom: 0.25rem;
        margin-bottom: 0;
    }
	body.page-template-page-recruit .job-details dd + dt {
		margin-top: 1.25rem;
	}
    body.page-template-page-recruit .process-flow::before {
        left: 15px;
    }
    body.page-template-page-recruit .process-step {
        padding-left: 50px;
    }
    body.page-template-page-recruit .process-step::before {
        width: 34px;
        height: 34px;
        font-size: var(--font-size-base);
        left: 0;
        border-width: 3px;
        outline-width: 1px;
    }
    body.page-template-page-recruit .process-title{
        margin:0;
        line-height:36px;
    }

    /* Archive */
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .site-footer {
        clip-path: polygon(0 var(--diagonal-height), 100% 0, 100% 100%, 0% 100%) !important;
    }

    /* Company Page */
    .company-info-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem;
    }

    .company-info-list dt {
        text-align: left;
        border-right: none;
        padding-right: 0;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid #ddd;
        justify-content: flex-start;
    }
	
	.company-section .directors-info {
      grid-template-columns: 1fr;
      row-gap: 0.75rem;
      align-items: start;
      align-content: start;
    }

    .company-section .directors-info > img {
      width: 200px;
      height: 200px;
      margin: 0 auto;
      border-radius: 5px;
    }

    .company-section .directors-name {
      font-size: var(--font-size-h4);
    }
    .company-section .directors-position {
      font-size: var(--font-size-h5);
    }
    .company-section .directors-profile {
      font-size: var(--font-size-base);
    }
	
    @media (max-width: 767px) {
      body.page-template-page-company .company-section.section-white .company-info-list {
        row-gap: 0.25rem;
      }
      body.page-template-page-company .company-section.section-white .company-info-list dt {
        padding-bottom: 0.25rem;
      }
      body.page-template-page-company .company-section.section-white .company-info-list dd + dt {
        margin-top: 1.25rem;
      }
    }
}