/* ============================================
   EquiBrief — "Paddock Editorial" Design System
   ============================================ */

:root {
  /* Colors — Primary */
  --color-primary: #0a7f5a;
  --color-primary-dark: #065a3e;
  --color-primary-deeper: #043d2a;
  --color-primary-light: #e8f5ef;
  --color-primary-mist: #f0f9f4;

  /* Colors — Accent */
  --color-accent-gold: #c9a84c;
  --color-accent-gold-light: #f5efd6;

  /* Colors — Neutrals */
  --color-bg: #fafaf8;
  --color-white: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #4a4a4a;
  --color-muted: #7a7a7a;
  --color-border: #e2e0db;
  --color-border-light: #f0eeea;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 7rem;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Border Radius */
  --radius: 8px;
  --radius-sm: 4px;
}

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

/* Base */
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--color-text);
}

h1 { font-size: 2.25rem; font-weight: 900; }
h2 { font-size: 1.75rem; font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 200ms ease;
}

a:hover {
  color: var(--color-primary-dark);
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

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

/* Containers */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ---- Navigation ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 2px solid var(--color-accent-gold);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.nav__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.nav__brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-primary-dark);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav__brand:hover {
  color: var(--color-primary);
}

.nav__links {
  display: flex;
  list-style: none;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.nav__link {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 200ms ease, border-color 200ms ease;
}

.nav__link:hover {
  color: var(--color-primary);
}

.nav__link--active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  background: linear-gradient(135deg, #065a3e 0%, #0a7f5a 50%, #12946a 100%);
  padding: var(--space-2xl) var(--space-md);
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.02) 0px,
    rgba(255, 255, 255, 0.02) 1px,
    transparent 1px,
    transparent 12px
  );
  pointer-events: none;
}

.hero__content {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--color-white);
  margin-bottom: var(--space-sm);
  line-height: 1.2;
}

.hero__subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.hero__dinkus {
  display: block;
  color: var(--color-accent-gold);
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  margin-bottom: var(--space-lg);
}

.hero__cta {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: 2px solid var(--color-white);
  border-radius: var(--radius);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background 250ms ease, color 250ms ease;
}

.hero__cta:hover {
  background: var(--color-white);
  color: var(--color-primary-dark);
}

/* ---- Sections ---- */
.section {
  padding: var(--space-xl) 0;
}

.section--mist {
  background-color: var(--color-primary-mist);
}

.section--light {
  background-color: var(--color-white);
}

.section__heading {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section__heading h2 {
  display: inline-block;
}

.section__heading h2::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background: var(--color-accent-gold);
  margin: var(--space-xs) auto 0;
}

/* ---- Feature Cards ---- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-primary);
  border-radius: var(--radius);
  padding: var(--space-md) var(--space-md) var(--space-lg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
  transition: box-shadow 250ms ease, transform 250ms ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

.card__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.card__title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

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

/* ---- Page Content ---- */
.page-header {
  text-align: center;
  padding: var(--space-xl) 0 var(--space-lg);
}

.page-header h1::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background: var(--color-accent-gold);
  margin: var(--space-xs) auto 0;
}

.prose {
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.prose h2 {
  color: var(--color-text);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.prose h2::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background: var(--color-accent-gold);
  margin-top: var(--space-xs);
}

.prose h3 {
  color: var(--color-text);
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
}

.prose p {
  margin-bottom: var(--space-sm);
}

.prose ul, .prose ol {
  margin-bottom: var(--space-sm);
  padding-left: var(--space-md);
}

.prose li {
  margin-bottom: var(--space-xs);
}

.prose--legal {
  font-size: 0.95rem;
}

/* ---- Contact Card ---- */
.contact-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius);
  padding: var(--space-lg);
  max-width: 480px;
  margin: 0 auto;
}

.contact-card dt {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  margin-bottom: 0.25rem;
}

.contact-card dd {
  margin-bottom: var(--space-md);
  font-size: 1.05rem;
}

.contact-card dd:last-child {
  margin-bottom: 0;
}

/* ---- CTA Section ---- */
.cta-section {
  text-align: center;
  padding: var(--space-lg);
  background: var(--color-primary-mist);
  border-radius: var(--radius);
  margin-top: var(--space-lg);
}

.cta-section p {
  color: var(--color-text-secondary);
  margin-top: var(--space-xs);
}

/* ---- Footer ---- */
.footer {
  background: var(--color-primary-dark);
  border-top: 2px solid var(--color-accent-gold);
  padding: var(--space-lg) var(--space-md);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '\265E';
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  font-size: 8rem;
  opacity: 0.04;
  color: var(--color-white);
  pointer-events: none;
}

.footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  text-align: center;
  position: relative;
}

.footer__links {
  display: flex;
  list-style: none;
  gap: var(--space-md);
}

.footer__links a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 200ms ease;
}

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

.footer__copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ---- Phone Mockup ---- */
.phone {
  position: relative;
  width: 220px;
  flex-shrink: 0;
  background: #111;
  border-radius: 32px;
  padding: 10px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.phone::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 22px;
  background: #111;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}

.phone__screen {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: var(--color-white);
  aspect-ratio: 9 / 19.5;
}

.phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

/* ---- App Preview (Homepage) ---- */
.app-preview {
  position: relative;
  padding: var(--space-xl) 0 var(--space-2xl);
  background: var(--color-white);
  overflow: hidden;
}

.app-preview__phones {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: var(--space-md);
  padding: 0 var(--space-md);
}

.app-preview__phones .phone--side {
  display: none;
}

.app-preview__phones .phone--center {
  width: 240px;
}

/* ---- Feature Showcase (Products) ---- */
.feature-showcase {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
  margin-bottom: var(--space-xl);
}

.feature-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.feature-row__phone {
  display: flex;
  justify-content: center;
}

.feature-row__content {
  max-width: 480px;
  text-align: center;
}

.feature-row__label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent-gold);
  margin-bottom: var(--space-xs);
}

.feature-row__title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  line-height: 1.2;
}

.feature-row__text {
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

.feature-row__bullets {
  list-style: none;
  padding: 0;
  margin-top: var(--space-sm);
}

.feature-row__bullets li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: var(--space-xs);
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

.feature-row__bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
}

/* ---- Responsive ---- */
@media (min-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2rem; }

  .hero { padding: var(--space-2xl) var(--space-md) calc(var(--space-2xl) + 1rem); }
  .hero__title { font-size: 3.25rem; }
  .hero__subtitle { font-size: 1.25rem; }

  .card-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

  /* App Preview — 3 phone fan */
  .app-preview__phones .phone--side {
    display: block;
    width: 190px;
    opacity: 0.85;
    margin-top: 2.5rem;
  }

  .app-preview__phones .phone--center {
    width: 250px;
  }

  /* Feature Showcase — alternating rows */
  .feature-row {
    flex-direction: row;
    gap: var(--space-xl);
    text-align: left;
  }

  .feature-row:nth-child(even) {
    flex-direction: row-reverse;
  }

  .feature-row__content {
    flex: 1;
    text-align: left;
  }

  .feature-row__title {
    font-size: 2rem;
  }

  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ---- Accessibility ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
