/* --- 1. Global Reset (Critical for padding math) --- */
*, *::before, *::after {
  box-sizing: border-box;
}


:root {
  --background: rgb(246, 242, 239);
  --accent: #a84b3e;
  --uicolorlight: #dcd3c9;
  --uicolor: #c4b8ab;
  
  /* Streamlined font sizes */
  --frontpage-heading-size: clamp(2rem, 8vw, 4.5em);
  --heading-size: clamp(1.5rem, 7vw, 4em);
  --text-size: clamp(1.2rem, 4.5vw, 1.5em);
  --subheading-size: clamp(1.5rem, 6.5vw, 3.5em);

  
  --moon-size: clamp(70px, 10vw, 200px);
}


body {
  margin: 0;
  font-family: "Tangerine", cursive;
  font-weight: 400;
  font-style: normal;
  background-color: var(--background);
  color: var(--accent);
}

h2 {
  font-size: var(--subheading-size);
  margin: 0;
  font-weight: normal;
}

.spaced-heading {
  margin-bottom: 5%;
  margin-top: -5%;
}

p {
  font-size: var(--text-size);
  margin: 0;
  line-height: 150%;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}


/* --- 2. The Overflow Stopper --- */
.page-overflow-wrap {
  width: 100%;
  overflow: hidden;
}

/* --- 3. The Centering Container --- */
.centering-container {
  min-height: 100dvh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}


/* --- 4. The Card Wrapper (Anchor for flowers) --- */
.card-wrapper {
  position: relative;
  width: min(90vw, 800px); 
  aspect-ratio: 5 / 7;
}


/* --- 5. The Card Itself --- */
.card {
  position: relative;
  width: 100%;
  height: 120%;
  background: var(--background);
  padding: 40px;
  overflow: hidden;
}


@media (max-width: 768px) {
  .bigger {
    height: auto; 
    min-height: 220%;
  }
}


/* --- Flower Positioning (Relative to .card-wrapper) --- */
.floral {
  position: absolute;
  z-index: 10;
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}


.floral-top-left {
  top: -17%;
  left: -20%;
  width: 70%;
  height: 70%;
  background-image: url('../img/flowers4.png');
  background-position: top left;
  transform: rotate(180deg);
  
  -webkit-transform: scale(1, -1) rotate(-37deg);
  -moz-transform: scale(1, -1) rotate(-37deg);
  -o-transform: scale(1, -1) rotate(-37deg);
  transform: scale(1, -1) rotate(-37deg);
}


.floral-top-center {
  top: -10%;
  left: 5%;
  width: 90%;
  height: 70%;
  background-image: url('../img/arc.png');
  background-position: top left;
}


.floral-bottom-right {
  bottom: -15%;
  right: -34%;
  width: 75%;
  height: 75%;
  background-image: url('../img/flowers2.png');
  background-position: bottom right;
}

.bottom-right-alt {
  background-image: url('../img/arcalt.png');
  bottom: -12%;
  right: -34%;
  width: 85%;
  height: 45%;
  
  -webkit-transform: rotate(126deg);
  -moz-transform: rotate(126deg);
  -o-transform: rotate(126deg);
  transform: rotate(126deg);
}

@media (max-width: 768px) {
  .floral-top-center{
    top: -4%;
  }

  .bottom-right-alt {
    bottom: -20%;
    right: -55%;
  }
}

/* --- Rest of your styles (Typography, Moon, Inner Border) --- */
.inner-border {
  position: absolute;
  inset: 30px;
  border: 4px solid var(--uicolorlight);
  border-radius: 38vw 38vw 0 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("../img/textured-paper.png");
  background-color: rgba(255, 251, 247, 0.55);
  background-blend-mode: lighten;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
  .inner-border {
    border-width: 3px;
  }
}


.text-content {
  position: relative;
  z-index: 12;
  top: 30%;
  text-align: center;
  color: var(--accent);
  padding: 0 10%;
}

.homepage-content {
  padding: 0 15%;
}


@media (max-width: 768px) {
  .text-content {
    top: 23vh;
    padding: 0 10%;
  }
}


.header-container {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

@media (max-width: 768px) {
  .header-container {
    top: 20vh;
  }
}

.names {
  font-family: "Love Light", cursive;
  font-weight: 400;
  font-style: normal;
  font-size: var(--frontpage-heading-size);
  line-height: 1.1;
  margin: 0;
  text-align: right;
}
.names span { 
  font-size: 0.6em; 
  display: block;
}

.header-names {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3.5rem;            /* adjust spacing between the two names */
  font-family: "Love Light", cursive;
  font-weight: 400;
  font-style: normal;
  font-size: var(--heading-size);
  line-height: 1;
  margin: 0;
  text-align: center;
  color: var(--accent);
  z-index: 4;
}

/* 
@media (max-width: 768px) {
  .header-names {
    top: 13%;
    left: 25%;
  }
} */

#date {
  font-size: var(--subheading-size);
  line-height: 1;
  margin: 0;
  text-align: center;
  color: var(--accent);
  position: absolute;
  top: 30%;
  z-index: 4;
  left: 35%;  

}

@media (max-width: 768px) {
  #date {
    top: 23%;
  }
}

.back {
  position: absolute;
  bottom: 8%;
  left: 15%;
  z-index: 5;
  font-size: var(--text-size);
}


.info {
  margin: 0;
  padding-top: 10%;
  padding-bottom: 5%;
  text-align: left;
  font-size: var(--text-size);
}


@media (max-width: 768px) {
  .info {
    padding-top: 5%;
  }
}


.buttons {
  margin: 0;
  padding-top: 10%;
  text-align: left;
  font-size: var(--text-size);
}


button {
  border: 3px solid var(--accent);
  background: var(--background);
  padding: .7rem 1rem;
  border-radius: 999px;
  text-decoration:none;
  font-weight: 600;
  letter-spacing: .03em;
  transition: transform .12s ease, background .12s ease;
}


button:hover:after {
  opacity: 1;
  right: 10px;
}


button:after {
  content: "\00BB";
  position: absolute;
  opacity: 0;
  font-size: 20px;
  line-height: 40px;
  top: 0;
  right: -20px;
  transition: 0.4s;
}



@media (max-width: 768px) {
  .buttons {
    padding-top: 10%;
  }
}



/* --- Noisy Gold Crescent Moon --- */
.crescent-moon {
  position: absolute;
  width: var(--moon-size);
  height: var(--moon-size);
  z-index: 4;
}

.crescent-moon--between {
  left: 50%;
  top: 50%;
  transform: translate(-75%, -60%);  /* perfectly centered between the two names */
}

.homepage-moon {
  top: 12%;
  left: 35%;
}

.loader {
  top: 12%;
  transform: translateX(-40%);
}

/* @media (max-width: 768px) {
  .crescent-moon {
    width: 20vw;
    height: 20vw;
    left: 15%
  }
} */


.crescent-moon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;


  background:
  linear-gradient(160deg, rgb(0 0 0 / 20%), rgb(64 38 0 / 20%)), 
  url("../img/noise.svg"), 
  radial-gradient(circle at 20% 75%, #DDCD9A 0%, #ba9e68 100%);


  background-size: auto, 140px 140px, auto;
  background-repeat: repeat, repeat, no-repeat;


  filter: contrast(170%) brightness(1000%);


  -webkit-mask: radial-gradient(circle at 35% 50%, transparent 55%, black 55.5%);
  mask: radial-gradient(circle at 35% 50%, transparent 55%, black 55.5%);


  transform: rotate(15deg);
}


@media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution:.001dpcm) {
  .crescent-moon::after {
    filter: contrast(200%) brightness(105%);
  }
}



    
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}


ul li {
  margin: 0 0 10%;
}


.the-arrow {
  width: 4%;
  transition: all 0.2s;
}


.the-arrow > .shaft {
  background-color: var(--uicolor);
  display: block;
  height: 1px;
  position: relative;
  transition: all 0.2s;
  transition-delay: 0s;
  will-change: transform;
}


.the-arrow > .shaft:before,
.the-arrow > .shaft:after {
  background-color: var(--uicolor);
  content: '';
  display: block;
  height: 1px;
  position: absolute;
  top: 0;
  right: 0;
  transition: all 0.2s;
  transition-delay: 0s;
}


.the-arrow > .shaft:before {
  transform-origin: top right;
}


.the-arrow > .shaft:after {
  transform-origin: bottom right;
}


.the-arrow.-left {
  position: absolute;
  top: 60%;
  left: 0;
}


.the-arrow.-left > .shaft {
  width: 0;
  background-color: var(--uicolor);
}


.the-arrow.-left > .shaft:before,
.the-arrow.-left > .shaft:after {
  width: 0;
  background-color: var(--uicolor);
}


.the-arrow.-left > .shaft:before {
  transform: rotate(0);
}


.the-arrow.-left > .shaft:after {
  transform: rotate(0);
}


.the-arrow.-right {
  top: 3px;
}


.the-arrow.-right > .shaft {
  width: 6vw;
  transition-delay: 0.2s;
}


.the-arrow.-right > .shaft:before,
.the-arrow.-right > .shaft:after {
  width: 8px;
  transition-delay: 0.3s;
  transition: all 0.5s;
}


.the-arrow.-right > .shaft:before {
  transform: rotate(40deg);
}


.the-arrow.-right > .shaft:after {
  transform: rotate(-40deg);
}


.animated-arrow {
  display: inline-block;
  color: var(--uicolor);
  font-size: var(--text-size);
  text-decoration: none;
  position: relative;
  transition: all 0.2s;
}


.animated-arrow > .main {
  display: flex;
  align-items: center;
  transition: all 0.2s;
}


.animated-arrow > .main > .text {
  margin: 0 16px 0 0;
  line-height: 1;
}


.animated-arrow > .main > .the-arrow {
  position: relative;
}


.animated-arrow:hover {
  color: var(--accent);
}


.animated-arrow:hover > .main {
  transform: translateX(80px);
}


.animated-arrow:hover > .the-arrow.-left > .shaft {
  width: 64px;
  transition-delay: 0.1s;
  background-color: var(--accent);
}


.animated-arrow:hover > .the-arrow.-left > .shaft:before,
.animated-arrow:hover > .the-arrow.-left > .shaft:after {
  width: 8px;
  transition-delay: 0.1s;
  background-color: var(--accent);
}


.animated-arrow:hover > .the-arrow.-left > .shaft:before {
  transform: rotate(40deg);
}


.animated-arrow:hover > .the-arrow.-left > .shaft:after {
  transform: rotate(-40deg);
}


.animated-arrow:hover > .main > .the-arrow.-right > .shaft {
  width: 0;
  transform: translateX(200%);
  transition-delay: 0s;
}


.animated-arrow:hover > .main > .the-arrow.-right > .shaft:before,
.animated-arrow:hover > .main > .the-arrow.-right > .shaft:after {
  width: 0;
  transition-delay: 0s;
  transition: all 0.1s;
}


.animated-arrow:hover > .main > .the-arrow.-right > .shaft:before {
  transform: rotate(0);
}


.animated-arrow:hover > .main > .the-arrow.-right > .shaft:after {
  transform: rotate(0);
}





.overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: white;
  z-index: 99;
}


.overlay > .crescent-moon {
  top: 40%;
  left: 47%;
  animation: 1s fadeIn;
  animation-fill-mode: forwards;
  opacity: 1;
}


@keyframes fadeIn {
  0% {
    opacity: 0; 
  }
  33% {
    opacity: 1;
  }
  66% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}


.delayOut {
  animation: 1s fadeOut;
  animation-fill-mode: forwards;
  
  visibility: visible;
}


@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    visibility: hidden;
    opacity: 0;
    display: none;
  }
}


  /* 2x2 Grid */
  .grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    grid-template-rows: auto; 
    gap: 20px;
    margin-top: 30px;
  }

  @media (max-width: 768px) {
    .grid-2x2 {
      grid-template-columns: 1fr; /* Force single column stack */
    }
  }

  .grid-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border: 2px solid var(--uicolorlight);
    border-radius: 10px;
    min-height: 80px;
    font-size: var(--text-size);

    text-decoration: none; /* Removes underline */
    color: inherit;        /* Uses your body/parent text color instead of blue */
    width: 100%;           /* Ensures it fills the grid column width */
  }

  .grid-cell:hover{
    background-color: var(--accent);
    color: var(--uicolorlight);
    border: 2px solid var(--accent);
  }

  .grid-cell:hover .icon {
    filter: brightness(0) invert(1);
  }

  .grid-smaller {
    width: 70%;
    margin: 3% auto;  
  }

  .grid-cell.vertical {
    flex-direction: column;
    text-align: center;
  }

  .invert-color {
    background-color: var(--accent);
    color: var(--uicolorlight);
    border: 2px solid var(--accent);
  }

  .invert-color .icon {
    filter: brightness(0) invert(1);
  }

  .invert-color:hover{
    background: rgba(0,0,0,0);
    border: 2px solid var(--uicolorlight);
    color: var(--accent)
  }

  .invert-color:hover .icon {
    filter: brightness(0) saturate(100%) invert(31%) sepia(19%) saturate(1354%) hue-rotate(314deg) brightness(96%) contrast(90%);
  }

  .grid-centered {
    grid-column: 1 / -1;  
  }

  .grid-cell.vertical {
    flex-direction: column;
    text-align: center;
  }

  .centered {
    text-align: center;
  }

  .icon {
    width: 60px; 
    height: auto;  
    display: block;
    filter: brightness(0) saturate(124%) invert(37%) sepia(20%) saturate(1365%) hue-rotate(320deg) brightness(97%) contrast(95%);
    padding-right: 5px;
  }

  .inline-icon {
    display: inline;
    width: 50px;
    height: auto;
    border-radius: 10px;
    border: solid 1px;
    padding: 10px;
    margin: 10px;
  }

  .centered-img {
    margin: auto;
    width: 70px;
    max-width: 50%;
  }

  .bigger-icon {
    margin-bottom: 20px;
    width: 170px;
    max-width: 95%;
    height: auto; 
  }

  .mobile-only {
    display: none;
  }

  .pc-only {
    display: flex;
  }

  @media (max-width: 768px) {
    .mobile-only {
      display: flex;
    }
    .pc-only {
      display: none;
    }
  }


  .high-header {
    padding-top: 0 !important;
  }

  .aligned-left {
    text-align: left;
  }

  .heart-list {
    list-style: "♡";
  }

  .heart-list li {
    font-size: var(--text-size);
    margin: 0;
  }

  .heart-list ::marker {
    font-size: 30px;
  }


  /* TIMELINE */

  .timeline {
    margin: 0 auto;
    position: relative;
    left: 120px;
    width: 60%;
    max-width: 900px;
    margin-top: 16px;
    margin-left: 5%;
  }

  .timeline-item {
    text-align: center;
    font-size: var(--text-size);
    padding: 1rem 1.5rem 1rem 1.5rem;
    border-left: 3px solid var(--accent);
    border-bottom: 1px solid var(--accent);
    position: relative;
    list-style-type: none;
    --item-width: calc(100%);
    margin: 0;

    &::after {
      content: attr(data-date);
      position: absolute;
      right: calc(var(--item-width) + 40px);
      top: 16px;
      float: right;
      font-weight: bold;
      white-space: nowrap;
    }

    &::before {
      content: "";
      border-radius: 50%;
      width: 16px;
      height: 16px;
      background-color: var(--accent);
      position: absolute;
      left: -10px;
      top: 25px;
    }

    &:last-child {
      border-bottom: none;
    }
  }

  @media only screen and (max-width: 800px) {
    .timeline {
      margin: 0 auto;
      position: relative;    
      left: 14%;


      .timeline-item {
        font-size: 1.1rem;

        &::after {
          right: calc(var(--item-width) + 30px);
        }
      }
    }
  }

  @media only screen and (max-width: 800px) {
    .timeline-item {
      padding: 1rem 1.5rem 1rem 0.5rem;

      &::after {
        right: calc(var(--item-width) + 20px);
      }
    }
  }
  /* TIMELINE end */

.normal-text {
  font-family: Garamond, Georgia, 'Times New Roman', Times, serif;
  font-size: 50%;
}

.low-heading {
  margin-top: 0;
}