:root {
  --bg: #FAFAF7;
  --fg: #1A1A18;
  --muted: #6B6B60;
  --accent: #1A5C4A;
  --accent-light: #EAF4F1;
  --sand: #E8D5B7;
  --sand-dark: #C9B48A;
  --white: #FFFFFF;
  --radius: 12px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* NAVBAR */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 48px;
  border-bottom: 1px solid rgba(26, 26, 24, 0.08);
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.nav-tagline {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* HERO */
.hero {
  padding: 80px 48px 100px;
  overflow: hidden;
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero-label {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 24px;
}
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 24px;
}
.hero-sub {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 440px;
}

/* Phone mockup */
.hero-visual {
  display: flex;
  justify-content: center;
}
.phone-frame {
  width: 280px;
  background: #1A1A18;
  border-radius: 36px;
  padding: 14px;
  box-shadow: 0 24px 64px rgba(26, 26, 24, 0.18), 0 4px 12px rgba(26, 26, 24, 0.08);
}
.phone-screen {
  background: var(--bg);
  border-radius: 26px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 420px;
}
.chat-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
  max-width: 85%;
}
.chat-bubble.bot {
  background: var(--accent-light);
  color: var(--fg);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-bubble.user {
  background: var(--accent);
  color: var(--white);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-confirm {
  background: #EAF4F1;
  border: 1px solid var(--accent);
  border-radius: 16px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

/* SECTION COMMON */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 48px;
}

/* HOW */
.how { padding: 80px 48px; background: var(--white); }
.how-inner { max-width: 1100px; margin: 0 auto; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.step { position: relative; }
.step-num {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 300;
  color: var(--sand-dark);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 16px;
}
.step h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 12px;
  color: var(--fg);
}
.step p { font-size: 14px; color: var(--muted); line-height: 1.7; }

/* FEATURES */
.features { padding: 80px 48px; }
.features-inner { max-width: 1100px; margin: 0 auto; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--white);
  border: 1px solid rgba(26, 26, 24, 0.06);
  border-radius: 20px;
  padding: 32px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.feature-card:hover {
  box-shadow: 0 8px 32px rgba(26, 26, 24, 0.08);
  transform: translateY(-2px);
}
.feature-icon {
  color: var(--accent);
  margin-bottom: 16px;
}
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 8px;
  color: var(--fg);
}
.feature-card p { font-size: 14px; color: var(--muted); line-height: 1.7; }

/* MANIFESTO */
.manifesto { padding: 100px 48px; background: var(--fg); color: var(--white); }
.manifesto-inner { max-width: 900px; margin: 0 auto; text-align: center; }
.manifesto-quote {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 300;
  font-style: italic;
  color: var(--sand);
  line-height: 1.3;
  margin-bottom: 40px;
  letter-spacing: -0.01em;
}
.manifesto-body {
  font-size: 16px;
  color: rgba(250, 250, 247, 0.75);
  line-height: 1.8;
  max-width: 640px;
  margin: 0 auto 24px;
}

/* CLOSING */
.closing { padding: 100px 48px; background: var(--bg); text-align: center; }
.closing-inner { max-width: 700px; margin: 0 auto; }
.closing-icon { color: var(--accent); margin-bottom: 32px; display: flex; justify-content: center; }
.closing-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 20px;
}
.closing-sub { font-size: 16px; color: var(--muted); line-height: 1.7; }

/* FOOTER */
.footer { padding: 40px 48px; border-top: 1px solid rgba(26, 26, 24, 0.08); }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.footer-logo { font-family: var(--font-display); font-weight: 600; font-size: 18px; margin-right: 12px; }
.footer-tagline { font-size: 13px; color: var(--muted); }
.footer-note { font-size: 13px; color: var(--muted); }

/* CTA BUTTON */
.cta-button {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  margin: 20px 0 12px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.cta-button:hover { background: #164d40; transform: translateY(-1px); }
.cta-hint { font-size: 13px; color: var(--muted); }

/* MODAL */
.modal-overlay {
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 24, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
}
.modal {
  background: var(--white);
  border-radius: 20px;
  padding: 40px;
  max-width: 440px;
  width: 90%;
  position: relative;
  box-shadow: 0 24px 64px rgba(26, 26, 24, 0.2);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.modal-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Auth tabs */
.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.auth-tab {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid rgba(26, 26, 24, 0.1);
  border-radius: 10px;
  background: none;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s;
}
.auth-tab.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* Form styles */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 500; color: var(--fg); }
.form-group input {
  border: 1.5px solid rgba(26, 26, 24, 0.12);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--fg);
  background: var(--bg);
  transition: border-color 0.15s;
}
.form-group input:focus {
  outline: none;
  border-color: var(--accent);
}
.form-submit {
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 4px;
}
.form-submit:hover { background: #164d40; }
.form-submit.success { background: var(--accent); }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.form-error { color: #c0392b; font-size: 13px; }
.form-success { color: var(--accent); font-size: 13px; font-weight: 500; }
.form-divider {
  text-align: center;
  margin: 16px 0;
  position: relative;
  color: var(--muted);
  font-size: 13px;
}
.form-divider::before, .form-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30%;
  height: 1px;
  background: rgba(26, 26, 24, 0.1);
}
.form-divider::before { left: 0; }
.form-divider::after { right: 0; }
.modal-security { font-size: 12px; color: var(--muted); margin-top: 16px; text-align: center; }

/* =========================================
   AGENTREADY — Landing Page
   ========================================= */

/* HERO — AgentReady single-center layout */
.hero {
  padding: 80px 48px 100px;
  background: var(--bg);
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}
.hero-copy {
  padding-top: 12px;
}
.hero-hint {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
}

/* Input tabs */
.input-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.input-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border: 1.5px solid rgba(26, 26, 24, 0.12);
  border-radius: 10px;
  background: var(--white);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.input-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.input-tab.active {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}
.input-tab svg { flex-shrink: 0; }

/* Input panel */
.input-panel {
  background: var(--white);
  border: 1.5px solid rgba(26, 26, 24, 0.1);
  border-radius: 14px;
  padding: 20px;
  min-height: 100px;
  position: relative;
}

/* URL input */
.url-input {
  width: 100%;
  border: 1.5px solid rgba(26, 26, 24, 0.12);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--fg);
  background: var(--bg);
  transition: border-color 0.15s;
}
.url-input:focus {
  outline: none;
  border-color: var(--accent);
}
.url-input::placeholder { color: var(--muted); }

.input-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

/* Error messages */
.input-error {
  font-size: 13px;
  color: #c0392b;
  margin-top: 6px;
  min-height: 18px;
}

/* File drop zone */
.file-drop-zone {
  border: 2px dashed rgba(26, 26, 24, 0.15);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.file-drop-zone:hover, .file-drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-light);
}
.file-drop-zone svg { color: var(--muted); }
.drop-text {
  font-size: 14px;
  color: var(--muted);
}
.drop-link {
  color: var(--accent);
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
}
.drop-formats {
  font-size: 12px;
  color: var(--muted);
}
.file-input-hidden { display: none; }

/* File status */
.file-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  margin-top: 8px;
}
.file-status.success {
  background: #EAF4F1;
  color: var(--accent);
}
.file-status svg { flex-shrink: 0; }

/* Loading overlay inside the form panel */
.diag-loading {
  position: absolute;
  inset: 0;
  background: rgba(250, 250, 247, 0.92);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 10;
}
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(26, 92, 74, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text {
  font-size: 14px;
  color: var(--fg);
  font-weight: 500;
}

/* Diagnostic button */
.diag-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.diag-button:hover:not(:disabled) { background: #164d40; transform: translateY(-1px); }
.diag-button:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

/* Spinner inside button */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* AgentReady footer section */
.ar-footer {
  padding: 48px 48px;
  background: var(--fg);
  color: var(--white);
}
.ar-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ar-footer-brand { display: flex; flex-direction: column; gap: 4px; }
.ar-footer-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
}
.ar-footer-tag { font-size: 13px; color: rgba(250, 250, 247, 0.55); }
.ar-footer-note { font-size: 14px; color: rgba(250, 250, 247, 0.6); }
.ar-footer-note a { color: var(--sand); text-decoration: none; }
.ar-footer-note a:hover { text-decoration: underline; }

/* Utility */
.hidden { display: none !important; }

/* MOBILE */
@media (max-width: 768px) {
  .navbar { padding: 20px 24px; }
  .hero { padding: 48px 24px 72px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .input-tabs { grid-template-columns: repeat(2, 1fr); }
  .ar-footer { padding: 40px 24px; }
  .ar-footer-inner { flex-direction: column; gap: 16px; text-align: center; }
}