/* ==========================================================================
   Photoverse — self-portrait photo studio in Chicago
   Palette: burgundy #8C4A5F / cream #FBF4F1
   ========================================================================== */

:root {
  color-scheme: light;
  --cream: #FBF4F1;
  --cream-soft: #F7E9E3;
  --burgundy: #8C4A5F;
  --burgundy-dark: #6E3347;
  --burgundy-deep: #4A2233;
  --ink: #432635;
  --ink-soft: rgba(67, 38, 53, 0.78);
  --ink-faint: rgba(67, 38, 53, 0.45);
  --card-radius: 20px;
  --ig-gradient: conic-gradient(
    from var(--ig-angle, 0deg),
    #833AB4, #E1306C, #F77737, #FCAF45, #833AB4
  );
}

@property --ig-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

* {
  box-sizing: border-box;
}

html {
  /* Gradient on the root: it propagates to the canvas and paints the whole
     document plus whatever shows beyond it (overscroll stretch, pinch-zoom) */
  background: linear-gradient(55deg, #f2ddd6, #fbf4f1 48%, #ecd6d0);
}

/* Gradient glued to the viewport. background-attachment: fixed on the
   root is unreliable in mobile Chrome/Android — scrolling with the
   collapsing URL bar leaves unpainted strips at the bottom.
   A position:fixed layer sized to the LARGE viewport (100lvh) is already
   as tall as the screen with the URL bar hidden, so the area exposed
   while the bar collapses stays painted. */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  background: linear-gradient(55deg, #f2ddd6, #fbf4f1 48%, #ecd6d0);
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  margin: 0;
  color: var(--ink);
  font-family: 'Noto Sans', 'Segoe UI', sans-serif;
  font-size: 14px;
  background: transparent;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(140, 74, 95, 0.25);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Layout ---------- */

.container {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 18px;
}

.column {
  display: flex;
  flex-direction: column;
}

/* ---------- Profile header ---------- */

.profile {
  position: relative; /* the share button anchors to the container edge */
  text-align: center;
  padding: 44px 0 6px;
}

.profile__avatar-wrap {
  display: inline-block;
}

.profile__avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(110, 51, 71, 0.28);
  display: inline-block;
}

/* Round share button at the container's right edge, level with the avatar */
.share-button {
  position: absolute;
  top: 42px;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(140, 74, 95, 0.16);
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  color: var(--burgundy);
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(110, 51, 71, 0.16);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.share-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px rgba(110, 51, 71, 0.22);
}

.share-button:active {
  transform: translateY(0) scale(0.94);
}

.share-button svg {
  display: block;
}

/* Copy-success toast */
.toastdiv {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 36px;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
}

.toastbox {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  background: var(--burgundy-deep);
  color: var(--cream);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 12px 28px rgba(74, 34, 51, 0.35);
}

.toastbox.toast-active {
  opacity: 1;
  transform: translateY(0);
}

.profile__name {
  margin: 18px 0 0;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.profile__description {
  max-width: 400px;
  margin: 20px auto 0; /* air under the "Photoverse" name */
}

.profile__description p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-faint);
}

/* Two classes: must out-rank `.profile__description p` (0,1,1) */
.profile__description .profile__tagline {
  margin-top: 20px !important;
  /* shrink just enough to keep the whole line on one line, even on
     narrow phones (~28.7px of text width per 1px of font size) */
  font-size: clamp(9px, 2.8vw, 11px);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--burgundy) !important;
}

/* ---------- Instagram card: live gradient border ---------- */

.ig-card {
  display: block;
  position: relative;
  margin-top: 60px; /* air between the profile block and the cards */
  padding: 2px; /* the gradient shows through as the border */
  border-radius: var(--card-radius);
  background: var(--ig-gradient);
  animation: ig-spin 7s linear infinite;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(131, 58, 180, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ig-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(131, 58, 180, 0.32);
}

@keyframes ig-spin {
  to { --ig-angle: 360deg; }
}

.ig-card__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #201019;
  border-radius: calc(var(--card-radius) - 2px);
  padding: 15px 18px;
  color: var(--cream);
}

.ig-card__glyph {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(131, 58, 180, 0.5), rgba(247, 119, 55, 0.4));
  color: var(--cream);
}

.ig-card__glyph svg,
.button .icon svg {
  display: block;
}

.ig-card__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ig-card__handle {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
}

.ig-card__sub {
  font-size: 12.5px;
  color: rgba(251, 244, 241, 0.65);
}

.ig-card__arrow {
  flex-shrink: 0;
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  transition: transform 0.25s ease, background 0.25s ease;
}

.ig-card:hover .ig-card__arrow {
  transform: translate(2px, -2px);
  background: rgba(255, 255, 255, 0.18);
}

/* ---------- Offer cards ---------- */

.offer-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  padding: 20px;
  border-radius: var(--card-radius);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.offer-card:hover {
  transform: translateY(-2px);
}

.offer-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.offer-card__head-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

/* Big price, top-right corner of the card */
.offer-card__price {
  flex-shrink: 0;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0.01em;
}

.offer-card__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}

.offer-card__title {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.01em;
}

/* What's included, mirroring the booking page */
.offer-card__list {
  margin: 8px 0 0; /* clear separation from the spec chips above */
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12.5px;
  line-height: 1.5;
  opacity: 0.88;
}

.offer-card--primary .offer-card__list li::marker {
  color: rgba(251, 244, 241, 0.55);
}

.offer-card--secondary .offer-card__list li::marker {
  color: var(--burgundy);
}

/* Spec chips: duration / people */
.offer-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -3px;
}

.offer-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.offer-card__meta-item svg {
  display: block;
  flex-shrink: 0;
}

.offer-card__cta {
  align-self: flex-end;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  transition: transform 0.25s ease;
}

.offer-card:hover .offer-card__cta {
  transform: translate(2px, 0);
}

/* Primary — solid burgundy */
.offer-card--primary {
  margin-top: 26px;
  background: linear-gradient(135deg, var(--burgundy), var(--burgundy-dark));
  color: var(--cream);
  box-shadow: 0 14px 32px rgba(110, 51, 71, 0.32);
}

.offer-card--primary::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 244, 241, 0.18), transparent 70%);
  pointer-events: none;
}

.offer-card--primary .offer-card__cta {
  background: var(--cream);
  color: var(--burgundy-dark);
}

.offer-card--primary .offer-card__price {
  color: var(--cream);
}

.offer-card--primary .offer-card__meta-item {
  background: rgba(251, 244, 241, 0.16);
  color: var(--cream);
}

/* Light sheen sweep on hover */
.offer-card--primary::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -80%;
  width: 60%;
  background: linear-gradient(105deg, transparent, rgba(251, 244, 241, 0.16), transparent);
  transform: skewX(-18deg);
  transition: left 0.7s ease;
  pointer-events: none;
}

.offer-card--primary:hover::after {
  left: 120%;
}

.offer-card--primary:hover {
  box-shadow: 0 18px 40px rgba(110, 51, 71, 0.4);
}

/* Secondary — frosted glass */
.offer-card--secondary {
  background: rgba(255, 255, 255, 0.58);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(140, 74, 95, 0.16);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(110, 51, 71, 0.1);
}

.offer-card--secondary .offer-card__eyebrow {
  color: var(--burgundy);
  opacity: 1;
}

.offer-card--secondary .offer-card__cta {
  background: var(--burgundy);
  color: var(--cream);
}

.offer-card--secondary .offer-card__price {
  color: var(--burgundy);
}

.offer-card--secondary .offer-card__meta-item {
  background: rgba(140, 74, 95, 0.09);
  color: var(--burgundy-dark);
}

.offer-card--secondary:hover {
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 12px 28px rgba(110, 51, 71, 0.16);
}

/* ---------- Slideshow ---------- */

.slideshow {
  margin-top: 40px; /* clear air before the heading */
  margin-bottom: 24px; /* + track padding below = air after the dots */
}

.slideshow__heading {
  margin: 0 0 14px;
  text-align: center;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.02em;
  color: var(--ink);
}

/* Full-bleed: the track stretches past the container to the viewport edges,
   so slides are cut by the screen edge, not by an invisible box mid-page.
   Vertical padding leaves room for the slide shadows, which overflow-x
   would otherwise clip */
.slideshow__track {
  position: relative; /* slide.offsetLeft is measured against the track in JS */
  display: flex;
  margin: 0 calc(50% - 50vw);
  padding: 18px 0 36px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* legacy Edge */
}

.slideshow__track::-webkit-scrollbar {
  display: none; /* Chrome / Safari */
}

/* While script.js drives the scroll, mandatory snap must step aside —
   otherwise Chromium re-snaps every programmatic scroll back instantly */
.slideshow__track--animating {
  scroll-snap-type: none;
}

/* Side spacers keep every slide (first and last included) able to sit
   dead-center; the −12px compensates the slide margin so the gap between
   a spacer and a slide matches the gap between slides */
.slideshow__track::before,
.slideshow__track::after {
  content: '';
  flex: 0 0 auto;
  width: calc((100% - min(78%, 380px)) / 2 - 12px);
}

.slide {
  flex: 0 0 min(78%, 380px);
  margin-right: 12px;
  scroll-snap-align: center;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  background: var(--cream-soft);
  box-shadow: 0 10px 24px rgba(110, 51, 71, 0.16);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* Desktop only (set from JS): a partially visible slide invites a click */
.slide--peek {
  cursor: pointer;
  filter: brightness(0.94);
}

.slide--peek:hover {
  filter: brightness(1.02);
}

.slideshow__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 0; /* the track's own bottom padding spaces this */
}

.slideshow__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(140, 74, 95, 0.28);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.slideshow__dot.is-active {
  width: 22px;
  background: var(--burgundy);
}

/* ---------- Pill buttons ---------- */

.button-entrance {
  display: flex;
  margin-top: 16px;
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(140, 74, 95, 0.14);
  color: var(--ink);
  font-family: 'Noto Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.button .icon {
  display: grid;
  place-items: center;
  color: var(--burgundy);
  flex-shrink: 0;
}

.button-hover:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(110, 51, 71, 0.14);
}

.button-click:active {
  transform: translateY(0) scale(0.98);
}

/* ---------- Footer ---------- */

.footer {
  text-align: center;
  /* generous bottom air: on mobile the last buttons must never
     sit against the bottom edge of the screen */
  margin: 34px 0 110px;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
}

/* ---------- Entrance animations ---------- */

.rise-in {
  animation: riseIn 0.7s cubic-bezier(0.22, 0.85, 0.35, 1) both;
  animation-delay: var(--rise-delay, 0ms);
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll-driven reveal (classes added by script.js) */
.reveal {
  opacity: 0;
  transform: translateY(18px);
}

.reveal.is-visible {
  animation: riseIn 0.7s cubic-bezier(0.22, 0.85, 0.35, 1) both;
  animation-delay: var(--reveal-delay, 0ms);
}

/* ---------- Small screens ---------- */

@media (max-width: 420px) {
  .profile {
    padding-top: 36px;
  }

  .profile__avatar {
    width: 96px;
    height: 96px;
  }

  .share-button {
    top: 34px;
  }

  .profile__name {
    font-size: 27px;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .rise-in,
  .reveal.is-visible {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .ig-card {
    animation: none;
  }

  .ig-card,
  .offer-card,
  .button,
  .share-button,
  .slide,
  .slideshow__dot,
  .offer-card__cta,
  .offer-card--primary::after,
  .toastbox {
    transition: none;
  }
}
