/* ============================================================
   Seahawk Cove — Student Living near UNCW
   Interim website. Plain HTML/CSS/JS, no build step required.
   ============================================================ */

:root {
  --navy:      #14253f;
  --navy-2:    #1d3556;
  --teal:      #16aab0;
  --teal-dark: #0e8c90;
  --gold:      #f2b705;
  --sand:      #f6f2ea;
  --paper:     #ffffff;
  --ink:       #1c2533;
  --muted:     #5c6b7d;
  --line:      #e4ddd0;
  --shadow:    0 10px 30px rgba(20, 37, 63, .12);
  --radius:    14px;
  --max:       1180px;
  --header-h:  72px;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Poppins", "Inter", system-ui, sans-serif;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 .5em;
  font-weight: 700;
  letter-spacing: -.01em;
}

p { margin: 0 0 1rem; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 22px; }

.section { padding: 84px 0; }
.section--sand { background: var(--sand); }
.section--navy { background: var(--navy); color: #dfe7f1; }
.section--navy h2, .section--navy h3 { color: #fff; }

.eyebrow {
  display: inline-block;
  font-family: "Poppins", sans-serif;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: .6rem;
}
.section--navy .eyebrow { color: var(--teal); }

.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.section--navy .section-head p { color: #b9c6d8; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: "Poppins", sans-serif;
  font-weight: 600; font-size: .98rem;
  padding: 13px 26px; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary { background: var(--teal); color: #fff; box-shadow: 0 8px 20px rgba(22,170,176,.35); }
.btn--primary:hover { background: var(--teal-dark); color: #fff; }
.btn--gold { background: var(--gold); color: var(--navy); }
.btn--gold:hover { background: #ffc928; }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn--outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: #fff; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px; }

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand__mark { height: 40px; width: auto; max-width: 120px; flex: none; object-fit: contain; }
.brand__logo { height: 46px; width: auto; display: block; }
.brand__name { font-family: "Poppins", sans-serif; font-weight: 700; color: var(--navy); font-size: 1.18rem; line-height: 1; letter-spacing: -.01em; }
.brand__sub { display: block; font-size: .62rem; letter-spacing: .22em; color: var(--teal-dark); font-weight: 600; text-transform: uppercase; margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--navy); font-weight: 500; font-size: .96rem; }
.nav a:hover { color: var(--teal-dark); text-decoration: none; }

.header__cta { display: flex; align-items: center; gap: 14px; }
.header__phone { font-family: "Poppins", sans-serif; font-weight: 600; color: var(--navy); white-space: nowrap; }
.header__phone:hover { color: var(--teal-dark); text-decoration: none; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; border-radius: 2px; transition: .25s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  min-height: calc(100vh - var(--header-h));
  display: flex; align-items: center;
  background: var(--navy);
}
/* Separate background layer so it can be parallaxed via transform */
.hero__bg {
  position: absolute; inset: -15% 0; z-index: 0;
  background: url("../images/exterior.jpg") center/cover no-repeat;
  transform: translate3d(0, var(--py, 0px), 0);
  will-change: transform;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(20,37,63,.55), rgba(20,37,63,.78));
}
.hero__inner { position: relative; z-index: 2; padding: 90px 0; max-width: 760px; }
.badge {
  display: inline-flex; align-items: center; gap: .5em;
  background: var(--gold); color: var(--navy);
  font-family: "Poppins", sans-serif; font-weight: 700; font-size: .82rem;
  letter-spacing: .04em; padding: 7px 16px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { color: #fff; font-size: clamp(2.4rem, 6vw, 4.1rem); margin-bottom: .3em; }
.hero p { font-size: clamp(1.05rem, 2.2vw, 1.32rem); color: #e7eef7; max-width: 560px; margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Quick stats bar ---------- */
.stats { background: var(--navy); color: #fff; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 26px 18px; text-align: center; border-right: 1px solid rgba(255,255,255,.12); }
.stat:last-child { border-right: 0; }
.stat__num { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 1.5rem; color: var(--teal); }
.stat__label { font-size: .9rem; color: #c4d0e0; }

/* ---------- About / intro ---------- */
.intro { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.intro__media img { border-radius: var(--radius); box-shadow: var(--shadow); }
.intro h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.intro ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.intro li { padding-left: 30px; position: relative; }
.intro li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--teal); font-weight: 700; }

/* ---------- Floor plan ---------- */
.floorplan { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.floorplan__img { background: #ddd; min-height: 340px; background-size: cover; background-position: center; }
.floorplan__body { padding: 44px; }
.floorplan__tag { display: inline-block; background: var(--sand); color: var(--teal-dark); font-weight: 600; font-size: .82rem; padding: 5px 14px; border-radius: 999px; margin-bottom: 14px; font-family: "Poppins", sans-serif; }
.floorplan h3 { font-size: 1.9rem; }
.fp-specs { display: flex; gap: 28px; margin: 20px 0; flex-wrap: wrap; }
.fp-spec { }
.fp-spec b { display: block; font-family: "Poppins", sans-serif; font-size: 1.5rem; color: var(--navy); }
.fp-spec span { font-size: .85rem; color: var(--muted); }
.fp-note { font-size: .82rem; color: var(--muted); margin: 6px 0 22px; }

/* ---------- Amenities ---------- */
.amenities-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.amenity {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; display: flex; gap: 16px; align-items: flex-start;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.amenity:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.amenity__icon { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--sand); display: grid; place-items: center; color: var(--teal-dark); }
.amenity__icon svg { width: 24px; height: 24px; }
.amenity h4 { font-size: 1.04rem; margin-bottom: 3px; }
.amenity p { font-size: .9rem; color: var(--muted); margin: 0; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery button { padding: 0; border: 0; cursor: pointer; background: none; border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery button:hover img { transform: scale(1.07); }
.gallery .wide { grid-column: span 2; aspect-ratio: 8/3; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(10,18,30,.92); display: none; align-items: center; justify-content: center; z-index: 200; padding: 30px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 8px; }
.lightbox__close, .lightbox__nav { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; cursor: pointer; border-radius: 50%; width: 50px; height: 50px; font-size: 1.6rem; display: grid; place-items: center; }
.lightbox__close { top: 22px; right: 22px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav.prev { left: 22px; }
.lightbox__nav.next { right: 22px; }
.lightbox__nav:hover, .lightbox__close:hover { background: rgba(255,255,255,.25); }

/* ---------- Location ---------- */
.location { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.location iframe { width: 100%; height: 380px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.location .info-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 20px; margin-top: 16px; }

/* ---------- Virtual Tour ---------- */
.tour { max-width: 960px; margin: 0 auto 40px; }
.tour__frame {
  position: relative; padding-top: 56.25%;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); background: var(--navy);
}
.tour__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Apply ---------- */
.apply { max-width: 900px; margin: 0 auto; }
.apply__frame {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.apply__frame iframe { display: block; width: 100%; border: 0; }
.apply__help { text-align: center; color: var(--muted); font-size: .95rem; margin-top: 18px; }

/* ---------- Residents ---------- */
.residents__btn { margin-top: 12px; }
.residents-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.res-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius); padding: 32px 28px; text-align: center;
  transition: transform .18s ease, background .18s ease;
}
.res-card:hover { transform: translateY(-4px); background: rgba(255,255,255,.1); text-decoration: none; }
.res-card svg { width: 38px; height: 38px; color: var(--teal); margin-bottom: 12px; }
.res-card h3 { color: #fff; font-size: 1.15rem; margin-bottom: 4px; }
.res-card p { color: #b9c6d8; font-size: .9rem; margin: 0; }

/* ---------- Contact ---------- */
.contact { max-width: 840px; margin: 0 auto; }
.contact-info { display: grid; grid-template-columns: 1fr 1fr; column-gap: 44px; }
.contact-info .ci-row {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; margin: 0 0 18px;
}
.contact-info .ci-row svg { width: 24px; height: 24px; color: var(--teal-dark); flex: none; margin-top: 3px; }
.contact-info h4 { margin-bottom: 2px; font-size: 1.02rem; }
.contact-info a { color: var(--ink); }
.contact-info p { color: var(--muted); margin: 0; }

.form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.form .field { margin-bottom: 16px; }
.form label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--navy); }
.form input, .form select, .form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; color: var(--ink); background: #fcfaf6;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--teal); border-color: var(--teal); }
.form textarea { resize: vertical; min-height: 110px; }
.form .btn { width: 100%; justify-content: center; }
.form__note { font-size: .8rem; color: var(--muted); margin-top: 12px; text-align: center; }

/* ---------- Footer ---------- */
.footer { background: #0e1c30; color: #aeb9c9; padding: 56px 0 26px; font-size: .92rem; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer a { color: #aeb9c9; }
.footer a:hover { color: var(--teal); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.footer__logo { height: 42px; width: auto; background: #fff; padding: 9px 14px; border-radius: 12px; box-sizing: content-box; }
.footer__brand .brand__name { color: #fff; }
.footer__notices { font-size: .8rem; color: #7e8ba0; line-height: 1.7; }
.footer__managed { margin-top: 22px; }
.footer__managed span { display: block; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: #7e8ba0; margin-bottom: 10px; }
.footer__managed img { height: 48px; width: auto; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .82rem; color: #7e8ba0; }
.footer__badges { display: flex; gap: 14px; align-items: center; }

/* ---------- Header shadow once scrolled ---------- */
.header { transition: box-shadow .25s ease, background .25s ease; }
.header.scrolled { box-shadow: 0 6px 20px rgba(20,37,63,.10); }

/* ---------- Scroll & entrance animations ---------- */
@media (prefers-reduced-motion: no-preference) {

  /* Hero content animates in on load */
  .anim-ready .hero .badge,
  .anim-ready .hero h1,
  .anim-ready .hero p,
  .anim-ready .hero__actions {
    opacity: 0; transform: translateY(22px);
    animation: heroIn .9s cubic-bezier(.2,.7,.2,1) forwards;
  }
  .anim-ready .hero h1        { animation-delay: .12s; }
  .anim-ready .hero p         { animation-delay: .24s; }
  .anim-ready .hero__actions  { animation-delay: .36s; }
  @keyframes heroIn { to { opacity: 1; transform: none; } }

  /* Elements that reveal as they scroll into view */
  .anim-ready .section-head,
  .anim-ready .intro__text,
  .anim-ready .intro__media,
  .anim-ready .floorplan,
  .anim-ready .amenity,
  .anim-ready .gallery button,
  .anim-ready .tour__frame,
  .anim-ready .location__map,
  .anim-ready .location__text,
  .anim-ready .apply__frame,
  .anim-ready .stat,
  .anim-ready .contact-info .ci-row,
  .anim-ready .residents__btn {
    opacity: 0; transform: translateY(28px);
    transition: opacity .7s cubic-bezier(.2,.6,.2,1),
                transform .7s cubic-bezier(.2,.6,.2,1);
  }
  .anim-ready .is-in {
    opacity: 1 !important; transform: none !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav, .header__phone { display: none; }
  .nav-toggle { display: block; }
  .nav.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 14px 22px 20px;
    box-shadow: var(--shadow);
  }
  .nav.open a { padding: 8px 0; width: 100%; }
  .intro, .floorplan, .location { grid-template-columns: 1fr; }
  .contact-info { grid-template-columns: 1fr; }
  .floorplan__img { min-height: 260px; }
  .amenities-grid, .residents-grid { grid-template-columns: repeat(2, 1fr); }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery .wide { grid-column: span 2; aspect-ratio: 16/9; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 60px 0; }
}
@media (max-width: 520px) {
  .amenities-grid, .residents-grid { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1; justify-content: center; }
  .floorplan__body { padding: 30px 24px; }
  .hero__inner { padding: 64px 0; }
  .stat { padding: 20px 12px; }
  .stat__num { font-size: 1.25rem; }
  .lightbox { padding: 14px; }
  .lightbox__close, .lightbox__nav { width: 42px; height: 42px; font-size: 1.3rem; }
  .lightbox__close { top: 12px; right: 12px; }
  .lightbox__nav.prev { left: 8px; }
  .lightbox__nav.next { right: 8px; }
}

/* Calmer hero parallax on small screens; honor reduced-motion everywhere */
@media (max-width: 700px) {
  .hero__bg { inset: -8% 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__bg { transform: none !important; }
}

/* Avoid sticky hover states lingering on touch devices */
@media (hover: none) {
  .amenity:hover { transform: none; box-shadow: none; border-color: var(--line); }
  .btn:hover { transform: none; }
  .gallery button:hover img { transform: none; }
}

/* ---------- Mobile spacing & centering polish ---------- */
@media (max-width: 640px) {
  .container { padding: 0 24px; }
  .section { padding: 52px 0; }
  .section-head { margin-bottom: 34px; }
  .section-head p { font-size: 1rem; }

  /* Hero — center and give text room */
  .hero__inner { text-align: center; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero__actions { justify-content: center; }

  /* Intro — centered, list kept readable */
  .intro { gap: 30px; text-align: center; }
  .intro ul { text-align: left; max-width: 330px; margin: 18px auto 0; }

  /* Floor plan — centered body, full-width CTA */
  .floorplan__body { text-align: center; padding: 32px 24px; }
  .fp-specs { justify-content: center; gap: 26px; }
  .floorplan .btn { width: 100%; justify-content: center; }

  /* Amenity cards — icon stacked over centered text */
  .amenity {
    flex-direction: column; align-items: center;
    text-align: center; gap: 12px; padding: 28px 24px;
  }

  /* Location — centered text, full-width directions button */
  .location { gap: 28px; }
  .location__text { text-align: center; }
  .location .info-card { text-align: left; }
  .location__text .btn { width: 100%; justify-content: center; }

  /* Contact cards — centered with icon on top */
  .contact-info .ci-row {
    flex-direction: column; align-items: center;
    text-align: center; gap: 8px; padding: 24px 22px;
  }
  .contact-info .ci-row svg { margin-top: 0; }

  /* Footer — center the columns for a tidy stacked layout */
  .footer { text-align: center; }
  .footer__brand { justify-content: center; }
  .footer ul { justify-items: center; }
  .footer__bottom { justify-content: center; text-align: center; }
}
