/* Base theme variables and common resets */
:root {
  --brand-primary: #f4c771;
  --brand-secondary: #fff5e2;
  --bg-light: #fffbf3;
  --brand-text: #000;
  --header-height: 80px; /* Default header height */
}

/* Brand typefaces */
@font-face {
  font-family: 'Portrait Light';
  src: url('assets/Portrait_Family/Portrait-Light-Trial.otf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'Portrait';
  src: url('assets/Portrait_Family/Portrait-Regular-Trial.otf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'Portrait Bold';
  src: url('assets/Portrait_Family/Portrait-Bold-Trial.otf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'Portrait Medium';
  src: url('assets/Portrait_Family/Portrait-Medium-Trial.otf') format('opentype');
  font-display: swap;
}

/* Simple reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base page structure */
body {
  font-family: "Futura", sans-serif;
  background: var(--bg-light);
  color: var(--brand-text);
  display: flex;
  flex-direction: column;
  /* Use small viewport height to prevent layout jolt on mobile */
  min-height: 100svh;
  /* Enable momentum scrolling on iOS */
  -webkit-overflow-scrolling: touch;
  /* Ensure vertical scroll behaves naturally */
  overscroll-behavior-y: auto;
}

/* Sticky header used site-wide */
header {
  text-align: center;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  background: var(--bg-light);
  z-index: 10;
  min-height: var(--header-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo {
  width: 250px;
  margin: 0 auto;
}

.header-text {
  margin-top: 0.5rem;
  font-size: 1rem;
  font-family: 'Nunito Sans', "Times New Roman", Times, serif;
  font-weight: 300;
}


/* Common styles for CTA buttons and footer across all pages */

/* Prevent horizontal scrolling on all pages */
html {
  overflow-x: hidden;
  /* Allow natural momentum scroll while preventing horizontal chaining */
  overscroll-behavior-x: none;
  overscroll-behavior-y: auto;
  /* Avoid global smooth scroll to reduce jank on mobile */
  scroll-behavior: auto;
  /* Offset for sticky header when scrolling to anchors */
  scroll-padding-top: var(--header-height);
}

/* Ensure confetti stays within viewport */
.confetti-container {
  overflow: hidden;
}

/* CTA Grid */
.cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 4px;
  margin-top: auto;
  padding: 0 2px;
}

/* CTA Button */
.cta {
  background: var(--brand-primary);
  padding: 1.25rem 0.75rem;
  text-align: center;
  font-size: clamp(1.25rem, 2.5vw, 2.25rem);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
  font-family: 'Portrait Light', "Times New Roman", Times, serif;
  color: #000;
  isolation: isolate;
  border-radius: 3px;
}

/* White knock-out text effect */
.cta::before {
  content: attr(data-text);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(calc(-50% + 4px), -50%);
  color: #fff;
  z-index: -1;
}

.cta:hover {
  background: #eabf63;
}

/* Footer */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem 2rem;
  margin: 4px;
  background: var(--brand-secondary);
  color: #333;
  font-size: 0.875rem;
  border-radius: 3px;
}

/* Thin legal text */
footer span:last-child {
  font-family: "Futura Light", sans-serif;
  font-weight: 200;
  letter-spacing: 0.02em;
}

/* Mobile tweaks */
@media (max-width: 480px) {
  .cta-grid {
    grid-template-columns: 1fr 1fr;
  }
  .cta {
    padding: 0.6rem 0.5rem;
    font-size: 1.3rem;
    font-family: 'Portrait', "Times New Roman", Times, serif;
  }
  .cta::before {
    transform: translate(calc(-50% + 2px), -50%);
  }
  footer {
    flex-direction: column;
    text-align: center;
    font-size: 0.75rem;
    padding: 1rem;
  }
}

