/* Meridian Software — shared stylesheet */

:root {
  --bg: #faf9f5;
  --dark: #0B0D0F;
  --cream: #E8E6E1;
  --accent: #D4925A;
  --text: #2a2826;
  --text-muted: #6b6560;
  --border: #e0ddd8;
  --card-bg: #ffffff;
  --section-alt-bg: #f3f1ec;
  --max-w: 1160px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
::selection { background: var(--accent); color: #fff; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
}

/* --- Typography --- */
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { color: var(--text-muted); }
strong { color: var(--text); font-weight: 600; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
em { font-style: italic; }

/* --- Navigation --- */
.nav {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav-logo img { height: 26px; display: block; }
.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  color: rgba(232, 230, 225, 0.65);
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); text-decoration: none; }
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(232,230,225,0.75);
  border-radius: 2px;
  transition: all 0.2s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Hero --- */
.hero {
  background: var(--dark);
  color: var(--cream);
  padding: 7rem 2rem 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 100%, rgba(212,146,90,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero-mark {
  width: 100px;
  height: 100px;
  margin: 0 auto 2.5rem;
  opacity: 0.35;
}
.hero-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
  display: block;
}
.hero h1 { color: var(--cream); margin-bottom: 1.25rem; }
.hero .hero-sub {
  font-size: 1.15rem;
  color: rgba(232,230,225,0.6);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  cursor: pointer;
  border: none;
  line-height: 1;
}
.btn:hover { opacity: 0.85; text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(232,230,225,0.3);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-outline-light {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline-light:hover { border-color: var(--accent); color: var(--accent); }

/* --- Container --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 5rem 2rem;
}
.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: block;
}
.section-heading { margin-bottom: 1rem; color: var(--text); }
.section-intro { max-width: 620px; margin-bottom: 3rem; font-size: 1.05rem; line-height: 1.7; }

/* --- Two-column layout --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-top: 2rem;
}

/* --- Styled list --- */
.list-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
}
.list-items li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.list-items li::before {
  content: '—';
  color: var(--accent);
  flex-shrink: 0;
}

/* --- Product Cards (homepage) --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.product-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  text-decoration: none;
}
.product-card-tag {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.product-card h3 { font-size: 1.5rem; margin-bottom: 0.75rem; color: var(--text); }
.product-card p { flex: 1; font-size: 0.95rem; margin-bottom: 1.5rem; line-height: 1.6; }
.product-card-link { font-size: 0.875rem; color: var(--accent); font-weight: 500; }

/* --- Feature Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.feature-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}
.feature-item h4 { margin-bottom: 0.5rem; color: var(--text); }
.feature-item p { font-size: 0.9rem; line-height: 1.6; }

/* --- Screenshots --- */
.screenshots {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem 5rem;
}
.screenshots-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}
.screenshot-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.screenshot-item img {
  width: 100%;
  height: auto;
  display: block;
}
.screenshot-caption {
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  line-height: 1.5;
}

/* --- Pricing --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
  align-items: start;
}
.pricing-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
}
.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.pricing-tier {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: block;
}
.pricing-card h3 { font-size: 1.25rem; margin-bottom: 0.75rem; color: var(--text); }
.pricing-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0.75rem 0 0.2rem;
  line-height: 1;
  letter-spacing: -0.03em;
}
.pricing-period { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }
.pricing-desc { font-size: 0.9rem; margin-bottom: 1.25rem; color: var(--text-muted); line-height: 1.6; }
.pricing-features { list-style: none; }
.pricing-features li {
  font-size: 0.875rem;
  padding: 0.35rem 0;
  color: var(--text-muted);
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li::before { content: '—'; color: var(--accent); flex-shrink: 0; }

/* --- Data Table --- */
.data-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }
.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  font-weight: 600;
}
.data-table td {
  padding: 0.9rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
  line-height: 1.5;
}
.data-table td strong { color: var(--text); }
.data-table tr:last-child td { border-bottom: none; }

/* --- Section alt (alternate background) --- */
.section-alt { background: var(--section-alt-bg); }

/* --- Product Components (SoaScape) --- */
.components-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.component-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem;
  border-top: 3px solid var(--accent);
}
.component-card h3 { margin-bottom: 0.75rem; font-size: 1.1rem; color: var(--text); }
.component-card p { font-size: 0.9rem; line-height: 1.6; }

/* --- Principles list (homepage) --- */
.principles-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.principles-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.principles-list li::before {
  content: '—';
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.05rem;
}

/* --- CTA Banner --- */
.cta-banner {
  background: var(--dark);
  color: var(--cream);
  text-align: center;
  padding: 5.5rem 2rem;
}
.cta-banner h2 { color: var(--cream); margin-bottom: 1rem; }
.cta-banner p {
  color: rgba(232,230,225,0.6);
  max-width: 500px;
  margin: 0 auto 2.25rem;
  font-size: 1.05rem;
  line-height: 1.7;
}
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* --- Footer --- */
.footer {
  background: var(--dark);
  color: rgba(232,230,225,0.45);
  padding: 3rem 2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-logo img { height: 22px; opacity: 0.55; display: block; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { color: rgba(232,230,225,0.45); font-size: 0.85rem; text-decoration: none; }
.footer-links a:hover { color: var(--accent); text-decoration: none; }
.footer-copy { font-size: 0.8rem; }

/* --- Contact form --- */
.form-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2.5rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.form-field { margin-bottom: 1.25rem; }
.form-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}
.form-field .required { color: var(--accent); }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.7rem 0.85rem;
  line-height: 1.5;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-field textarea { resize: vertical; min-height: 150px; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212, 146, 90, 0.15);
}
.form-field input:invalid:not(:placeholder-shown),
.form-field textarea:invalid:not(:placeholder-shown) { border-color: #c2553f; }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.4rem; }

/* Honeypot — hidden from people, tempting to bots. Not display:none, which
   some bots detect and skip. */
.form-gotcha {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}
.form-consent { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

.form-status {
  border-radius: 6px;
  padding: 0.9rem 1.1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.form-status[hidden] { display: none; }
.form-status.is-success {
  background: rgba(212, 146, 90, 0.1);
  border: 1px solid var(--accent);
  color: var(--text);
}
.form-status.is-error {
  background: rgba(194, 85, 63, 0.08);
  border: 1px solid #c2553f;
  color: #7a3325;
}

/* --- Feature group subheadings --- */
.feature-group { margin-top: 3rem; }
.feature-group:first-child { margin-top: 2.5rem; }
.feature-group-label {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: block;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--dark);
    flex-direction: column;
    padding: 1rem 2rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    gap: 1.25rem;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .hero { padding: 4rem 1.5rem 3.5rem; }
  .container { padding: 3.5rem 1.5rem; }
  .screenshots { padding: 0 1.5rem 3.5rem; }
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
  .pricing-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .data-table th:nth-child(3),
  .data-table th:nth-child(4),
  .data-table td:nth-child(3),
  .data-table td:nth-child(4) { display: none; }
}
