@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400..900;1,6..96,400..900&family=Jost:wght@300;400;500;600&display=swap');

:root {
  --ed-bg: #f9f8f6; /* Off-white warm paper */
  --ed-text: #222222;
  --ed-accent: #000000;
  --ed-border: #000000;
  
  --font-ed-serif: 'Bodoni Moda', serif;
  --font-ed-sans: 'Jost', sans-serif;
  
  /* Backward compatibility for layout.php inline styles */
  --scrap-bg: var(--ed-bg);
  --scrap-text: var(--ed-text);
  --scrap-accent: var(--ed-accent);
  --scrap-tape-border: var(--ed-border);
  --font-script: var(--font-ed-serif);
  --font-typewriter: var(--font-ed-sans);
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--ed-bg);
  color: var(--ed-text);
  font-family: var(--font-ed-sans);
  overflow-x: hidden;
  line-height: 1.6;
}

body.popup-active {
  overflow: hidden;
}

/* OVERLAY COVER */
#introOverlay {
  position: fixed;
  inset: 0;
  background: var(--ed-bg);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1s cubic-bezier(0.8, 0, 0.2, 1), transform 1s cubic-bezier(0.8, 0, 0.2, 1);
}
#introOverlay.open-anim {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

.cover-section {
  text-align: center;
  padding: 0;
  width: 100%;
  height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--ed-bg);
}

.cover-bg-image {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
}

html[data-tone="monochrome"] .cover-bg-image,
body[data-grayscale="1"] .cover-bg-image {
    filter: grayscale(100%) contrast(110%);
}

.cover-overlay-dark {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}

.cover-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.cover-header {
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    text-align: center;
}

.cover-issue {
    font-family: var(--font-ed-sans);
    color: #fff;
    font-size: 0.75rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding-bottom: 10px;
    display: inline-block;
}

.cover-title-wrap {
    margin: 0 0 40px 0;
    text-align: center;
}

.cover-names {
    font-family: var(--font-ed-serif);
    font-size: 4.5rem;
    color: #fff;
    line-height: 1;
    font-weight: 400;
    margin: 20px 0;
}

.cover-date {
    font-family: var(--font-ed-serif);
    color: #fff;
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 20px;
}

.btn-open {
  background-color: #fff;
  color: #000;
  border: none;
  padding: 12px 35px;
  font-family: var(--font-ed-sans);
  font-weight: 400;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  cursor: pointer;
  transition: all 0.4s ease;
}
.btn-open:hover {
  background-color: #e0e0e0;
  color: #000;
}

/* MAIN CONTENT CONTAINER */
.ed-container {
  opacity: 0;
  transition: opacity 1.5s ease;
  padding: 0 0 100px 0;
  max-width: 100%;
  margin: 0 auto;
  background: transparent;
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5 {
    font-family: var(--font-ed-serif);
    font-weight: 400;
    color: var(--ed-accent);
    margin: 0;
}

.ed-section {
    padding: 80px 20px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.ed-chapter {
    font-family: var(--font-ed-sans);
    font-size: 0.7rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #777;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.ed-chapter::after {
    content: '';
    height: 1px;
    flex-grow: 1;
    background: var(--ed-border);
    opacity: 0.2;
}

.ed-title {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.ed-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
    font-weight: 300;
}

.ed-dropcap::first-letter {
    float: left;
    font-family: var(--font-ed-serif);
    font-size: 4.5rem;
    line-height: 1;
    margin-right: 15px;
    margin-top: 0;
    color: var(--ed-accent);
}

/* IMAGES */
.ed-image-wrap {
    width: 100%;
    margin: 40px 0;
    position: relative;
}
.ed-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
}

/* GLOBAL GRAYSCALE FEATURE */
html[data-tone="monochrome"] .cover-bg-image,
body[data-grayscale="1"] .cover-bg-image,
html[data-tone="monochrome"] .slide img,
body[data-grayscale="1"] .slide img,
html[data-tone="monochrome"] .ed-image-wrap img,
body[data-grayscale="1"] .ed-image-wrap img,
html[data-tone="monochrome"] .ed-profile-img,
body[data-grayscale="1"] .ed-profile-img,
html[data-tone="monochrome"] .ed-gallery img,
body[data-grayscale="1"] .ed-gallery img {
    filter: grayscale(100%) contrast(110%) !important;
}

/* SLIDER / HERO */
.slider-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/5;
    max-height: 80vh;
    overflow: hidden;
    margin-bottom: 40px;
    border: 1px solid var(--ed-border);
    padding: 10px;
    background: #fff;
}
.slider-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.slide.active {
    opacity: 1;
    z-index: 2;
}
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}



.ed-caption {
    font-family: var(--font-ed-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
    margin-top: 15px;
    text-align: right;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 10px;
}

/* PROFIL MEMPELAI */
.ed-profile {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.ed-profile-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .ed-profile-card {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
    .ed-profile-card.reverse {
        direction: rtl;
    }
    .ed-profile-card.reverse > * {
        direction: ltr;
    }
}

.ed-profile-img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.ed-profile-info h3 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.ed-profile-info .ed-parents {
    font-style: italic;
    color: #666;
    margin-bottom: 20px;
}

.btn-ed {
    display: inline-block;
    border: 1px solid var(--ed-border);
    padding: 12px 24px;
    color: var(--ed-accent);
    text-decoration: none;
    font-family: var(--font-ed-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s;
    background: transparent;
}
.btn-ed:hover {
    background: var(--ed-accent);
    color: var(--ed-bg);
}

/* EVENT BOX */
.ed-event-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.ed-event-box {
    border-top: 2px solid var(--ed-border);
    padding-top: 30px;
}

.ed-event-box h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    font-style: italic;
}

.ed-event-details {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 15px;
    font-size: 0.95rem;
    margin-bottom: 25px;
}
.ed-event-details strong {
    font-family: var(--font-ed-sans);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
    color: #777;
}

.ed-event-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* GALLERY MASONRY */
.ed-gallery {
    column-count: 2;
    column-gap: 15px;
}
@media (min-width: 768px) {
    .ed-gallery { column-count: 3; }
}
.ed-gallery img {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
    display: block;
}

/* RSVP FORM */
.ed-form {
    border: 1px solid var(--ed-border);
    padding: 40px 30px;
}

.ed-input-group {
    margin-bottom: 25px;
}
.ed-input-group label {
    display: block;
    font-family: var(--font-ed-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: #555;
}
.ed-input-group input,
.ed-input-group select,
.ed-input-group textarea {
    width: 100%;
    border: none;
    border-bottom: 1px solid #ccc;
    background: transparent;
    padding: 10px 0;
    font-family: var(--font-ed-serif);
    font-size: 1.1rem;
    color: var(--ed-accent);
}
.ed-input-group input:focus,
.ed-input-group select:focus,
.ed-input-group textarea:focus {
    outline: none;
    border-bottom-color: var(--ed-accent);
}

/* WISHES */
.ed-wish-item {
    padding: 20px 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}
.ed-wish-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}
.ed-wish-header strong {
    font-family: var(--font-ed-serif);
    font-size: 1.2rem;
}
.ed-wish-badge {
    font-family: var(--font-ed-sans);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 8px;
    border: 1px solid #ccc;
}

/* AUDIO */
#audioToggle {
    background: var(--ed-bg) !important;
    color: var(--ed-accent) !important;
    border: 1px solid var(--ed-border) !important;
    border-radius: 50% !important;
}

/* COUNTDOWN */
.ed-countdown {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
}
.ed-cd-item {
    text-align: center;
}
.ed-cd-item span {
    font-family: var(--font-ed-serif);
    font-size: 3.5rem;
    line-height: 1;
    display: block;
}
.ed-cd-item small {
    font-family: var(--font-ed-sans);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
}

/* QUOTE */
.ed-quote-wrap {
    text-align: center;
    padding: 60px 20px;
    border-top: 1px solid rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    margin: 60px 0;
}
.ed-quote-icon {
    font-size: 2rem;
    color: #ccc;
    margin-bottom: 20px;
}
.ed-quote-arab {
    font-family: 'Amiri', serif;
    font-size: 1.8rem;
    line-height: 2.2;
    color: var(--ed-accent);
    margin-bottom: 20px;
}
.ed-quote-arti {
    font-family: var(--font-ed-sans);
    font-style: italic;
    font-size: 0.95rem;
    color: #555;
}

/* BANK INFO */
.ed-bank-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--ed-border);
    margin-bottom: 15px;
}
.ed-bank-info strong {
    font-family: var(--font-ed-sans);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.ed-bank-info span {
    font-family: var(--font-ed-serif);
    font-size: 1.4rem;
    display: block;
    margin: 5px 0;
}
