/* ======================================================
   Kevin Chiva Newsletter — Landing Page Styles
   ====================================================== */

/* ---------- Design Tokens ---------- */
:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #6b7280;
  --color-accent: #6b7c59;
  --color-accent-hover: #5a6a4a;
  --color-accent-light: #f2f4ef;
  --color-border: #e5e7eb;
  --color-success: #16a34a;
  --color-error: #dc2626;

  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --transition: 0.2s ease;
  --max-width: 1200px;
  --content-width: 720px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 1rem;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section__title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
    transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.btn--outline {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn--outline:hover {
  background: var(--color-accent);
  color: #fff;
}

.btn--sm {
  padding: 8px 20px;
  font-size: 0.875rem;
}

.btn--full {
  width: 100%;
  padding: 14px 24px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
}

/* ---------- Hero ---------- */
.hero {
  padding: 140px 0 80px;
  text-align: center;
}

.hero__inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.hero__title {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
}

/* ---------- Forms ---------- */
.form-wrapper {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}

.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.form-input {
  font-family: var(--font-family);
  font-size: 1rem;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  background: var(--color-bg);
}

.form-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(107, 124, 89, 0.15);
}

.form-input.is-invalid {
  border-color: var(--color-error);
}

.form-input.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-error {
  font-size: 0.8rem;
  color: var(--color-error);
}

.form-trust {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  text-align: center;
  margin-top: 12px;
  line-height: 1.5;
}

.form-trust strong {
  color: var(--color-text);
}

/* Form Success State */
.form-success {
  text-align: center;
  padding: 24px 0;
}

.form-success__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #dcfce7;
  color: var(--color-success);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  animation: scaleIn 0.3s ease;
}

.form-success__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.form-success__text {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}

/* Form Error State */
.form-error-state {
  text-align: center;
  padding: 16px 0;
}

.form-error-state__text {
  font-size: 0.95rem;
  color: var(--color-error);
  margin-bottom: 12px;
}

/* ---------- Benefits Section ---------- */
.benefits {
  padding: 80px 0;
}

.benefits__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  text-align: center;
}

.benefits__inner .section__title {
  margin-bottom: 40px;
}

.benefits__list {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.benefit {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.benefit__icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.benefit__content {
  flex: 1;
}

.benefit__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.benefit__desc {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ---------- Audience Section ---------- */
.audience {
  padding: 80px 0;
  background: var(--color-accent-light);
}

.audience__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  text-align: center;
}

.audience__inner .section__title {
  margin-bottom: 32px;
}

.audience__list {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.audience__item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 1.05rem;
  line-height: 1.6;
}

.audience__check {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ---------- About Section ---------- */
.about {
  padding: 80px 0;
}

.about__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  text-align: center;
}

.about__inner .section__title {
  margin-bottom: 32px;
}

.about__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.about__photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--color-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__photo-placeholder {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent);
}

.about__bio {
  text-align: left;
  max-width: 560px;
}

.about__bio p {
  margin-bottom: 12px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.about__bio p:last-child {
  margin-bottom: 0;
  color: var(--color-text);
  font-weight: 600;
}

/* ---------- Final CTA Section ---------- */
.final-cta {
  padding: 80px 0;
  background: var(--color-accent-light);
}

.final-cta__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  text-align: center;
}

.final-cta__subtitle {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
  line-height: 1.6;
}

/* ---------- Footer ---------- */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--color-border);
}

.footer__inner {
  text-align: center;
}

.footer__links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.footer__links a {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  transition: color var(--transition);
}

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

.footer__divider {
  color: var(--color-border);
  font-size: 0.875rem;
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

/* ---------- Animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in--delay-1 {
  animation-delay: 0.15s;
}

.fade-in--delay-2 {
  animation-delay: 0.3s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ---------- Spinner ---------- */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .hero {
    padding: 110px 0 56px;
  }

  .benefits,
  .audience,
  .about,
  .final-cta {
    padding: 56px 0;
  }

  .benefit {
    gap: 12px;
  }

  .benefit__icon {
    width: 32px;
    height: 32px;
    font-size: 1.25rem;
  }

  .about__photo {
    width: 96px;
    height: 96px;
  }

  .about__photo-placeholder {
    font-size: 1.5rem;
  }
}
