/**
 * Tomorhow Site - Main Styles
 * Production-grade frontend — faithful to prototype design system
 *
 * @package Tomorhow_Site
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  /* Colors — Tomorhow Brand */
  --color-primary: #e84c8a;
  --color-primary-dark: #d63a78;
  --color-primary-light: #f06a9e;
  --color-secondary: #2d9cdb;
  --color-secondary-light: #56b4e9;
  --color-accent-green: #27ae60;
  --color-accent-green-light: #6fcf97;
  --color-accent-orange: #f2994a;

  /* Neutrals */
  --color-dark: #000000;
  --color-dark-light: #333333;
  --color-text: #2d3748;
  --color-text-light: #718096;
  --color-white: #ffffff;
  --color-cream: #fdf8f5;
  --color-cream-dark: #f7ede8;

  /* Gradients */
  --gradient-primary: linear-gradient(
    135deg,
    #d63a78 0%,
    #e84c8a 50%,
    #f06a9e 100%
  );
  --gradient-blue: linear-gradient(
    135deg,
    #1a7bb9 0%,
    #2d9cdb 50%,
    #56b4e9 100%
  );
  --gradient-green: linear-gradient(
    135deg,
    #1e8449 0%,
    #27ae60 50%,
    #6fcf97 100%
  );
  --gradient-hero: linear-gradient(
    180deg,
    rgba(10, 22, 40, 0.7) 0%,
    rgba(10, 22, 40, 0.4) 100%
  );
  --gradient-card: linear-gradient(
    180deg,
    rgba(233, 30, 140, 0.05) 0%,
    rgba(233, 30, 140, 0) 100%
  );

  /* Typography */
  --font-heading:
    "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:
    "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Font Sizes — Desktop */
  --text-xs: 0.875rem;
  --text-sm: 1rem;
  --text-base: 1.125rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: 2.5rem;
  --text-4xl: 3.5rem;
  --text-5xl: 4.5rem;
  --text-hero: 6rem;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 8rem;
  --space-section: 10rem;

  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --radius-2xl: 3rem;
  --radius-full: 100px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
  --shadow-primary: 0 8px 30px rgba(233, 30, 140, 0.3);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --container-max: 1400px;
  --container-padding: 2rem;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

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

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-base);
}

ul,
ol {
  list-style: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.1;
  color: var(--color-dark);
}

/* ============================================
   WORDPRESS BLOCK ALIGNMENTS
   ============================================ */
.alignfull {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.alignwide {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   WORDPRESS BLOCK GAP RESET
   Kill default WP margins between top-level template blocks only
   ============================================ */
.wp-site-blocks > * + .wp-block-template-part,
.wp-site-blocks > .wp-block-template-part + *,
.wp-site-blocks > .wp-block-group + .wp-block-group {
  margin-top: 0;
}

.wp-site-blocks .wp-block-template-part > * + * {
  margin-top: 0;
}

/* Ensure no gap between hero and next section */
.wp-block-tomorhow-hero,
.wp-block-tomorhow-introduction,
.wp-block-tomorhow-services,
.wp-block-tomorhow-values,
.wp-block-tomorhow-expertise,
.wp-block-tomorhow-cta,
.wp-block-tomorhow-contact,
.wp-block-tomorhow-about,
.wp-block-tomorhow-team {
  margin-top: 0;
  margin-bottom: 0;
}

/* ============================================
   SHARED BUTTON STYLES
   ============================================ */
.tomorhow-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-sm);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
  position: relative;
  z-index: 1;
}

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

.tomorhow-btn--primary {
  padding: var(--space-sm) 2.5rem;
  background: var(--gradient-primary);
  color: var(--color-white);
}

.tomorhow-btn--primary:hover {
  box-shadow: var(--shadow-primary);
}

.tomorhow-btn--white {
  padding: var(--space-sm) 2.5rem;
  background-color: var(--color-white);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 2px solid var(--color-white);
  transition: all var(--transition-base);
}

.tomorhow-btn--white:hover {
  background-color: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.tomorhow-btn--lg {
  padding: 1.125rem 3rem;
  font-size: 1.0625rem;
}

.tomorhow-btn--full {
  width: 100%;
  justify-content: center;
}

.tomorhow-btn--dark {
  padding: 1rem 2rem;
  background-color: var(--color-dark);
  color: var(--color-white);
  border-color: var(--color-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tomorhow-btn--dark:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-primary);
}

.tomorhow-btn__icon {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-base);
}

.tomorhow-btn:hover .tomorhow-btn__icon {
  transform: translateX(4px);
}

/* ============================================
   ANIMATIONS — Intersection Observer driven
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
.delay-1 {
  transition-delay: 0.1s;
}
.delay-2 {
  transition-delay: 0.2s;
}
.delay-3 {
  transition-delay: 0.3s;
}
.delay-4 {
  transition-delay: 0.4s;
}
.delay-5 {
  transition-delay: 0.5s;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.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;
}

/* Footer styles now in blocks/footer/style.css */

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
.tomorhow-scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  font-size: 20px;
  z-index: 999;
  box-shadow: var(--shadow-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tomorhow-scroll-top.visible {
  opacity: 1;
  visibility: visible;
  bottom: 6rem;
}

.tomorhow-scroll-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(232, 76, 138, 0.5);
}

/* ============================================
   RESPONSIVE — Global font scale
   ============================================ */
@media (max-width: 1200px) {
  :root {
    --text-4xl: 2.5rem;
    --text-5xl: 3.5rem;
  }
}

@media (max-width: 768px) {
  :root {
    --text-4xl: 2rem;
    --text-3xl: 1.75rem;
    --text-5xl: 2.25rem;
  }

  .has-lg-font-size {
    font-size: 1.45rem !important;
  }
}

@media (max-width: 480px) {
  :root {
    --container-padding: 1.5rem;
    --space-section: 6rem;
  }

  .tomorhow-scroll-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* ============================================
   SINGLE OFFRE — Template Base
   ============================================ */

/* Hero */
.single-offre .offre-hero {
  background: var(--gradient-primary);
  padding: 10rem var(--container-padding) 7rem;
  text-align: center;
}

.single-offre .offre-hero__title {
  color: var(--color-white) !important;
  font-size: var(--text-4xl);
  font-weight: 800;
  line-height: 1.15;
  margin: 0;
}

/* Content prose */
.single-offre .offre-content {
  padding: var(--space-2xl) var(--container-padding) var(--space-3xl);
}

.single-offre .offre-content h2 {
  font-size: var(--text-3xl);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  color: var(--color-primary);
  position: relative;
  padding-bottom: 0.75rem;
}

.single-offre .offre-content h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.single-offre .offre-content h3 {
  font-size: var(--text-2xl);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  color: var(--color-dark);
}

.single-offre .offre-content h4 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
  color: var(--color-primary-dark);
}

.single-offre .offre-content p,
.single-offre .offre-content > span {
  line-height: 1.8;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.single-offre .offre-content ul,
.single-offre .offre-content ol {
  margin: var(--space-sm) 0 var(--space-md);
  padding-left: 0;
  list-style: none;
}

.single-offre .offre-content ul li,
.single-offre .offre-content ol li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.single-offre .offre-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
}

.single-offre .offre-content a:not(.btn):not(.wp-block-button__link) {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: rgba(232, 76, 138, 0.3);
  text-underline-offset: 3px;
}

.single-offre .offre-content a:not(.btn):not(.wp-block-button__link):hover {
  text-decoration-color: var(--color-primary);
}

/* Remove empty divs */
.single-offre .offre-content .entry-social:empty {
  display: none;
}

/* Pricing tables */
.single-offre .pricing-tables {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-lg);
}

.single-offre .pricing-card {
  background: var(--color-white);
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.single-offre .pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-light);
}

.single-offre .pricing-card .pricing-title {
  font-size: var(--text-xl);
  color: var(--color-dark);
  margin: 0 0 var(--space-xs);
  padding: 0;
}

.single-offre .pricing-card .pricing-title::after {
  display: none;
}

.single-offre .pricing-card .pricing-price {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

.single-offre .pricing-card .pricing-period {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-light);
}

.single-offre .pricing-card .pricing-features {
  flex: 1;
  margin-bottom: var(--space-md);
}

.single-offre .pricing-card .pricing-features li {
  font-size: var(--text-sm);
}

.single-offre .btn-pricing,
.single-offre .btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  background: var(--gradient-primary);
  color: var(--color-white) !important;
  font-weight: 700;
  font-size: var(--text-sm);
  border-radius: var(--radius-full);
  text-decoration: none !important;
  transition: all var(--transition-base);
  text-align: center;
}

.single-offre .btn-pricing:hover,
.single-offre .btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}

/* Bottom CTA — uses existing tomorhow-cta-section block */
.single-offre .tomorhow-cta-section {
  margin-top: var(--space-2xl);
}

/* CTA block is outside .offre-content — no overrides needed */

/* Responsive */
@media (max-width: 768px) {
  .single-offre .offre-hero {
    padding: 4rem var(--container-padding) 3rem;
  }

  .single-offre .offre-hero__title {
    font-size: var(--text-3xl);
  }

  .single-offre .pricing-tables {
    grid-template-columns: 1fr;
  }

  .single-offre .offre-content h2 {
    font-size: var(--text-2xl);
  }
}
