/* ============================================
   Wedding Invitation - Pure CSS
   Fonts: Cormorant Garamond (serif), Montserrat (sans)
   ============================================ */

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

:root {
	--background: #f7f3ee;
	--foreground: #3a3228;
	--card: #faf7f2;
	--card-foreground: #3a3228;
	--primary: #5a7a52;
	--primary-foreground: #f7f3ee;
	--secondary: #f0ebe4;
	--secondary-foreground: #4a3f34;
	--muted: #efe9e1;
	--muted-foreground: #7a6e62;
	--accent: #c9a96e;
	--accent-foreground: #3a3228;
	--border: #e2dbd2;
	--input: #e8e1d8;
	--ring: #5a7a52;
	--font-serif: 'Cormorant Garamond', serif;
	--font-sans: 'Montserrat', sans-serif;
}

html {
	scroll-behavior: smooth;
}

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

main {
	overflow: hidden;
}

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

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

/* --- Utility --- */
.text-center { text-align: center; }

/* --- Animations (Intersection Observer driven) --- */
.fade-up {
	opacity: 0;
	transform: translateY(40px);
	transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-up.visible {
	opacity: 1;
	transform: translateY(0);
}

.fade-in {
	opacity: 0;
	transition: opacity 0.8s ease;
}
.fade-in.visible {
	opacity: 1;
}

.fade-left {
	opacity: 0;
	transform: translateX(-50px);
	transition: opacity 1s ease, transform 1s ease;
}
.fade-left.visible {
	opacity: 1;
	transform: translateX(0);
}

.fade-right {
	opacity: 0;
	transform: translateX(30px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-right.visible {
	opacity: 1;
	transform: translateX(0);
}

.scale-in {
	opacity: 0;
	transform: scale(0);
	transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.scale-in.visible {
	opacity: 1;
	transform: scale(1);
}

.scale-x-in {
	transform: scaleX(0);
	transition: transform 0.8s ease;
}
.scale-x-in.visible {
	transform: scaleX(1);
}

.scale-y-in {
	transform: scaleY(0);
	transform-origin: top;
	transition: transform 1.5s ease;
}
.scale-y-in.visible {
	transform: scaleY(1);
}

/* Delay utility classes */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }
.delay-7 { transition-delay: 0.7s; }
.delay-8 { transition-delay: 0.8s; }
.delay-10 { transition-delay: 1.0s; }
.delay-12 { transition-delay: 1.2s; }
.delay-15 { transition-delay: 1.5s; }


/* ============================================
   HERO SECTION
   ============================================ */
.hero {
	position: relative;
	min-height: 700px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.hero__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	animation: heroZoom 1.5s ease-out forwards;
}
@keyframes heroZoom {
	from { transform: scale(1.1); }
	to   { transform: scale(1); }
}

.hero__bg-image {
	position: absolute;
	inset: 0;
	background: url('assets/hero-wedding.webp') center/cover no-repeat;
}

.hero__bg-overlay {
	position: absolute;
	inset: 0;
	background-color: var(--background);
	opacity: 0.4;
}

/* Floating decorative circles */
.hero__circle {
	position: absolute;
	border-radius: 50%;
	border: 1px solid;
}
.hero__circle--1 {
	top: 5rem;
	left: 2.5rem;
	width: 8rem;
	height: 8rem;
	border-color: rgba(90,122,82,0.2);
	animation: floatUp 6s ease-in-out infinite;
}
.hero__circle--2 {
	bottom: 10rem;
	right: 5rem;
	width: 6rem;
	height: 6rem;
	border-color: rgba(201,169,110,0.3);
	animation: floatDown 5s ease-in-out 1s infinite;
}

@keyframes floatUp {
	0%, 100% { transform: translateY(0) rotate(0deg); }
	50%      { transform: translateY(-20px) rotate(5deg); }
}
@keyframes floatDown {
	0%, 100% { transform: translateY(0) rotate(0deg); }
	50%      { transform: translateY(15px) rotate(-5deg); }
}

/* Hero content */
.hero__content {
	position: relative;
	z-index: 10;
	text-align: center;
	padding: 0 1rem;
	max-width: 56rem;
	margin: 0 auto;
}

.hero__subtitle {
	font-size: 0.875rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--muted-foreground);
	margin-bottom: 1.5rem;
	font-family: var(--font-sans);
}

.hero__title {
	font-family: var(--font-serif);
	font-size: clamp(3.5rem, 8vw, 8rem);
	font-weight: 300;
	color: var(--foreground);
	margin-bottom: 1rem;
	line-height: 1.1;
}

.hero__ampersand {
	display: block;
	color: var(--primary);
	font-size: clamp(2.5rem, 5vw, 4rem);
	font-family: var(--font-serif);
	font-style: italic;
	margin: 1rem 0;
}

.hero__date {
	margin-top: 3rem;
	font-size: clamp(1rem, 2vw, 1.25rem);
	color: var(--muted-foreground);
	font-family: var(--font-sans);
	font-weight: 300;
	letter-spacing: 0.05em;
}

.hero__cta {
	display: inline-block;
	margin-top: 4rem;
	padding: 1rem 2rem;
	border: 1px solid rgba(58,50,40,0.3);
	color: var(--foreground);
	font-size: 0.875rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	font-family: var(--font-sans);
	transition: all 0.5s ease;
}
.hero__cta:hover {
	background-color: var(--foreground);
	color: var(--background);
}

.hero__gradient {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 8rem;
	background: linear-gradient(to top, var(--background), transparent);
}


/* ============================================
   COUNTDOWN SECTION
   ============================================ */
.countdown {
	padding: 8rem 0;
	background-color: var(--secondary);
	position: relative;
	overflow: hidden;
}

.countdown__line {
	position: absolute;
	top: 0;
	width: 1px;
	height: 100%;
	background-color: var(--border);
}
.countdown__line--left {
	left: 50%;
}
.countdown__line--right {
	display: none;
}

.countdown__container {
	max-width: 72rem;
	margin: 0 auto;
	padding: 0 1rem;
}

.countdown__header {
	text-align: center;
	margin-bottom: 4rem;
}

.countdown__label {
	font-size: 0.875rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--muted-foreground);
	margin-bottom: 1rem;
	font-family: var(--font-sans);
}

.countdown__title {
	font-family: var(--font-serif);
	font-size: clamp(2.5rem, 5vw, 4rem);
	font-weight: 300;
	color: var(--foreground);
}

.countdown__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 2rem;
}

.countdown__unit {
	text-align: center;
}

.countdown__number-wrap {
	position: relative;
	display: inline-block;
	transition: transform 0.2s ease;
}
.countdown__number-wrap:hover {
	transform: scale(1.05);
}

.countdown__number {
	font-family: var(--font-serif);
	font-size: clamp(3.5rem, 8vw, 6rem);
	font-weight: 300;
	color: var(--foreground);
	display: block;
	line-height: 1;
}

.countdown__underline {
	position: absolute;
	bottom: -0.5rem;
	left: 50%;
	transform: translateX(-50%);
	width: 3rem;
	height: 1px;
	background-color: var(--primary);
}

.countdown__unit-label {
	margin-top: 1.5rem;
	font-size: 0.875rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--muted-foreground);
	font-family: var(--font-sans);
}


/* ============================================
   STORY SECTION
   ============================================ */
.story {
	padding: 8rem 0;
	background-color: var(--background);
	position: relative;
	overflow: hidden;
}

.story__container {
	max-width: 80rem;
	margin: 0 auto;
	padding: 0 1rem;
}

.story__header {
	text-align: center;
	margin-bottom: 6rem;
}

.story__label {
	font-size: 0.875rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--muted-foreground);
	margin-bottom: 1rem;
	font-family: var(--font-sans);
}

.story__title {
	font-family: var(--font-serif);
	font-size: clamp(2.5rem, 5vw, 4rem);
	font-weight: 300;
	color: var(--foreground);
}

.story__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 4rem;
	align-items: center;
}

/* Image side */
.story__image-wrap {
	position: relative;
}

.story__image-container {
	position: relative;
	aspect-ratio: 4/5;
	overflow: hidden;
}

.story__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.story__image-frame {
	position: absolute;
	inset: 1rem;
	border: 1px solid rgba(90,122,82,0.3);
	pointer-events: none;
}

.story__image-blob {
	position: absolute;
	bottom: -2rem;
	right: -2rem;
	width: 12rem;
	height: 12rem;
	background-color: var(--secondary);
	border-radius: 50%;
	z-index: -1;
}

/* Timeline */
.story__timeline {
	position: relative;
}

.story__timeline-line {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 1px;
	background-color: var(--border);
}

.story__timeline-items {
	padding-left: 3rem;
	display: flex;
	flex-direction: column;
	gap: 3rem;
}

.story__timeline-item {
	position: relative;
}

.story__timeline-dot {
	position: absolute;
	left: -3rem;
	top: 0;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 50%;
	background-color: var(--background);
	border: 2px solid var(--primary);
	display: flex;
	align-items: center;
	justify-content: center;
}

.story__timeline-dot-inner {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background-color: var(--primary);
}

.story__year {
	color: var(--primary);
	font-family: var(--font-serif);
	font-size: 1.5rem;
}

.story__event-title {
	font-family: var(--font-serif);
	font-size: clamp(1.5rem, 3vw, 1.875rem);
	color: var(--foreground);
	margin-top: 0.5rem;
	margin-bottom: 0.75rem;
}

.story__event-desc {
	color: var(--muted-foreground);
	font-family: var(--font-sans);
	font-weight: 300;
	line-height: 1.7;
}


/* ============================================
   DETAILS SECTION
   ============================================ */
.details {
	padding: 8rem 0;
	background-color: var(--secondary);
	position: relative;
	overflow: hidden;
}

.details__circle {
	position: absolute;
	top: -8rem;
	right: -8rem;
	width: 24rem;
	height: 24rem;
	border-radius: 50%;
	border: 1px solid rgba(90,122,82,0.1);
}

.details__container {
	max-width: 80rem;
	margin: 0 auto;
	padding: 0 1rem;
}

.details__header {
	text-align: center;
	margin-bottom: 6rem;
}

.details__label {
	font-size: 0.875rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--muted-foreground);
	margin-bottom: 1rem;
	font-family: var(--font-sans);
}

.details__title {
	font-family: var(--font-serif);
	font-size: clamp(2.5rem, 5vw, 4rem);
	font-weight: 300;
	color: var(--foreground);
}

.details__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 4rem;
	align-items: start;
}

/* Venue image */
.details__venue {
	position: relative;
	order: 2;
}

.details__venue-image-wrap {
	position: relative;
	aspect-ratio: 4/3;
	overflow: hidden;
}

.details__venue-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.details__venue-caption {
	position: absolute;
	bottom: -1.5rem;
	left: 1.5rem;
	right: 1.5rem;
	background-color: var(--card);
	padding: 1.5rem;
	box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
}

.details__venue-name {
	font-family: var(--font-serif);
	font-size: 1.25rem;
	color: var(--foreground);
}

.details__venue-address {
	color: var(--muted-foreground);
	font-family: var(--font-sans);
	font-size: 0.875rem;
	margin-top: 0.25rem;
}

/* Schedule */
.details__schedule {
	order: 1;
}

.details__schedule-title {
	font-family: var(--font-serif);
	font-size: 1.875rem;
	color: var(--foreground);
	margin-bottom: 3rem;
}

.details__events {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.details__event {
	display: flex;
	gap: 2rem;
	align-items: flex-start;
}

.details__event-time {
	text-align: right;
	width: 5rem;
	flex-shrink: 0;
	font-family: var(--font-serif);
	font-size: 1.875rem;
	color: var(--primary);
}

.details__event-info {
	position: relative;
	padding-left: 2rem;
	border-left: 1px solid var(--border);
	transition: border-color 0.5s ease;
}
.details__event:hover .details__event-info {
	border-left-color: var(--primary);
}

.details__event-dot {
	position: absolute;
	left: -0.375rem;
	top: 0.5rem;
	width: 0.75rem;
	height: 0.75rem;
	border-radius: 50%;
	background-color: var(--secondary);
	border: 2px solid var(--primary);
	transition: transform 0.3s ease;
}
.details__event:hover .details__event-dot {
	transform: scale(1.3);
}

.details__event-name {
	font-family: var(--font-serif);
	font-size: 1.25rem;
	color: var(--foreground);
	margin-bottom: 0.25rem;
}

.details__event-location {
	color: var(--muted-foreground);
	font-family: var(--font-sans);
}

.details__event-addr {
	color: var(--muted-foreground);
	opacity: 0.7;
	font-family: var(--font-sans);
	font-size: 0.875rem;
}


/* ============================================
   RSVP SECTION
   ============================================ */
.rsvp {
	padding: 8rem 0;
	background-color: var(--background);
	position: relative;
	overflow: hidden;
}

/* Spinning decorative circles */
.rsvp__circle {
	position: absolute;
	border-radius: 50%;
	border: 1px solid;
}
.rsvp__circle--1 {
	top: 5rem;
	left: 2.5rem;
	width: 16rem;
	height: 16rem;
	border-color: rgba(201,169,110,0.2);
	animation: spinSlow 60s linear infinite;
}
.rsvp__circle--2 {
	bottom: 5rem;
	right: 2.5rem;
	width: 12rem;
	height: 12rem;
	border-color: rgba(90,122,82,0.1);
	animation: spinSlow 45s linear infinite reverse;
}
@keyframes spinSlow {
	from { transform: rotate(0deg); }
	to   { transform: rotate(360deg); }
}

.rsvp__container {
	max-width: 48rem;
	margin: 0 auto;
	padding: 0 1rem;
	position: relative;
	z-index: 10;
}

.rsvp__header {
	text-align: center;
	margin-bottom: 4rem;
}

.rsvp__label {
	font-size: 0.875rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--muted-foreground);
	margin-bottom: 1rem;
	font-family: var(--font-sans);
}

.rsvp__title {
	font-family: var(--font-serif);
	font-size: clamp(2.5rem, 5vw, 4rem);
	font-weight: 300;
	color: var(--foreground);
	margin-bottom: 1.5rem;
}

.rsvp__desc {
	color: var(--muted-foreground);
	font-family: var(--font-sans);
	font-weight: 300;
	max-width: 32rem;
	margin: 0 auto;
	line-height: 1.7;
}

/* Form */
.rsvp__form {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.rsvp__row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

.rsvp__field label {
	display: block;
	font-size: 0.875rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--muted-foreground);
	margin-bottom: 0.75rem;
	font-family: var(--font-sans);
}

.rsvp__input,
.rsvp__select {
	width: 100%;
	background-color: var(--secondary);
	border: 1px solid var(--border);
	border-radius: 0.375rem;
	padding: 1rem;
	font-family: var(--font-sans);
	font-size: 1rem;
	color: var(--foreground);
	transition: border-color 0.3s ease;
	outline: none;
}
.rsvp__input:focus,
.rsvp__select:focus {
	border-color: var(--primary);
}
.rsvp__input::placeholder {
	color: var(--muted-foreground);
	opacity: 0.6;
}

.rsvp__attend-buttons {
	display: flex;
	gap: 1rem;
}

.rsvp__attend-btn {
	flex: 1;
	padding: 1rem 1.5rem;
	border: 1px solid var(--border);
	background: transparent;
	color: var(--foreground);
	font-family: var(--font-sans);
	font-size: 0.875rem;
	letter-spacing: 0.05em;
	cursor: pointer;
	transition: all 0.3s ease;
}
.rsvp__attend-btn:hover {
	border-color: var(--primary);
}
.rsvp__attend-btn.active {
	background-color: var(--primary);
	color: var(--primary-foreground);
	border-color: var(--primary);
}

.rsvp__submit-wrap {
	padding-top: 1.5rem;
	text-align: center;
}

.rsvp__submit {
	padding: 1.25rem 3rem;
	background-color: var(--foreground);
	color: var(--background);
	border: none;
	font-size: 0.875rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	font-family: var(--font-sans);
	cursor: pointer;
	transition: all 0.5s ease;
}
.rsvp__submit:hover {
	opacity: 0.9;
}

/* Success message */
.rsvp__success {
	text-align: center;
	padding: 4rem 0;
}

.rsvp__success-icon {
	width: 6rem;
	height: 6rem;
	border-radius: 50%;
	background-color: rgba(90,122,82,0.1);
	margin: 0 auto 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: popIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popIn {
	from { transform: scale(0); }
	to   { transform: scale(1); }
}

.rsvp__success-icon svg {
	width: 3rem;
	height: 3rem;
	color: var(--primary);
}

.rsvp__success h3 {
	font-family: var(--font-serif);
	font-size: 1.875rem;
	color: var(--foreground);
	margin-bottom: 1rem;
}

.rsvp__success p {
	color: var(--muted-foreground);
	font-family: var(--font-sans);
}


/* ============================================
   FOOTER SECTION
   ============================================ */
.footer {
	padding: 6rem 0;
	background-color: var(--foreground);
	color: var(--background);
	position: relative;
	overflow: hidden;
}

.footer__monogram {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 1.5s ease;
}
.footer__monogram.visible {
	opacity: 0.05;
}

.footer__monogram span {
	font-family: var(--font-serif);
	font-size: clamp(10rem, 30vw, 30rem);
	font-weight: 300;
	line-height: 1;
}

.footer__container {
	max-width: 56rem;
	margin: 0 auto;
	padding: 0 1rem;
	text-align: center;
	position: relative;
	z-index: 10;
}

.footer__title {
	font-family: var(--font-serif);
	font-size: clamp(2.5rem, 5vw, 4rem);
	font-weight: 300;
	margin-bottom: 2rem;
	text-wrap: balance;
}

.footer__divider {
	width: 6rem;
	height: 1px;
	background-color: rgba(247,243,238,0.3);
	margin: 2rem auto;
}

.footer__names {
	font-family: var(--font-serif);
	font-style: italic;
	font-size: clamp(1.5rem, 3vw, 1.875rem);
	opacity: 0.8;
	margin-bottom: 2rem;
}

.footer__date {
	opacity: 0.6;
	font-family: var(--font-sans);
	font-size: 0.875rem;
	letter-spacing: 0.1em;
}

.footer__bottom {
	margin-top: 4rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(247,243,238,0.1);
}

.footer__credits {
	opacity: 0.4;
	font-family: var(--font-sans);
	font-size: 0.75rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
}


/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 768px) {
	.countdown__grid {
		grid-template-columns: repeat(4, 1fr);
		gap: 3rem;
	}
	.countdown__line--left {
		left: 25%;
	}
	.countdown__line--right {
		display: block;
		right: 25%;
	}
	.rsvp__row {
		grid-template-columns: 1fr 1fr;
	}
}

@media (min-width: 1024px) {
	.story__grid {
		grid-template-columns: 1fr 1fr;
		gap: 4rem;
	}
	.details__grid {
		grid-template-columns: 1fr 1fr;
		gap: 4rem;
	}
	.details__venue {
		order: 1;
	}
}

/* ============================================
   Music Toggle Button
   ============================================ */
.music-toggle {
	position: fixed;
	bottom: 2rem;
	right: 2rem;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 50%;
	background-color: var(--primary);
	color: var(--background);
	border: none;
	box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2), 0 4px 6px -2px rgba(0,0,0,0.1);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 1000;
	transition: transform 0.3s ease, background-color 0.3s ease;
}
.music-toggle:hover {
	transform: scale(1.1);
	background-color: var(--foreground);
}
