/* ==========================================================================
   Marketing Components
   Shared building blocks for the public marketing pages (home, sample, about).
   Depends on the design tokens in base.css. Load order: base.css → marketing.css.

   Conventions:
   - Components are namespaced (e.g. .site-nav, .hero, .feature-card) to avoid
     clashing with the dashboard/garage CSS.
   - Use the design tokens (var(--…)) rather than hard-coded values.
   ========================================================================== */

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
}

/* --------------------------------------------------------------------------
   Invite banner (dismissible bar above the nav, for invited visitors)
   -------------------------------------------------------------------------- */
.invite-banner {
  background: var(--gradient-primary);
  color: #fff;
  text-align: center;
  font-size: 0.9rem;
  padding: 0.6rem 2.75rem;
  position: relative;
}

.invite-banner a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
}

.invite-banner a:hover {
  color: #fff;
  opacity: 0.9;
}

.invite-banner__close {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
  padding: 0.25rem 0.55rem;
}

.invite-banner__close:hover {
  opacity: 1;
}

.invite-banner[hidden] {
  display: none;
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.container--narrow {
  max-width: var(--content-narrow);
}

/* --------------------------------------------------------------------------
   Top navigation (unified marketing nav bar)
   -------------------------------------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.site-nav__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0.85rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-nav__logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.site-nav__link {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.site-nav__link:hover {
  color: var(--color-primary);
}

.site-nav__menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

/* Sign in lives in the bar next to Request Access on desktop; the copy inside
   the collapsible menu is only for the mobile sheet, so hide it here. */
.site-nav__menu > .site-nav__link {
  display: none;
}

.site-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Hamburger toggle - hidden on desktop, shown in the mobile media query */
.site-nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.site-nav__toggle-bars,
.site-nav__toggle-bars::before,
.site-nav__toggle-bars::after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-text);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.site-nav__toggle-bars {
  position: relative;
}

.site-nav__toggle-bars::before {
  position: absolute;
  top: -7px;
}

.site-nav__toggle-bars::after {
  position: absolute;
  top: 7px;
}

.site-nav--open .site-nav__toggle-bars {
  background: transparent;
}

.site-nav--open .site-nav__toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.site-nav--open .site-nav__toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-nav__toggle:focus-visible,
.site-nav__menu .site-nav__link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Buttons - sizes & accent variant (extends base.css .btn)
   -------------------------------------------------------------------------- */
.btn--lg {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

.btn--pill {
  border-radius: var(--radius-pill);
}

.btn-accent {
  background: var(--gradient-accent);
  color: white;
  box-shadow: var(--shadow-accent);
}

.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4);
  color: white;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  padding: 3rem 2rem 2rem;
  text-align: center;
  background: var(--gradient-soft);
}

.hero__title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.hero__subtitle {
  font-size: 1.3rem;
  color: var(--color-text-subtle);
  max-width: 620px;
  margin: 0 auto 2rem;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section {
  padding: 3rem 2rem;
}

.section--soft {
  background: var(--color-bg-soft);
}

.section__title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.section__lead {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  max-width: var(--content-narrow);
  margin: 0 auto 3rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Feature cards
   -------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  max-width: var(--content-max);
  margin: 0 auto;
}

.feature-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--gradient-lavender);
  color: white;
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card__icon {
  margin-bottom: 1rem;
  color: white;
}

.feature-card__title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   How it works - 1·2·3 steps
   -------------------------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  max-width: var(--content-max);
  margin: 0 auto;
}

.step {
  text-align: center;
  padding: 1rem;
}

.step__num {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
}

.step__title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.step p {
  color: var(--color-text-subtle);
}

/* Base .icon / .icon--sm / .icon--lg rules now live in the shared
   shared/css/icons.css (imported via base.css). Marketing-specific icon
   tweaks (e.g. .photo-placeholder .icon below) stay here. */

/* --------------------------------------------------------------------------
   404 / Not found page
   -------------------------------------------------------------------------- */
.notfound {
  max-width: var(--content-narrow);
  margin: 0 auto;
  padding: 5rem 1.5rem;
  text-align: center;
}

.notfound__code {
  font-size: 6rem;
  font-weight: 700;
  line-height: 1;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.notfound__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.notfound__text {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.notfound__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: linear-gradient(135deg, var(--color-footer-from) 0%, var(--color-footer-to) 100%);
  color: white;
  margin-top: 4rem;
}

.site-footer__content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.site-footer__brand h3 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-footer__brand p {
  margin: 0;
  opacity: 0.8;
  font-size: 0.9rem;
}

.site-footer__links {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.site-footer__links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: opacity 0.2s ease;
}

.site-footer__links a:hover {
  opacity: 0.8;
}

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  padding: 1.5rem 2rem;
}

.site-footer__bottom p {
  margin: 0;
  opacity: 0.7;
  font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   Photo placeholder - marks where a real photo goes (swap for <img> later)
   -------------------------------------------------------------------------- */
.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--gradient-soft);
  border: 2px dashed #c9cdf0;
  border-radius: var(--radius-lg);
  color: var(--color-primary);
  text-align: center;
  padding: 2rem;
  min-height: 240px;
}

.photo-placeholder .icon {
  opacity: 0.7;
}

.photo-placeholder span {
  font-size: 0.85rem;
  color: var(--color-text-subtle);
}

.photo-placeholder--wide {
  aspect-ratio: 16 / 9;
  min-height: 0;
}

.photo-placeholder--tall {
  aspect-ratio: 3 / 4;
  min-height: 0;
}

/* Uncropped images - render at the photo's own (landscape) aspect ratio so the
   whole room is visible, never cropped tall. Gallery sources are 3:2. */
.media-gallery,
.media-portrait {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
}

/* Homepage trio - three landscape photos side by side */
.home-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 700px) {
  .home-trio {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Info card (plain white card - e.g. host / guest blurbs)
   -------------------------------------------------------------------------- */
.info-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
}

.info-card h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.info-card h3 .icon {
  color: var(--color-primary);
}

.info-card p {
  margin: 0;
  color: var(--color-text-subtle);
}

/* --------------------------------------------------------------------------
   Legal pages (privacy, terms): readable long-form prose on the shared system
   -------------------------------------------------------------------------- */
/* Full-bleed light-grey page; the nav and footer span edge to edge. */
.legal-page {
  background: var(--color-bg-soft);
}

/* Centered reading column, no card. Distinction comes from the white
   callout boxes and the section dividers, not a border. */
.legal-container {
  max-width: var(--content-narrow);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.legal-header {
  text-align: center;
  margin-bottom: 3rem;
}

.legal-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.legal-header p {
  color: var(--color-text-subtle);
  margin: 0.25rem 0;
}

.legal-content {
  line-height: 1.7;
  color: var(--color-text-muted);
}

.legal-section {
  margin-bottom: 2.5rem;
}

.legal-section h2 {
  color: var(--color-primary);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.legal-section p {
  margin-bottom: 1rem;
}

.legal-section ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.legal-section li {
  margin-bottom: 0.5rem;
}

.legal-content a {
  color: var(--color-primary);
  text-decoration: none;
}

.legal-content a:hover {
  text-decoration: underline;
}

.highlight-box {
  background: var(--color-bg);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
  font-weight: 500;
}

.highlight-box strong {
  color: var(--color-primary);
}

.warning-box {
  background: var(--color-bg);
  border-left: 4px solid var(--color-warning);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
}

/* --------------------------------------------------------------------------
   Toast (used by the homepage showToast helper)
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  top: 80px;
  right: 20px;
  background: var(--color-accent);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-accent);
  z-index: 1200;
  transform: translateX(400px);
  transition: transform 0.3s ease;
  font-weight: 500;
}

.toast.show {
  transform: translateX(0);
}

.toast.error {
  background: var(--color-error);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .site-nav__inner {
    padding: 0.75rem 1rem;
    gap: 1rem;
    justify-content: space-between;
  }

  .site-nav__toggle {
    display: flex;
  }

  .site-nav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    box-shadow: var(--shadow-md);
    padding: 0 1rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition:
      max-height 0.25s ease,
      opacity 0.2s ease,
      visibility 0.2s ease,
      padding 0.25s ease;
  }

  .site-nav--open .site-nav__menu {
    max-height: 24rem;
    opacity: 1;
    visibility: visible;
    padding: 0.5rem 1rem 1rem;
  }

  .site-nav__menu .site-nav__links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .site-nav__menu .site-nav__links li,
  .site-nav__menu > .site-nav__link {
    border-bottom: 1px solid var(--color-border);
  }

  .site-nav__menu .site-nav__link {
    display: block;
    padding: 0.85rem 0.25rem;
    font-size: 1rem;
  }

  /* Sign in moves into the sheet on mobile, so hide the in-bar copy. */
  .site-nav__actions > .site-nav__link {
    display: none;
  }

  .site-nav__actions .btn-accent {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .hero {
    padding: 2.5rem 1.5rem 1.5rem;
  }

  .hero__title {
    font-size: 2.5rem;
  }

  .hero__subtitle {
    font-size: 1.1rem;
  }

  .section {
    padding: 2.5rem 1.5rem;
  }

  .section__title {
    font-size: 2rem;
  }

  .site-footer__content {
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav__menu,
  .site-nav__toggle-bars,
  .site-nav__toggle-bars::before,
  .site-nav__toggle-bars::after {
    transition: none;
  }
}
