:root {
  --white: #ffffff;
  --off-white: #f8f8f8;
  --silver-light: #e8eaed;
  --silver: #b8bcc4;
  --silver-dark: #8a8f9a;
  --charcoal: #2c2d30;
  --near-black: #1a1a1e;
  --gold: #c9a96e;
  --gold-light: #e4d4b0;
}

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

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--charcoal);
  background: var(--off-white);
  font-family: 'DM Sans', sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

#petalCanvas {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
}

.bg-ornaments {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.leaf {
  position: absolute;
  width: 170px;
  height: 300px;
  opacity: 0.06;
  border: 1px solid var(--charcoal);
  border-radius: 100% 0 100% 0;
  transform-origin: bottom center;
}

.leaf::before,
.leaf::after {
  position: absolute;
  content: '';
  display: block;
  width: 1px;
  height: 155px;
  background: var(--charcoal);
  transform-origin: bottom center;
}

.leaf::before {
  left: 50%;
  bottom: -1px;
  transform: rotate(20deg);
}

.leaf::after {
  left: 51%;
  bottom: 45px;
  transform: rotate(78deg);
  box-shadow: 15px 0 0 -0.25px var(--charcoal), 30px -8px 0 -0.25px var(--charcoal);
}

.leaf-one {
  top: -115px;
  left: -82px;
  transform: rotate(-28deg);
}

.leaf-two {
  top: -115px;
  right: -82px;
  transform: scaleX(-1) rotate(-28deg);
}

.leaf-three {
  right: -125px;
  bottom: -180px;
  transform: rotate(160deg) scale(0.9);
}

.page-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 48px 20px 60px;
}

.hero {
  margin-bottom: 12px;
  text-align: center;
  animation: fadeUp 0.9s ease both;
}

.hero-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.ornament-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--silver));
}

.ornament-line.right {
  background: linear-gradient(90deg, var(--silver), transparent);
}

.ornament-diamond {
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}

.couple-names {
  color: var(--near-black);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(42px, 10vw, 68px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 2px;
}

.couple-names .amp {
  margin: 0 8px;
  color: var(--gold);
  font-style: italic;
  font-weight: 300;
}

.wedding-date {
  margin-top: 10px;
  color: var(--silver-dark);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.wedding-time {
  margin-top: 6px;
  color: var(--gold);
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 1px;
}

.wedding-location {
  margin-top: 4px;
  color: var(--silver-dark);
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-style: italic;
}

.couple-photo-section {
  margin-top: 28px;
  animation: fadeUp 0.9s 0.1s ease both;
}

.couple-photo-frame {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto;
  overflow: hidden;
  background: linear-gradient(135deg, #e8eaed 0%, #f8f8f8 50%, #e4d4b0 100%);
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1), 0 0 0 1px var(--silver-light);
}

.couple-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.08);
}

.countdown-section {
  margin: 28px 0 8px;
  animation: fadeUp 0.9s 0.15s ease both;
}

.countdown-label {
  margin-bottom: 14px;
  color: var(--silver-dark);
  font-size: 10px;
  letter-spacing: 3px;
  text-align: center;
  text-transform: uppercase;
}

.countdown-boxes {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.countdown-box {
  position: relative;
  min-width: 72px;
  overflow: hidden;
  padding: 16px 20px 12px;
  background: var(--white);
  border: 1px solid var(--silver-light);
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
  text-align: center;
}

.countdown-box::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  content: '';
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
}

.countdown-num {
  color: var(--near-black);
  font-family: 'Cormorant Garamond', serif;
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
}

.countdown-unit {
  margin-top: 4px;
  color: var(--silver-dark);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.section-divider {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 460px;
  gap: 14px;
  margin: 30px 0 24px;
  animation: fadeUp 0.9s 0.2s ease both;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--silver-light);
}

.divider-icon {
  color: var(--gold);
  font-size: 18px;
}

.timeline-section,
.tabs-wrapper,
.contribution-card,
.map-section {
  width: 100%;
  max-width: 460px;
}

.timeline-section {
  margin-bottom: 24px;
  animation: fadeUp 0.9s 0.22s ease both;
}

.timeline-heading,
.map-heading {
  margin-bottom: 16px;
  text-align: center;
}

.card-heading {
  color: var(--near-black);
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 400;
}

.timeline-card {
  padding: 20px 24px;
  background: var(--white);
  border: 1px solid var(--silver-light);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

.timeline-row {
  display: flex;
  align-items: stretch;
  min-height: 40px;
}

.timeline-row-last {
  min-height: auto;
}

.timeline-time {
  width: 48px;
  padding-top: 2px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.2px;
}

.timeline-row-highlight .timeline-time {
  padding-top: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.timeline-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 16px;
}

.timeline-marker span {
  display: block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 5px;
  background: var(--gold);
  border-radius: 50%;
}

.timeline-row-highlight .timeline-marker span {
  width: 10px;
  height: 10px;
  margin-top: 6px;
}

.timeline-marker i {
  display: block;
  width: 1px;
  flex: 1;
  margin: 4px 0;
  background: var(--gold-light);
}

.timeline-copy {
  flex: 1;
  padding-bottom: 16px;
  color: var(--charcoal);
  font-size: 14px;
}

.timeline-row-highlight .timeline-copy {
  padding-top: 3px;
  font-size: 15px;
  font-weight: 600;
}

.timeline-copy-detail {
  display: flex;
  flex-direction: column;
}

.timeline-copy-detail small {
  margin-top: 4px;
  color: var(--silver-dark);
  font-size: 12px;
  line-height: 1.4;
}

.tabs-wrapper {
  margin-bottom: 16px;
  animation: fadeUp 0.9s 0.24s ease both;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--white);
  border: 1px solid var(--silver-light);
  border-radius: 14px;
}

.tab-btn {
  flex: 1;
  padding: 10px 8px;
  color: var(--silver-dark);
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.2s;
}

.tab-btn.active {
  color: var(--white);
  background: var(--near-black);
}

.tab-btn:focus-visible,
.location-btn:focus-visible,
.action-btn:focus-visible,
.directions-btn:focus-visible {
  outline: 3px solid rgba(201, 169, 110, 0.45);
  outline-offset: 3px;
}

.contribution-card {
  padding: 36px 32px;
  background: var(--white);
  border: 1px solid rgba(232, 234, 237, 0.8);
  border-radius: 24px;
  box-shadow: 0 1px 0 var(--silver-light), 0 4px 24px rgba(0, 0, 0, 0.06), 0 16px 48px rgba(0, 0, 0, 0.04);
  animation: fadeUp 0.9s 0.26s ease both;
}

.contribution-card .card-heading {
  margin-bottom: 4px;
}

.card-sub {
  margin-bottom: 28px;
  color: var(--silver-dark);
  font-size: 13px;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--silver-dark);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

input[type='text'],
textarea {
  width: 100%;
  padding: 14px 16px;
  color: var(--charcoal);
  background: var(--off-white);
  border: 1.5px solid var(--silver-light);
  border-radius: 12px;
  outline: none;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

input[type='text']:focus,
textarea:focus {
  background: var(--white);
  border-color: var(--silver);
  box-shadow: 0 0 0 3px rgba(184, 188, 196, 0.12);
}

input[type='text']::placeholder,
textarea::placeholder {
  color: var(--silver);
}

textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.6;
}

.drop-zone {
  position: relative;
  padding: 30px 20px;
  overflow: hidden;
  background: var(--off-white);
  border: 1.5px dashed var(--silver-light);
  border-radius: 16px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.drop-zone:hover,
.drop-zone.dragover {
  background: var(--white);
  border-color: var(--silver);
}

.drop-zone input[type='file'] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.drop-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  color: var(--silver-dark);
  background: var(--silver-light);
  border-radius: 50%;
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  line-height: 1;
}

.drop-text-main {
  margin-bottom: 4px;
  color: var(--charcoal);
  font-size: 14px;
  font-weight: 500;
}

.drop-text-sub {
  color: var(--silver-dark);
  font-size: 12px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.preview-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--silver-light);
  border-radius: 10px;
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--white);
  background: var(--charcoal);
  font-size: 22px;
}

.remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.55);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
}

.file-count {
  margin-top: 10px;
  color: var(--silver-dark);
  font-size: 12px;
  text-align: center;
}

.error-msg {
  display: none;
  margin-top: 12px;
  padding: 12px 14px;
  color: #c0392b;
  background: #fff4f4;
  border-left: 3px solid #e74c3c;
  border-radius: 10px;
  font-size: 13px;
}

.action-btn,
.directions-btn {
  width: 100%;
  border: 0;
  cursor: pointer;
}

.action-btn {
  margin-top: 28px;
  padding: 16px;
  color: var(--white);
  background: var(--near-black);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

.action-btn:hover:not(:disabled) {
  background: #3a3b40;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.action-btn:disabled {
  background: var(--silver);
  cursor: not-allowed;
}

.progress-section {
  display: none;
  margin-top: 20px;
}

.progress-bar-wrap {
  height: 4px;
  margin-bottom: 8px;
  overflow: hidden;
  background: var(--silver-light);
  border-radius: 99px;
}

.progress-bar-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--silver), var(--charcoal));
  border-radius: 99px;
  transition: width 0.4s ease;
}

.progress-text {
  color: var(--silver-dark);
  font-size: 12px;
  letter-spacing: 1px;
  text-align: center;
}

.success-screen,
.wish-sent {
  display: none;
  padding: 20px 0 8px;
  text-align: center;
}

.success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--off-white), var(--silver-light));
  border: 1px solid var(--silver-light);
  border-radius: 50%;
  font-size: 32px;
}

.success-screen h2,
.wish-sent h2 {
  margin-bottom: 10px;
  color: var(--near-black);
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 400;
}

.success-screen p,
.wish-sent p {
  color: var(--silver-dark);
  font-size: 14px;
  line-height: 1.7;
}

.wish-icon {
  margin-bottom: 14px;
  font-size: 40px;
}

.wish-sent h2 {
  font-size: 26px;
}

.char-counter {
  margin-top: 5px;
  color: var(--silver);
  font-size: 11px;
  text-align: right;
}

.map-section {
  margin-top: 24px;
  animation: fadeUp 0.9s 0.3s ease both;
}

.location-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--silver-light);
  border-radius: 30px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.06);
}

.location-btn {
  flex: 1;
  padding: 12px 16px;
  color: #7f8c8d;
  background: transparent;
  border: 0;
  border-radius: 24px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.location-btn.active {
  color: #2c3e50;
  background: var(--white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.location-content {
  animation: fadeUp 0.5s ease;
}

.location-content[hidden],
#wishTab[hidden] {
  display: none;
}

.location-copy {
  margin-bottom: 16px;
  text-align: center;
}

.location-copy strong {
  color: var(--charcoal);
  font-weight: 500;
}

.map-frame {
  height: 250px;
  overflow: hidden;
  border: 1px solid var(--silver-light);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.directions-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  color: var(--white);
  background: var(--charcoal);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.directions-btn:hover {
  background: #3a3b40;
}

.footer {
  margin-top: 36px;
  text-align: center;
  animation: fadeUp 0.9s 0.35s ease both;
}

.footer-names {
  color: var(--silver-dark);
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  font-style: italic;
}

.template-note {
  margin-top: 8px;
  color: var(--silver);
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .page-wrapper {
    padding-right: 16px;
    padding-left: 16px;
  }

  .countdown-box {
    min-width: 60px;
    padding: 12px 14px 10px;
  }

  .countdown-num {
    font-size: 28px;
  }

  .contribution-card {
    padding: 28px 20px;
  }

  .timeline-card {
    padding-right: 18px;
    padding-left: 18px;
  }

  .timeline-marker {
    margin-right: 12px;
    margin-left: 12px;
  }

  .timeline-copy {
    font-size: 13px;
  }
}
