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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: #F9F7F2;
  color: #4A4A4A;
  font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
}

/* ─── Typography ─────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  color: #4A403A;
  line-height: 1.3;
}

p {
  margin-bottom: 0;
}

a {
  color: #4A403A;
  text-decoration: none;
}

a:hover {
  color: #9E8B7E;
}

/* ─── Layout ─────────────────────────────────────────────────────────── */
.page-container {
  max-width: 650px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* ─── Logo / Branding ────────────────────────────────────────────────── */
.brand {
  text-align: center;
  padding: 50px 0 40px;
  border-bottom: 1px solid #E0DCD5;
  margin-bottom: 50px;
}

.brand-name {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-size: 28px;
  color: #4A403A;
  letter-spacing: 2px;
  margin: 0 0 4px;
}

.brand-tagline {
  font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  font-size: 10px;
  color: #9E8B7E;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 400;
  margin: 0;
}

/* ─── Hero / Ebook Section ───────────────────────────────────────────── */
.ebook-hero {
  text-align: center;
  padding-bottom: 50px;
  border-bottom: 1px solid #E0DCD5;
  margin-bottom: 50px;
}

.ebook-cover {
  width: 200px;
  max-width: 100%;
  margin: 0 auto 40px;
  display: block;
}

.ebook-cover-placeholder {
  width: 200px;
  height: 280px;
  background: #4A403A;
  margin: 0 auto 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #F9F7F2;
  padding: 20px;
  text-align: center;
}

.ebook-cover-placeholder .cover-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 12px;
  line-height: 1.2;
}

.ebook-cover-placeholder .cover-author {
  font-family: 'Manrope', sans-serif;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 300;
}

.ebook-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  color: #4A403A;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.ebook-subtitle {
  font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: #9E8B7E;
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto;
}

/* ─── Intro Text ─────────────────────────────────────────────────────── */
.intro-section {
  padding-bottom: 50px;
  border-bottom: 1px solid #E0DCD5;
  margin-bottom: 50px;
}

.intro-quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  color: #4A403A;
  line-height: 1.5;
  text-align: center;
  padding: 20px 0;
  font-style: italic;
}

.intro-quote + .intro-quote {
  border-top: 1px solid #E0DCD5;
}

.intro-description {
  font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  font-weight: 300;
  color: #4A4A4A;
  line-height: 1.7;
  text-align: center;
  padding-top: 30px;
}

/* ─── Form ───────────────────────────────────────────────────────────── */
.form-section {
  padding-bottom: 20px;
}

.form-section h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  text-align: center;
  margin-bottom: 36px;
  color: #4A403A;
}

.form-group {
  margin-bottom: 32px;
}

.form-group label {
  display: block;
  font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: #9E8B7E;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"] {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-bottom: 1px solid #E0DCD5;
  background: transparent;
  font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  font-weight: 300;
  color: #4A403A;
  outline: none;
  transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus {
  border-bottom-color: #4A403A;
}

.form-group input::placeholder {
  color: #C5BFB5;
  font-weight: 300;
}

.form-group input[type="password"] {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-bottom: 1px solid #E0DCD5;
  background: transparent;
  font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  font-weight: 300;
  color: #4A403A;
  outline: none;
  transition: border-color 0.3s ease;
}

.form-group input[type="password"]:focus {
  border-bottom-color: #4A403A;
}

/* ─── Buttons ────────────────────────────────────────────────────────── */
.btn-primary {
  display: block;
  width: 100%;
  padding: 18px 32px;
  background: #4A403A;
  color: #ffffff;
  border: none;
  border-radius: 0;
  font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-align: center;
  text-decoration: none;
}

.btn-primary:hover {
  background: #3A302A;
  color: #ffffff;
}

.btn-primary:active {
  background: #2E2520;
}

.btn-secondary {
  display: inline-block;
  padding: 14px 32px;
  background: #D4CCC0;
  color: #4A403A;
  border: none;
  border-radius: 0;
  font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-align: center;
  text-decoration: none;
}

.btn-secondary:hover {
  background: #C4BAB0;
  color: #4A403A;
}

.btn-outline {
  display: inline-block;
  padding: 14px 32px;
  background: transparent;
  color: #4A403A;
  border: 1px solid #E0DCD5;
  border-radius: 0;
  font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
}

.btn-outline:hover {
  border-color: #4A403A;
  color: #4A403A;
}

/* ─── Error Messages ─────────────────────────────────────────────────── */
.form-error {
  font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  color: #A04040;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 400;
}

/* ─── Success / Info Pages ───────────────────────────────────────────── */
.message-page {
  text-align: center;
  padding: 60px 0;
}

.message-page .message-icon {
  font-size: 48px;
  margin-bottom: 30px;
  display: block;
}

.message-page h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  color: #4A403A;
  margin-bottom: 20px;
}

.message-page p {
  font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  font-weight: 300;
  color: #4A4A4A;
  line-height: 1.7;
  max-width: 450px;
  margin: 0 auto 16px;
}

.message-page .btn-primary,
.message-page .btn-secondary,
.message-page .btn-outline {
  display: inline-block;
  width: auto;
  margin-top: 30px;
}

/* ─── Download Page ──────────────────────────────────────────────────── */
.download-section {
  text-align: center;
  padding: 40px 0;
}

.download-section .download-icon {
  font-size: 56px;
  margin-bottom: 30px;
  display: block;
}

.download-section h1 {
  font-size: 28px;
  margin-bottom: 16px;
}

.download-section p {
  font-size: 15px;
  color: #4A4A4A;
  margin-bottom: 16px;
}

.download-section .download-buttons {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* ─── Footer ─────────────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 40px 0 20px;
  border-top: 1px solid #E0DCD5;
  margin-top: 60px;
}

.footer p {
  font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  font-size: 11px;
  color: #9E8B7E;
  font-weight: 300;
  line-height: 1.7;
}

/* ─── Admin ──────────────────────────────────────────────────────────── */
.admin-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 30px 24px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid #E0DCD5;
  margin-bottom: 30px;
}

.admin-header h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  color: #4A403A;
}

.admin-header .admin-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid #E0DCD5;
  padding: 24px;
  text-align: center;
}

.stat-card .stat-number {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 36px;
  font-weight: 400;
  color: #4A403A;
  display: block;
}

.stat-card .stat-label {
  font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  font-size: 10px;
  color: #9E8B7E;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 4px;
}

.leads-table {
  width: 100%;
  border-collapse: collapse;
}

.leads-table th {
  font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  font-size: 10px;
  color: #9E8B7E;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 400;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #E0DCD5;
}

.leads-table td {
  font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: #4A4A4A;
  padding: 14px 16px;
  border-bottom: 1px solid #E0DCD5;
}

.leads-table tr:hover {
  background: #ffffff;
}

.status-confirmed {
  color: #5A7A5A;
  font-weight: 400;
}

.status-pending {
  color: #9E8B7E;
}

/* ─── Login Page ─────────────────────────────────────────────────────── */
.login-container {
  max-width: 400px;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
}

.login-container h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  color: #4A403A;
  margin-bottom: 40px;
}

.login-container .form-group {
  text-align: left;
}

.login-container .btn-primary {
  margin-top: 12px;
}

/* ─── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .page-container {
    padding: 20px 20px 40px;
  }

  .brand {
    padding: 30px 0 24px;
    margin-bottom: 30px;
  }

  .brand-name {
    font-size: 20px;
    letter-spacing: 1.5px;
  }

  .brand-tagline {
    font-size: 9px;
    letter-spacing: 2px;
  }

  .ebook-hero {
    padding-bottom: 36px;
    margin-bottom: 36px;
  }

  .ebook-cover-placeholder {
    width: 150px;
    height: 210px;
    margin: 0 auto 30px;
  }

  .ebook-cover-placeholder .cover-title {
    font-size: 17px;
  }

  .ebook-title {
    font-size: 26px;
    margin-bottom: 12px;
  }

  .ebook-subtitle {
    font-size: 14px;
    line-height: 1.6;
  }

  .intro-section {
    padding-bottom: 36px;
    margin-bottom: 36px;
  }

  .intro-quote {
    font-size: 19px;
    padding: 16px 0;
  }

  .intro-description {
    font-size: 14px;
    padding-top: 24px;
  }

  .form-section h2 {
    font-size: 22px;
    margin-bottom: 28px;
  }

  .form-group {
    margin-bottom: 28px;
  }

  .form-group input[type="text"],
  .form-group input[type="email"],
  .form-group input[type="password"] {
    font-size: 16px; /* Prevents iOS zoom on focus */
    padding: 12px 0;
  }

  .btn-primary {
    padding: 16px 24px;
    font-size: 11px;
    letter-spacing: 1.5px;
  }

  .message-page {
    padding: 40px 0;
  }

  .message-page h1 {
    font-size: 24px;
  }

  .message-page p {
    font-size: 14px;
  }

  .download-section .download-icon {
    font-size: 44px;
  }

  .download-section h1 {
    font-size: 24px;
  }

  .footer {
    padding: 30px 0 16px;
    margin-top: 40px;
  }

  /* Admin responsive */
  .admin-container {
    padding: 20px 16px;
  }

  .stats-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 18px;
  }

  .stat-card .stat-number {
    font-size: 28px;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .admin-header .admin-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .admin-header .admin-actions .btn-outline,
  .admin-header .admin-actions .btn-secondary {
    flex: 1;
    text-align: center;
    font-size: 10px;
    padding: 12px 16px;
  }

  .leads-table {
    font-size: 12px;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .leads-table th,
  .leads-table td {
    padding: 10px 8px;
    white-space: nowrap;
  }

  .login-container {
    padding: 50px 20px;
  }
}
