/* ========================================
   Doc2Bid — Stylesheet
   ======================================== */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* --- Variables --- */
:root {
  --color-bg: #F5F2ED;
  --color-bg-alt: #EBE7E0;
  --color-surface: #FFFFFF;
  --color-text: #1A1A1A;
  --color-text-muted: #5C574F;
  --color-accent: #1B4965;
  --color-accent-light: #2A6F97;
  --color-accent-glow: rgba(27, 73, 101, 0.08);
  --color-border: #D6D1C9;
  --color-cta: #C45D2C;
  --color-cta-hover: #A84E25;
  --font-display: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --header-height: 72px;
  --max-width: 1200px;
  --radius: 10px;
  --radius-lg: 16px;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(245, 242, 237, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.06);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo img {
  height: 38px;
  width: auto;
}

.header-logo span {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  white-space: nowrap;
}

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

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

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

.btn-primary:hover {
  background: var(--color-cta-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(196, 93, 44, 0.3);
}

/* --- Hero --- */
.hero {
  padding-top: calc(var(--header-height) + 6vh);
  padding-bottom: 60px;
  min-height: auto;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 56px;
  align-items: center;
}

.hero-text {
  animation: fadeInUp 0.7s ease both;
}

.hero-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-glow);
  padding: 6px 14px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: 22px;
}

.hero-heading em {
  font-style: normal;
  color: var(--color-accent);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-cta-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-video {
  animation: fadeInUp 0.7s 0.15s ease both;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--color-border);
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- How It Works --- */
.how-it-works {
  padding: 80px 0;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 620px;
  line-height: 1.65;
  margin-bottom: 48px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.step-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.07);
}

.step-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-accent);
  opacity: 0.18;
  line-height: 1;
  margin-bottom: 16px;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--color-text);
}

.step-body {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- Why Section --- */
.why-section {
  padding: 80px 0;
  background: var(--color-bg-alt);
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.why-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.why-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.why-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--color-accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.why-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.why-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text);
}

.why-body {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- CTA Banner --- */
.cta-banner {
  padding: 80px 0;
}

.cta-card {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

.cta-card-inner {
  background: var(--color-accent);
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-card-inner::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.cta-heading {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  position: relative;
  letter-spacing: -0.02em;
}

.cta-sub {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 32px;
  position: relative;
}

.btn-white {
  background: #fff;
  color: var(--color-accent);
  font-weight: 700;
  position: relative;
}

.btn-white:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* --- Footer --- */
.site-footer {
  background: #1A1A1A;
  color: #B8B3AB;
  padding: 56px 0 32px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #918C84;
  margin-top: 14px;
  max-width: 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo img {
  height: 32px;
  width: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.footer-logo span {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.footer-section-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.9rem;
  color: #918C84;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
}

.footer-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 24px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: #6B665E;
}

/* --- Modal Overlay --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  position: relative;
  background: #EFF2F7;
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  color: #3C4858;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 1;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.12);
}

/* Ensure Brevo form fills modal naturally */
.modal-container .sib-form {
  background-color: transparent !important;
}

.modal-container .sib-container--large {
  border: none !important;
  max-width: 100% !important;
}

/* Lock body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-text {
    text-align: center;
  }

  .hero-sub {
    max-width: 100%;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 600px) {
  :root {
    --header-height: 62px;
  }

  .header-logo img {
    height: 30px;
  }

  .header-logo span {
    font-size: 1.1rem;
  }

  .btn {
    font-size: 0.84rem;
    padding: 9px 16px;
  }

  .hero {
    padding-top: calc(var(--header-height) + 4vh);
    padding-bottom: 40px;
  }

  .hero-heading {
    font-size: 1.7rem;
  }

  .cta-card-inner {
    padding: 40px 24px;
  }

  .modal-container {
    padding: 24px 16px;
    max-height: 95vh;
  }

  .modal-container .sib-form-block p {
    font-size: 24px !important;
  }
}
