@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Cormorant+Garamond:wght@500;600;700&display=swap');

:root {
  --radius-lg: 12px;
  --card-shadow: 0 18px 36px rgba(12, 12, 14, 0.45);
  --accent-glow: rgba(196, 126, 66, 0.28);
  
  --font-ui: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  
  --type-display-size: clamp(2.25rem, 4.5vw + 0.5rem, 3.25rem);
  --type-display-line: 1.1;
  --type-title-size: clamp(1.75rem, 2.8vw, 2.25rem);
  --type-title-line: 1.15;
  --type-subtitle-size: clamp(1.125rem, 1.5vw + 0.25rem, 1.375rem);
  --type-subtitle-line: 1.4;
  --type-body-size: 0.9375rem;
  --type-body-line: 1.6;
  --type-micro-size: 0.75rem;
  --type-micro-line: 1.45;
  
  --aperium-copper: #C47E42;
  --aperium-copperHover: #A8612E;
  --aperium-slate: #0D0D0E;
  --aperium-ivory: #F7F5F2;
  --aperium-textLight: #EDEDED;
  --aperium-textBody: #B0A89A;
  
  /* Light Mode Colors */
  --bg: var(--aperium-ivory);
  --card: #ffffff;
  --card-elevated: #ffffff;
  --text: #1c1e21;
  --muted: #475569;
  --text-muted: #6c727f;
  --accent: var(--aperium-copper);
  --accent-dark: var(--aperium-copperHover);
  --accent-soft: rgba(196, 126, 66, 0.12);
  --border: rgba(196, 126, 66, 0.2);
  --card-shadow: 0 18px 36px rgba(193, 168, 139, 0.25);
  --accent-glow: rgba(196, 126, 66, 0.18);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-ui);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
.type-display {
  font-family: var(--font-display);
  font-size: var(--type-display-size);
  line-height: var(--type-display-line);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.type-title {
  font-family: var(--font-display);
  font-size: var(--type-title-size);
  line-height: var(--type-title-line);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.type-subtitle {
  font-family: var(--font-ui);
  font-size: var(--type-subtitle-size);
  line-height: var(--type-subtitle-line);
  font-weight: 500;
}

.type-micro {
  font-size: var(--type-micro-size);
  line-height: var(--type-micro-line);
}

/* Header */
.landing-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #FEF9F4 0%, #F8F5F1 52%, rgba(196, 126, 66, 0.22) 100%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 26px rgba(196, 126, 66, 0.15);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-size: 18px;
  line-height: 1.2;
  color: var(--text);
  font-weight: 600;
}

.brand-subtitle {
  font-size: 11px;
  line-height: 1.3;
  color: var(--muted);
  font-weight: 400;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 8px;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s ease;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 4px 12px rgba(94, 76, 54, 0.15);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 36px var(--accent-glow);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 36px var(--accent-glow);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: none;
}

.btn--ghost:hover {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.55);
}

.btn--large {
  padding: 12px 24px;
  font-size: 15px;
}

/* Hero Section */
.hero {
  padding: 60px 24px;
  min-height: 60vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(60rem 60rem at 65% 35%, rgba(196, 126, 66, 0.12), transparent 60%),
              radial-gradient(32rem 32rem at 20% 70%, rgba(196, 126, 66, 0.10), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-card {
  max-width: 720px;
  padding: 48px 40px;
  border-radius: 20px;
  border: 1px solid rgba(196, 126, 66, 0.2);
  background: linear-gradient(165deg, rgba(249, 240, 231, 0.95) 0%, rgba(255, 255, 255, 0.98) 60%, rgba(255, 255, 255, 0.9) 100%);
  box-shadow: 0 20px 40px rgba(193, 168, 139, 0.28);
  color: #1c1e21;
  position: relative;
}

.ap-card {
  position: relative;
  overflow: hidden;
}

.ap-copper-glow {
  box-shadow: 0 0 24px rgba(196, 126, 66, 0.22),
              inset 0 4px 18px rgba(0, 0, 0, 0.26);
}

.hero-card h1 {
  margin-bottom: 16px;
  color: #1c1e21;
}

.hero-subhead {
  margin-bottom: 24px;
  color: #475569;
  font-size: 1.125rem;
}

.hero-highlights {
  list-style: none;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-highlights li {
  position: relative;
  padding-left: 20px;
  color: #1c1e21;
  font-size: 14px;
  line-height: 1.6;
}

.hero-highlights li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.hero-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.hero-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 32px;
  border-top: 1px solid rgba(196, 126, 66, 0.2);
}

.trust-label {
  font-size: 12px;
  color: #6c727f;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.trust-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  padding: 7px 14px;
  border-radius: 20px;
  background: rgba(196, 126, 66, 0.12);
  border: 1px solid rgba(196, 126, 66, 0.25);
  color: #1c1e21;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

/* Sections */
.section {
  padding: 60px 24px;
  background: transparent; /* Explicit transparent to ensure cards' backgrounds are evaluated */
}

.section-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: 36px;
  color: var(--text);
}

.section-note {
  text-align: center;
  margin-top: 32px;
  color: var(--muted);
  font-size: 14px;
}

/* How It Works */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-bottom: 24px;
}

.step-card {
  padding: 24px;
  border-radius: 16px;
  background: #ffffff !important; /* Explicit white background with !important to guarantee contrast */
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  isolation: isolate; /* Create new stacking context to ensure background isolation */
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(12, 12, 14, 0.4);
}

.step-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #000000 !important; /* Pure black for maximum contrast guarantee (21:1 on white) */
}

.step-desc {
  color: #000000 !important; /* Pure black for maximum contrast guarantee (21:1 on white) */
  line-height: 1.6;
}

/* Use Cases */
.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.use-case-card {
  padding: 32px;
  border-radius: 16px;
  background: #ffffff !important; /* Explicit white background with !important to guarantee contrast */
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  isolation: isolate; /* Create new stacking context to ensure background isolation */
}

.use-case-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(12, 12, 14, 0.4);
}

.use-case-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #000000 !important; /* Pure black for maximum contrast guarantee (21:1 on white) */
}

.use-case-desc {
  color: #000000 !important; /* Pure black for maximum contrast guarantee (21:1 on white) */
  margin-bottom: 24px;
  line-height: 1.6;
}

.use-case-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.use-case-bullets li {
  position: relative;
  padding-left: 20px;
  color: #000000 !important; /* Pure black for maximum contrast guarantee (21:1 on white) */
  font-size: 14px;
}

.use-case-bullets li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.feature-item {
  padding: 20px;
  border-radius: 12px;
  background: #ffffff !important; /* Explicit white background with !important to guarantee contrast */
  border: 1px solid var(--border);
  transition: transform 0.2s ease;
  isolation: isolate; /* Create new stacking context to ensure background isolation */
}

.feature-item:hover {
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 24px;
  margin-bottom: 10px;
}

.feature-label {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #000000 !important; /* Pure black for maximum contrast guarantee (21:1 on white) */
}

.feature-desc {
  color: #000000 !important; /* Pure black for maximum contrast guarantee (21:1 on white) */
  font-size: 14px;
  line-height: 1.6;
}

/* Halytic Band */
.halytic-band {
  background: rgba(247, 245, 242, 0.8);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.halytic-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}

.halytic-text {
  flex: 1;
  min-width: 300px;
}

.halytic-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.halytic-label {
  display: inline-block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0;
}

.halytic-body {
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 16px;
  max-width: 600px;
}

.halytic-link {
  color: #8B5729; /* Darker brown for guaranteed WCAG 2 AA contrast (7:1 on white, 6:1 on ivory) */
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.halytic-link:hover {
  color: #6B4520; /* Even darker on hover for better contrast */
  text-decoration: underline;
}

.halytic-logo {
  height: 24px;
  width: auto;
  opacity: 0.85;
  flex-shrink: 0;
}

/* Pricing */
.pricing-intro {
  text-align: center;
  color: var(--muted);
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.pricing-card {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  text-align: center;
}

.plan-header {
  margin-bottom: 32px;
}

.plan-name {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.plan-features {
  list-style: none;
  margin-bottom: 40px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan-features li {
  position: relative;
  padding-left: 24px;
  color: var(--text);
}

.plan-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--card);
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 40px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.modal-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text);
}

.beta-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

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

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: none;
  padding: 16px 24px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.toast[aria-hidden="false"] {
  display: block;
  animation: slideUp 0.3s ease;
}

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

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast-message {
  color: var(--text);
  font-weight: 500;
}

/* Footer */
.footer {
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  background: rgba(247, 245, 242, 0.6);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-copyright {
  color: var(--muted);
  font-size: 14px;
}

.footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

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

.footer-disclaimer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 768px) {
  .header-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    gap: 16px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 999;
    box-shadow: 0 12px 26px rgba(196, 126, 66, 0.15);
  }

  .header-nav[aria-expanded="true"] {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-actions {
    margin-left: 0;
    flex-direction: column;
    width: 100%;
  }

  .nav-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }

  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  .hero {
    padding: 48px 16px;
    min-height: auto;
  }

  .hero-card {
    padding: 40px 32px;
  }

  .section {
    padding: 48px 16px;
  }

  .steps-grid,
  .use-cases-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }

  .halytic-content {
    flex-direction: column;
    text-align: center;
  }

  .halytic-header {
    justify-content: center;
  }

  .modal-content {
    padding: 32px 24px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-nav {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-card {
    padding: 32px 24px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

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

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-card,
.step-card,
.use-case-card,
.feature-item {
  animation: fadeIn 0.6s ease;
}

.step-card:nth-child(2) {
  animation-delay: 0.1s;
}

.step-card:nth-child(3) {
  animation-delay: 0.2s;
}

