/*
Theme Name: GRITX Bright Corporate V10
Theme URI: https://gritx-site.com
Author: GRITX
Description: A completely rebuilt, bright, corporate theme (V10). Fixes duplicate contact form on the Contact page and unifies company table borders with a consistent bold style.
Version: 10.0
Text Domain: gritx
*/

@charset "UTF-8";

:root {
  --primary: #0f2c4a;
  --primary-light: #244b75;
  --accent: #b38b45;
  --accent-light: #d6b374;
  --text-main: #333333;
  --text-muted: #666666;
  --bg-light: #f9fafb;
  --white: #ffffff;
  --border: #e5e7eb;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text-main);
  background-color: var(--white);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Montserrat', 'Noto Sans JP', sans-serif;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 5%;
}

/* --- Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all 0.3s ease;
}

.site-header .nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.site-logo {
  display: block;
  height: 40px;
}

.site-logo img {
  height: 100%;
  width: auto;
}

.main-navigation ul {
  display: flex;
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.main-navigation a {
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.main-navigation a:hover,
.main-navigation .current-menu-item>a {
  color: var(--accent);
}

/* Responsive Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 24px;
  cursor: pointer;
}

/* --- Hero Section --- */
.hero {
  margin-top: 80px;
  position: relative;
  background-image: linear-gradient(rgba(15, 44, 74, 0.6), rgba(15, 44, 74, 0.8)), url('https://images.unsplash.com/photo-1497366216548-37526070297c?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  color: var(--white);
}

.hero-content {
  max-width: 800px;
}

.hero-eyebrow {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--accent-light);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 30px;
  letter-spacing: 0.02em;
}

.hero-sub {
  font-size: 16px;
  font-weight: 300;
  line-height: 2;
  opacity: 0.9;
  margin-bottom: 40px;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 18px 40px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1em;
  border-radius: 4px;
  transition: background 0.3s, transform 0.2s;
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  color: var(--white);
}

/* --- Page Header (Inner Pages) --- */
.page-header {
  margin-top: 80px;
  background: var(--primary);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}

.page-header h1 {
  font-size: 36px;
  margin-bottom: 10px;
}

.page-header p {
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.2em;
  color: var(--accent-light);
}

/* --- Section Common --- */
section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title-en {
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 10px;
}

.section-title-jp {
  font-size: 32px;
  color: var(--primary);
  font-weight: 700;
}

/* --- Content Typography (For standard pages) --- */
.site-main {
  padding: 0 0 60px 0;
  min-height: 50vh;
}

.entry-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 0;
}

.entry-content p {
  margin-bottom: 20px;
  line-height: 1.8;
}

.entry-content h2 {
  font-size: 28px;
  color: var(--primary);
  margin-top: 50px;
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
}

.entry-content h3 {
  font-size: 22px;
  color: var(--primary);
  margin-top: 40px;
  margin-bottom: 20px;
}

.entry-content ul,
.entry-content ol {
  margin-bottom: 25px;
  padding-left: 20px;
}

.entry-content li {
  margin-bottom: 10px;
}

/* --- Specific Sections --- */
.philosophy {
  background: var(--white);
}

.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.philosophy-text h3 {
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 30px;
  line-height: 1.5;
}

.philosophy-text p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.philosophy-text p strong {
  color: var(--primary);
}

.philosophy-image img {
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.services {
  background: var(--bg-light);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card {
  background: var(--white);
  padding: 50px 40px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s, box-shadow 0.3s;
  border-bottom: 4px solid transparent;
  display: block;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  border-bottom-color: var(--accent);
}

.service-icon {
  font-size: 40px;
  color: var(--primary);
  margin-bottom: 20px;
}

.service-card h4 {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 15px;
}

.service-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
}

.message {
  background: var(--white);
}

.message-content {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-light);
  padding: 60px;
  border-radius: 8px;
  position: relative;
}

.message-content::before {
  content: '"';
  font-size: 120px;
  font-family: serif;
  color: var(--accent);
  opacity: 0.2;
  position: absolute;
  top: 20px;
  left: 30px;
  line-height: 1;
}

.message-text {
  font-size: 16px;
  color: var(--text-main);
  margin-bottom: 30px;
  position: relative;
  z-index: 1;
}

.ceo-info {
  text-align: right;
}

.ceo-title {
  font-size: 13px;
  color: var(--text-muted);
}

.ceo-name {
  font-size: 20px;
  color: var(--primary);
  font-weight: 700;
}

/* --- Premium CEO Message Page Layout (V8) --- */
.ceo-message-layout {
  display: flex;
  gap: 80px;
  align-items: flex-start;
}

.message-portrait {
  flex: 0 0 45%;
  position: relative;
}

.ceo-img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 2;
  display: block;
}

.ceo-portrait-bg {
  position: absolute;
  top: -20px;
  left: -20px;
  width: 100%;
  height: 100%;
  background: var(--bg-light);
  border: 1px solid var(--border);
  z-index: 1;
  border-radius: 4px;
}

.message-body {
  flex: 1;
  padding-top: 20px;
}

.message-headline {
  font-size: 32px;
  color: var(--primary);
  line-height: 1.5;
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.05em;
  font-weight: 700;
}

.message-headline .accent-text {
  color: var(--accent);
}

.message-content p {
  line-height: 2;
  color: var(--text-muted);
  margin-bottom: 30px;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.message-signature {
  text-align: right;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--bg-light);
}

.message-signature .ceo-title {
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 5px;
}

.message-signature .ceo-name {
  font-size: 26px;
  color: var(--primary);
}

.cta {
  background: var(--primary);
  color: var(--white);
  text-align: center;
  padding: 80px 0;
}

.cta h2 {
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--white);
}

.cta p {
  opacity: 0.8;
  margin-bottom: 40px;
}

.btn-outline {
  display: inline-block;
  border: 2px solid var(--white);
  color: var(--white);
  padding: 16px 40px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1em;
  border-radius: 4px;
  transition: all 0.3s;
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
}

/* --- Company Page Specific & WP Table Blocks --- */
.company-table,
.company-section table,
.company-table-block table {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  border-collapse: collapse;
  background: var(--white);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
  font-family: inherit;
  font-size: 15px;
}

.company-table th,
.company-table td,
.company-section table th,
.company-section table td,
.company-table-block table td {
  padding: 25px 30px;
  border: 2px solid var(--border);
  text-align: left;
  line-height: 1.6;
}

/* Treat the first column in WP block tables as a th */
.company-table th,
.company-section table th,
.company-table-block table td:first-child {
  width: 30%;
  background: var(--bg-light);
  color: var(--primary);
  font-weight: 500;
}

/* --- Footer --- */
.site-footer {
  background: #06111f;
  color: rgba(255, 255, 255, 0.6);
  padding: 60px 0 30px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 40px;
  margin-bottom: 30px;
}

.footer-logo img {
  height: 40px;
  width: auto;
}

.footer-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.footer-links a {
  font-size: 13px;
  color: inherit;
}

.footer-links a:hover {
  color: var(--white);
}

.site-info {
  text-align: center;
  font-size: 12px;
}

/* Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .main-navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  }

  .main-navigation.is-open {
    display: block;
  }

  .main-navigation ul {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }

  .philosophy-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 28px;
  }

  .message-content {
    padding: 40px 20px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 30px;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: 15px;
  }

  .company-table th,
  .company-table td {
    display: block;
    width: 100%;
    padding: 15px 20px;
  }

  .company-table th {
    padding-top: 20px;
  }

  .ceo-message-layout {
    flex-direction: column;
    gap: 40px;
  }

  .message-portrait {
    flex: 0 0 100%;
  }

  .message-headline {
    font-size: 24px;
  }
}