/* ============================================
   Keystone ILS Capital - WordPress Theme CSS
   ============================================ */

/* --- CSS Variables --- */
:root {
  --color-navy-900: #0f1419;
  --color-navy-800: #1a2332;
  --color-navy-700: #243044;
  --color-navy-600: #2e3d56;
  --color-brand-green: #69821b;
  --color-brand-green-light: #7a9922;
  --color-brand-green-dark: #556a16;
  --color-text-primary: #f0f0f0;
  --color-text-secondary: #a0aab4;
  --color-text-muted: #6b7a8d;
  --color-border: #2a3a4e;
  --font-sans: "Inter", "Noto Sans JP", sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--color-navy-900);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background-color: var(--color-brand-green);
  color: white;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* --- Container --- */
.container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Gradient Backgrounds --- */
.gradient-dark {
  background: linear-gradient(135deg, var(--color-navy-900) 0%, var(--color-navy-800) 50%, var(--color-navy-900) 100%);
}

.gradient-green {
  background: linear-gradient(135deg, var(--color-brand-green) 0%, var(--color-brand-green-light) 100%);
}

.bg-navy-800-50 {
  background-color: rgba(26, 35, 50, 0.5);
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.animate-delay-1 { animation-delay: 0.15s; }
.animate-delay-2 { animation-delay: 0.3s; }
.animate-delay-3 { animation-delay: 0.45s; }

.fade-target {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-target.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-target.delay-1 { transition-delay: 0.15s; }
.fade-target.delay-2 { transition-delay: 0.3s; }
.fade-target.delay-3 { transition-delay: 0.45s; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: all 0.3s ease;
  background: transparent;
}

.site-header.scrolled {
  background: rgba(15, 20, 25, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.header-logo img {
  height: 2rem;
  width: auto;
}

.header-nav {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--color-text-primary);
}

.mobile-menu-toggle {
  display: block;
  padding: 0.5rem;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}

.mobile-menu-toggle:hover {
  color: var(--color-text-primary);
}

@media (min-width: 768px) {
  .header-inner {
    height: 5rem;
  }
  .header-logo img {
    height: 2.5rem;
  }
  .header-nav {
    display: flex;
  }
  .mobile-menu-toggle {
    display: none;
  }
}

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  pointer-events: none;
}

.mobile-menu.is-open {
  pointer-events: auto;
}

.mobile-menu-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu.is-open .mobile-menu-overlay {
  opacity: 1;
}

.mobile-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 80%;
  max-width: 320px;
  background: var(--color-navy-800);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.mobile-menu.is-open .mobile-menu-panel {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.mobile-menu-logo {
  height: 2rem;
  width: auto;
}

.mobile-menu-close {
  padding: 0.5rem;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}

.mobile-menu-close:hover {
  color: var(--color-text-primary);
}

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
}

.mobile-nav-link {
  display: block;
  padding: 1rem 1.5rem;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
  transition: color 0.2s, background-color 0.2s;
}

.mobile-nav-link:hover {
  color: var(--color-text-primary);
  background-color: rgba(255, 255, 255, 0.03);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

.btn--md {
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
}

.btn--lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

.btn--primary {
  background-color: var(--color-brand-green);
  color: white;
  border: 1px solid var(--color-brand-green);
}

.btn--primary:hover {
  background-color: var(--color-brand-green-light);
  border-color: var(--color-brand-green-light);
}

.btn--outline {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn--outline:hover {
  border-color: var(--color-text-secondary);
  background: rgba(255, 255, 255, 0.05);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid transparent;
}

.btn--ghost:hover {
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn--full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background-color: var(--color-navy-800);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card--hover:hover {
  transform: translateY(-2px);
  border-color: rgba(105, 130, 27, 0.3);
}

.card--no-hover {
  /* no hover effect */
}

/* ============================================
   SECTION TITLE
   ============================================ */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
}

.section-title .subtitle {
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.section-title .accent-line {
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--color-brand-green);
  margin: 1rem auto 0;
  border-radius: 2px;
}

@media (min-width: 768px) {
  .section-title h2 {
    font-size: 2.25rem;
  }
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-block;
  padding: 0.125rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 9999px;
  line-height: 1.6;
}

.badge--default {
  background: rgba(160, 170, 180, 0.15);
  color: var(--color-text-secondary);
}

.badge--green {
  background: rgba(105, 130, 27, 0.15);
  color: var(--color-brand-green-light);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 5rem 0;
}

.section--alt {
  background-color: rgba(26, 35, 50, 0.5);
}

@media (min-width: 768px) {
  .section {
    padding: 7rem 0;
  }
}

/* ============================================
   PAGE HERO
   ============================================ */
.page-hero {
  padding-top: 7rem;
  padding-bottom: 3rem;
}

.page-hero h1 {
  font-size: 1.875rem;
  font-weight: 700;
}

.page-hero .lead {
  margin-top: 1rem;
  color: var(--color-text-secondary);
}

@media (min-width: 768px) {
  .page-hero {
    padding-top: 9rem;
    padding-bottom: 4rem;
  }
  .page-hero h1 {
    font-size: 2.25rem;
  }
}

/* ============================================
   HERO SECTION (Front Page)
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-bg .blob-1 {
  position: absolute;
  top: 25%;
  right: 25%;
  width: 24rem;
  height: 24rem;
  background: rgba(105, 130, 27, 0.05);
  border-radius: 50%;
  filter: blur(48px);
}

.hero-bg .blob-2 {
  position: absolute;
  bottom: 25%;
  left: 25%;
  width: 16rem;
  height: 16rem;
  background: rgba(105, 130, 27, 0.03);
  border-radius: 50%;
  filter: blur(48px);
}

.hero-content {
  position: relative;
  z-index: 10;
  padding: 8rem 0;
  max-width: 48rem;
}

.hero-tagline {
  color: var(--color-brand-green);
  font-weight: 500;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero h1 .accent {
  color: var(--color-brand-green);
}

.hero-description {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  max-width: 40rem;
  line-height: 1.8;
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-bottom-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8rem;
  background: linear-gradient(to top, var(--color-navy-900), transparent);
}

@media (min-width: 640px) {
  .hero-actions {
    flex-direction: row;
  }
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 3rem;
  }
  .hero-description {
    font-size: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .hero h1 {
    font-size: 3.75rem;
  }
}

/* ============================================
   GRID SYSTEM
   ============================================ */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================
   STATS
   ============================================ */
.stat {
  text-align: center;
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-brand-green);
}

.stat-label {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.stat-desc {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

@media (min-width: 768px) {
  .stat-value {
    font-size: 3rem;
  }
}

/* ============================================
   STEP CARD
   ============================================ */
.step-card {
  position: relative;
}

.step-card .step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.step-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(105, 130, 27, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brand-green);
}

.step-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(105, 130, 27, 0.5);
}

.step-arrow {
  display: none;
  position: absolute;
  top: 50%;
  right: -0.75rem;
  transform: translateY(-50%);
  z-index: 10;
  color: rgba(105, 130, 27, 0.4);
}

@media (min-width: 1024px) {
  .step-arrow {
    display: flex;
  }
}

/* ============================================
   STRENGTHS
   ============================================ */
.strength-number {
  font-size: 1.875rem;
  font-weight: 700;
  color: rgba(105, 130, 27, 0.3);
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  text-align: center;
}

.cta-section h2 {
  font-size: 1.875rem;
  font-weight: 700;
}

.cta-section h2 .accent {
  color: var(--color-brand-green);
}

.cta-section .cta-description {
  margin-top: 1.5rem;
  color: var(--color-text-secondary);
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.cta-section .cta-actions {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
}

@media (min-width: 768px) {
  .cta-section h2 {
    font-size: 2.25rem;
  }
}

/* ============================================
   TIMELINE (Mechanism Section)
   ============================================ */
.timeline {
  position: relative;
  max-width: 48rem;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  left: 1.5rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  padding-left: 4rem;
  margin-bottom: 2rem;
}

.timeline-number {
  position: absolute;
  left: 0;
  top: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 2px solid var(--color-brand-green);
  background: var(--color-navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brand-green);
  font-weight: 700;
  font-size: 1.125rem;
}

.timeline-item h3 {
  font-size: 1.125rem;
  font-weight: 600;
  padding-top: 0.5rem;
}

.timeline-item p {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

@media (min-width: 768px) {
  .timeline-line {
    left: 2rem;
  }
  .timeline-item {
    padding-left: 5rem;
  }
  .timeline-number {
    width: 4rem;
    height: 4rem;
    font-size: 1.25rem;
  }
}

/* ============================================
   TABLES
   ============================================ */
.comparison-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.comparison-table table {
  min-width: 600px;
}

.comparison-table th {
  text-align: left;
  padding: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
}

.comparison-table th.highlight {
  color: var(--color-brand-green);
  border-bottom-color: rgba(105, 130, 27, 0.4);
}

.comparison-table td {
  padding: 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(42, 58, 78, 0.5);
}

.comparison-table tr:hover td {
  background: rgba(26, 35, 50, 0.5);
}

.comparison-table td:first-child {
  font-weight: 500;
}

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

/* ============================================
   STRUCTURE BANNER
   ============================================ */
.structure-banner {
  border-radius: 0.75rem;
  border: 1px solid rgba(105, 130, 27, 0.3);
  background: rgba(105, 130, 27, 0.05);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.structure-banner-icon {
  flex-shrink: 0;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: rgba(105, 130, 27, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brand-green);
}

.structure-banner-text {
  text-align: center;
  flex: 1;
}

.structure-banner-text h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.structure-banner-text p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

@media (min-width: 768px) {
  .structure-banner {
    flex-direction: row;
    padding: 2rem 2.5rem;
  }
  .structure-banner-text {
    text-align: left;
  }
}

/* ============================================
   MERIT CARD
   ============================================ */
.merit-card .merit-inner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.merit-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: rgba(105, 130, 27, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brand-green);
}

.merit-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.merit-card p {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ============================================
   FLOW DIAGRAM
   ============================================ */
.flow-diagram {
  max-width: 56rem;
  margin: 0 auto;
}

.flow-phase {
  margin-bottom: 2rem;
}

.flow-phase-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.flow-phase-num {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(105, 130, 27, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brand-green);
  font-size: 0.875rem;
  font-weight: 700;
}

.flow-phase-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.flow-phase-duration {
  font-size: 0.75rem;
  color: var(--color-brand-green);
  font-weight: 500;
  background: rgba(105, 130, 27, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

.flow-steps {
  margin-left: 1rem;
  border-left: 2px solid var(--color-border);
  padding-left: 2rem;
}

.flow-step {
  position: relative;
  margin-bottom: 1rem;
}

.flow-step::before {
  content: '';
  position: absolute;
  left: -2.35rem;
  top: 0.375rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--color-navy-900);
  border: 2px solid rgba(105, 130, 27, 0.5);
}

.flow-step h4 {
  font-size: 0.875rem;
  font-weight: 600;
}

.flow-step p {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  margin-top: 0.125rem;
}

.flow-summary {
  max-width: 56rem;
  margin: 2.5rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.flow-summary .total {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

.flow-summary .total strong {
  color: var(--color-text-primary);
  font-weight: 500;
}

.flow-summary .note {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

/* ============================================
   TABS (Use Cases)
   ============================================ */
.tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.tab-btn {
  padding: 0.625rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  background: var(--color-navy-800);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.tab-btn:hover {
  color: var(--color-text-primary);
}

.tab-btn.active {
  background: var(--color-brand-green);
  color: white;
  border-color: var(--color-brand-green);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .tab-panel.active {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   COMPANY INFO TABLE
   ============================================ */
.company-table {
  max-width: 48rem;
  margin: 0 auto;
}

.company-table table {
  width: 100%;
}

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

.company-table th {
  width: 8rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

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

/* ============================================
   PROFILE CARD
   ============================================ */
.profile-card {
  max-width: 48rem;
  margin: 0 auto;
}

.profile-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

.profile-avatar {
  flex-shrink: 0;
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  background: rgba(105, 130, 27, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar span {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--color-brand-green);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-name {
  font-size: 1.25rem;
  font-weight: 700;
}

.profile-role {
  font-size: 0.875rem;
  color: var(--color-brand-green);
  font-weight: 500;
  margin-top: 0.25rem;
}

.profile-bio {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.profile-bio p {
  margin-bottom: 0.75rem;
}

.profile-bio p.highlight {
  font-weight: 500;
  color: var(--color-text-primary);
}

.partner-avatar {
  flex-shrink: 0;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-avatar span {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.partner-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0.5rem;
}

.partner-stake {
  font-size: 0.875rem;
  color: var(--color-brand-green);
  font-weight: 500;
  margin-top: 0.25rem;
}

@media (min-width: 768px) {
  .profile-inner {
    flex-direction: row;
  }
}

/* ============================================
   CONTACT
   ============================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr 20rem;
    gap: 3rem;
  }
}

@media (min-width: 1024px) {
  .contact-layout {
    grid-template-columns: 1fr 22rem;
  }
}

/* Contact Form */
.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .contact-form .form-row--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contact-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.contact-form .required {
  color: #f87171;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid var(--color-border);
  background: var(--color-navy-900);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--color-text-muted);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-brand-green);
}

.contact-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7a8d' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.contact-form .form-note {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 1rem;
}

.contact-form .form-note a {
  color: var(--color-brand-green);
}

.contact-form .form-note a:hover {
  text-decoration: underline;
}

/* Contact Info */
.contact-info h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.contact-info-icon {
  flex-shrink: 0;
  color: var(--color-brand-green);
}

.contact-info-label {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

.contact-info-value {
  font-size: 0.875rem;
}

.contact-info-value a {
  transition: color 0.2s;
}

.contact-info-value a:hover {
  color: var(--color-brand-green);
}

.contact-hours h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.contact-hours p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.contact-hours .note {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* CF7 form styling overrides */
.wpcf7-form .form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .wpcf7-form .form-row--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.wpcf7-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form select,
.wpcf7-form textarea {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid var(--color-border);
  background: var(--color-navy-900);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  transition: border-color 0.2s;
}

.wpcf7-form input::placeholder,
.wpcf7-form textarea::placeholder {
  color: var(--color-text-muted);
}

.wpcf7-form input:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--color-brand-green);
}

.wpcf7-form .wpcf7-submit {
  width: 100%;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  background-color: var(--color-brand-green);
  color: white;
  border: 1px solid var(--color-brand-green);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s;
  font-family: var(--font-sans);
}

.wpcf7-form .wpcf7-submit:hover {
  background-color: var(--color-brand-green-light);
}

.wpcf7-form .wpcf7-response-output {
  border-radius: 0.5rem;
  padding: 1rem;
  font-size: 0.875rem;
  margin-top: 1rem;
}

.wpcf7-form .wpcf7-not-valid-tip {
  font-size: 0.75rem;
  color: #f87171;
  margin-top: 0.25rem;
}

/* ============================================
   NEWS LIST
   ============================================ */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.news-card {
  display: flex;
  flex-direction: column;
}

.news-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.news-card-date {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.news-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.news-card h3 a {
  transition: color 0.2s;
}

.news-card h3 a:hover {
  color: var(--color-brand-green);
}

.news-card .excerpt {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  flex: 1;
}

.news-card .read-more {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--color-brand-green);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap 0.2s;
}

.news-card .read-more:hover {
  gap: 0.5rem;
}

/* News: no posts */
.news-empty {
  text-align: center;
  padding: 3rem 0;
  color: var(--color-text-secondary);
}

/* ============================================
   SINGLE POST
   ============================================ */
.single-post-header {
  margin-bottom: 2rem;
}

.single-post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.single-post-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.4;
}

.single-post-content {
  max-width: 48rem;
  font-size: 0.9375rem;
  line-height: 1.9;
  color: var(--color-text-secondary);
}

.single-post-content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.single-post-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.single-post-content p {
  margin-bottom: 1rem;
}

.single-post-content ul,
.single-post-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.single-post-content li {
  margin-bottom: 0.5rem;
}

.single-post-content strong {
  color: var(--color-text-primary);
  font-weight: 600;
}

.single-post-content a {
  color: var(--color-brand-green);
}

.single-post-content a:hover {
  text-decoration: underline;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  transition: color 0.2s;
  margin-bottom: 1rem;
}

.back-link:hover {
  color: var(--color-text-primary);
}

/* ============================================
   PRIVACY POLICY
   ============================================ */
.privacy-content {
  max-width: 48rem;
  margin: 0 auto;
}

.privacy-intro {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.privacy-section {
  margin-bottom: 2rem;
}

.privacy-section h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.privacy-section p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  white-space: pre-line;
}

.privacy-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ============================================
   404 PAGE
   ============================================ */
.page-404 {
  text-align: center;
  padding: 8rem 0 5rem;
}

.page-404 .error-code {
  font-size: 3.75rem;
  font-weight: 700;
  color: var(--color-brand-green);
}

.page-404 h1 {
  margin-top: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.page-404 p {
  margin-top: 1rem;
  color: var(--color-text-secondary);
}

.page-404 .actions {
  margin-top: 2rem;
}

/* ============================================
   STRUCTURE INDEX
   ============================================ */
.phase-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 40rem;
  margin: 0 auto;
}

.phase-link {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--color-border);
  background: var(--color-navy-800);
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.phase-link:hover {
  border-color: rgba(105, 130, 27, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.phase-num {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
}

.phase-link-text {
  flex: 1;
  min-width: 0;
}

.phase-link-text h2 {
  font-size: 1.125rem;
  font-weight: 600;
}

.phase-link-text p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-top: 0.25rem;
}

.phase-link-arrow {
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.phase-link:hover .phase-link-arrow {
  color: var(--color-text-secondary);
}

/* ============================================
   IFRAME CONTAINER
   ============================================ */
.tutorial-iframe-container {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: white;
  width: 100%;
  aspect-ratio: 3 / 2;
}

.tutorial-iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================
   BASIS RISK HIGHLIGHT
   ============================================ */
.basis-risk-card {
  max-width: 56rem;
  margin: 0 auto;
  border-color: rgba(105, 130, 27, 0.3);
}

.basis-risk-inner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.basis-risk-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: rgba(105, 130, 27, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.125rem;
  color: var(--color-brand-green);
}

.basis-risk-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.basis-risk-card h3 .accent {
  color: var(--color-brand-green);
}

.basis-risk-card p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.basis-risk-card p:last-child {
  margin-bottom: 0;
}

.basis-risk-card p.emphasis {
  color: var(--color-text-primary);
  font-weight: 500;
}

/* ============================================
   CATBOND INTRO CARDS (Home page)
   ============================================ */
.intro-card-icon {
  color: var(--color-brand-green);
  margin-bottom: 1rem;
}

.intro-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.intro-card p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-navy-900);
}

.footer-inner {
  padding: 3rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.footer-logo {
  height: 2rem;
  width: auto;
}

.footer-description {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.footer-heading {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav a {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--color-text-primary);
}

.footer-company-info {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.footer-company-info p {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-copyright {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.footer-privacy-link {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.footer-privacy-link:hover {
  color: var(--color-text-secondary);
}

@media (min-width: 768px) {
  .footer-inner {
    padding: 4rem 0;
  }
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }
.text-green { color: var(--color-brand-green); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.leading-relaxed { line-height: 1.7; }
.max-w-3xl { max-width: 48rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.gap-8 { gap: 2rem; }
.hidden { display: none; }

/* ============================================
   PAGINATION (News Archive)
   ============================================ */
.pagination {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  transition: all 0.2s;
}

.pagination a:hover {
  border-color: var(--color-brand-green);
  color: var(--color-text-primary);
}

.pagination .current {
  background: var(--color-brand-green);
  color: white;
  border-color: var(--color-brand-green);
}
