
:root {
  /* Easily tweak your color palette here */
  --lang-bg: #E7DFD4;             /* Container background color */
  --lang-border: #9B7A3E;         /* Outer border color */
  --lang-active-bg: #4A3315;      /* Selected pill background */
  --lang-active-text: #FFFFFF;    /* Selected text color */
  --lang-inactive-text: #3C290B;  /* Unselected text color */
  --green: #445302ba;
  --dark-brown: #4A3315;
  --darkest-brown: #3C290B;
  --choco-brown: #3d1f00;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

header {
    padding: 1.5rem 1rem;
    text-align: center;
    padding-bottom: 0;
}

h1#names {
    font-family: "Pinyon Script", cursive;
    font-weight: 400;
    font-style: normal;
    font-size: clamp(3.5rem, 6.5vw, 10rem);
    white-space: nowrap;
    margin: 0;
    background: linear-gradient(180deg, #3C290B, #634413FF, #9B7A3E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    z-index: 75;
    position: relative;
}

.top-blur-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 120px; /* How far down the screen the blur reaches */
  
  /* Clicks will pass right through this layer to your links/buttons underneath */
  pointer-events: none; 
  
  /* Make sure this is below your sticky nav's z-index (100) but above the text */
  z-index: 50; 
  
  /* Creates the blur */
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px); /* For Safari */
  
  /* Fades the blur out smoothly so there is no harsh line */
  mask-image: linear-gradient(
    to bottom, 
    rgba(0,0,0,1) 10%, 
    rgba(0,0,0,0.8) 30%,
    rgba(0,0,0,0.3) 70%,
    rgba(0,0,0,0) 100%);

  -webkit-mask-image: linear-gradient(
    to bottom, 
    rgba(0,0,0,1) 10%, 
    rgba(0,0,0,0.8) 30%,
    rgba(0,0,0,0.3) 70%,
    rgba(0,0,0,0) 100%);
}

.sticky-nav-wrapper {
    position: sticky;
    top: 15px;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    width: 100%;
}

.nav-accent-img {
    width: 35px;
}

nav {
    padding-bottom: 20px;
    margin-bottom: 20px;
}

nav.sticky-nav {
    background-color: var(--choco-brown);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px 0;
    margin-top: 20px;
    border-radius: 20px; 
    width: clamp(335px, 30vw, 700px);
}

.nav-group {
  display: flex;
  gap: 1.2rem;
  flex: 1;
}

.nav-group.left {
  justify-content: flex-end;
  padding-right: 2rem;
}

.nav-group.right {
  justify-content: flex-start;
  padding-left: 2rem;
}

.nav-group a {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 1.0rem;
}

.crest-container {
  position: relative;
  width: 0; /* Zero width keeps the left/right nav groups perfectly balanced */
}

.crest {
  position: absolute;
  top: 50%;
  left: 50%;
  
  /* Initial states that JS will overwrite */
  width: 350px; 
  transform: translate(-50%, 75px); 
  transform-origin: center center;
  border-radius: 50%; 
}

.invite-card-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;

    perspective: 1000px;
}

.invite-card-frame {
    display: block;
    width: 100%;
    height: auto;
}

.wedding-info {
    margin-bottom: 60px;
    text-align: center;
}

.invite-card-contents {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60%;
    height: auto;
    z-index: 2;
      
    /* The animation properties */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s ease-in-out;
    backface-visibility: hidden;
}

/* --- ENGLISH CARD (FRONT) --- */
.card-front {
  /* Default state: visible and facing forward */
  transform: translate(-50%, -50%) rotateY(0deg);
  opacity: 1;
}

.card-front.flipped {
  /* Flipped state: rotates away and fades out */
  transform: translate(-50%, -50%) rotateY(180deg);
  opacity: 0;
  pointer-events: none; /* Prevents invisible element from blocking clicks */
}

/* --- ARABIC CARD (BACK) --- */
.card-back {
  /* Default state: starts rotated backward and invisible */
  transform: translate(-50%, -50%) rotateY(-180deg);
  opacity: 0;
  pointer-events: none;
}

.card-back.flipped {
  /* Flipped state: rotates into view and becomes solid */
  transform: translate(-50%, -50%) rotateY(0deg);
  opacity: 1;
  pointer-events: auto;
}

.welcome-content {
    justify-content: center;
}

body.scrolled .sticky-nav {
  border-radius: 0; /* Flattens to a standard sticky header */
  width: 100%;
}

body.scrolled .crest {
  width: 60px; /* Shrinks to fit inside the bar */
  /* Pulls it up to center exactly inside the navigation bar */
  transform: translate(-50%, -50%); 
}


body {
    background-color: #fcf3e2;
    background-image: url('assets/background_texture_small.png');
    background-repeat: repeat;
    background-attachment: fixed;
    background-size: auto;
    color: #3C290B;
    font-family: "Cormorant Upright", serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
    font-variation-settings:
    "wdth" 100;
    font-size: 1.2rem;
}

#family-crest {
    display: block;
    margin: 0 auto;
}

main {
    padding-top: 460px;
    width: 100%;
    max-width: 1000px;
    display: block;
    margin: 0 auto;
    opacity: 0;
}

h2 {
    font-size: 2em;
    font-family: "Pinyon Script", "cursive";
    text-align: center;
    margin: 0;
}

h3 {
    font-size: 1.5em;
}

p {
    font-weight: 500;
}


.toggle-wrapper {
    display: flex;
    width: 100%;
    justify-content: center;
    margin-top: 15px;
}


/* Visually hide native radio buttons */
.lang-toggle input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lang-toggle {
  display: inline-flex;
  align-items: stretch; 
  background-color: var(--lang-bg);
  border: 1.5px solid var(--lang-border);
  border-radius: 9999px;
  user-select: none;
  width: fit-content;
  margin: 0 auto 1rem auto;
  overflow: hidden;
  padding: 0; 
  
  /* ADDED: Establishes a stacking context so the negative z-index below works correctly */
  position: relative; 
  z-index: 1; 
}

/* THE SLIDER */
.lang-toggle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%; /* Takes up exactly half the container */
  background-color: var(--choco-brown);
  border-radius: 30px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Slides the brown background behind the text, but above the container's background */
  z-index: -1; 
}

/* Text option labels */
.lang-option {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1; /* ADDED: Forces both labels to be exactly the same width */
  
  padding: 6px 18px;
  font-size: 1.0rem;
  font-weight: 400;
  color: var(--lang-inactive-text);
  cursor: pointer;
  transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-ar {
  font-family: "Noto Naskh Arabic", serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
}

.lang-option:hover {
  opacity: 1;
}

/* Move the slider when Arabic is selected */
.lang-toggle:has(#lang-ar:checked)::before {
  transform: translateX(100%);
}

/* 
  IMPORTANT: Remove or delete your old active state background color rule.
  Change it to ONLY update the text color, like this: 
*/
.lang-toggle input[type="radio"]:checked + .lang-option {
  color: var(--lang-active-text);
  /* Make sure there is NO background-color property here anymore */
}

/* Accessibility focus state */
.lang-toggle input[type="radio"]:focus-visible + .lang-option {
  outline: 2px solid var(--choco-brown);
  outline-offset: 2px;
}

/* Container card with frosted glass texture overlay */
.rsvp-card {
  max-width: 440px;
  margin: 2rem auto;
  padding: 2.5rem 2rem;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(3px);
  border: 10px solid var(--green);
  border-radius: 134px;
  box-shadow: 0 10px 25px rgba(60, 41, 11, 0.06);
  text-align: center;
  box-sizing: border-box;
}

.rsvp-title {
  font-family: "Cormorant Upright", serif;
  font-size: 3.8rem;
  font-weight: 500;
  color: #3C290B;
  margin: 0;
  line-height: 1;
}

.rsvp-subtitle {
  font-size: 1.2rem;
  color: #634413;
  margin: 0.5rem 0 1.75rem 0;
  font-weight: 500;
}

/* Form layout & custom controls */
.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3C290B;
  margin-bottom: 0.4rem;
}

.form-group input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #9B7A3E;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  color: #3C290B;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--choco-brown);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(74, 51, 21, 0.12);
}

/* Matching navigation pill button */
.rsvp-btn {
  margin-top: 0.5rem;
  margin-bottom: 0;
  margin-right: 2.5rem;
  margin-left: 2.5rem;
  padding-bottom: 0.5rem;
  padding-right: 1.0rem;
  padding-left: 1.0rem;
  padding-top: 0.8rem;
  background-color: var(--choco-brown);
  color: #FFFFFF;
  border: none;
  border-radius: 9999px;
  font-family: "Pinyon Script", cursive;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rsvp-btn:hover {
  background-color: #3C290B;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(60, 41, 11, 0.15);
}

/* Container spacing & top divider */
.guest-rsvp-container {
  margin-top: 0.5rem;
  border-top: 1px dashed rgba(155, 122, 62, 0.4);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Individual Guest Row/Card */
.guest-card {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(155, 122, 62, 0.3);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  text-align: left;
  transition: background 0.2s ease;
  margin-top: 1.5rem;
}

.guest-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.guest-name {
  font-weight: 500;
  font-size: 1.1rem;
  color: #3C290B;
}

/* Attendance Toggle & Custom Checkbox */
.attendance-toggle {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  cursor: pointer;
  user-select: none;
}

.attendance-toggle input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border: 1.5px solid #9B7A3E;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: all 0.2s ease;
}

.attendance-toggle input[type="checkbox"]:checked {
  background-color: var(--choco-brown);
  border-color: var(--choco-brown);
}

.attendance-toggle input[type="checkbox"]:checked::before {
  content: "✓";
  color: #FFFFFF;
  font-size: 13px;
  font-weight: bold;
}

.toggle-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #634413;
}

/* Matching Dietary Input */
.guest-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(155, 122, 62, 0.5);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  color: #3C290B;
  box-sizing: border-box;
}

.guest-dietary-input:focus {
  outline: none;
  border-color: #4A3315;
  background: #FFFFFF;
  box-shadow: 0 0 0 2px rgba(74, 51, 21, 0.1);
}

.timeline-container {
  max-width: 500px;
  margin: 3rem auto;
  padding: 0 1.5rem;
  text-align: left;
}

.schedule-title {
  font-family: "Pinyon Script", cursive;
  font-size: 3.8rem;
  color: #3C290B;
  text-align: center;
  margin: 0;
  line-height: 1;
}

.schedule-date {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 500;
  color: #634413;
  margin: 0.5rem 0 2.5rem 0;
  letter-spacing: 0.03em;
}

/* Shift the timeline right to make room for left-aligned timestamps */
.timeline {
  position: relative;
  margin-left: 70px; /* Space reserved on the left of the line */
  padding-left: 2rem;
  border-left: 2px solid #9B7A3E;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.timeline-item {
  position: relative;

}

/* Node dot sitting directly over the vertical spine */
.timeline-item::before {
  content: "";
  position: absolute;
  
  /* Horizontal positioning: Target the 2px border center */
  left: -2.06rem;
  
  /* Vertical positioning: Align with the center of the first line of text */
  top: 0.75em;
  
  /* Perfect centering offset */
  transform: translate(-50%, -50%);
  
  /* Dimensions & styles */
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--choco-brown);
  border: 2px solid #E7DFD4;
  box-shadow: 0 0 0 1px var(--green);
  box-sizing: content-box; /* Ensures consistent border sizing */
}

.timeline-item-pic::before {
  content: "";
  position: absolute;
  
  /* Keep your existing positioning exactly as is */
  left: -2.06rem;
  top: 0.75em;
  transform: translate(-50%, -50%);
  
  /* Update dimensions to fit your image */
  width: 32px;  /* Increased from 12px so the artwork is visible */
  height: 32px; 
  
  /* Replace colors/borders with your image */
  background-image: url('assets/dot_1_small.png'); /* Insert your image path here */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.timeline-item-crest::before {
  content: "";
  position: absolute;
  
  /* Keep your existing positioning exactly as is */
  left: -2.06rem;
  top: 0.75em;
  transform: translate(-50%, -50%);
  
  /* Update dimensions to fit your image */
  width: 20px;  /* Increased from 12px so the artwork is visible */
  height: 20px; 
  
  /* Replace colors/borders with your image */
  background-image: url('assets/dot_1_small.png'); /* Insert your image path here */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Position time to the left of the vertical spine */
.timeline-time {
  position: absolute;
  left: calc(-2rem - 110px); /* Pushes time out to the left margin */
  width: 95px;                /* Fixed width for clean right-alignment */
  text-align: right;          /* Aligns text up against the vertical line */
  top: 1px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9B7A3E;
  line-height: 1.3;
}

.timeline-event {
  font-size: 1.35rem;
  font-weight: 500;
  color: #3C290B;
  margin: 0 0 0.25rem 0;
}

.timeline-desc {
  font-size: 0.95rem;
  color: #634413;
  margin: 0;
  line-height: 1.4;
}

.header-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.header-accent {
    width: 50px;
}

.info-subtitle-container {
  display: inline-block;
  width: 90%;
  max-width: 600px; /* Limits size on desktop viewports */
  margin: 0 auto;  /* Centers the frame on the page */

  border: 20px solid transparent;
  border-image-source: url('assets/subtitle_border.svg');
  border-image-slice: 30 fill;
  border-image-repeat: stretch:
}

.subtitle-frame {
  display: block;
  width: 100%;     /* Forces the SVG image to fill the container */
  height: auto;
}

.info-subtitle {
    margin: 0;
    padding: 10px 15px;
}

.address {
    font-size: 0.8rem;
    text-decoration: none;
    color: var(--choco-brown);
}
