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

:root {
  --bg: #f0ede8;
  --text: #1a1a1a;
  --accent: #d4a820;
  --border: #1a1a1a;
  --white: #ffffff;
}

html {
  scroll-behavior: smooth;
  font-size: 112.5%; /* base 18px — 2pt larger across the board */
}

body {
  font-family: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Typography */
h1 { font-size: clamp(3rem, 5.5vw, 5rem); font-weight: 700; line-height: 1.08; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p  { font-size: 1rem; color: #333; }

/* Nav */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 4rem;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.5px;
}

.logo span.lex {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--text);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Divider */
.nav-divider {
  height: 1px;
  background: #ccc;
  margin: 0 4rem;
}

/* =====================
   HOME PAGE
   ===================== */

/* Hero */
.hero {
  padding: 2.5rem 4rem 2.5rem;
  max-width: 100%;
}

.hero h1 {
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1rem;
  max-width: 540px;
  margin-bottom: 1.6rem;
  line-height: 1.7;
}

.btn-primary {
  display: inline-block;
  background: var(--text);
  color: var(--white);
  padding: 1rem 2.2rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover {
  background: #333;
  transform: translateY(-1px);
}

/* Section divider */
.section-divider {
  height: 1px;
  background: #ccc;
  margin: 0;
}

/* How it Works */
.how-it-works {
  padding: 4rem 4rem;
  background: var(--bg);
}

.section-title-box {
  display: inline-block;
  border: 2px solid var(--text);
  padding: 0.7rem 2.5rem;
  margin-bottom: 3.5rem;
}

.section-title-box.gold {
  border-color: var(--accent);
}

.section-title-box h2 {
  color: var(--accent);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.section-title-box.black h2 {
  color: var(--text);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.how-it-works .section-title-box {
  display: flex;
  justify-content: center;
  width: 100%;
}

.how-it-works-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.how-title-box {
  display: inline-block;
  border: 2px solid var(--text);
  padding: 0.7rem 2.5rem;
}

.how-title-box h2 {
  color: var(--text);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4.5rem 3.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.feature-item {
  text-align: center;
}

.feature-icon {
  width: 90px;
  height: 90px;
  margin: 0 auto 1.2rem;
}

.feature-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feature-item h3 {
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
}

.feature-item p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #444;
}

/* Why LexAnalyst */
.why-section {
  padding: 4rem 4rem;
  background: var(--bg);
}

.why-header {
  text-align: center;
  margin-bottom: 3rem;
}

.why-title-box {
  display: inline-block;
  border: 2px solid var(--accent);
  padding: 0.7rem 2.5rem;
}

.why-title-box h2 {
  color: var(--text);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  max-width: 960px;
  margin: 0 auto;
  border: 2px solid var(--text);
}

.why-card {
  padding: 2.5rem 2.2rem;
  text-align: center;
  border: 1px solid var(--text);
}

.why-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

.why-card p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #444;
}

/* =====================
   ABOUT PAGE
   ===================== */
.about-section {
  padding: 4rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  min-height: calc(100vh - 90px);
}

.about-content h1 {
  margin-bottom: 1.5rem;
}

.about-content p {
  font-size: 1rem;
  line-height: 1.8;
  color: #333;
}

.about-content strong {
  color: var(--text);
}

.about-image {
  width: 100%;
  height: 580px;
  object-fit: cover;
  display: block;
}

/* =====================
   CONTACT PAGE
   ===================== */
.contact-section {
  padding: 4rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  min-height: calc(100vh - 90px);
}

.contact-content h1 {
  margin-bottom: 1rem;
}

.contact-content > p {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

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

.form-group label span {
  font-size: 0.8rem;
  color: #666;
  font-weight: 400;
}

.form-group input,
.form-group textarea {
  padding: 0.7rem 1rem;
  border: 1.5px solid #ccc;
  border-radius: 50px;
  font-size: 0.95rem;
  font-family: inherit;
  background: transparent;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.form-group textarea {
  border-radius: 16px;
  resize: vertical;
  min-height: 120px;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--text);
}

.contact-image {
  width: 100%;
  height: 580px;
  object-fit: cover;
  display: block;
}

/* Status message */
.form-status {
  font-size: 0.9rem;
  padding: 0.5rem 0;
  display: none;
}
.form-status.success { color: #2e7d32; display: block; }
.form-status.error   { color: #c62828; display: block; }

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 900px) {
  nav { padding: 1.2rem 2rem; }
  .nav-divider { margin: 0 2rem; }
  .hero { padding: 3rem 2rem; }
  .how-it-works, .why-section { padding: 3rem 2rem; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .about-section, .contact-section { padding: 3rem 2rem; grid-template-columns: 1fr; }
  .about-image, .contact-image { height: 300px; }
}

@media (max-width: 640px) {
  nav { padding: 1rem 1.5rem; }
  .nav-divider { margin: 0 1.5rem; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); padding: 1rem 1.5rem 1.5rem; border-bottom: 1px solid #ccc; gap: 1rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .hero { padding: 2.5rem 1.5rem; }
  .how-it-works, .why-section { padding: 2.5rem 1.5rem; }
  .features-grid { grid-template-columns: 1fr; gap: 2rem; }
  .why-grid { grid-template-columns: 1fr; }
  .about-section, .contact-section { padding: 2rem 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
}
