/* ===== SIGNA EVENTS — Mobile-first ===== */

:root {
  --coral:      #E85A4F;
  --coral-dark: #C94840;
  --charcoal:   #1C1C1C;
  --mid:        #5C5A57;
  --muted:      #9E9C99;
  --border:     #E3E0DC;
  --white:      #FFFFFF;
  --bg:         #FAF8F5;
  --serif:      "Cormorant Garamond", Georgia, serif;
  --sans:       "DM Sans", "Helvetica Neue", sans-serif;
  --ease:       cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out:   cubic-bezier(0, 0, 0.3, 1);
}

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

html, body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 1.1rem;
  background: var(--white);
  border-top: 3px solid var(--coral);
  border-bottom: 1px solid var(--border);
}

.logo { flex-shrink: 0; }

/* Mobile logo — cropped PNG, mark fills ~75% of height */
.logo img {
  height: 50px;
  width: auto;
  display: block;
}

/* Ghost button */
.contact-btn {
  flex-shrink: 0;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.6rem 1.05rem;
  white-space: nowrap;
  background: transparent;
  color: var(--coral);
  border: 1.5px solid var(--coral);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.22s var(--ease), color 0.22s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.contact-btn:hover,
.contact-btn:active {
  background: var(--coral);
  color: var(--white);
}

/* ===== MOBILE LAYOUT (default — no viewport lock) ===== */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

/* Hero stacks vertically on mobile: carousel on top, copy below */
.hero {
  display: flex;
  flex-direction: column;
}

/* ===== CAROUSEL ===== */
.experiences-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #D8D5D0;
  overflow: hidden;
  order: -1; /* carousel first on mobile (copy is first in DOM for desktop layout) */
  /* No border-radius on mobile — goes edge-to-edge */
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Crossfade slides — stacked absolutely */
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s var(--ease);
}

.carousel-slide.active { opacity: 1; }

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
  will-change: transform;
}

/* Ken Burns */
@keyframes kenBurns {
  0%   { transform: scale(1);    }
  100% { transform: scale(1.07); }
}

.carousel-slide.active img {
  animation: kenBurns 7s ease-in-out forwards;
}

/* Gradient vignette for dots/counter legibility */
.experiences-carousel::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to top, rgba(0,0,0,0.48), transparent);
  pointer-events: none;
  z-index: 1;
}

/* Frosted glass nav buttons */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.carousel-nav:hover,
.carousel-nav:active {
  background: rgba(255,255,255,0.28);
  border-color: rgba(255,255,255,0.9);
}

.carousel-nav.prev { left: 0.75rem; }
.carousel-nav.next { right: 0.75rem; }

.carousel-dots {
  position: absolute;
  bottom: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.45rem;
  z-index: 2;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.38);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  -webkit-tap-highlight-color: transparent;
}

.carousel-dot.active {
  background: var(--white);
  transform: scale(1.4);
}

.carousel-counter {
  position: absolute;
  bottom: 0.85rem;
  right: 0.9rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.65);
  z-index: 2;
  font-family: var(--sans);
  user-select: none;
}

/* ===== COPY (below carousel on mobile) ===== */
.copy {
  padding: 1.5rem 1.25rem 0.5rem;
}

.copy-headline {
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--charcoal);
  margin-bottom: 0.85rem;
  animation: fadeUp 0.75s var(--ease-out) 0.1s both;
}

/* Animated coral highlight on the italic line */
.copy-headline em {
  color: var(--coral);
  font-style: italic;
  display: inline-block;
  animation: slideReveal 0.9s var(--ease-out) 0.55s both;
}

@keyframes slideReveal {
  from {
    opacity: 0;
    transform: translateX(-20px);
    clip-path: inset(0 100% 0 0);
  }
  to {
    opacity: 1;
    transform: translateX(0);
    clip-path: inset(0 0% 0 0);
  }
}

.copy-divider {
  width: 36px;
  height: 2px;
  background: var(--coral);
  margin-bottom: 0.9rem;
  animation: fadeUp 0.75s var(--ease-out) 0.2s both;
}

.copy p {
  margin-bottom: 0.8rem;
  color: var(--mid);
  font-size: 0.9rem;
  line-height: 1.7;
}

.copy p:nth-of-type(1) { animation: fadeUp 0.75s var(--ease-out) 0.3s both; }
.copy p:nth-of-type(2) { animation: fadeUp 0.75s var(--ease-out) 0.44s both; }
.copy p:last-child { margin-bottom: 0; }

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

/* ===== LOGOS SECTION ===== */
.logos-section {
  padding: 1rem 0 0.75rem;
  margin-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.logos-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 0.6rem;
  text-align: center;
}

/*
  Ticker animation with built-in pause:
  - 85% of total time = smooth scroll 0 → -50%
  - instant jump back to 0
  - 15% of total time = pause at start (~3.5s with 23s total)
*/
@keyframes logoTicker {
  0%      { transform: translateX(0); }
  85%     { transform: translateX(var(--ticker-end, -50%)); }
  85.001% { transform: translateX(0); }
  100%    { transform: translateX(0); }
}

.logos-carousel {
  position: relative;
  overflow: hidden;
  /*
    Wide fade (22% each side) means the "clear" visible zone is only ~56% of
    viewport width — narrower than one logo set, so duplicates stay in the
    faded edges and are never clearly visible
  */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 22%, black 78%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 22%, black 78%, transparent 100%);
}

.logos-track {
  display: flex;
  gap: 4rem;
  align-items: center;
  width: max-content;
  animation: logoTicker 26s linear infinite;
}

.logos-track:hover {
  animation-play-state: paused;
}

.logo-slide {
  flex: 0 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
}

.logo-slide img {
  max-height: 100%;
  max-width: 180px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.55;
  mix-blend-mode: multiply;
  transition: opacity 0.3s ease, filter 0.3s ease;
  pointer-events: none; /* ticker moves, no hover needed on individual logos */
}

/* ===== CONTACT MODAL — Bottom sheet on mobile ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end; /* slides up from bottom on mobile */
  justify-content: center;
}

.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 16, 14, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

.modal-content {
  position: relative;
  background: var(--white);
  border-radius: 18px 18px 0 0;
  border-top: 3px solid var(--coral);
  padding: 1.75rem 1.5rem 2.5rem;
  width: 100%;
  max-height: 94vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 -16px 60px rgba(0,0,0,0.18);
  animation: sheetUp 0.38s var(--ease-out);
}

/* Drag handle indicator */
.modal-content::before {
  content: '';
  display: block;
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 1.25rem;
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.modal-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.modal-close:hover { color: var(--charcoal); }

.modal-content h2 {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--charcoal);
  margin-bottom: 0.2rem;
}

.modal-subtitle {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* Editorial underline inputs */
.contact-form label {
  display: block;
  margin-bottom: 1.2rem;
}

.contact-form label span {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.55rem 0;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 1rem; /* larger touch target on mobile */
  color: var(--charcoal);
  transition: border-color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-bottom-color: var(--coral);
}

.contact-form textarea {
  resize: vertical;
  min-height: 80px;
}

.field-error {
  display: block;
  font-size: 0.72rem;
  color: var(--coral);
  margin-top: 0.3rem;
  min-height: 1em;
  letter-spacing: 0.01em;
}

.contact-form input.invalid {
  border-bottom-color: var(--coral);
}

.contact-form label span:first-child {
  display: block;
}

input::placeholder,
textarea::placeholder {
  color: #BBBBBB;
  font-size: 0.88rem;
}

.contact-form input[type="date"] { cursor: pointer; }

.submit-btn {
  margin-top: 1.5rem;
  width: 100%;
  padding: 1rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--coral);
  color: var(--white);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.submit-btn:hover,
.submit-btn:active { background: var(--coral-dark); }

/* ===== TABLET (601–900px) ===== */
@media (min-width: 601px) and (max-width: 900px) {
  .header { padding: 0.5rem 1.5rem; }
  .logo img { height: 60px; }
  .contact-btn { font-size: 0.76rem; padding: 0.62rem 1.2rem; }

  .copy { padding: 1.75rem 2rem 0.5rem; }
  .copy-headline { font-size: 2rem; }
  .copy p { font-size: 0.9rem; }

  .experiences-carousel { aspect-ratio: 16/9; }

  .logos-section { margin-top: 1.5rem; }
  .logos-label { padding-left: 3rem; }
  .logos-carousel { padding: 0 3rem; }
  .logo-slide { height: 28px; }
}

/* ===== DESKTOP (901px+) — locked viewport, two-column ===== */
@media (min-width: 901px) {
  html, body {
    height: 100%;
    overflow: hidden;
  }

  .page {
    height: 100vh;
    max-height: 100dvh;
    min-height: unset;
    overflow: hidden;
  }

  .header {
    position: static;
    padding: 0.2rem 2rem;
  }

  .logo img { height: 110px; }

  .logo img { height: 164px; }

  .contact-btn {
    font-size: 0.76rem;
    padding: 0.68rem 1.5rem;
  }

  .main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 1.5rem 2rem 1rem;
  }

  .hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
    flex: 1;
    min-height: 0;
  }

  .experiences-carousel {
    order: 0; /* reset — grid handles column placement on desktop */
    aspect-ratio: 4/3;
    max-height: 100%;
    border-radius: 6px;
    animation: fadeUp 0.8s var(--ease-out) 0.15s both;
  }

  .copy {
    padding: 0;
    overflow-y: auto;
  }

  .copy-headline {
    font-size: clamp(1.8rem, 2.4vw, 2.7rem);
  }

  .copy p { font-size: 0.88rem; }

  .logos-section {
    flex-shrink: 0;
    margin-top: 0;
    padding: 0.8rem 0 0.2rem;
  }

  /* Constrain ticker to a centered band — doesn't bleed to screen edges */
  .logos-carousel {
    max-width: 820px;
    margin: 0 auto;
  }

  .logos-label { padding-left: 0; }
  .logo-slide { height: 60px; }
  .logo-slide img { max-width: 200px; }

  /* Desktop modal — centered panel */
  .modal {
    align-items: center;
    padding: 2rem;
  }

  .modal-content {
    border-radius: 4px;
    padding: 2.25rem 2.5rem 2.5rem;
    max-width: 420px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.22);
    animation: modalIn 0.35s var(--ease-out);
  }

  .modal-content::before { display: none; } /* hide drag handle on desktop */

  @keyframes modalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }
}

/* ===== VERY NARROW (≤380px) ===== */
@media (max-width: 380px) {
  .logo img { height: 42px; }
  .contact-btn { padding: 0.5rem 0.8rem; font-size: 0.68rem; }
  .copy { padding: 1.25rem 1rem 0.5rem; }
  .copy-headline { font-size: 1.6rem; }
}
