/* ============================================================
   WebRevive - style.css
   A warm, earthy, professional design system
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --color-bg:         #FAF7F2;
  --color-espresso:   #2C1A0E;
  --color-terracotta: #C8622A;
  --color-text:       #1A1A1A;
  --color-warm-grey:  #6B6460;
  --color-card-grey:  #E8E4DE;

  /* Fonts */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --section-pad-y: clamp(4rem, 10vw, 8rem);
  --section-pad-x: clamp(1.25rem, 5vw, 3rem);
  --container-max: 1140px;

  /* Transitions */
  --transition-fast: 0.25s ease;
  --transition-med:  0.4s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* Prevent section headings from hiding behind sticky nav */
section[id] {
  scroll-margin-top: 80px;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul { list-style: none; }

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--section-pad-x);
}

/* --- Scroll-reveal animation --- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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


/* ============================================================
   1. NAVIGATION
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Scrolled state */
.site-nav.scrolled {
  background: var(--color-bg);
  box-shadow: 0 2px 24px rgba(44, 26, 14, 0.08);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-badge {
  width: 40px;
  height: 40px;
  background: var(--color-espresso);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.logo-badge .monogram {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-terracotta);
  letter-spacing: -0.5px;
}

.logo-badge .dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-terracotta);
}

.logo-wordmark {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 24px;
  line-height: 1;
}

.logo-wordmark .web {
  color: var(--color-terracotta);
}

.logo-wordmark .revive {
  color: var(--color-text);
}

/* When nav is NOT scrolled (over dark hero), wordmark "Revive" should be white */
.site-nav:not(.scrolled) .logo-wordmark .revive {
  color: #fff;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
}

.nav-links a.active {
  border-bottom: 2px solid var(--color-terracotta);
  padding-bottom: 4px;
}

.site-nav.scrolled .nav-links a {
  color: var(--color-warm-grey);
}

.site-nav.scrolled .nav-links a:hover,
.site-nav.scrolled .nav-links a.active {
  color: var(--color-text);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.site-nav.scrolled .hamburger span {
  background: var(--color-text);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    background: var(--color-espresso);
    transform: translateX(100%);
    transition: transform var(--transition-med);
    box-shadow: -4px 0 32px rgba(0, 0, 0, 0.3);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8) !important;
  }

  .nav-links a:hover,
  .nav-links a.active {
    color: #fff !important;
  }

  /* When mobile menu is open, hamburger lines always white */
  .hamburger.open span {
    background: #fff !important;
  }
}


/* ============================================================
   2. HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--color-espresso);
  overflow: hidden;
}

/* CSS-only textured background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 80%, rgba(200, 98, 42, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 80% 20%, rgba(200, 98, 42, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 800px 600px at 50% 50%, rgba(200, 98, 42, 0.05) 0%, transparent 80%),
    radial-gradient(circle 2px at 15% 25%, rgba(200, 98, 42, 0.15) 0%, transparent 100%),
    radial-gradient(circle 2px at 85% 75%, rgba(200, 98, 42, 0.12) 0%, transparent 100%),
    radial-gradient(circle 1.5px at 45% 10%, rgba(200, 98, 42, 0.1) 0%, transparent 100%),
    radial-gradient(circle 1.5px at 65% 90%, rgba(200, 98, 42, 0.1) 0%, transparent 100%);
  pointer-events: none;
}

/* Pulsing decorative circle */
.hero-circle {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  border: 1px solid rgba(200, 98, 42, 0.1);
  right: -100px;
  top: 50%;
  transform: translateY(-50%);
  animation: pulse 6s ease-in-out infinite;
  pointer-events: none;
}

.hero-circle::after {
  content: '';
  position: absolute;
  inset: 60px;
  border-radius: 50%;
  border: 1px solid rgba(200, 98, 42, 0.07);
  animation: pulse 6s ease-in-out infinite 1s;
}

@keyframes pulse {
  0%, 100% { transform: translateY(-50%) scale(1); opacity: 1; }
  50%      { transform: translateY(-50%) scale(1.06); opacity: 0.6; }
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 720px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: #fff;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--color-warm-grey);
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Buttons (shared) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.85rem 2rem;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast),
              border-color var(--transition-fast), transform var(--transition-fast);
}

.btn:hover {
  transform: translateY(-2px);
}

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

.btn-primary:hover {
  background: #b5551f;
  border-color: #b5551f;
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
  border-color: #fff;
}


/* ============================================================
   3. PROBLEM SECTION
   ============================================================ */
.problems {
  padding: var(--section-pad-y) 0;
  background: var(--color-bg);
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--color-warm-grey);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.problems-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.problem-card {
  background: #fff;
  border-radius: 12px;
  padding: 2.5rem 2rem;
  border-top: 4px solid var(--color-terracotta);
  box-shadow: 0 2px 20px rgba(44, 26, 14, 0.05);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.problem-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(44, 26, 14, 0.1);
}

.problem-card .icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.5rem;
}

.problem-card .icon svg {
  width: 48px;
  height: 48px;
}

.problem-card p {
  font-size: 1.05rem;
  color: var(--color-text);
  line-height: 1.7;
}

@media (max-width: 900px) {
  .problems-grid { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; }
}


/* ============================================================
   4. HOW IT WORKS SECTION
   ============================================================ */
.how-it-works {
  padding: var(--section-pad-y) 0;
  background: var(--color-bg);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
}

/* Connector line (desktop) */
.steps::before {
  content: '';
  position: absolute;
  top: 40px;
  left: calc(12.5% + 1rem);
  right: calc(12.5% + 1rem);
  height: 2px;
  background: var(--color-card-grey);
  z-index: 0;
}

.step {
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-number {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 700;
  color: var(--color-terracotta);
  opacity: 0.2;
  line-height: 1;
  margin-bottom: 1rem;
}

.step h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.step p {
  font-size: 0.95rem;
  color: var(--color-warm-grey);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .steps {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
    gap: 2.5rem;
  }
  .steps::before { display: none; }
}


/* ============================================================
   5. PORTFOLIO / WORK SECTION
   ============================================================ */
.work {
  padding: var(--section-pad-y) 0;
  background: #fff;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 1.25rem;
}

.work-card {
  background: var(--color-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 20px rgba(44, 26, 14, 0.05);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(44, 26, 14, 0.1);
}

.work-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 200px;
}

.panel-before {
  background: var(--color-card-grey);
  border: 2px dashed #C5C0B8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--color-warm-grey);
  font-weight: 500;
  margin: 12px 6px 12px 12px;
  border-radius: 8px;
}

.panel-after {
  background: rgba(200, 98, 42, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #fff;
  font-weight: 600;
  position: relative;
  margin: 12px 12px 12px 6px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(200, 98, 42, 0.18), rgba(200, 98, 42, 0.08));
}

.panel-after .watermark {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 0.6rem;
  color: rgba(200, 98, 42, 0.4);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.panel-after .label {
  color: var(--color-terracotta);
  font-weight: 600;
}

.work-card-info {
  padding: 1.25rem 1.5rem;
}

.work-card-info h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.work-card-info p {
  font-size: 0.9rem;
  color: var(--color-warm-grey);
  font-style: italic;
}

.work-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-warm-grey);
  font-style: italic;
  margin-bottom: 2.5rem;
}

.work-cta {
  text-align: center;
}

.work-cta p {
  font-size: 1.1rem;
  color: var(--color-text);
  margin-bottom: 1rem;
}

@media (max-width: 1024px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .work-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto 1.25rem; }
}


/* ============================================================
   6. PRICING SECTION
   ============================================================ */
.pricing {
  padding: var(--section-pad-y) 0;
  background: var(--color-espresso);
}

.pricing .section-header h2 {
  color: #fff;
}

.pricing .section-header p {
  color: rgba(255, 255, 255, 0.6);
}

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 780px;
  margin: 0 auto 2.5rem;
}

.pricing-card {
  background: var(--color-bg);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  transition: transform var(--transition-fast);
}

.pricing-card:hover {
  transform: translateY(-4px);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-terracotta);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.pricing-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--color-warm-grey);
  margin-bottom: 0.5rem;
}

.pricing-amount {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.pricing-term {
  font-size: 0.9rem;
  color: var(--color-warm-grey);
  margin-bottom: 1.5rem;
}

.pricing-card ul {
  text-align: left;
}

.pricing-card li {
  font-size: 0.95rem;
  color: var(--color-text);
  padding: 0.45rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.pricing-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-terracotta);
  opacity: 0.5;
}

.pricing-callout {
  background: var(--color-terracotta);
  border-radius: 12px;
  padding: 2rem 2.5rem;
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.pricing-callout p {
  color: #fff;
  font-size: 1.1rem;
  line-height: 1.7;
  font-weight: 500;
}

@media (max-width: 640px) {
  .pricing-cards { grid-template-columns: 1fr; max-width: 400px; }
}


/* ============================================================
   7. TESTIMONIALS SECTION
   ============================================================ */
.testimonials {
  padding: var(--section-pad-y) 0;
  background: var(--color-bg);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.testimonial-card {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 20px rgba(44, 26, 14, 0.05);
}

.testimonial-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-espresso);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-terracotta);
  margin-bottom: 1.25rem;
}

.testimonial-card blockquote {
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  font-style: italic;
}

.testimonial-card cite {
  font-size: 0.85rem;
  color: var(--color-warm-grey);
  font-style: normal;
  font-weight: 500;
}

.testimonials-note {
  text-align: center;
  font-size: 14px;
  color: var(--color-warm-grey);
  font-style: italic;
  margin-top: 16px;
}

@media (max-width: 900px) {
  .testimonials-grid { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto 1.5rem; }
}


/* ============================================================
   8. CONTACT SECTION
   ============================================================ */
.contact {
  padding: var(--section-pad-y) 0;
  background: var(--color-espresso);
}

.contact .section-header h2 {
  color: #fff;
}

.contact .section-header p {
  color: var(--color-warm-grey);
}

.contact-form-wrapper {
  max-width: 580px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--color-bg);
  border: 2px solid transparent;
  border-radius: 8px;
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-espresso);
}

.form-group input.error,
.form-group textarea.error {
  border-color: var(--color-terracotta);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-error {
  font-size: 0.8rem;
  color: var(--color-terracotta);
  margin-top: 0.3rem;
  display: none;
}

.form-error.visible {
  display: block;
}

.btn-submit {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  margin-top: 0.5rem;
}

.form-success {
  text-align: center;
  padding: 2rem 1rem;
  display: none;
}

.form-success.visible {
  display: block;
}

.form-success p {
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.7;
}

.contact-alt {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.95rem;
  color: var(--color-warm-grey);
}

.contact-alt a {
  color: var(--color-terracotta);
  font-weight: 600;
  transition: opacity var(--transition-fast);
}

.contact-alt a:hover {
  opacity: 0.8;
}


/* ============================================================
   9. FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-espresso);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3rem 0 2rem;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

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

.footer-logo .logo-badge {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.footer-logo .logo-badge .monogram {
  font-size: 14px;
}

.footer-logo .logo-badge .dot {
  width: 4px;
  height: 4px;
  top: 5px;
  right: 5px;
}

.footer-logo .logo-wordmark {
  font-size: 18px;
}

.footer-logo .logo-wordmark .revive {
  color: rgba(255, 255, 255, 0.9);
}

.footer-nav {
  display: flex;
  gap: 2rem;
}

.footer-nav a {
  font-size: 0.9rem;
  color: var(--color-warm-grey);
  transition: color var(--transition-fast);
}

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

.footer-email {
  font-size: 0.9rem;
  color: var(--color-warm-grey);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  .footer-nav { gap: 1.25rem; }
}
