@import 'variables.css';

@font-face {
  font-family: 'Alfa Slab One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/alfa-slab-one.woff2') format('woff2');
}

/* =========================================================
   RESET & BASE
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-black);
  line-height: 1.7;
  background: var(--color-white);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* =========================================================
   LAYOUT
   ========================================================= */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.section          { padding: var(--space-16) 0; }
.section--large   { padding: var(--space-24) 0; }
.section--grey    { background: var(--color-light-grey); }
.section--blue    { background: var(--color-blue); color: var(--color-white); }
.section--yellow  { background: var(--color-yellow); }
.section--dark    { background: var(--color-black); color: var(--color-white); }

.section__header  { text-align: center; margin-bottom: var(--space-12); }
.section__eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-blue-mid);
  margin-bottom: var(--space-3);
}
.section--blue   .section__eyebrow,
.section--dark   .section__eyebrow { color: var(--color-yellow); }
.section--yellow .section__eyebrow { color: var(--color-blue); }

.section__title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-blue);
  line-height: 1.2;
  margin-bottom: var(--space-4);
}
.section--blue .section__title,
.section--dark .section__title { color: var(--color-white); }
.section--yellow .section__title { color: var(--color-blue); }

.section__subtitle {
  font-size: var(--text-lg);
  color: var(--color-dark-grey);
  max-width: 640px;
  margin: 0 auto;
}
.section--blue .section__subtitle,
.section--dark .section__subtitle { color: rgba(255, 255, 255, 0.8); }

/* =========================================================
   TYPOGRAPHY
   ========================================================= */

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-blue);
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: var(--text-lg);
  color: var(--color-dark-grey);
  line-height: 1.8;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--btn-padding-y) var(--btn-padding-x);
  border-radius: var(--btn-radius);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all var(--transition-base);
  white-space: nowrap;
  border: 2px solid transparent;
}

.btn--primary {
  background: var(--color-yellow);
  color: var(--color-blue);
  border-color: var(--color-yellow);
}
.btn--primary:hover {
  background: var(--color-yellow-dark);
  border-color: var(--color-yellow-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245, 197, 24, 0.35);
}

.btn--secondary {
  background: transparent;
  color: var(--color-blue);
  border-color: var(--color-blue);
}
.btn--secondary:hover {
  background: var(--color-blue);
  color: var(--color-white);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}
.btn--ghost:hover {
  background: var(--color-white);
  color: var(--color-blue);
  transform: translateY(-1px);
}

.btn--sm {
  padding: 0.5rem 1.25rem;
  font-size: var(--text-xs);
}

.btn--lg {
  padding: 1rem 2.5rem;
  font-size: var(--text-base);
}

/* =========================================================
   CARDS
   ========================================================= */

.card {
  background: var(--color-white);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: var(--card-padding);
  transition: all var(--transition-base);
  border-left: 4px solid transparent;
}
.card:hover {
  box-shadow: var(--card-shadow-hover);
  border-left-color: var(--color-yellow);
  transform: translateY(-2px);
}

.card__icon {
  width: 52px;
  height: 52px;
  background: var(--color-blue-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  color: var(--color-blue);
}
.card__icon ph-icon,
.card__icon [data-ph-icon] { font-size: 1.5rem; }

.card__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-blue);
  margin-bottom: var(--space-3);
}

.card__text {
  color: var(--color-dark-grey);
  font-size: var(--text-base);
  margin-bottom: var(--space-4);
}

.card__link {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-blue-mid);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: gap var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.card__link:hover { gap: var(--space-3); color: var(--color-blue); }

/* =========================================================
   GRIDS
   ========================================================= */

.grid--2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-8); }
.grid--3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8); }
.grid--4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }

@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid--2 { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: 1fr; }
}

/* =========================================================
   PAGE HERO
   ========================================================= */

.page-hero {
  background: var(--color-blue);
  padding: calc(var(--nav-height) + var(--space-16)) 0 var(--space-16);
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  /* Split the accent bar: yellow on the left, red on the right — both brand colours represented */
  background: linear-gradient(to right, var(--color-yellow) 50%, var(--color-red) 50%);
}

.page-hero__title {
  color: var(--color-white);
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
}

.page-hero__subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-lg);
  max-width: 600px;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: var(--space-6);
}
.breadcrumb a { color: rgba(255, 255, 255, 0.75); transition: color var(--transition-fast); }
.breadcrumb a:hover { color: var(--color-yellow); }
.breadcrumb__sep { color: rgba(255, 255, 255, 0.4); }
.breadcrumb__current { color: var(--color-yellow); }

/* =========================================================
   NAVIGATION
   ========================================================= */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background var(--transition-base), box-shadow var(--transition-base);
  background: transparent;
}

.nav.scrolled {
  background: var(--color-white);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
  border-top: 3px solid var(--color-red);
  border-bottom: 1px solid var(--color-border);
}

.nav--solid {
  background: var(--color-white);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
  border-top: 3px solid var(--color-red);
  border-bottom: 1px solid var(--color-border);
}

/* Transparent nav state (homepage pre-scroll) — dark scrim + white glow keeps blue links readable */
.nav:not(.scrolled):not(.nav--solid) {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, transparent 100%);
}
.nav:not(.scrolled):not(.nav--solid) .nav__link,
.nav:not(.scrolled):not(.nav--solid) .nav__dropdown-toggle {
  text-shadow: 0 1px 6px rgba(255, 255, 255, 0.8);
}
.nav:not(.scrolled):not(.nav--solid) .nav__link:hover,
.nav:not(.scrolled):not(.nav--solid) .nav__dropdown-toggle:hover {
  color: var(--color-yellow);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
  padding: 0 var(--space-2);
}

.nav__logo img,
.nav__logo svg {
  height: 44px;
  width: auto;
}

.nav__brand {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.nav__brand-main {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--color-blue);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav__brand-sub {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: var(--text-xs);
  color: var(--color-blue);
  letter-spacing: 0.02em;
}

.nav:not(.scrolled):not(.nav--solid) .nav__brand-main,
.nav:not(.scrolled):not(.nav--solid) .nav__brand-sub {
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav__link {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-blue);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--btn-radius);
  transition: all var(--transition-fast);
  position: relative;
}
.nav__link:hover { color: var(--color-yellow-dark); }

.nav__link.active {
  color: var(--color-blue);
}

/* Services dropdown */
.nav__dropdown { position: relative; }

.nav__dropdown-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav__dropdown-menu {
  position: absolute;
  top: calc(100% + var(--space-3));
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-white);
  border-radius: var(--card-radius);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  min-width: 560px;
  padding: var(--space-6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  border-top: 3px solid var(--color-yellow);
}

/* Bridge the gap between the toggle and the dropdown panel so
   mouseleave is not fired while the cursor crosses the spacing */
.nav__dropdown-menu::before {
  content: '';
  position: absolute;
  top: calc(-1 * var(--space-3) - 4px);
  left: 0;
  right: 0;
  height: calc(var(--space-3) + 4px);
}

.nav__dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: 6px;
  color: var(--color-dark-grey);
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
}
.nav__dropdown-item:hover {
  background: var(--color-blue-light);
  color: var(--color-blue);
}
.nav__dropdown-item .icon {
  color: var(--color-blue-mid);
  flex-shrink: 0;
}

.nav__cta { margin-left: var(--space-4); }

.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  cursor: pointer;
  padding: 0;
}
.nav__hamburger span {
  display: block;
  height: 2px;
  background: var(--color-blue);
  border-radius: 2px;
  transition: all var(--transition-base);
}

/* Mobile nav */
.nav__mobile {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-blue);
  overflow-y: auto;
  padding: var(--space-8) var(--container-pad);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  z-index: 999;
}

.nav__mobile-link {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  padding: var(--space-4) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__mobile-sub {
  padding: var(--space-2) 0 var(--space-2) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.nav__mobile-sub a {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-2) 0;
  transition: color var(--transition-fast);
}
.nav__mobile-sub a:hover { color: var(--color-yellow); }

@media (max-width: 1024px) {
  .nav__links  { display: none; }
  .nav__cta    { display: none; }
  .nav__hamburger { display: flex; }
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  background: var(--color-blue);
  color: var(--color-white);
  padding: var(--space-16) 0 0;
  /* Red top border mirrors the page-hero accent stripe — bookends the page with the same
     brand accent that appears at the top, tying the footer back to the logo's red. */
  border-top: 4px solid var(--color-red);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer__logo { height: 60px; width: auto; margin-bottom: var(--space-4); }

.footer__tagline {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-base);
  margin-bottom: var(--space-6);
  line-height: 1.6;
}

.footer__heading {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-yellow);
  margin-bottom: var(--space-4);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer__links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.footer__links a:hover { color: var(--color-yellow); }

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-sm);
  line-height: 1.5;
}
.footer__contact-item .icon { flex-shrink: 0; margin-top: 2px; color: var(--color-yellow); }

.footer__socials {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.footer__social {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--transition-fast);
  font-size: 1rem;
}
.footer__social:hover {
  border-color: var(--color-yellow);
  color: var(--color-yellow);
  background: rgba(245, 197, 24, 0.1);
}

.footer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) 0;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.45);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer__bar a { color: rgba(255, 255, 255, 0.6); transition: color var(--transition-fast); }
.footer__bar a:hover { color: var(--color-yellow); }

@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer__grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer__bar  { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   WHATSAPP FLOATING BUTTON
   ========================================================= */

.whatsapp-float {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  z-index: 900;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  font-size: 1.75rem;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.65);
}
.whatsapp-float .tooltip {
  position: absolute;
  right: calc(100% + var(--space-3));
  background: var(--color-black);
  color: var(--color-white);
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-3);
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}
.whatsapp-float:hover .tooltip { opacity: 1; }

@media (max-width: 600px) {
  .whatsapp-float { bottom: var(--space-6); right: var(--space-4); }
}

/* =========================================================
   UTILITIES
   ========================================================= */

.text-center  { text-align: center; }
.text-yellow  { color: var(--color-yellow); }
.text-blue    { color: var(--color-blue); }
.text-muted   { color: var(--color-mid-grey); }
.text-white   { color: var(--color-white); }

.mt-auto { margin-top: auto; }
.mt-4    { margin-top: var(--space-4); }
.mt-6    { margin-top: var(--space-6); }
.mt-8    { margin-top: var(--space-8); }
.mt-12   { margin-top: var(--space-12); }
.mb-4    { margin-bottom: var(--space-4); }
.mb-6    { margin-bottom: var(--space-6); }
.mb-8    { margin-bottom: var(--space-8); }

.flex          { display: flex; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.gap-4         { gap: var(--space-4); }
.gap-6         { gap: var(--space-6); }
.gap-8         { gap: var(--space-8); }
.flex-wrap     { flex-wrap: wrap; }

.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;
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 3px solid var(--color-yellow);
  outline-offset: 2px;
  border-radius: 2px;
}

/* =========================================================
   ANIMATIONS (AOS fallback)
   ========================================================= */

[data-aos] { transition-duration: 600ms; }
