/* ============================================
   layout.css — Section spacing, grid,
   container, responsive rules
   ============================================ */
html {
  overflow-x: hidden;
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2rem);
}

/* ---------- Section ---------- */
.section {
  padding: clamp(3rem, 8vw, 6rem) 0;
}

/* ---------- Fluid Type ---------- */
.text-h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.text-h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
}

.text-h3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
}

.text-body {
  font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.text-small {
  font-size: clamp(0.75rem, 1.2vw, 0.875rem);
}

/* ---------- Navbar Layout ---------- */
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-availability {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #7b94ff;
  white-space: nowrap;
}

[data-theme="dark"] .nav-availability {
  color: var(--text-muted);
}

/* Mobile Menu */
.mobile-menu {
  display: flex;
  position: fixed;
  height: 100vh;
  width: 78vw;
  top: 0;
  right: 0;
  background-color: #0f1b61;
  padding-top: 96px;
  padding-left: 28px;
  padding-right: 24px;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  box-shadow: -10px 0 50px rgba(0, 0, 0, 0.3);
  z-index: 99;
  /* transform-based toggle enables smooth exit animation */
  transform: translateX(105%);
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 0.7s cubic-bezier(0.4, 0, 1, 1),
    visibility 0s linear 0.7s;
}

[data-theme="dark"] .mobile-menu {
  background-color: #080d30;
}

.mobile-menu.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition:
    transform 1.5s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 0s;
}

/* ── Scrolled state: menu matches floating navbar ── */
.navbar.scrolled .mobile-menu.open {
  top: 60px; /* sits just below the floating navbar */
  right: 5px; /* aligns with navbar's right edge */
  left: auto; /* detach from left */
  width: min(78vw);
  height: 100vh;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  border-radius: 1rem;
  padding-top: 1.25rem;

  /* Glassmorphism — matches navbar */
  background: rgba(15, 27, 97, 0.901);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .navbar.scrolled .mobile-menu.open {
  background-color: rgba(8, 13, 48, 0.9);
}

/* ---------- Hero Layout ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 160px;
  padding-bottom: 0;
  overflow: hidden;
  background: #0f1b61;
}

.hero-inner {
  position: relative;
  width: 100%;
  max-width: 900px;
  padding: 80px 32px;
  margin: 0 auto;
}

.hero-text-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-line--1 {
  font-family: "Playfair Display", serif;
  font-style: italic;
  width: fit-content !important;
  max-width: none;
  font-weight: 700;
  font-size: 78px;
  color: #0f1b61;
  line-height: 1.2;
  letter-spacing: -0.02em;
  white-space: nowrap;
  display: inline-block !important;
  position: relative;
  background-color: #ffffff;
  padding: 0 16px;
}

.hero-line--2 {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: 126px;
  text-transform: uppercase;
  color: #ffffff;
  line-height: 0.92;
  white-space: nowrap;
  display: block;
  position: relative;
}

.hero-line--3-wrap {
  position: relative;
  display: block;
}

.hero-line--3 {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: 126px;
  text-transform: uppercase;
  color: #ffffff;
  line-height: 0.88;
  white-space: nowrap;
  display: block;
  position: relative;
  z-index: 1;
}

.hero-line--3-stroke {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: 126px;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 3px #ffffff;
  line-height: 0.88;
  white-space: nowrap;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  pointer-events: none;
  user-select: none;
}

.hero-cta {
  position: relative;
  z-index: 5;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.hero-photo {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-45%);
  width: 500px;
  height: auto;
  object-fit: cover;
  object-position: top center;
  z-index: 3;
  pointer-events: none;
  display: block;
  filter: grayscale(100%);
}

/* ---------- Trust Banner ---------- */
.trust-banner {
  background: var(--bg-surface);
  padding: 2rem 0;
}

[data-theme="dark"] .trust-banner {
  background: var(--bg-primary);
}

.trust-banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.trust-heading {
  font-family: "Inter", sans-serif;
  font-size: clamp(0.78rem, 1.2vw, 0.9rem);
  font-weight: 400;
  color: var(--text-primary);
  white-space: nowrap;
}

.trust-countries {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: clamp(0.78rem, 1.2vw, 0.9rem);
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.trust-item .flag {
  font-size: 1.1em;
}

.trust-sep {
  color: var(--border);
  opacity: 0.6;
  font-size: 0.8rem;
}

/* ---------- About Layout ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

/* Brand color background for about section */
.about-brand {
  background: #0f1b61;
  position: relative;
}

/* About counters */
.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.75rem, 2vw, 1.25rem);
  margin-top: 2rem;
}

.about-stat {
  text-align: center;
  padding: 1.1rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  background-image: linear-gradient(
    135deg,
    var(--bg-surface) 0%,
    var(--accent-light) 100%
  );
}

.about-stat-number {
  font-family: "Inter", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.about-stat-label {
  font-size: clamp(0.65rem, 1vw, 0.78rem);
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.3;
}

/* ---------- Skills Grid ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  gap: 8px;
}
/* ---------- Portfolio Grid ---------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

/* ---------- Pricing Grid ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 1.5rem);
  align-items: stretch;
}

.standalone-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  margin-top: clamp(1rem, 2.5vw, 1.5rem);
}

.pricing-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.3rem 0;
}

.pricing-feature i {
  color: #22c55e;
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 1rem;
}

.pricing-price {
  font-family: "Inter", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-primary);
}

.price-highlight {
  color: var(--accent);
  font-weight: 700;
}

.pricing-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Testimonials Grid ---------- */
.testimonials-grid {
  columns: 4;
  column-gap: 16px;
}

/* ---------- Contact Layout ---------- */
.contact-brand {
  background: #0f1b61;
}

.contact-new-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

/* ---------- Footer ---------- */
.footer {
  background: linear-gradient(135deg, #0a1550 0%, #0f1b61 50%, #0a1550 100%);
  padding: clamp(1.5rem, 4vw, 2.5rem) 0;
  color: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] .footer {
  background: linear-gradient(135deg, #070c2e 0%, #0d1245 50%, #070c2e 100%);
}

.footer-simple {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}

/* ---------- Dark Mode Overrides ---------- */
[data-theme="dark"] .hero {
  background: #080d30;
}

[data-theme="dark"] #portfolio {
  background: #13152a !important;
}

[data-theme="dark"] .about-brand {
  background: #080d30;
}

[data-theme="dark"] .contact-brand {
  background: #080d30;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 480px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

/* ── HERO RESPONSIVE 1. Mobile (320px to 767px) ── */
@media (max-width: 767px) {
  .hero {
    padding-top: 60px;
    min-height: 600px;
  }

  .hero-inner {
    max-width: 370px;
    padding: 100px 16px;
  }

  .hero-line--1 {
    font-size: 40px;
  }

  .hero-line--2 {
    font-size: 52px;
    line-height: 1;
  }

  .hero-line--3 {
    font-size: 52px;
    line-height: 1;
  }

  .hero-line--3-stroke {
    font-size: 52px;
    line-height: 1;
    -webkit-text-stroke: 1px #ffffff;
  }

  .hero-photo {
    width: 350px;
    height: 500px;
    max-height: 500px;
    transform: translateX(-10%);
  }

  /* NAVBAR */
  .nav-links {
    display: none;
  }

  .nav-availability {
    font-size: 8px;
  }

  .nav-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .portfolio-grid .portfolio-card {
    grid-column: span 1 !important;
  }

  /* Mobile: 1 column */
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .standalone-cards {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials-grid {
    columns: 1;
  }

  .contact-new-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-form-row {
    grid-template-columns: 1fr;
  }

  .navbar.scrolled .mobile-menu.open {
    top: 60px; /* sits just below the floating navbar */
    right: 5px; /* aligns with navbar's right edge */
    left: auto; /* detach from left */
    width: min(80vw);
    height: 70vh;
    max-height: calc(100vh - 100px);
    justify-content: center;
  }
}

/* ── HERO 2. Tablet (768px to 1024px) ── */
/* Using min and max together prevents this from affecting mobile */
@media (min-width: 768px) and (max-width: 1024px) {
  .hero {
    display: flex;
    align-items: center;
    min-height: 550px;
    padding: 50px 0;
  }

  .hero-inner {
    max-width: 600px; /* From your "Perfect" tablet settings */
    padding: 0 32px;
  }

  .hero-line--1 {
    font-size: 3.5rem;
  }

  .hero-line--2,
  .hero-line--3,
  .hero-line--3-stroke {
    font-size: 5rem;
  }

  .hero-line--3-stroke {
    -webkit-text-stroke: 1px #ffffff;
  }

  .hero-photo {
    width: 350px;
    height: auto;
    left: 50%;
    transform: translateX(-20%);
    z-index: 3;
  }

  /* NAVBAR */
  .nav-links {
    display: none;
  }

  .nav-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .testimonials-grid {
    columns: 2;
  }

  .trust-banner-inner {
    flex-direction: column;
    gap: 0.5rem;
  }

  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .standalone-cards {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .pricing-feature {
    gap: 6px;
    font-size: 0.8rem;
  }

  .pricing-features-list {
    gap: 2px;
  }

  .pricing-btn {
    padding: 8px 0;
    font-size: 0.8rem;
  }

  .mobile-menu {
    width: 60vw;
  }

  .navbar.scrolled .mobile-menu.open {
    top: 60px; /* sits just below the floating navbar */
    right: 5px; /* aligns with navbar's right edge */
    left: auto; /* detach from left */
    width: min(70vw);
    height: 80vh;
    max-height: calc(100vh - 100px);
    justify-content: center;
  }

  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (min-width: 1440px) {
  .hero {
    display: flex;
    align-items: center;
    min-height: 800px;
    padding: 80px 0;
  }

  .hero-inner {
    max-width: 900px; /* From your "Perfect" tablet settings */
    padding: 0 32px;
  }

  .hero-line--1 {
    font-size: 78px;
  }

  .hero-line--2,
  .hero-line--3,
  .hero-line--3-stroke {
    font-size: 126px;
  }

  .hero-photo {
    width: 500px;
    height: auto;
    left: 50%;
    transform: translateX(-20%);
    z-index: 3;
  }
}
