@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700;900&display=swap');

@font-face {
  font-family: 'Amsterdam Three';
  src: url('assets/fonts/amsterdam-three-slant.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-amber: #FFB13D;
  --color-amber-tint: #FFEAC6;
  --color-amber-deep: #E0931E;
  --color-teal: #0097B2;
  --color-teal-tint: #CEEAEF;
  --color-teal-deep: #00798E;
  --color-ink: #111111;
  --color-ink-soft: #2A2A2A;
  --color-paper: #FFFFFF;
  --color-cream: #FBF4E6;
  --color-rule: #D9D9D9;

  --font-script: 'Amsterdam Three', 'Snell Roundhand', cursive;
  --font-serif: 'Merriweather', Georgia, serif;

  --shadow-card: 0 1px 0 rgba(20, 14, 0, 0.05), 0 14px 30px rgba(20, 14, 0, 0.07);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-serif);
  color: var(--color-ink);
  background: var(--color-cream);
  min-height: 100vh;
  line-height: 1.55;
}

.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(40rem 40rem at -8rem 8rem, var(--color-teal-tint) 0%, transparent 72%),
    radial-gradient(20rem 20rem at 85% 6rem, var(--color-amber-tint) 0%, transparent 70%),
    radial-gradient(26rem 26rem at 92% 55%, rgba(0, 151, 178, 0.12) 0%, transparent 74%),
    linear-gradient(180deg, #f7f3eb 0%, #f3eee2 100%);
}

.site-wrap {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100% - 2.5rem));
  margin: 2rem auto 3.5rem;
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

.auth-card {
  width: min(520px, 100%);
  margin: min(12vh, 5rem) auto 0;
  padding: 1.5rem;
}

.auth-title {
  margin: 0;
  color: var(--color-teal);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.15;
}

.auth-copy {
  margin: 0.75rem 0 0;
  color: var(--color-ink-soft);
  font-size: 1rem;
}

.auth-form {
  margin-top: 1.1rem;
}

.card {
  max-width: 100%;
  min-width: 0;
  background: var(--color-paper);
  border: 1px solid var(--color-rule);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}

.hero {
  text-align: center;
  padding: 2.2rem 1.2rem 1.7rem;
}

.hero-title {
  margin: 0;
  display: grid;
  gap: 0.45rem;
  color: var(--color-teal);
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  line-height: 1;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.hero-title small {
  color: var(--color-ink-soft);
  font-size: clamp(1.45rem, 3.4vw, 2.2rem);
  line-height: 1.2;
  font-weight: 400;
}

.eyebrow {
  margin: 0;
  color: var(--color-teal);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  font-weight: 700;
}

.info-grid,
.action-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.thank-card {
  padding: 1.45rem 1.5rem 1.55rem;
}

.thank-title {
  margin: 0;
  color: var(--color-teal);
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  line-height: 1.15;
}

.thank-text {
  margin: 0.75rem 0 0;
  font-size: clamp(1.05rem, 2vw, 1.24rem);
  line-height: 1.7;
}

.thank-text p {
  margin: 0.65rem 0 0;
}

.thank-text p:first-child {
  margin-top: 0;
}

.signature-script {
  display: block;
  font-family: var(--font-script);
  color: var(--color-teal);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 0.95;
  text-align: right;
  white-space: nowrap;
}

.thank-text .signature-script {
  margin-top: 1rem;
}

.info-card {
  padding: 1.2rem 1.15rem 1.25rem;
}

.schedule-list {
  margin: 0.7rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 1.2rem;
  line-height: 1.6;
}

.deadline,
.travel-text,
.quarter-text {
  margin: 0.75rem 0 0;
  font-size: 1.22rem;
  line-height: 1.5;
}

.btn-map {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.45rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--color-teal);
  color: var(--color-teal);
  background: transparent;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 120ms var(--ease-out), color 120ms var(--ease-out);
}

.btn-map:hover {
  background: var(--color-teal);
  color: #fff;
}

.contact-line {
  margin: 0.52rem 0 0;
  font-size: 1.2rem;
}

.contact-line a {
  color: var(--color-teal);
  font-weight: 700;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.contact-line a:hover {
  color: var(--color-teal-deep);
}

.quarter-note {
  margin: 0.5rem 0 0;
  color: var(--color-amber-deep);
  font-style: italic;
}

.photo-card {
  padding: 1.5rem;
  overflow: hidden;
}

.photo-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.photo-head h2 {
  margin: 0.45rem 0 0;
  font-size: clamp(1.6rem, 3.1vw, 2.3rem);
}

.photo-count {
  margin: 0;
  padding: 0.4rem 0.62rem;
  border: 1px solid rgba(0, 151, 178, 0.24);
  border-radius: 999px;
  color: var(--color-teal-deep);
  background: var(--color-teal-tint);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.status {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
}

.status ul {
  margin: 0.45rem 0 0;
  padding-left: 1.15rem;
}

.status p {
  margin: 0;
}

.status-success {
  background: var(--color-teal-tint);
  border: 1px solid rgba(0, 151, 178, 0.35);
}

.status-error {
  background: #fff2f2;
  border: 1px solid #e8abab;
}

form {
  margin-top: 1.1rem;
  display: grid;
  gap: 1rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.field label,
.field legend {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--color-teal);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  font-weight: 700;
}

.fieldset,
.field {
  margin: 0;
}

.fieldset,
fieldset {
  border: 0;
  padding: 0;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--color-rule);
  border-radius: 8px;
  padding: 0.7rem 0.78rem;
  font: inherit;
  color: var(--color-ink);
  background: var(--color-paper);
  transition: border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

input:focus,
textarea:focus {
  outline: 0;
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(0, 151, 178, 0.2);
}

.radio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.radio-card {
  border: 1px solid var(--color-rule);
  border-radius: 10px;
  padding: 0.65rem 0.72rem;
  cursor: pointer;
  display: grid;
  gap: 0.2rem;
}

.radio-card input {
  width: auto;
  margin: 0 0 0.35rem;
  accent-color: var(--color-teal);
}

.radio-card span {
  font-weight: 700;
}

.radio-card small {
  color: var(--color-ink-soft);
  font-size: 0.78rem;
}

.btn-primary {
  border: 0;
  border-radius: 8px;
  background: var(--color-teal);
  color: #fff;
  padding: 0.82rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms var(--ease-out), background-color 120ms var(--ease-out);
}

.btn-primary:disabled {
  cursor: wait;
  opacity: 0.8;
}

.btn-primary:hover {
  background: var(--color-teal-deep);
}

.btn-primary:active {
  transform: translateY(2px);
}

.gallery-empty {
  margin-top: 1rem;
  padding: 2rem 1rem;
  border: 1px dashed rgba(0, 151, 178, 0.38);
  border-radius: 12px;
  color: var(--color-ink-soft);
  background: rgba(206, 234, 239, 0.28);
  text-align: center;
}

.carousel {
  position: relative;
  width: 100%;
  max-width: min(100%, calc(680px + 6rem));
  margin: 1.1rem auto 0;
  padding: 0 3rem 2.1rem;
  min-width: 0;
}

.carousel-viewport {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  overflow: hidden;
  touch-action: pan-y;
  border-radius: 12px;
  border: 1px solid var(--color-rule);
  background: var(--color-cream);
}

.carousel-track {
  display: flex;
  width: 100%;
  transition: transform 220ms var(--ease-out);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  margin: 0;
  max-width: 100%;
  min-width: 0;
}

.carousel-image-button {
  width: 100%;
  border: 0;
  padding: 0;
  display: block;
  aspect-ratio: 16 / 10;
  background: transparent;
  cursor: pointer;
}

.carousel-image {
  display: block;
  max-width: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 160ms var(--ease-out);
}

.carousel-image-button:hover .carousel-image {
  transform: scale(1.01);
}

.carousel-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #111;
  object-fit: contain;
}

.carousel-caption {
  min-height: 3.2rem;
  padding: 0.7rem 0.85rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.65rem;
  align-items: center;
  border-top: 1px solid var(--color-rule);
  background: var(--color-paper);
}

.carousel-caption span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.carousel-caption small {
  color: var(--color-ink-soft);
  font-size: 0.78rem;
  white-space: nowrap;
}

.carousel-caption a {
  padding: 0.36rem 0.58rem;
  border-radius: 999px;
  color: var(--color-teal);
  border: 1px solid var(--color-teal);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.carousel-caption a:hover {
  color: #fff;
  background: var(--color-teal);
}

.carousel-btn {
  position: absolute;
  top: calc(50% - 1.45rem);
  width: 2.25rem;
  height: 2.9rem;
  border: 1px solid rgba(0, 151, 178, 0.28);
  border-radius: 999px;
  background: var(--color-paper);
  color: var(--color-teal);
  font: inherit;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: background-color 120ms var(--ease-out), color 120ms var(--ease-out), opacity 120ms var(--ease-out);
}

.carousel-btn:hover {
  background: var(--color-teal);
  color: #fff;
}

.carousel-btn:disabled {
  cursor: default;
  opacity: 0.32;
}

.carousel-btn:disabled:hover {
  background: var(--color-paper);
  color: var(--color-teal);
}

.carousel-btn-prev {
  left: 0;
}

.carousel-btn-next {
  right: 0;
}

.carousel-dots {
  position: absolute;
  left: 3rem;
  right: 3rem;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 0.45rem;
}

.carousel-dot {
  width: 0.58rem;
  height: 0.58rem;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(0, 151, 178, 0.25);
  cursor: pointer;
}

.carousel-dot.is-active {
  background: var(--color-teal);
}

.upload-panel {
  margin-top: 0.8rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 0.85rem;
  background: transparent;
}

.upload-copy label {
  display: block;
  color: var(--color-teal);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  font-weight: 700;
}

.upload-copy p {
  margin: 0.25rem 0 0;
  color: var(--color-ink-soft);
  font-size: 0.9rem;
}

.upload-input {
  max-width: 100%;
  min-width: 0;
  background: var(--color-paper);
}

.upload-progress {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--color-teal-deep);
  font-size: 0.9rem;
  font-weight: 700;
}

.upload-progress[hidden] {
  display: none;
}

.upload-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(0, 151, 178, 0.25);
  border-top-color: var(--color-teal);
  border-radius: 999px;
  animation: upload-spin 700ms linear infinite;
}

.upload-submit {
  position: relative;
  min-height: 3rem;
}

.btn-loading {
  display: none;
}

.upload-panel.is-uploading .btn-label {
  display: none;
}

.upload-panel.is-uploading .btn-loading {
  display: inline;
}

@keyframes upload-spin {
  to {
    transform: rotate(360deg);
  }
}

.lightbox {
  position: relative;
  border: 0;
  padding: 1rem;
  border-radius: 18px;
  max-width: min(92vw, 980px);
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 80px rgba(20, 14, 0, 0.28);
}

.lightbox::backdrop {
  background: rgba(17, 17, 17, 0.72);
}

.lightbox-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
}

.lightbox-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: var(--color-teal);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-download {
  display: inline-block;
  margin-top: 0.85rem;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  background: var(--color-amber);
  color: var(--color-ink);
  font-weight: 700;
  text-decoration: none;
}

.lightbox-download:hover {
  background: var(--color-amber-deep);
  color: #fff;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 920px) {
  .site-wrap {
    width: min(1100px, calc(100% - 1.2rem));
    margin-top: 1rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .action-grid {
    grid-template-columns: 1fr;
  }

  .field-grid,
  .radio-grid,
  .upload-panel {
    grid-template-columns: 1fr;
  }

  .photo-head {
    display: grid;
  }

  .photo-count {
    justify-self: start;
  }

  .carousel {
    max-width: 100%;
    padding: 0 0 2rem;
  }

  .carousel-btn {
    top: calc(50% - 2.4rem);
    width: 2rem;
    height: 2.6rem;
    background: rgba(255, 255, 255, 0.92);
  }

  .carousel-btn-prev {
    left: 0.5rem;
  }

  .carousel-btn-next {
    right: 0.5rem;
  }

  .carousel-caption {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .carousel-dots {
    left: 0;
    right: 0;
  }

  .lightbox {
    width: min(92vw, 980px);
  }

  .hero {
    padding-top: 1.8rem;
  }
}

@media (max-width: 640px) {
  body {
    line-height: 1.5;
  }

  .page-bg {
    background:
      radial-gradient(26rem 26rem at -10rem 4rem, var(--color-teal-tint) 0%, transparent 72%),
      radial-gradient(18rem 18rem at 100% 0, var(--color-amber-tint) 0%, transparent 70%),
      linear-gradient(180deg, #f7f3eb 0%, #f3eee2 100%);
  }

  .site-wrap {
    width: calc(100% - 0.75rem);
    margin: 0.45rem auto 1.5rem;
    gap: 0.75rem;
  }

  .card {
    border-radius: 12px;
  }

  .auth-card,
  .hero,
  .thank-card,
  .photo-card,
  .info-card {
    padding: 1rem;
  }

  .auth-card {
    margin-top: 0.75rem;
  }

  .hero-title {
    gap: 0.25rem;
    font-size: clamp(2.1rem, 13vw, 3.2rem);
  }

  .hero-title small {
    font-size: clamp(1.15rem, 6vw, 1.55rem);
  }

  .thank-title,
  .photo-head h2 {
    font-size: 1.45rem;
  }

  .thank-text {
    font-size: 1rem;
    line-height: 1.6;
  }

  .signature-script {
    font-size: clamp(1.8rem, 10vw, 2.7rem);
    white-space: normal;
  }

  .eyebrow {
    letter-spacing: 0.12em;
  }

  .contact-line {
    font-size: 1rem;
    overflow-wrap: anywhere;
  }

  input,
  textarea,
  .btn-primary {
    font-size: 1rem;
  }

  .btn-primary {
    width: 100%;
    padding: 0.9rem 1rem;
  }

  .photo-head {
    gap: 0.35rem;
  }

  .photo-count {
    font-size: 0.76rem;
  }

  .carousel {
    margin-top: 0.85rem;
  }

  .carousel-viewport {
    border-radius: 10px;
  }

  .carousel-image-button,
  .carousel-video {
    aspect-ratio: 4 / 3;
  }

  .carousel-caption {
    min-height: 0;
    padding: 0.65rem;
    gap: 0.45rem;
  }

  .carousel-caption span {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .carousel-btn {
    top: calc(50% - 2.9rem);
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.6rem;
  }

  .carousel-btn-prev {
    left: 0.35rem;
  }

  .carousel-btn-next {
    right: 0.35rem;
  }

  .upload-copy p,
  .upload-progress {
    font-size: 0.86rem;
  }

  .upload-input {
    font-size: 0.9rem;
  }

  .lightbox {
    padding: 0.6rem;
    border-radius: 12px;
  }

  .lightbox-close {
    top: 0.45rem;
    right: 0.45rem;
  }
}
