/* ABOUTME: Main stylesheet for the wedding website.
   ABOUTME: Contains all styles for layout, typography, and the growing vine animation. */

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

body {
  min-height: 100vh;
  background: linear-gradient(
    180deg,
    #fdf8f5 0%,
    #fef6f0 50%,
    #f8f4f1 100%
  );
  font-family: "Lora", serif;
  color: #5a5a5a;
  position: relative;
  overflow-x: hidden;
}

/* Main content */
main {
  text-align: center;
  padding: 2rem;
  z-index: 1;
  position: relative;
}

/* Hero section */
.hero {
  min-height: auto;
  padding: 3rem 0 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Decorative flower */
.flower {
  margin-bottom: 1.5rem;
}

.flower svg {
  width: 60px;
  height: 60px;
}

h1 {
  font-family: "Alex Brush", cursive;
  font-size: clamp(3.5rem, 12vw, 7rem);
  font-weight: 400;
  color: #d4a5a5;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

h1 .name {
  display: inline-block;
  opacity: 0;
}

h1 .name-first {
  transform: translateX(-50px) translateY(-0.15em);
}

h1 .name-second {
  transform: translateX(50px) translateY(0.15em);
}

.ampersand {
  font-style: italic;
  color: #d4a5a5;
  display: inline;
  font-size: 0.8em;
  margin: 0 0.3em;
  opacity: 0;
}

h2 {
  font-family: "Lora", serif;
  font-size: clamp(1rem, 3vw, 1.3rem);
  font-weight: 400;
  color: #8fbc8f;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 1.5rem;
}

/* Decorative line */
.divider {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d4a5a5, transparent);
  margin: 2rem auto;
}

/* Venue address */
.venue-figure {
  margin: 1.5rem 0 0;
  position: relative;
  display: inline-block;
}

.venue-map-link {
  display: block;
  transition: transform 0.3s ease;
}

.venue-map-link:hover {
  transform: scale(1.02);
}

.venue-map {
  max-width: 600px;
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  display: block;
}

.venue {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-style: normal;
  line-height: 1.6;
  color: #5a5a5a;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.venue strong {
  color: #d4a5a5;
  font-weight: 500;
}

.venue-figure figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-style: italic;
  color: #8a8a8a;
}

/* Mobile: address above map */
@media (max-width: 600px) {
  .venue-figure {
    display: flex;
    flex-direction: column;
  }

  .venue {
    position: static;
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin-bottom: 1rem;
    text-align: center;
    order: -1;
  }
}

/* Leaf decorations */
.leaf-decoration {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  opacity: 0.7;
}

.leaf {
  width: 24px;
  height: 24px;
  fill: #a8c9a8;
}

/* Action items */
.actions {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
}

.action-item {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.action-item h3 {
  font-family: "Alex Brush", cursive;
  font-size: 2rem;
  color: #d4a5a5;
  margin-bottom: 0.75rem;
}

.action-item p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #6a6a6a;
  margin-bottom: 1rem;
}

.action-item .password {
  display: inline-block;
  background: #f8f4f1;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9rem;
  color: #8fbc8f;
  border: 1px dashed #a8c9a8;
}

.action-item .btn {
  display: inline-block;
  background: linear-gradient(135deg, #d4a5a5, #e8b4b4);
  color: white;
  text-decoration: none;
  padding: 0.75rem 2rem;
  border-radius: 30px;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(212, 165, 165, 0.3);
}

.action-item .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 165, 165, 0.4);
}

.action-item .btn.btn-secondary {
  background: linear-gradient(135deg, #8fbc8f, #a8c9a8);
  box-shadow: 0 4px 15px rgba(143, 188, 143, 0.3);
}

.action-item .btn.btn-secondary:hover {
  box-shadow: 0 6px 20px rgba(143, 188, 143, 0.4);
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.nowrap {
  white-space: nowrap;
}

.external-link-icon {
  margin-left: 0.4em;
  vertical-align: -0.1em;
}

/* Content sections */
.section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 2rem;
  position: relative;
  overflow: hidden;
}

.section-content {
  max-width: 600px;
  text-align: center;
}

.section h3 {
  font-family: "Alex Brush", cursive;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 400;
  color: #d4a5a5;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}

.section p {
  font-size: 1rem;
  line-height: 1.8;
  color: #6a6a6a;
  margin-bottom: 1rem;
}

/* Growing flower vine */
.growing-vine {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100px;
  height: 100vh;
  height: 100lvh;
  pointer-events: none;
  z-index: -1;
  opacity: 0.7;
  overflow: hidden;
}

.vine-svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.vine-path {
  stroke-dasharray: 1100;
  stroke-dashoffset: 1100;
  transition: stroke-dashoffset 0.1s ease-out;
}

.vine-flower {
  position: absolute;
  transform: scale(0);
  transform-origin: center center;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.vine-flower.bloomed {
  transform: scale(1);
}

.vine-leaf {
  position: absolute;
  width: 28px;
  height: 16px;
  pointer-events: none;
  transform: scale(0);
  transform-origin: left center;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vine-leaf.grown {
  transform: scale(1);
}

.vine-leaf svg {
  width: 100%;
  height: 100%;
}

/* Welcome section */
.welcome-section .section-content p {
  font-style: italic;
  color: #8a8a8a;
}

.welcome-section .signature {
  font-family: "Alex Brush", cursive;
  font-size: 2rem;
  color: #d4a5a5;
  margin-top: 1.5rem;
}

/* Time display for schedule */
.section p.time {
  font-family: "Lora", serif;
  font-size: 1.15rem;
  font-style: italic;
  color: #8fbc8f;
  letter-spacing: 0.05em;
  margin-top: -1rem;
  margin-bottom: 1rem;
}

/* Section headings within content */
.section h4 {
  font-family: "Lora", serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: #8fbc8f;
  margin: 1.5rem 0 0.75rem;
}

/* Room options grid */
.room-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.room-option {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.room-option h4 {
  font-family: "Lora", serif;
  font-size: 1rem;
  font-weight: 500;
  color: #d4a5a5;
  margin: 0 0 0.5rem;
}

.room-option .price {
  font-size: 1.2rem;
  font-weight: 500;
  color: #5a5a5a;
  margin-bottom: 0.5rem;
}

.room-option .details {
  font-size: 0.85rem;
  color: #8a8a8a;
  line-height: 1.5;
}

/* Room extras */
.room-extras {
  background: rgba(143, 188, 143, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: left;
}

.room-extras h4 {
  margin-top: 0;
  text-align: center;
}

.room-extras ul {
  list-style: none;
  padding: 0;
}

.room-extras li {
  font-size: 0.9rem;
  color: #6a6a6a;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(143, 188, 143, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.room-extras li:last-child {
  border-bottom: none;
}

.room-extras li .price {
  color: #8fbc8f;
  font-weight: 500;
  white-space: nowrap;
}

/* FAQ section */
.faq-item {
  text-align: left;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(212, 165, 165, 0.15);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(212, 165, 165, 0.3);
}

.faq-item[open] {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 16px rgba(212, 165, 165, 0.15);
}

.faq-item:last-of-type {
  margin-bottom: 0;
}

.faq-item summary {
  font-family: "Lora", serif;
  font-size: 1rem;
  font-weight: 500;
  color: #d4a5a5;
  font-style: italic;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: color 0.2s ease;
}

.faq-item summary:hover {
  color: #c48f8f;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "❀";
  font-size: 1rem;
  font-style: normal;
  color: #a8c9a8;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  transform: rotate(135deg);
  color: #d4a5a5;
}

.faq-item.closing summary::after {
  transform: rotate(0deg);
  color: #a8c9a8;
}

.faq-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}

.faq-item[open] .faq-content {
  grid-template-rows: 1fr;
}

.faq-item.closing .faq-content {
  grid-template-rows: 0fr;
}

.faq-content > p {
  overflow: hidden;
  margin: 0;
  padding-top: 0;
  border-top: 1px dashed rgba(168, 201, 168, 0.3);
  transition: padding-top 0.35s ease, opacity 0.25s ease, margin-top 0.35s ease;
  opacity: 0;
}

.faq-item[open] .faq-content > p {
  padding-top: 1rem;
  margin-top: 1rem;
  opacity: 1;
}

.faq-item.closing .faq-content > p {
  padding-top: 0;
  margin-top: 0;
  opacity: 0;
}

/* Links in content */
.section a {
  color: #8fbc8f;
  text-decoration: none;
  border-bottom: 1px dotted #8fbc8f;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.section a:hover {
  color: #6b8e6b;
  border-color: #6b8e6b;
}

/* Table of Contents Navigation */
.toc {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  background: rgba(253, 248, 245, 0.95);
  border-radius: 12px;
  padding: 1rem 0.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  max-height: 80vh;
  overflow-y: auto;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc li {
  margin: 0.25rem 0;
}

.toc a {
  display: block;
  padding: 0.5rem 1rem;
  font-family: "Lora", serif;
  font-size: 0.85rem;
  color: #8a8a8a;
  text-decoration: none;
  border-radius: 6px;
  border-right: 2px solid transparent;
  transition: all 0.3s ease;
}

.toc a:hover {
  color: #d4a5a5;
  background: rgba(212, 165, 165, 0.1);
}

.toc a.active {
  color: #d4a5a5;
  border-right-color: #d4a5a5;
  background: rgba(212, 165, 165, 0.1);
  font-weight: 500;
}

/* ToC toggle button (mobile only) */
.toc-toggle {
  display: none;
  position: fixed;
  right: 1rem;
  bottom: 1.5rem;
  z-index: 101;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #d4a5a5, #e8b4b4);
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(212, 165, 165, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.toc-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(212, 165, 165, 0.5);
}

.toc-toggle svg {
  display: block;
  margin: auto;
}

/* Mobile styles */
@media (max-width: 1100px) {
  .toc-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .toc {
    position: fixed;
    right: 1rem;
    bottom: 5rem;
    top: auto;
    transform: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: translateY(10px);
  }

  .toc.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}
