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

:root {
  --navy: #0B1D3A;
  --navy-light: #122B52;
  --accent: #C9A84C;
  --accent-light: #E0C76A;
  --cream: #FAF8F5;
  --white: #FFFFFF;
  --gray-100: #F5F5F5;
  --gray-200: #E8E8E8;
  --gray-400: #999999;
  --gray-600: #666666;
  --gray-800: #333333;
  --text: #2D2D2D;
  --text-light: #5A5A5A;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-logo: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Typography ===== */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.15rem; font-weight: 600; }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--navy);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
}

.btn-nav {
  padding: 10px 24px;
  background: var(--accent);
  color: var(--navy);
  border-radius: var(--radius);
}
.btn-nav:hover {
  background: var(--accent-light);
}

.nav-links .btn-client-login {
  padding: 10px 24px;
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
}
.nav-links .btn-client-login:hover {
  background: var(--accent);
  color: var(--navy);
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.05rem;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  background: transparent;
  transition: all var(--transition);
}

.navbar.scrolled {
  background: var(--navy);
  padding: 12px 0;
  box-shadow: var(--shadow-md);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-wordmark {
  flex-shrink: 0;
  height: 50px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all var(--transition);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, #1a3a6b 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(201,168,76,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

/* Pattern overlay applied to all inner-page heroes for consistency with homepage */
.page-hero,
.legal-hero {
  position: relative;
  overflow: hidden;
}

.page-hero::after,
.legal-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.page-hero > *,
.legal-hero > * {
  position: relative;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 750px;
  padding: 120px 24px 80px;
}

.hero-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ===== Sections ===== */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-header h2 {
  max-width: 600px;
  margin: 0 auto;
}

/* ===== About ===== */
.about {
  background: var(--cream);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-lead {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--navy);
  line-height: 1.7;
  margin-bottom: 20px;
}

.about-main p:not(.about-lead),
.about-detail p {
  color: var(--text-light);
  margin-bottom: 16px;
}

.about-highlight {
  background: var(--white);
  border-left: 3px solid var(--accent);
  padding: 20px 24px;
  margin-top: 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 500;
  color: var(--navy) !important;
}

/* ===== Mission & Vision ===== */
.mission-section {
  background: var(--navy);
}

.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.mission-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
}

.mission-icon {
  color: var(--accent);
  margin-bottom: 24px;
}

.mission-card h3 {
  color: var(--white);
  margin-bottom: 16px;
}

.mission-card p {
  color: rgba(255,255,255,0.7);
  line-height: 1.8;
}

/* ===== Values ===== */
.values-section {
  background: var(--white);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.value-card {
  padding: 40px 32px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.value-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.value-number {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.4;
  line-height: 1;
  margin-bottom: 16px;
}

.value-card h4 {
  color: var(--navy);
  margin-bottom: 12px;
}

.value-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* last two values span properly */
.values-grid .value-card:nth-child(4) {
  grid-column: 1 / 2;
}
.values-grid .value-card:nth-child(5) {
  grid-column: 2 / 3;
}

/* ===== Problems ===== */
.problems-section {
  background: var(--cream);
}

.problems-grid {
  display: grid;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.problem-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--accent);
  transition: all var(--transition);
}

.problem-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.problem-quote {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 16px;
  font-style: italic;
  line-height: 1.6;
}

.problem-card > p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ===== CTA ===== */
.cta-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  text-align: center;
}

.cta-container {
  max-width: 700px;
}

.cta-section h2 {
  color: var(--white);
  margin-bottom: 16px;
}

.cta-section > .container > p {
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.cta-note {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

/* ===== Footer ===== */
.footer {
  background: #060F1F;
  padding: 64px 0 0;
}

.footer-container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand p {
  color: rgba(255,255,255,0.5);
  margin-top: 16px;
  font-size: 0.9rem;
  max-width: 320px;
}

.footer h4 {
  color: var(--white);
  margin-bottom: 16px;
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-contact p {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.footer-contact a {
  color: var(--accent);
}
.footer-contact a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  padding: 24px 0;
}

.footer-bottom p {
  color: rgba(255,255,255,0.3);
  font-size: 0.8rem;
  text-align: center;
}

/* ===== Controller Diagram (Homepage) ===== */
.controller-section {
  background: var(--white);
  padding: 96px 0;
}

.controller-diagram {
  display: grid;
  grid-template-columns: 1fr auto 1.2fr auto 1fr;
  gap: 16px;
  align-items: stretch;
  max-width: 1000px;
  margin: 0 auto 48px;
}

.diagram-role {
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.diagram-role-side {
  background: var(--cream);
  border: 1px solid var(--gray-200);
  color: var(--text);
}

.diagram-role-center {
  background: var(--navy);
  color: var(--white);
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-lg);
  transform: scale(1.05);
}

.diagram-role-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--accent);
  padding: 4px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
  align-self: center;
}

.diagram-role-label {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.2;
}

.diagram-role-side .diagram-role-label {
  color: var(--navy);
}

.diagram-role-center .diagram-role-label {
  color: var(--white);
}

.diagram-role-action {
  font-size: 0.95rem;
  margin-bottom: 8px;
  font-weight: 500;
}

.diagram-role-side .diagram-role-action {
  color: var(--text);
}

.diagram-role-center .diagram-role-action {
  color: rgba(255, 255, 255, 0.95);
}

.diagram-role-frequency {
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
}

.diagram-role-side .diagram-role-frequency {
  color: var(--text-light);
}

.diagram-role-center .diagram-role-frequency {
  color: var(--accent);
}

.diagram-role-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  text-align: left;
  font-size: 0.88rem;
  line-height: 1.5;
}

.diagram-role-list li {
  position: relative;
  padding: 6px 0 6px 20px;
}

.diagram-role-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.diagram-role-side .diagram-role-list {
  color: var(--text);
}

.diagram-role-center .diagram-role-list {
  color: rgba(255, 255, 255, 0.92);
}

.diagram-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  padding: 0 4px;
}

.controller-explainer {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.8;
  text-align: center;
}

/* ===== Reasons (Why You Need a Controller) ===== */
.reasons-section {
  background: var(--navy);
  padding: 100px 0;
}

.reasons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.reason-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  transition: all var(--transition);
}

.reason-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent);
  transform: translateY(-4px);
}

.reason-icon {
  color: var(--accent);
  margin-bottom: 24px;
}

.reason-card h3 {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 16px;
  line-height: 1.3;
}

.reason-card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== Founder Intro (Homepage) ===== */
.founder-intro {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.founder-lead {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--navy);
  line-height: 1.6;
  margin-bottom: 20px;
}

.founder-body {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 24px;
}

.founder-cta a {
  color: var(--accent);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.founder-cta a:hover {
  color: var(--accent-light);
}

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

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

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .values-grid .value-card:nth-child(5) {
    grid-column: 1 / 2;
  }
  .reasons-grid {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 0 auto;
  }
  .controller-diagram {
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 480px;
  }
  .diagram-role-center {
    transform: none;
  }
  .diagram-arrow {
    transform: rotate(90deg);
    padding: 4px 0;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--navy);
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    padding: 40px;
    transition: right var(--transition);
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 1.1rem;
    color: var(--white);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .mission-grid {
    grid-template-columns: 1fr;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }
  .values-grid .value-card:nth-child(4),
  .values-grid .value-card:nth-child(5) {
    grid-column: auto;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-content {
    padding: 140px 24px 60px;
  }

  .section {
    padding: 72px 0;
  }

  .problem-card {
    padding: 28px 24px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .cta-actions {
    flex-direction: column;
    align-items: center;
  }

  .cta-actions .btn {
    width: 100%;
  }
}
