/* ============================================================
   RESPONSIVE - FLEX hönnun ehf.
   Desktop-first breakpoints: 1024, 768, 480
   ============================================================ */

/* ====================
   ≤ 1024px - TABLET
   ==================== */
@media (max-width: 1024px) {

  /* Nav - hamburger replaces links, CTA hidden */
  .nav__links {
    display: none;
  }

  .nav__cta {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  /* Hero - indicators simplify */
  .hero__indicator-text {
    display: none;
  }

  .hero__content {
    bottom: 100px;
    max-width: 560px;
  }

  /* About - stack vertically */
  .about__top {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .about__image {
    max-width: 60%;
  }

  .about__bottom {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .about__columns {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }

  /* Tabs - tabs reposition */
  .tabs-section__tabs {
    top: var(--space-md);
    right: var(--space-md);
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  /* Projects - single card, carousel still works */
  .projects__card {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .projects__card-images {
    min-height: 350px;
  }

  /* Services - stack */
  .services__inner {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .services__left {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-md);
    align-items: start;
  }

  .services__img {
    max-width: 280px;
    aspect-ratio: 3 / 4;
  }

  /* Testimonials */
  .testimonials__card {
    max-width: 460px;
    padding: 36px;
  }

  /* CTA */
  .cta-section__images {
    gap: var(--space-sm);
  }

  /* Footer - stack columns */
  .footer__inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}


/* ====================
   ≤ 768px - MOBILE LANDSCAPE
   ==================== */
@media (max-width: 768px) {

  /* Container padding reduces */
  .container {
    padding: 0 24px;
  }

  /* Hero */
  .hero__title {
    font-size: 44px;
  }

  .hero__content {
    bottom: 90px;
    left: 24px;
    max-width: 90%;
  }

  .hero__indicators {
    bottom: 28px;
    gap: var(--space-md);
  }

  .hero__arrows {
    right: 24px;
    bottom: 28px;
  }

  .hero__arrow {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  /* About */
  .about {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-xl);
  }

  .about__image {
    max-width: 100%;
  }

  .about__columns {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  /* Tabs */
  .tabs-section {
    min-height: 70vh;
  }

  .tabs-section__tabs {
    position: relative;
    top: auto;
    right: auto;
    padding: var(--space-md) 24px 0;
    justify-content: flex-start;
    z-index: 3;
    order: -1;
  }

  .tabs-section__tab {
    padding: 8px 18px;
    font-size: 12px;
  }

  .tabs-section__content {
    padding: 0 24px var(--space-lg);
  }

  .tabs-section__cta {
    position: relative;
    bottom: auto;
    right: auto;
    margin: 0 24px var(--space-lg);
    z-index: 3;
    align-self: flex-start;
  }

  /* Projects - cards stack meta above images, no overlap */
  .projects {
    padding: var(--space-2xl) 0;
  }

  .projects__card {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .projects__card-images {
    min-height: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
  }

  .projects__card-img--primary {
    width: 100%;
    aspect-ratio: 4 / 5;
  }

  .projects__card-img--secondary {
    position: relative;
    bottom: auto;
    right: auto;
    width: 100%;
    aspect-ratio: 4 / 5;
    transform: none;
  }

  .projects__statement-text {
    font-size: clamp(28px, 4vw, 36px);
  }

  /* Services */
  .services {
    padding: var(--space-xl) 0;
  }

  .services__left {
    grid-template-columns: 1fr;
  }

  .services__img {
    max-width: 100%;
    aspect-ratio: 16 / 9;
  }

  /* Testimonial card - near full width */
  .testimonials {
    padding: var(--space-2xl) 0;
    min-height: 60vh;
  }

  .testimonials__card {
    max-width: calc(100% - 48px);
    margin-left: 24px;
    margin-right: 24px;
    padding: 32px;
  }

  .testimonials__text {
    font-size: 18px;
  }

  /* CTA images stack */
  .cta-section {
    padding: var(--space-xl) 0;
  }

  .cta-section__images {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  /* Footer */
  .footer {
    padding: var(--space-xl) 0;
  }

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


/* ====================
   ≤ 480px - MOBILE PORTRAIT
   ==================== */
@media (max-width: 480px) {

  /* Container */
  .container {
    padding: 0 20px;
  }

  /* Hero */
  .hero__title {
    font-size: 36px;
  }

  .hero__subtitle {
    font-size: 15px;
  }

  .hero__content {
    bottom: 80px;
    left: 20px;
  }

  .hero__indicators {
    display: none;
  }

  .hero__arrows {
    right: 20px;
    bottom: 24px;
  }

  /* About */
  .about {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-lg);
  }

  .about__title {
    font-size: clamp(28px, 6vw, 36px);
  }

  /* Tabs */
  .tabs-section {
    min-height: 60vh;
  }

  .tabs-section__title {
    font-size: clamp(28px, 5.5vw, 36px);
  }

  /* Projects */
  .projects {
    padding: var(--space-xl) 0;
  }

  .projects__header {
    margin-bottom: var(--space-lg);
  }

  .projects__card-images {
    grid-template-columns: 1fr;
  }

  .projects__statement {
    padding-top: var(--space-lg);
  }

  .projects__statement-text {
    font-size: 26px;
  }

  /* Services */
  .services {
    padding: var(--space-lg) 0;
  }

  .services__item-link {
    padding: 24px 0;
  }

  .services__item-title {
    font-size: 16px;
  }

  /* Testimonials */
  .testimonials {
    min-height: auto;
    padding: var(--space-xl) 0;
  }

  .testimonials__card {
    max-width: calc(100% - 40px);
    margin-left: 20px;
    margin-right: 20px;
    padding: 28px;
  }

  .testimonials__text {
    font-size: 16px;
  }

  .testimonials__slides {
    min-height: 180px;
  }

  /* CTA */
  .cta-section {
    padding: var(--space-lg) 0;
  }

  .cta-section__title {
    font-size: clamp(26px, 5.5vw, 32px);
  }

  .cta-section__thumb {
    width: 90px;
  }

  /* Footer */
  .footer {
    padding: var(--space-lg) 0;
  }

  .footer__title {
    font-size: clamp(28px, 6vw, 36px);
  }

  .footer__contact p {
    font-size: var(--text-small);
  }

  .footer__copyright {
    font-size: 12px;
  }

  /* Buttons - slightly smaller on mobile */
  .btn--pill {
    padding: 12px 26px;
    font-size: 13px;
  }

  /* Section spacing halved globally */
  .about,
  .projects,
  .services,
  .cta-section {
    padding-top: var(--space-lg);
    padding-bottom: var(--space-lg);
  }
}


/* ====================
   MOBILE MENU OVERLAY (all sizes)
   ==================== */
.nav__overlay {
  /* Base styles in components.css */
  /* Transition handled there: opacity + visibility */
}

/* Reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero__slide {
    transition: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
