/* styles.css */
:root {
    --primary-blue: #0F3B81;
    --primary-light: #1E4EA2;
    --accent-red: #D97B53; /* Terracotta from PDF */
    --accent-pink: #FADADD;
    --bg-cream: #FCFBF9; /* Off-white from PDF */
    --text-dark: #2C2C2C;
    --text-light: #666666;
    --foliage-green: #8A9A86; /* Sage green from PDF */
    --border-gold: #D4AF37;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
    /* Premium Design Tokens */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-premium: 0 20px 40px rgba(10, 54, 128, 0.08);
    --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse-gold {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Button Styles */
.btn-primary {
    display: inline-block;
    background-color: var(--accent-red);
    color: white;
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-family: var(--font-sans);
    font-weight: 500;
    letter-spacing: 1px;
    order: 5;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(217, 43, 43, 0.3);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-red);
    border-color: var(--accent-red);
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: var(--primary-blue);
    padding: 0.8rem 2rem;
    text-decoration: none;
    border: 2px solid var(--primary-blue);
    border-radius: 50px;
    font-family: var(--font-sans);
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--primary-blue);
    color: white;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: var(--primary-blue);
    background-image: 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath d='M40 0 L80 40 L40 80 L0 40 Z' fill='none' stroke='rgba%28255, 255, 255, 0.15%29' stroke-width='1.5'/%3E%3Cpath d='M40 20 L50 40 L40 60 L30 40 Z' fill='%23D97B53' opacity='0.3'/%3E%3Cpath d='M20 40 L40 50 L60 40 L40 30 Z' fill='%23D97B53' opacity='0.3'/%3E%3Ccircle cx='40' cy='40' r='15' fill='none' stroke='%23D4AF37' stroke-width='1' opacity='0.3'/%3E%3C/svg%3E"),
        linear-gradient(rgba(15, 59, 129, 0.85), rgba(15, 59, 129, 0.95));
    background-size: 60px 60px, 100% 100%;
    color: white;
    text-align: center;
    overflow: hidden;
    animation: fadeIn 1.5s ease-out;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 20%, rgba(10,54,128,0.6) 80%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 3rem 3rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 650px;
    background: transparent; 
    border: 1px solid rgba(15, 59, 129, 0.3);
    border-radius: 20px;
    max-width: 800px;
    width: 90%;
    box-shadow: var(--shadow-premium);
    animation: fadeIn 2s ease-out;
    overflow: hidden;
}

.hero-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-cream) url("images/vibrant_couple.png") no-repeat;
    background-position: center center;
    background-size: contain;
    opacity: 1; /* Full tone and vibrancy */
    z-index: -1;
    border-radius: 20px;
}

.tile-border {
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--border-gold) 30%, var(--border-gold) 70%, transparent);
    width: 100%;
    position: absolute;
    left: 0;
}

.tile-border.top {
    top: 0;
    border-radius: 20px 20px 0 0;
}

.tile-border.bottom {
    bottom: 0;
    border-radius: 0 0 20px 20px;
}

.title {
    font-family: var(--font-serif);
    font-size: 4.5rem;
    margin-bottom: 1rem;
    letter-spacing: 3px;
    color: #ffffff;
    text-shadow: 0 2px 10px var(--primary-blue), 0 0 20px var(--primary-blue), 0 0 5px var(--primary-blue);
    order: 1;
}

.subtitle {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 2rem;
    margin-bottom: 0.2rem;
    margin-top: auto; /* Push text to the bottom */
    color: var(--border-gold);
    text-shadow: 0 2px 10px var(--primary-blue), 0 0 20px var(--primary-blue);
    order: 2;
}

.date {
    font-size: 1.3rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 0.5rem; /* Reduced space to timer */
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding: 1.2rem 2.5rem;
    display: inline-block;
    color: #ffffff;
    text-shadow: 0 2px 10px var(--primary-blue), 0 0 20px var(--primary-blue);
    background-color: rgba(15, 59, 129, 0.4);
    border-radius: 4px;
    order: 3; /* Move below subtitle */
}

/* Countdown */
.countdown-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 0;
    margin-bottom: 2rem;
    color: var(--primary-blue);
    order: 4;
}

.time-unit {
    display: flex;
    flex-direction: column;
}

.time-unit span:first-child {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 2px 10px var(--primary-blue), 0 0 20px var(--primary-blue);
}

.time-unit .label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 2px 10px var(--primary-blue);
}

/* Sections */
.section {
    padding: 6rem 0;
}

h2 {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--primary-blue);
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background-color: var(--accent-red);
    margin: 1rem auto 0;
}

.lead {
    font-size: 1.25rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem;
    color: var(--text-light);
}

.story p {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.peony-decoration {
    width: 200px;
    height: 50px;
    margin: 3rem auto 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 50' width='200' height='50'%3E%3Cpath d='M10 25 C30 5 70 5 90 25 C70 45 30 45 10 25 Z' fill='%234A8A33' opacity='0.3'/%3E%3Cpath d='M190 25 C170 5 130 5 110 25 C130 45 170 45 190 25 Z' fill='%234A8A33' opacity='0.3'/%3E%3Ccircle cx='100' cy='25' r='15' fill='%23FADADD'/%3E%3Ccircle cx='100' cy='25' r='8' fill='%23D92B2B'/%3E%3Ccircle cx='100' cy='25' r='3' fill='%23D4AF37'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    animation: float 4s ease-in-out infinite;
}

/* Details Section */
.details {
    background-color: #FFFFFF;
    background-image: 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M20 0 L40 20 L20 40 L0 20 Z' fill='none' stroke='rgba%2815, 59, 129, 0.15%29' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 40px 40px;
}

.card {
    background: white;
    padding: 3.5rem 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-premium);
    text-align: center;
    border-top: 5px solid var(--primary-blue);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    max-width: 600px;
    margin: 0 auto;
    transition: var(--transition-smooth);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(10, 54, 128, 0.15);
}

.venue-img {
    width: 100%;
    max-width: 350px;
    height: auto;
    border-radius: 12px;
    margin: 0 auto 1.5rem;
    display: block;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: var(--transition-smooth);
}

.card:hover .venue-img {
    transform: scale(1.02);
}

.card h3 {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
}

.highlight {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--accent-red);
    margin-bottom: 0.5rem;
}

/* RSVP Section */
.rsvp-section {
    background-color: var(--primary-blue);
    background-image: 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M30 0 L60 30 L30 60 L0 30 Z' fill='none' stroke='rgba%28212, 175, 55, 0.1%29' stroke-width='1'/%3E%3Ccircle cx='30' cy='30' r='10' fill='none' stroke='rgba%28255, 255, 255, 0.05%29' stroke-width='1'/%3E%3C/svg%3E"),
        linear-gradient(rgba(10, 54, 128, 0.9), rgba(10, 54, 128, 0.95));
    background-size: 60px 60px;
    padding: 6rem 0;
}

.rsvp-card {
    background: white;
    padding: 4rem;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    max-width: 700px;
    margin: 0 auto;
    border: 1px solid rgba(212, 175, 55, 0.3);
    position: relative;
}

.rsvp-card h2 {
    margin-bottom: 0.5rem;
    color: var(--primary-blue);
}

.rsvp-card p {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--primary-blue);
}

input[type="text"],
input[type="email"],
textarea {
    padding: 1rem 1.2rem;
    border: 1px solid rgba(10, 54, 128, 0.2);
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 1rem;
    background-color: rgba(10, 54, 128, 0.02);
    transition: var(--transition-smooth);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(10, 54, 128, 0.1);
}

/* Custom Radio Buttons */
.radio-group {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 30px;
    font-weight: 500;
}

.radio-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.custom-radio {
    position: absolute;
    top: 2px;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: white;
    border-radius: 50%;
    border: 2px solid var(--primary-blue);
    transition: var(--transition-smooth);
}

.radio-label:hover input ~ .custom-radio {
    background-color: rgba(10, 54, 128, 0.1);
}

.radio-label input:checked ~ .custom-radio {
    background-color: var(--primary-blue);
    box-shadow: inset 0 0 0 4px white;
}

.btn-submit {
    background-color: var(--primary-blue);
    color: white;
    padding: 1.2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(10, 54, 128, 0.3);
}

.btn-submit:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(10, 54, 128, 0.4);
}

.form-message {
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.form-message.success {
    background-color: rgba(74, 138, 51, 0.1);
    color: var(--foliage-green);
}

.form-message.error {
    background-color: rgba(217, 43, 43, 0.1);
    color: var(--accent-red);
}

.hidden {
    display: none;
}

.image-grid {
    display: flex;
    gap: 15px;
    justify-content: flex-start; /* Aligns them to the left */
    margin-bottom: 20px;
}

.image-grid img {
    /* Step 1: Set the width for 3-across */
    width: calc(33.33% - 10px); 

    /* Step 2: Force a uniform shape (1/1 is a square, 4/5 is a tall rectangle) */
    aspect-ratio: 1 / 1; 

    /* Step 3: Prevent squishing */
    object-fit: cover; 

    /* Step 4: Center the focus */
    object-position: center;

    border-radius: 8px;
}

/* Footer */
footer {
    background-color: var(--primary-blue);
    color: white;
    text-align: center;
    padding: 2rem 0;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }
    .countdown-container {
        gap: 1rem;
    }
    .time-unit span:first-child {
        font-size: 2rem;
    }
    .rsvp-card {
        padding: 2rem;
    }
}

/* Cursor Trail */
.cursor-trail {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    font-size: 1.2rem;
    animation: fadeAndMove 1s ease-out forwards;
    transform: translate(-50%, -50%);
}

@keyframes fadeAndMove {
    0% { 
        opacity: 1; 
        transform: translate(-50%, -50%) translateY(0) scale(1); 
    }
    100% { 
        opacity: 0; 
        transform: translate(-50%, -50%) translateY(-50px) scale(0.5) rotate(20deg); 
    }
}

.timeline-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
  font-family: 'Playfair Display', serif; /* Or any elegant wedding font */
}

.timeline-year {
  margin-bottom: 100px;
  position: relative;
}

.year-label {
  text-align: center;
  font-size: 5rem;
  font-weight: bold;
  color: rgba(30, 85, 155, 0.15);
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

/* A dynamic grid for 5 photos */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-gap: 15px;
  position: relative;
  z-index: 2;
}

.photo-card {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-card:hover {
  transform: scale(1.05);
  z-index: 10;
}

/* Making the 5-photo layout look irregular and "cool" */
.photo-card:nth-child(1) { grid-column: span 3; grid-row: span 2; }
.photo-card:nth-child(2) { grid-column: span 3; }
.photo-card:nth-child(3) { grid-column: span 3; }
.photo-card:nth-child(4) { grid-column: span 2; }
.photo-card:nth-child(5) { grid-column: span 4; }
.photo-card:nth-child(6) { grid-column: span 6; }

/* Responsive adjustments */
@media (max-width: 768px) {
  .photo-grid { grid-template-columns: 1fr; margin-left: 40px; }
  .photo-card { grid-column: span 1 !important; }
}

/* --- The 4-Photo "Quartet" Layout --- */
.mosaic-quartet {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 380px); /* Tall rows for portrait impact */
  grid-gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

/* Base style for every photo container in this section */
.photo-item {
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* This fills the box with your portrait shot */
  display: block;
}

/* The Layout Logic */
.mosaic-quartet .hero {
  grid-column: 1 / span 2;
  grid-row: 1 / span 2; /* Big vertical feature on the left */
}

.mosaic-quartet .photo-item:nth-child(2) {
  grid-column: 3 / span 2;
  grid-row: 1; /* Wide top-right photo */
}

.mosaic-quartet .photo-item:nth-child(3) {
  grid-column: 3;
  grid-row: 2; /* Bottom-center square */
}

.mosaic-quartet .photo-item:nth-child(4) {
  grid-column: 4;
  grid-row: 2; /* Bottom-right square */
}

/* Interaction */
.photo-item:hover {
  transform: scale(1.02);
  z-index: 10;
}

/* Mobile: Simple vertical stack */
@media (max-width: 768px) {
  .mosaic-quartet {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    margin-left: 40px;
  }
  .mosaic-quartet .photo-item {
    grid-column: span 1 !important;
    grid-row: auto !important;
    height: 450px;
  }
}
