/*
 * =============================================================================
 * File:        styles.css
 * Description: Premier Tech Homes landing page styles
 * Author:      Nordic Design Collective
 * Created:     2026-05-25
 * Modified:    2026-05-25
 * Version:     1.4.0
 * Project:     Premier Tech Homes
 * =============================================================================
 */

/* ============================================================
   Custom properties
   ============================================================ */
:root {
  --navy:       #00305b;
  --navy-dark:  #001c38;
  --navy-mid:   rgba(0, 48, 91, 0.72);
  --white:      #ffffff;
  --text-sm:    0.8125rem;   /* 13px */
  --text-base:  1rem;        /* 16px */
  --text-lg:    1.125rem;    /* 18px */
  --text-xl:    1.25rem;     /* 20px */
  --radius:     0.375rem;    /* 6px */
  --transition: 0.18s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--white);
  background: var(--navy-dark);
  min-height: 100svh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ============================================================
   Background video
   ============================================================ */
.video-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ============================================================
   Overlay: navy gradient, darker toward bottom for footer legibility
   ============================================================ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0, 28, 56, 0.45) 0%,
    rgba(0, 28, 56, 0.50) 40%,
    rgba(0, 28, 56, 0.70) 75%,
    rgba(0, 28, 56, 0.88) 100%
  );
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  /* leave space for the fixed footer */
  padding: 2.5rem 2rem 6rem;
}

/*
 * Two-column layout (desktop): logo left, copy + CTAs right.
 * Collapses to single column at 860px breakpoint.
 */
.hero__inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4rem;
  max-width: 1160px;
  width: 100%;
}

/* Left column: logo, centered within column.
 * WHY: flex: 0 0 auto with no explicit width means the column shrinks to the
 * SVG intrinsic size (~300px default). Giving the column a fixed width gives
 * the child img's width: 100% a real value to resolve against. */
.hero__col--logo {
  flex: 0 0 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Right column: text + buttons, left-aligned on desktop */
.hero__col--content {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: flex-start;
}

/* ============================================================
   Logo
   ============================================================ */
.logo-link {
  display: inline-block;
  outline-offset: 4px;
}

.logo {
  /* WHY: explicit width instead of width:100% so the rendered size is
   * predictable regardless of how the flex parent sizes itself.
   * Target: ~480px rendered width on desktop (~154px tall at 1767:551 ratio). */
  width: 480px;
  max-width: 100%;
  height: auto;
  /* Drop shadow helps the white SVG pop off bright footage frames */
  filter: drop-shadow(0 2px 16px rgba(0, 0, 0, 0.50));
}

/* ============================================================
   Tagline
   ============================================================ */
.tagline {
  font-size: var(--text-lg);
  line-height: 1.65;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  letter-spacing: 0.01em;
}

/* ============================================================
   CTA buttons
   ============================================================ */
.ctas {
  display: flex;
  /* WHY: nowrap keeps both buttons on one row in two-column (desktop) mode.
   * The single-column breakpoint overrides this to column for stacked layout. */
  flex-wrap: nowrap;
  gap: 1rem;
  /* Left-align so button edges line up with the copy above. */
  justify-content: flex-start;
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.625rem;
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
  /* Ensure minimum tap target size on mobile */
  min-height: 48px;
  min-width: 200px;
  justify-content: center;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

/* Solid white button */
.btn--primary {
  background: var(--white);
  color: var(--navy);
  border: 2px solid var(--white);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.btn--primary:hover {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.88);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

/* White-outline ghost button */
.btn--outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.80);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--white);
  transform: translateY(-1px);
}

.btn--outline:active {
  transform: translateY(0);
}

/* Icon inside button */
.btn__icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.70);
}

.footer__legal {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.footer__sep {
  opacity: 0.4;
}

.footer__credit a {
  color: rgba(255, 255, 255, 0.55);
  transition: color var(--transition);
  text-underline-offset: 2px;
}

.footer__credit a:hover {
  color: var(--white);
  text-decoration: underline;
}

/* ============================================================
   Accessibility: prefers-reduced-motion
   Pause video and show poster image instead.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .bg-video {
    display: none;
  }

  .video-wrap {
    background-image: url("assets/poster.jpg");
    background-size: cover;
    background-position: center;
  }
}

/* ============================================================
   Responsive: single-column breakpoint at 1150px.
   WHY 1150px: in two-column mode the layout needs:
     hero padding (32px) + logo col (500px) + gap (64px)
     + two side-by-side buttons (~532px) = ~1128px minimum.
   1150px gives ~22px of margin above that minimum so the
   content column (1150 - 32 - 500 - 64 = 554px) comfortably
   holds both buttons on one row without wrapping.
   Below 1150px the layout collapses to single column AND the
   buttons go stacked + full-width simultaneously. No split
   breakpoint, no in-between state.
   ============================================================ */
@media (max-width: 1150px) {
  .hero {
    padding: 2.5rem 1.5rem 6rem;
  }

  .hero__inner {
    flex-direction: column;
    align-items: center;
    gap: 2.25rem;
    max-width: 620px;
  }

  .hero__col--logo {
    flex: 0 0 auto;
    width: 100%;
    justify-content: center;
  }

  .hero__col--content {
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .logo {
    /* WHY: keep the large logo size in single-column. width: 480px renders
     * at full size as long as the column can hold it; max-width: 100% lets
     * it shrink fluidly only when the viewport becomes narrower than ~530px
     * (viewport minus hero padding). No arbitrary cap. */
    width: 480px;
    max-width: 100%;
  }

  .tagline {
    max-width: 100%;
  }

  /* Stacked + full-width buttons: applied at the same breakpoint
   * as single-column collapse so both states change together. */
  .ctas {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
  }

  .btn {
    min-width: unset;
    width: 100%;
  }
}

/* ============================================================
   Responsive: phone-only tweaks (narrow)
   Button stacking is already handled above at 1150px.
   This query handles spacing, font-size, and footer layout
   for small phone viewports only.
   ============================================================ */
@media (max-width: 480px) {
  .hero {
    padding: 2rem 1rem 5.5rem;
  }

  .hero__inner {
    gap: 1.75rem;
  }

  .tagline {
    font-size: var(--text-base);
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.625rem 1rem;
  }
}

/* ============================================================
   Responsive: large desktop
   WHY: logo column stays at 500px (not expanded to 560px) so
   the content column keeps a comfortable ~596px at 1280px,
   ensuring both CTA buttons fit side by side with room to spare.
   ============================================================ */
@media (min-width: 1200px) {
  .tagline {
    font-size: var(--text-xl);
  }

  /* Subtle logo size bump on large screens; column width unchanged
   * so the content column retains sufficient width for side-by-side
   * buttons. */
  .logo {
    width: 500px;
  }
}
