@import "tokens.css";

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap");

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul[role="list"] { list-style: none; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; }
h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); font-weight: 600; }
h3 { font-size: clamp(1.05rem, 2.5vw, 1.3rem); font-weight: 600; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ===== LAYOUT ===== */
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 4rem 0; }
.section--alt { background: color-mix(in srgb, var(--color-primary) 5%, var(--color-bg)); }
.section--dark {
  background: color-mix(in srgb, var(--color-primary) 92%, #000);
  color: #fff;
}
.section--dark h2, .section--dark h3 { color: var(--color-secondary); }

/* ===== HEADER / NAV ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav__logo { display: flex; align-items: center; }
.nav__logo img { height: 40px; width: auto; }
.nav__links {
  display: none;
  list-style: none;
  gap: 1.5rem;
}
.nav__links a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .875rem;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--color-primary);
  border-bottom-color: var(--color-secondary);
}
.nav__burger {
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform .3s, opacity .3s;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav__mobile {
  display: none;
  background: var(--color-bg);
  border-top: 1px solid rgba(0,0,0,.08);
  padding: 1rem 1.25rem 1.5rem;
}
.nav__mobile.is-open { display: block; }
.nav__mobile ul { list-style: none; display: flex; flex-direction: column; gap: .25rem; }
.nav__mobile a {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
  padding: .65rem 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
  transition: color .2s;
}
.nav__mobile a:hover { color: var(--color-primary); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  padding: .75rem 1.75rem;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .2s, color .2s, transform .15s, box-shadow .2s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.btn--primary { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.btn--primary:hover { background: color-mix(in srgb, var(--color-primary) 82%, #000); }
.btn--secondary { background: var(--color-secondary); color: var(--color-text); border-color: var(--color-secondary); }
.btn--secondary:hover { background: color-mix(in srgb, var(--color-secondary) 82%, #000); }
.btn--outline { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn--outline:hover { background: var(--color-primary); color: #fff; }

/* ===== HERO ===== */
.hero { padding: 3.5rem 0 3rem; }
.hero__inner { display: grid; gap: 2rem; }
.hero__content { display: flex; flex-direction: column; gap: 1.25rem; }
.hero__tag {
  display: inline-block;
  background: var(--color-secondary);
  color: var(--color-text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .3rem .8rem;
  border-radius: 4px;
  width: fit-content;
}
.hero__title { color: var(--color-primary); }
.hero__intro { font-size: 1.05rem; line-height: 1.7; color: color-mix(in srgb, var(--color-text) 80%, #888); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.hero__rating { display: flex; align-items: center; gap: .4rem; font-size: .9rem; font-weight: 600; }

/* ===== STARS ===== */
.stars { color: var(--color-secondary); letter-spacing: .05em; }

/* ===== PAGE HEADER ===== */
.page-header {
  background: color-mix(in srgb, var(--color-primary) 6%, var(--color-bg));
  padding: 3rem 0 2rem;
  border-bottom: 1px solid color-mix(in srgb, var(--color-primary) 15%, transparent);
}
.page-header h1 { color: var(--color-primary); margin-bottom: .5rem; }
.page-header p { font-size: 1.05rem; color: color-mix(in srgb, var(--color-text) 75%, #888); }

/* ===== SECTION TITLES ===== */
.section__header { text-align: center; margin-bottom: 3rem; }
.section__header h2 { color: var(--color-primary); margin-bottom: .5rem; }
.section__lead { font-size: 1.05rem; color: color-mix(in srgb, var(--color-text) 70%, #888); max-width: 600px; margin: 0 auto; }

/* ===== CARDS ===== */
.cards { display: grid; gap: 1.5rem; }
.card {
  background: var(--color-bg);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: box-shadow .2s, transform .2s;
}
.card:hover {
  box-shadow: 0 6px 20px color-mix(in srgb, var(--color-primary) 16%, transparent);
  transform: translateY(-2px);
}
.card__icon { font-size: 2rem; margin-bottom: .75rem; }
.card h3 { color: var(--color-primary); margin-bottom: .5rem; }
.card p { color: color-mix(in srgb, var(--color-text) 80%, #888); font-size: .95rem; }
.card ul { padding-left: 1.1rem; color: color-mix(in srgb, var(--color-text) 78%, #888); font-size: .93rem; }
.card ul li { margin-bottom: .3rem; }

/* ===== FEATURES (atouts) ===== */
.features { display: grid; gap: 2rem; }
.feature { display: flex; gap: 1rem; align-items: flex-start; }
.feature__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: color-mix(in srgb, var(--color-primary) 10%, var(--color-bg));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.feature h3 { color: var(--color-primary); margin-bottom: .3rem; }
.feature p { font-size: .95rem; color: color-mix(in srgb, var(--color-text) 78%, #888); }

/* ===== REVIEWS ===== */
.reviews__meta { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.reviews__badge {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--color-bg);
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 8px;
  padding: .6rem 1.1rem;
  font-weight: 600;
  font-size: .9rem;
  color: var(--color-text);
  transition: box-shadow .2s;
}
.reviews__badge:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.reviews__grid { display: grid; gap: 1.25rem; }
.review-card {
  background: var(--color-bg);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
}
.review-card__header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .5rem; }
.review-card__author { font-weight: 600; font-size: .95rem; }
.review-card__date { font-size: .8rem; color: color-mix(in srgb, var(--color-text) 55%, #888); }
.review-card .stars { margin-bottom: .6rem; }
.review-card__text { font-size: .93rem; line-height: 1.6; color: color-mix(in srgb, var(--color-text) 78%, #888); }
.reviews__attribution { text-align: center; margin-top: 1.5rem; font-size: .82rem; color: color-mix(in srgb, var(--color-text) 55%, #888); }
.reviews__attribution a { color: var(--color-primary); }

/* ===== CONTACT ===== */
.contact-grid { display: grid; gap: 2.5rem; }
.contact-info { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-item { display: flex; gap: .75rem; align-items: flex-start; }
.contact-item__icon { flex-shrink: 0; font-size: 1.4rem; margin-top: .1rem; }
.contact-item strong {
  display: block;
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .2rem;
}
.contact-item a { color: var(--color-primary); font-weight: 600; }
.contact-item a:hover { text-decoration: underline; }

/* ===== FORM ===== */
.form { display: flex; flex-direction: column; gap: 1rem; }
.form__row { display: grid; gap: 1rem; }
.form__field { display: flex; flex-direction: column; gap: .35rem; }
.form__field label { font-size: .9rem; font-weight: 600; color: color-mix(in srgb, var(--color-text) 85%, #888); }
.form__field input,
.form__field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: .65rem .9rem;
  border: 1.5px solid rgba(0,0,0,.18);
  border-radius: 6px;
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color .2s, box-shadow .2s;
}
.form__field input:focus,
.form__field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent);
}
.form__field textarea { resize: vertical; min-height: 120px; }
.form__rgpd { font-size: .82rem; color: color-mix(in srgb, var(--color-text) 55%, #888); line-height: 1.55; }

/* ===== MAP ===== */
.map-wrapper { border-radius: 12px; overflow: hidden; border: 1px solid rgba(0,0,0,.1); margin-top: 2rem; }
.map-wrapper iframe { display: block; width: 100%; height: 320px; border: none; }

/* ===== FOOTER ===== */
.site-footer {
  background: color-mix(in srgb, var(--color-primary) 7%, var(--color-bg));
  border-top: 3px solid var(--color-primary);
  padding: 3rem 0 1.5rem;
}
.footer__grid { display: grid; gap: 2rem; margin-bottom: 2rem; }
.footer__brand { display: flex; flex-direction: column; gap: .75rem; }
.footer__tagline { font-size: .9rem; color: color-mix(in srgb, var(--color-text) 65%, #888); font-style: italic; }
.footer__heading {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: .75rem;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.footer__links { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.footer__links a { font-size: .9rem; color: color-mix(in srgb, var(--color-text) 70%, #888); transition: color .2s; }
.footer__links a:hover { color: var(--color-primary); }
.footer__address { font-size: .9rem; color: color-mix(in srgb, var(--color-text) 68%, #888); line-height: 1.65; }
.footer__address a { color: var(--color-primary); font-weight: 600; }
.footer__bottom {
  border-top: 1px solid rgba(0,0,0,.08);
  padding-top: 1.25rem;
  text-align: center;
  font-size: .82rem;
  color: color-mix(in srgb, var(--color-text) 50%, #888);
}

/* ===== VISUAL PLACEHOLDERS ===== */
.visual-placeholder {
  display: block;
  width: 100%;
  border-radius: 8px;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--color-primary) 22%, var(--color-bg)) 0%,
      color-mix(in srgb, var(--color-primary) 10%, var(--color-bg)) 55%,
      color-mix(in srgb, var(--color-secondary) 18%, var(--color-bg)) 100%
    );
}
.visual-placeholder[data-aspect="4:3"]  { aspect-ratio: 4 / 3; }
.visual-placeholder[data-aspect="1:1"]  { aspect-ratio: 1 / 1; }
.visual-placeholder[data-aspect="3:4"]  { aspect-ratio: 3 / 4; }
.visual-placeholder[data-aspect="21:9"] { aspect-ratio: 21 / 9; }
.visual-placeholder[data-tone="secondary"] {
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--color-secondary) 22%, var(--color-bg)) 0%,
      color-mix(in srgb, var(--color-secondary) 10%, var(--color-bg)) 55%,
      color-mix(in srgb, var(--color-primary) 16%, var(--color-bg)) 100%
    );
}
.visual-placeholder[data-tone="accent"] {
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--color-accent, var(--color-primary)) 22%, var(--color-bg)) 0%,
      color-mix(in srgb, var(--color-primary) 12%, var(--color-bg)) 60%,
      color-mix(in srgb, var(--color-secondary) 16%, var(--color-bg)) 100%
    );
}
.visual-placeholder[data-tone="muted"] {
  background: color-mix(in srgb, var(--color-text) 8%, var(--color-bg));
}

/* ===== TABLET 640px ===== */
@media (min-width: 640px) {
  .nav__burger { display: none; }
  .nav__links { display: flex; }
  .hero__inner { grid-template-columns: 1fr 1fr; align-items: center; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .reviews__grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .form__row { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: repeat(3, 1fr); }
  .map-wrapper iframe { height: 380px; }
}

/* ===== DESKTOP 1024px ===== */
@media (min-width: 1024px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .reviews__grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== REDUCED-MOTION GUARD (WCAG 2.3.1) ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ===== ANIMATION PASS — WEB-1220 ===== */
@media (prefers-reduced-motion: no-preference) {

  /* ─── 1. Hero section entrance (page-load, staggered) ─── */
  @keyframes pa-fade-slide {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes pa-fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes pa-scale-in {
    from { opacity: 0; transform: scale(.97); }
    to   { opacity: 1; transform: none; }
  }

  .hero__tag    { animation: pa-fade-slide .45s ease both; }
  .hero__title  { animation: pa-fade-up .5s .08s ease both; }
  .hero__intro  { animation: pa-fade-up .5s .18s ease both; }
  .hero__cta    { animation: pa-fade-up .5s .28s ease both; }
  .hero__rating { animation: pa-fade-up .45s .36s ease both; }

  /* Hero placeholder: entrance then continuous shimmer */
  .hero .visual-placeholder {
    animation:
      pa-scale-in .65s .2s ease both,
      pa-shimmer  8s  .85s ease-in-out infinite;
  }

  /* ─── 2. Visual placeholder gradient shimmer ─── */
  @keyframes pa-shimmer {
    0%   { background-position: 0%   50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0%   50%; }
  }
  .visual-placeholder {
    background-size: 250% 250%;
    animation: pa-shimmer 8s ease-in-out infinite;
  }

  /* ─── 3. Section header scroll-driven reveal (CSS-native, safe for in-viewport elements) ─── */
  @keyframes pa-section-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
  }
  @supports (animation-timeline: view()) {
    .section__header {
      animation: pa-section-in .55s linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
  }

  /* ─── 4. Feature icon hover pulse ─── */
  .feature__icon {
    transition: transform .25s ease, background-color .25s ease;
  }
  .feature:hover .feature__icon {
    transform: scale(1.15) rotate(-4deg);
    background: color-mix(in srgb, var(--color-primary) 18%, var(--color-bg));
  }

  /* ─── 5. Animated underline on desktop nav ─── */
  .nav__links a {
    border-bottom-width: 0;
    padding-bottom: 3px;
    background-image: linear-gradient(var(--color-secondary), var(--color-secondary));
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: color .2s ease, background-size .3s ease;
  }
  .nav__links a:hover,
  .nav__links a[aria-current="page"] {
    background-size: 100% 2px;
  }

  /* ─── 6. Card reveal stagger ─── */
  .cards .card:nth-child(2),
  .reviews__grid .review-card:nth-child(2),
  .features .feature:nth-child(2) { transition-delay: 80ms; }
  .cards .card:nth-child(3),
  .reviews__grid .review-card:nth-child(3),
  .features .feature:nth-child(3) { transition-delay: 155ms; }
  .features .feature:nth-child(4) { transition-delay: 225ms; }

  /* ─── Focus ring enhancement ─── */
  :focus-visible {
    outline: 3px solid var(--color-secondary);
    outline-offset: 3px;
    border-radius: 3px;
  }
}
