/* ==========================================================================
   Wedding Website - Vanessa & Lachy
   Mobile-first, single-page wedding site
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Palette inspired by familysupper.club cards */
  --color-cream: #fffcf3;
  --color-rust: #9d3d2c;
  --color-mustard: #d4a84b;
  --color-sage: #c5c5b0;
  --color-coral: #e07050;

  /* Hero colors (brand) */
  --color-green: #294636;
  --color-pink: #f9babd;

  /* New palette from familysupper.club */
  --color-terracotta: #9d3d2c;
  --color-purple: #c9b3b0;
  --color-off-yellow: #ddd17a;

  /* Utility */
  --color-white: #ffffff;

  /* Typography */
  --font-primary: 'Georgia', serif;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Layout */
  --nav-height: 60px;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-md);
  scroll-padding-bottom: calc(var(--nav-height) + var(--space-lg));
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-cream);
  color: var(--color-green);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h2, h3 {
  font-weight: 400;
  letter-spacing: 0.02em;
}

.section__heading {
  font-size: clamp(2rem, 8vw, 4rem);
  color: var(--color-pink);
  margin-bottom: var(--space-lg);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.section {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xl) var(--space-md);
}

.section__inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.section--hero {
  position: relative;
  overflow: hidden;
  padding: 0 8vw;
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background-color: #f5f4f1;
  transition: background-color 1.2s ease;
}

.section--hero.is-revealed {
  background-color: var(--color-green);
}

.hero__content {
  position: relative;
  width: 100%;
  padding-bottom: calc(var(--nav-height) + clamp(12vh, 16vw, 24vh));
  padding-top: 12vh;
}

/* Disco ball - positioned relative to text container */
.hero__disco-ball {
  position: absolute;
  top: -12vh;
  right: 4px;
  width: 25%;
  max-width: 130px;
  min-width: 75px;
  z-index: 2;
}

.hero__disco-ball-img {
  width: 100%;
  height: auto;
  transition: filter 1.2s ease;
}

.section--hero.is-revealed .hero__disco-ball-img {
  filter: brightness(0) saturate(100%) invert(95%) sepia(10%) saturate(200%) hue-rotate(10deg) brightness(103%);
}

/* Venue header */
.hero__venue {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #2a2028;
  transform: translateY(-8vh);
  margin-bottom: clamp(1rem, 3vw, 2rem);
  transition: color 1.2s ease;
}

.section--hero.is-revealed .hero__venue {
  color: var(--color-pink);
}

/* Typography stack */
.hero__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 95%;
  max-width: 900px;
  margin: 0 auto;
  transform: translateX(3%);
  position: relative;
}

.hero__line {
  width: 100%;
  position: relative;
}

.hero__svg {
  width: 100%;
  height: auto;
  display: block;
  transition: filter 1.2s ease;
}

.section--hero.is-revealed .hero__svg {
  filter: brightness(0) saturate(100%) invert(82%) sepia(17%) saturate(653%) hue-rotate(299deg) brightness(101%) contrast(97%);
}

/* Individual line sizing - smaller text, more line spacing */
.hero__line--date {
  width: 48%;
  margin-bottom: clamp(1rem, 4vw, 2.5rem);
}

.hero__line--vanessa {
  width: 82%;
  margin-bottom: clamp(1rem, 4vw, 2.5rem);
}

.hero__line--and {
  width: 40%;
  margin-bottom: clamp(1rem, 4vw, 2.5rem);
}

/* LACHY line - aligned directly under the D of AND */
.hero__line--lachy {
  position: relative;
  width: 58%;
  margin-left: 30%;
}

.hero__svg--lachy {
  width: 100%;
  height: auto;
  display: block;
  transition: filter 1.2s ease;
}

.section--hero.is-revealed .hero__svg--lachy {
  filter: brightness(0) saturate(100%) invert(82%) sepia(17%) saturate(653%) hue-rotate(299deg) brightness(101%) contrast(97%);
}

/* Record - left of LACHY, music note touching AND above */
.hero__record {
  position: absolute;
  right: 100%;
  top: 0;
  transform: translateY(-15%);
  width: 38%;
  margin-right: 0;
  z-index: 2;
}

.hero__record-img {
  width: 100%;
  height: auto;
}

/* Clink - left side, where record was */
.hero__clink {
  position: absolute;
  right: 100%;
  top: 0;
  transform: translateY(5%);
  width: 55%;
  margin-right: 8%;
  z-index: 2;
}

.hero__clink-img {
  width: 100%;
  height: auto;
  transition: filter 1.2s ease;
}

.section--hero.is-revealed .hero__clink-img {
  filter: brightness(0) saturate(100%) invert(95%) sepia(10%) saturate(200%) hue-rotate(10deg) brightness(103%);
}

/* Hero RSVP text */
.hero__rsvp {
  position: absolute;
  bottom: clamp(-18vh, -15vw, -14vh);
  right: 4px;
  font-family: var(--font-sans);
  font-size: clamp(1.125rem, 3.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #2a2028;
  text-align: right;
  line-height: 1.1;
  transition: color 1.2s ease;
}

.section--hero.is-revealed .hero__rsvp {
  color: var(--color-pink);
}

/* --------------------------------------------------------------------------
   Details Section
   -------------------------------------------------------------------------- */
.section--details {
  position: relative;
  background-color: #f5f4f1;
  color: #2a2028;
  font-family: var(--font-sans);
  min-height: auto;
  padding: var(--space-xl) var(--space-md) 0;
  margin-top: -1px;
  transition: background-color 1.2s ease, color 1.2s ease;
}

.section--details.is-revealed {
  background-color: var(--color-green);
  color: var(--color-pink);
}

.details__heading {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 400;
  font-style: italic;
  margin-bottom: var(--space-xs);
  color: #f173ac;
  transition: color 1.2s ease;
}

.section--details.is-revealed .details__heading {
  color: #f7f2db;
}

.details__intro {
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: var(--space-2xl);
  max-width: 800px;
}

.details__grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.details__item {
  font-family: var(--font-sans);
  position: relative;
  display: grid;
  grid-template-columns: auto 1px 1fr;
  gap: 0 clamp(1rem, 3vw, 2.5rem);
}

/* Horizontal line at bottom */
.details__item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 1px;
  background-color: currentColor;
  opacity: 0.3;
  transition: background-color 1.2s ease;
}

/* Horizontal line at top for first item */
.details__item:first-child::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 1px;
  background-color: currentColor;
  opacity: 0.3;
  transition: background-color 1.2s ease;
}


.details__label {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 400;
  font-style: italic;
  color: #f173ac;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  padding: var(--space-lg) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: color 1.2s ease;
}

.section--details.is-revealed .details__label {
  color: #f7f2db;
}

/* Vertical line between label and content */
.details__divider {
  background-color: currentColor;
  opacity: 0.3;
  width: 1px;
  transition: background-color 1.2s ease;
}

.details__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-lg) var(--space-md);
}

.details__value {
  font-size: clamp(1.125rem, 4vw, 1.75rem);
  font-weight: 500;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.details__sub {
  font-size: clamp(0.875rem, 3vw, 1.25rem);
  font-weight: 600;
  opacity: 0.7;
}

@media (min-width: 600px) {
  .details__grid {
    gap: 0;
  }

  .details__item {
    padding: 0 var(--space-lg);
  }

  .details__label {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    padding: 2.5rem 3.5rem 2.5rem 0;
  }

  .details__content {
    padding: 2.5rem 0 2.5rem 1.5rem;
  }

  .details__value {
    font-size: clamp(1.125rem, 4vw, 1.75rem);
    margin-bottom: 0.5rem;
  }

  .details__sub {
    font-size: clamp(0.875rem, 2.5vw, 1.125rem);
  }
}


/* --------------------------------------------------------------------------
   Marquee
   -------------------------------------------------------------------------- */
.marquee {
  background-color: #f5f4f1;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid #2a2028;
  border-bottom: 1px solid #2a2028;
  transition: background-color 1.2s ease, border-color 1.2s ease;
}

.marquee.is-revealed {
  background-color: var(--color-pink);
  border-top-color: transparent;
  border-bottom-color: var(--color-green);
}

.marquee__track {
  display: inline-flex;
  animation: marquee 35s linear infinite;
  will-change: transform;
}

.marquee__text {
  display: flex;
  flex-shrink: 0;
  padding-right: 0;
}

.marquee__word {
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: #2a2028;
  font-weight: 600;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  transition: color 1.2s ease;
}

.marquee.is-revealed .marquee__word {
  color: var(--color-green);
}

.marquee__word::after {
  content: '☼';
  display: inline-block;
  margin: 0 0.75em;
  font-size: 1.2em;
  font-weight: 900;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-33.333%);
  }
}

/* --------------------------------------------------------------------------
   Recovery Section
   -------------------------------------------------------------------------- */
.section--recovery {
  background-color: var(--color-pink);
  color: var(--color-green);
  font-family: var(--font-sans);
  min-height: auto;
}

.recovery__heading {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 400;
  font-style: italic;
  margin-bottom: var(--space-xs);
  color: var(--color-green);
}

.recovery__intro {
  font-family: var(--font-sans);
  font-size: clamp(1.125rem, 4vw, 1.75rem);
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: var(--space-lg);
  max-width: 800px;
}

.section--recovery .details__item {
  color: var(--color-green);
  display: block;
  border: none;
  text-align: left;
}

.section--recovery .details__label {
  writing-mode: horizontal-tb;
  transform: none;
  padding: 0;
  margin-bottom: var(--space-xs);
  text-align: left;
  display: block;
  color: var(--color-green);
}

.section--recovery .details__divider {
  display: none;
}

.section--recovery .details__content {
  padding: 0;
}

.section--recovery .details__item::after,
.section--recovery .details__item::before {
  display: none;
}

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

.recovery__img {
  width: 100%;
  max-width: 700px;
  border-radius: 20px;
}

@media (min-width: 900px) {
  .section--recovery .section__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto 1fr;
    gap: var(--space-xs) var(--space-xl);
    align-items: start;
  }

  .recovery__heading {
    grid-column: 1;
    grid-row: 1;
  }

  .recovery__intro {
    grid-column: 1;
    grid-row: 2;
  }

  .recovery__image {
    grid-column: 2;
    grid-row: 1 / span 3;
    margin-bottom: 0;
  }

  .recovery__img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
  }

  .recovery__content {
    grid-column: 1;
    grid-row: 3;
  }

  .section--recovery .details__label {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
  }

  .section--recovery .details__value {
    font-size: clamp(1.5rem, 4vw, 2rem);
  }
}

.recovery__content {
  text-align: left;
}

.recovery__details {
  margin-top: var(--space-lg);
  border: none;
}

.recovery__decoration {
  display: flex;
  justify-content: center;
}

.recovery__clink {
  width: clamp(80px, 25vw, 150px);
  opacity: 0;
  transform: scaleX(1.4);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.recovery__clink.is-clinking {
  opacity: 1;
  transform: scaleX(1);
}

/* --------------------------------------------------------------------------
   RSVP Section
   -------------------------------------------------------------------------- */
.section--rsvp {
  background-color: #f5f4f1;
  color: #2a2028;
  font-family: var(--font-sans);
}

.rsvp__heading {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 400;
  font-style: italic;
  margin-bottom: var(--space-xs);
  color: #f173ac;
}

.rsvp__intro {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: var(--space-2xl);
  max-width: 800px;
}

.rsvp__form {
  max-width: 500px;
}

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

.form__label {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  font-style: italic;
  margin-bottom: var(--space-xs);
  color: #f173ac;
}

.form__input,
.form__select,
.form__textarea {
  width: 100%;
  padding: var(--space-sm);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  color: #2a2028;
  background-color: var(--color-white);
  border: 2px solid #2a2028;
  border-radius: 8px;
  transition: border-color 0.2s ease;
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
  outline: none;
  border-color: #f173ac;
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: #2a2028;
  opacity: 0.4;
}

.form__select {
  cursor: pointer;
}

.form__textarea {
  resize: vertical;
  min-height: 80px;
}

.form__radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form__radio-button {
  display: block;
  cursor: pointer;
}

.form__radio-button input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.form__radio-button-label {
  display: block;
  padding: var(--space-sm) var(--space-md);
  font-weight: 600;
  text-align: center;
  background-color: var(--color-white);
  border: 2px solid #2a2028;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.form__radio-button input[type="radio"]:checked + .form__radio-button-label {
  background-color: #f173ac;
  border-color: #f173ac;
  color: var(--color-white);
}

.form__radio-button input[type="radio"]:focus + .form__radio-button-label {
  border-color: #f173ac;
}

@media (min-width: 640px) {
  .form__radio-group {
    flex-direction: row;
  }

  .form__radio-button {
    flex: 1;
  }
}

.form__submit {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-white);
  background-color: #2a2028;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.form__submit:hover {
  background-color: #f173ac;
  transform: translateY(-2px);
}

.form__submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.rsvp__success {
  text-align: center;
  padding: var(--space-2xl) 0;
}

.rsvp__success-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 3rem);
  font-style: italic;
  color: #f173ac;
  margin-bottom: var(--space-sm);
}

.rsvp__success-message {
  font-size: clamp(1.125rem, 4vw, 1.5rem);
  font-weight: 500;
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  background-color: #2a2028;
  padding: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.footer__back-to-top {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.footer__back-to-top:hover {
  opacity: 1;
  color: #f173ac;
}

.footer__arrow {
  font-size: 1.25rem;
}

.footer__lochness {
  width: clamp(120px, 35vw, 180px);
  height: auto;
  filter: brightness(0) saturate(100%) invert(95%) sepia(10%) saturate(200%) hue-rotate(10deg) brightness(103%);
}

/* --------------------------------------------------------------------------
   Bottom Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-sm);
  pointer-events: none;
  font-family: var(--font-sans);
}

.nav__inner {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  background-color: #2a2028;
  border-radius: 8px;
  padding: var(--space-xs) var(--space-sm);
  max-width: 400px;
  margin: 0 auto;
  pointer-events: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav__link {
  padding: var(--space-xs) var(--space-sm);
  font-size: clamp(0.75rem, 2.5vw, 0.875rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffffff;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
}

.nav__link:hover {
  color: #f173ac;
}

.nav__link.is-active {
  background-color: #f9babd;
  color: #2a2028;
  font-weight: 700;
}

.nav.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}

.nav {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* --------------------------------------------------------------------------
   Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  :root {
    --space-md: 2rem;
    --space-lg: 3rem;
    --space-xl: 4rem;
  }

  .section {
    padding: var(--space-3xl) var(--space-lg);
  }

  .section--details {
    padding: var(--space-3xl) var(--space-lg) 0;
  }

  .section--hero {
    padding: 0 10vw;
  }

  .hero__content {
    max-width: 700px;
    margin: 0 auto;
  }

  .hero__disco-ball {
    max-width: 140px;
  }

  .nav__inner {
    gap: 0.5rem;
    padding: 0.5rem 1rem;
  }

  .nav__link {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
}

@media (min-width: 1200px) {
  .hero__content {
    max-width: 800px;
  }

  .hero__disco-ball {
    max-width: 160px;
  }
}

/* --------------------------------------------------------------------------
   Small Screen Adjustments (340px minimum)
   -------------------------------------------------------------------------- */
@media (max-width: 380px) {
  .section--hero {
    padding: 0 4vw;
  }

  .hero__disco-ball {
    width: 20%;
    min-width: 55px;
    max-width: 75px;
  }

  .hero__line--date {
    width: 78%;
    margin-bottom: 2.5vw;
  }

  .hero__line--vanessa {
    width: 85%;
    margin-bottom: 2.5vw;
  }

  .hero__line--and {
    width: 42%;
    margin-bottom: 2.5vw;
  }

  .hero__line--lachy {
    width: 55%;
    margin-left: 20%;
  }

  .hero__record {
    width: 40%;
    margin-right: 0;
  }

  .hero__clink {
    width: 40%;
    margin-left: -8%;
  }

  .nav__inner {
    padding: var(--space-xs);
    gap: 2px;
  }

  .nav__link {
    padding: var(--space-xs) 0.75rem;
    font-size: 0.7rem;
  }
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
