/* ============================================================
   AiSpace Corporation — Corporate Site Stylesheet
   ============================================================ */

/* ============ VARIABLES ============ */
:root {
  --ink: #050a18;
  --ink-light: #0d1428;
  --slate: #8892a4;
  --silver: #a0aec0;
  --mist: rgba(255, 255, 255, 0.08);
  --cloud: #0f1729;
  --white: #ffffff;
  --accent: #3b82f6;
  --accent-deep: #2563eb;
  --accent-glow: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.15);
  --accent-line: rgba(59, 130, 246, 0.3);
  --cyber: #06b6d4;
  --ai: #8b5cf6;
  --web: #10b981;
  --font-display: 'DM Sans', sans-serif;
  --font-body: 'Noto Sans JP', sans-serif;
  --font-mono: 'Space Mono', monospace;

  /* Dark theme additions */
  --bg-primary: #050a18;
  --bg-secondary: #0a1125;
  --bg-card: #0d1730;
  --bg-card-hover: #111d3a;
  --glow-blue: 0 0 30px rgba(59, 130, 246, 0.15);
  --glow-cyan: 0 0 30px rgba(6, 182, 212, 0.15);
  --glow-purple: 0 0 30px rgba(139, 92, 246, 0.15);
  --text-primary: #e2e8f0;
  --text-secondary: #8892a4;
  --border: rgba(255, 255, 255, 0.06);
}

/* ============ RESET ============ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; overflow-y: scroll; }
body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.8;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ============ UTILITY ============ */
.container { max-width: 1120px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 6rem 0; }
.section--gray { background: var(--bg-secondary); }
.section--dark { background: var(--ink); }

.label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 1rem;
  display: block;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.section-lead {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 640px;
  line-height: 1.9;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
}

.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.btn--ghost { background: transparent; color: var(--text-primary); border: 1px solid var(--border); }
.btn--ghost:hover { border-color: var(--accent-line); background: rgba(59, 130, 246, 0.08); }

.btn--white { background: rgba(255, 255, 255, 0.1); color: var(--white); border: 1px solid var(--border); }
.btn--white:hover { background: rgba(255, 255, 255, 0.15); transform: translateY(-1px); }

.btn__arrow { transition: transform 0.2s; }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ============ HEADER ============ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(5, 10, 24, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--white);
}

.header__logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.header__logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--white);
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header__nav a {
  font-size: 0.82rem;
  color: var(--silver);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

.header__nav a:hover { color: var(--white); }

.header__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: var(--white) !important;
  padding: 0.55rem 1.2rem;
  border-radius: 6px;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  transition: all 0.2s;
}

.header__cta:hover { background: var(--accent-deep); box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }

.header__menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.header__menu-btn span {
  display: block;
  width: 20px; height: 2px;
  background: var(--white);
  margin: 4px 0;
  transition: 0.3s;
}

/* ============ HERO (TOP) ============ */
.hero {
  padding-top: 72px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero__bg {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 50%);
  will-change: auto;
  z-index: 2;
}

.hero__grid {
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.06) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  will-change: auto;
  z-index: 3;
}

.hero__content { position: relative; z-index: 2; }

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero__eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--accent);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--white);
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  max-width: 700px;
}

.hero__title em { font-style: normal; color: var(--accent-glow); text-shadow: 0 0 30px rgba(96, 165, 250, 0.3); }

.hero__desc {
  font-size: 1rem;
  color: var(--silver);
  line-height: 2;
  max-width: 560px;
  margin-bottom: 2.5rem;
}

.hero__actions { display: flex; gap: 1rem; align-items: center; }

/* ============ PAGE HERO (Sub pages) ============ */
.page-hero {
  padding-top: 72px;
  padding-bottom: 0;
}

.page-hero__inner {
  padding: 5rem 0 3rem;
  border-bottom: 1px solid var(--border);
}

.page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.page-hero__desc {
  font-size: 0.95rem;
  color: var(--silver);
  line-height: 1.9;
  max-width: 600px;
}

/* ============ PILLAR CARDS ============ */
.pillars__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  opacity: 0;
  transition: opacity 0.3s;
}

.pillar-card:hover {
  border-color: var(--accent-line);
  box-shadow: var(--glow-blue);
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.pillar-card:hover::before { opacity: 1; }

.pillar-card--ai::before { background: var(--ai); }
.pillar-card--cyber::before { background: var(--cyber); }
.pillar-card--web::before { background: var(--web); }

.pillar-card__icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.pillar-card--ai .pillar-card__icon { background: rgba(139, 92, 246, 0.15); color: var(--ai); }
.pillar-card--cyber .pillar-card__icon { background: rgba(6, 182, 212, 0.15); color: var(--cyber); }
.pillar-card--web .pillar-card__icon { background: rgba(16, 185, 129, 0.15); color: var(--web); }

.pillar-card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.pillar-card__title { color: var(--text-primary); }
.pillar-card__desc { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 1.5rem; }

.pillar-card__link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.pillar-card:hover .pillar-card__link span { transform: translateX(3px); }
.pillar-card__link span { transition: transform 0.2s; }

/* ============ FEATURES GRID ============ */
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}

/*.feature { text-align: left; display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; }*/

/*.feature__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature__icon svg {
  width: 20px;
  height: 20px;
}

.feature__content { flex: 1; }

.feature__content h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--ink);
}

.feature__content p {
  font-size: 0.88rem;
  color: var(--slate);
  line-height: 1.8;
  margin: 0;
}*/
.feature { text-align: left; }

.feature__number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-glow);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.feature__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.feature__desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.8; }

/* ============ OTHER SERVICES ============ */
.other-services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.other-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s;
}

a.other-card:hover { border-color: var(--accent-line); box-shadow: var(--glow-blue); cursor: pointer; }
div.other-card { cursor: default; }

.other-card__icon {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--accent-glow);
}

.other-card__title { font-size: 0.92rem; font-weight: 600; margin-bottom: 0.2rem; color: var(--text-primary); }
.other-card__desc { font-size: 0.78rem; color: var(--text-secondary); }

/* ============ NEWS LIST ============ */
.news-list { margin-top: 2rem; }

.news-item {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.news-item:first-child { border-top: 1px solid var(--border); }
.news-item:hover { opacity: 0.7; }

.news-item__date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--silver);
  white-space: nowrap;
  min-width: 90px;
}

.news-item__tag {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.15rem 0.6rem;
  border-radius: 3px;
  white-space: nowrap;
}

.news-item__title { font-size: 0.9rem; font-weight: 500; color: var(--text-primary); }

.news-more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.news-more:hover span { transform: translateX(3px); }
.news-more span { transition: transform 0.2s; }

/* ============ SERVICE DETAIL PAGE ============ */
.service-hero-badge {
  margin-top: 1.5rem;
}

.service-hero-badge img {
  height: 48px;
  width: auto;
  display: block;
}

.service-detail { padding: 4rem 0; }

.service-detail__grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 4rem;
}

.service-detail__main { min-width: 0; }

.service-detail__sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}

.service-block { margin-bottom: 3rem; }

.service-block__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
}

.service-block__title-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.service-block__text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.9;
}

/* Sidebar card */
.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.sidebar-card__title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.sidebar-card__list { list-style: none; }

.sidebar-card__list li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.7;
}

.sidebar-card__list li:last-child { border-bottom: none; }

.sidebar-card__list li::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 0.55em;
}

.sidebar-cta {
  background: linear-gradient(135deg, #0a1628 0%, #112240 100%);
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
}

.sidebar-cta__title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.sidebar-cta__desc {
  font-size: 0.78rem;
  color: var(--silver);
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

/* ============ COMPANY TABLE ============ */
.company-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
}

.company-table th,
.company-table td {
  text-align: left;
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.company-table th {
  width: 160px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-card);
}

.company-table td { color: var(--text-secondary); }

/* Timeline */
.timeline { margin-top: 2rem; }

.timeline__item {
  display: flex;
  gap: 1.5rem;
  padding: 1rem 0;
  position: relative;
}

.timeline__year {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 60px;
  flex-shrink: 0;
}

.timeline__text { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; }

.timeline__item + .timeline__item { border-top: 1px solid var(--border); }

/* ============ CONTACT FORM ============ */
.form-group { margin-bottom: 1.5rem; }

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.form-label .required {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--white);
  background: var(--accent);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.5rem;
}

.form-label .optional {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--silver);
  margin-left: 0.5rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.88rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-card);
  transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-textarea { min-height: 160px; resize: vertical; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* ============ CTA SECTION ============ */
.cta-section {
  background: linear-gradient(135deg, #0a1628 0%, #112240 100%);
  padding: 5rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cta-section .label { color: var(--accent-glow); }
.cta-section .section-title { color: var(--white); }

.cta-section__desc {
  color: var(--silver);
  font-size: 0.92rem;
  max-width: 480px;
  margin: 0 auto 2rem;
  line-height: 1.9;
}

/* ============ FOOTER ============ */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--white);
  margin-bottom: 1rem;
}

.footer__logo .header__logo-img {
  height: 24px;
}

.footer__logo .header__logo-text {
  color: var(--white);
}
.footer__corp { font-size: 0.78rem; color: var(--silver); }

.footer__pmark {
  margin-top: 1rem;
}

.footer__pmark img {
  height: 56px;
  width: auto;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.footer__pmark img:hover { opacity: 1; }
.footer__nav { display: flex; gap: 3rem; }

.footer__nav-group h4 {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--silver);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
}

.footer__nav-group a {
  display: block;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.2s;
}

.footer__nav-group a:hover { color: var(--white); }

.footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__copy { font-size: 0.72rem; color: rgba(255, 255, 255, 0.3); }
.footer__links { display: flex; gap: 1.5rem; }
.footer__links a {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.3);
  text-decoration: none;
  transition: color 0.2s;
}
.footer__links a:hover { color: rgba(255, 255, 255, 0.6); }

/* ============ ANIMATIONS ============ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible { opacity: 1; transform: translateY(0); }
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .pillars__grid { grid-template-columns: 1fr; gap: 1rem; }
  .features__grid { grid-template-columns: 1fr; gap: 2rem; }
  .other-services { grid-template-columns: 1fr; }
  .service-detail__grid { grid-template-columns: 1fr; gap: 2rem; }
  .service-detail__sidebar { position: static; }
  .form-grid { grid-template-columns: 1fr; }
  .header__nav { display: none; }
  .header__menu-btn { display: block; }
  .footer__inner { flex-direction: column; }
  .footer__nav { flex-direction: column; gap: 2rem; }
  .footer__bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .news-item { flex-wrap: wrap; gap: 0.5rem 1rem; }
}


/* ============ SERVICE FEATURE ============ */
.service-feature {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.service-feature__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-feature__icon svg {
  width: 20px;
  height: 20px;
}

.service-feature__content {
  flex: 1;
}

.service-feature__content h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.service-feature__content p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0;
}

/* ============ DRUPAL OVERRIDES ============ */
/* Hide Drupal admin toolbar spacing when not logged in */
body.toolbar-fixed { padding-top: 0 !important; }
body.toolbar-horizontal.toolbar-fixed { padding-top: 79px !important; }
body.toolbar-horizontal.toolbar-tray-open.toolbar-fixed { padding-top: 119px !important; }

/* Hide default Drupal page title (we use custom templates) */
.block-page-title-block { display: none; }

/* Hide Drupal tabs on front-facing pages for anonymous users */
.block-local-tasks-block { margin-bottom: 1rem; }

/* Fix Drupal messages */
.messages { margin: 1rem 2rem; border-radius: 6px; }

/* Content block styling */
.content-block { margin-bottom: 2.5rem; }
.content-block h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}
.content-block p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 0.75rem;
}

/* Staff card styles (company page) */
.staff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
@media (max-width: 768px) { .staff-grid { grid-template-columns: 1fr; max-width: 300px; } }
.staff-card { text-align: center; }
.staff-card__photo {
  width: 180px; height: 180px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  margin: 0 auto 1rem;
  display: block;
  border: 4px solid var(--border);
}
.staff-card__role { font-size: 0.78rem; color: var(--accent-glow); font-weight: 600; margin-bottom: 0.25rem; }
.staff-card__name { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.5rem; }
.staff-card__bio { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.7; }

/* Section header */
.section-header { margin-bottom: 2rem; }
.section-header .label { margin-bottom: 0.75rem; }
.section-header__title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

/* History items */
.history-item {
  display: flex;
  gap: 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.history-item__date {
  flex-shrink: 0;
  width: 100px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-glow);
}
.history-item__text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; }

/* News page styles */
.news-year { margin-top: 3rem; margin-bottom: 1rem; }
.news-year:first-of-type { margin-top: 0; }
.news-year__label { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }

.news-list__item {
  display: block;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}
.news-list__item:hover { background: var(--bg-card); margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; }
.news-list__item:first-child { border-top: 1px solid var(--border); }
.news-list__meta { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.5rem; }
.news-list__date { font-family: var(--font-mono); font-size: 0.8rem; color: var(--silver); }
.news-list__tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: var(--accent);
  color: white;
}
.news-list__tag--info { background: var(--accent); }
.news-list__tag--case { background: #059669; }
.news-list__tag--press { background: #7c3aed; }
.news-list__title { font-size: 1rem; font-weight: 500; color: var(--text-primary); line-height: 1.6; }
.news-list__item:hover .news-list__title { color: var(--accent); }

/* Privacy page */
.privacy-content { max-width: 760px; }
.privacy-content h2 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin: 2.5rem 0 0.75rem; color: var(--text-primary); }
.privacy-content h2:first-of-type { margin-top: 1.5rem; }
.privacy-content p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.9; margin-bottom: 0.75rem; }
.privacy-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.privacy-content ol li { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.9; padding: 0.2rem 0; }
.pmark-badge { display: flex; align-items: center; gap: 1.5rem; margin: 2rem 0; padding: 1.5rem 2rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; }
.pmark-badge img { height: 72px; width: auto; flex-shrink: 0; }
.pmark-badge__text { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.8; }

/* Webform overrides */
.webform-submission-form .form-item { margin-bottom: 1.5rem; }
.webform-submission-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}
.webform-submission-form .form-required::after {
  content: '必須';
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--white);
  background: var(--accent);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.5rem;
}
.webform-submission-form input[type="text"],
.webform-submission-form input[type="email"],
.webform-submission-form input[type="tel"],
.webform-submission-form select,
.webform-submission-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.88rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-card);
  transition: border-color 0.2s;
}
.webform-submission-form input:focus,
.webform-submission-form select:focus,
.webform-submission-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.webform-submission-form textarea { min-height: 160px; resize: vertical; }

/* Webform checkbox */
.webform-submission-form .js-form-type-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.webform-submission-form .js-form-type-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.webform-submission-form .js-form-type-checkbox label {
  display: inline;
  margin-bottom: 0;
  cursor: pointer;
}

/* Webform submit button */
.webform-submission-form .form-actions {
  margin-top: 2rem;
}
.webform-submission-form .form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2.5rem;
  background: var(--accent);
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 200px;
}
.webform-submission-form .form-submit:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}
.webform-submission-form .form-submit:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  z-index: 99;
  padding: 2rem;
  flex-direction: column;
  gap: 1rem;
}
.mobile-nav.active { display: flex; }
.mobile-nav a {
  font-size: 1rem;
  color: var(--text-primary);
  text-decoration: none;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}

/* ============ DRUPAL ADMIN / LOGIN FORMS ============ */
#main-content .user-login-form,
#main-content .user-pass {
  max-width: 480px;
  margin: 3rem auto;
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
#main-content .user-login-form .form-item,
#main-content .user-pass .form-item {
  margin-bottom: 1.5rem;
}
#main-content .user-login-form label,
#main-content .user-pass label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}
#main-content .user-login-form input[type="text"],
#main-content .user-login-form input[type="password"],
#main-content .user-pass input[type="text"],
#main-content .user-pass input[type="email"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.88rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-card);
  transition: border-color 0.2s;
}
#main-content .user-login-form input:focus,
#main-content .user-pass input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
#main-content .user-login-form input[type="submit"],
#main-content .user-pass input[type="submit"] {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 0.5rem;
}
#main-content .user-login-form input[type="submit"]:hover,
#main-content .user-pass input[type="submit"]:hover {
  background: var(--accent-hover);
}
#main-content .user-login-form .description,
#main-content .user-pass .description {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

/* ============ HERO PHOTO BACKGROUND ============ */
.hero__photo {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(5, 10, 24, 0.92) 0%, rgba(5, 10, 24, 0.7) 100%);
}

/* ============ PAGE HERO PHOTO BACKGROUND ============ */
.page-hero {
  position: relative;
  overflow: hidden;
}
.page-hero__photo {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.page-hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(5, 10, 24, 0.85) 0%, rgba(5, 10, 24, 0.95) 100%);
}
.page-hero .container {
  position: relative;
  z-index: 2;
}

/* ============ STATS COUNTER ============ */
.stats-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat__number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-glow);
  display: inline;
}
.stat__plus {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-glow);
}
.stat__label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}