/* Escape with Ellie - Custom styles
   Brand: Sunshine Yellow #FFD54F (primary accent), Seafoam Teal #7BC8C2,
   Deep Navy #1F2A44, Coral #FF8A7A, Sand #F3E7D2, Ivory #FFF9EF
   Fonts: Playfair Display (headings), Open Sans (body), Dancing Script (script)
*/

:root {
  --yellow: #FFD54F;
  --yellow-dark: #F5B800;
  --yellow-soft: #FFF1B8;
  --gold-ink: #B45309;  /* legible warm gold for accent text on light bg (4.5:1 on ivory) */
  --teal: #7BC8C2;
  --teal-dark: #4FA9A2;
  --teal-soft: #E4F3F1;
  --navy: #1F2A44;
  --navy-light: #334155;
  --coral: #FF8A7A;
  --sand: #F3E7D2;
  --ivory: #FFF9EF;
  --gray: #6B7280;
  --gray-light: #F3F4F6;
  --white: #FFFFFF;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
  color: var(--navy);
  background: var(--ivory);
  margin: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 .5em;
  font-weight: 700;
  text-wrap: balance;
}

.font-script { font-family: 'Dancing Script', cursive; font-weight: 600; color: var(--gold-ink); }

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--yellow-dark); text-decoration: underline; }

/* Focus states for a11y */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: var(--yellow); padding: .75rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,249,239,.95);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 3px solid var(--yellow);
}
.nav-link {
  color: var(--navy); font-weight: 600; font-size: .82rem;
  padding: .5rem .25rem; position: relative;
}
.nav-link:hover { color: var(--yellow-dark); text-decoration: none; }
.nav-link.active { color: var(--navy); }
.nav-link.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 3px; background: var(--yellow); border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 9999px;
  font-weight: 700; font-size: .95rem;
  transition: all .2s ease; cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--yellow); color: var(--navy); border-color: var(--yellow); }
.btn-primary:hover { background: var(--yellow-dark); border-color: var(--yellow-dark); color: var(--navy); text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(245,184,0,.55); }
.btn-secondary { background: var(--navy); color: var(--yellow); border-color: var(--navy); }
.btn-secondary:hover { background: transparent; color: var(--navy); text-decoration: none; }
.btn-ghost { color: var(--navy); }
.btn-ghost:hover { color: var(--yellow-dark); text-decoration: none; }

/* Hero */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse at top left, var(--yellow-soft) 0%, transparent 55%),
    radial-gradient(ellipse at bottom right, var(--teal-soft) 0%, transparent 55%),
    var(--ivory);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; top: -80px; right: -80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: var(--yellow); opacity: .35; filter: blur(20px);
  pointer-events: none;
}
.hero-image {
  border-radius: 24px;
  box-shadow: 0 30px 60px -20px rgba(31,42,68,.35), 0 0 0 6px var(--yellow);
  width: 100%; height: 100%; object-fit: cover;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem 1rem; border-radius: 9999px;
  background: var(--yellow); color: var(--navy);
  font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  box-shadow: 0 6px 14px -6px rgba(245,184,0,.5);
}

/* Search / trip planner card */
.trip-card {
  background: #fff; border-radius: 20px;
  box-shadow: 0 20px 40px -15px rgba(31,42,68,.15);
  padding: 1.25rem;
  border: 1px solid var(--sand);
  border-top: 4px solid var(--yellow);
}
.trip-tabs { display: flex; gap: .25rem; margin-bottom: 1rem; flex-wrap: wrap; }
.trip-tab {
  padding: .5rem 1rem; border-radius: 9999px; font-weight: 600; font-size: .875rem;
  color: var(--gray); background: transparent; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: .375rem;
}
.trip-tab[aria-selected="true"] { background: var(--yellow); color: var(--navy); }

/* Feature icon */
.feature-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--yellow); color: var(--navy);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 16px -8px rgba(245,184,0,.6);
}
.feature-icon.alt { background: var(--teal-soft); color: var(--teal-dark); box-shadow: none; }

/* Destination cards */
.dest-card {
  position: relative; border-radius: 20px; overflow: hidden;
  aspect-ratio: 3/4;
  box-shadow: 0 15px 30px -15px rgba(31,42,68,.3);
  transition: transform .3s ease, box-shadow .3s ease;
  display: block;
}
.dest-card:hover { transform: translateY(-4px); box-shadow: 0 25px 40px -15px rgba(245,184,0,.5); text-decoration: none; }
.dest-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.dest-card:hover img { transform: scale(1.05); }
.dest-card .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(31,42,68,.85) 0%, rgba(31,42,68,.2) 45%, transparent 70%);
}
.dest-badge {
  position: absolute; top: 1rem; left: 1rem;
  background: var(--yellow); color: var(--navy);
  padding: .35rem .85rem; border-radius: 9999px;
  font-size: .75rem; font-weight: 800; letter-spacing: .04em;
}
.dest-info { position: absolute; left: 1.25rem; right: 1.25rem; bottom: 1.25rem; color: #fff; }
.dest-info h3 { color: #fff; margin: 0 0 .25rem; font-size: 1.35rem; }
.dest-info p { margin: 0; font-size: .9rem; opacity: .95; }

/* CTA panel */
.cta-panel {
  border-radius: 24px; overflow: hidden; position: relative;
  color: var(--navy);
  background: linear-gradient(135deg, var(--yellow) 0%, var(--yellow-dark) 100%);
}
.cta-panel h2, .cta-panel h3 { color: var(--navy); }
.cta-panel h2, .cta-panel h3, .cta-panel p {
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(31,42,68,.35);
}
.cta-panel img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -1;
}

/* Newsletter */
.newsletter {
  background: var(--yellow); color: var(--navy);
  border-radius: 24px;
  border: 3px solid var(--navy);
}
.newsletter h2, .newsletter h3 { color: var(--navy); }
.newsletter input {
  border: 2px solid var(--navy); padding: .875rem 1.25rem; border-radius: 9999px;
  color: var(--navy); flex: 1; min-width: 0; background: #fff;
}
.newsletter .btn-primary { background: var(--navy); color: var(--yellow); border-color: var(--navy); }
.newsletter .btn-primary:hover { background: #0f1729; color: var(--yellow); }

/* Section headings */
.section-title { font-size: clamp(1.75rem, 3vw, 2.5rem); }
.section-title .accent { color: var(--yellow-dark); }
.section-sub { color: var(--gray); font-size: 1.05rem; max-width: 60ch; }

/* Footer */
.site-footer {
  background: var(--navy); color: #CBD5E1;
  border-top: 6px solid var(--yellow);
}
.site-footer h4 { color: var(--yellow); font-family: 'Open Sans', sans-serif; font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; }
.site-footer a { color: #CBD5E1; }
.site-footer a:hover { color: var(--yellow); }
.site-footer .font-script { color: var(--yellow-dark); }  /* bright gold reads on navy; caramel gold-ink does not */
.social-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,213,79,.15); color: var(--yellow);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s ease, color .2s ease;
}
.social-icon:hover { background: var(--yellow); color: var(--navy); text-decoration: none; }

/* Mobile nav */
#mobile-nav { display: none; }
#mobile-nav.open { display: block; }
@media (max-width: 767px) {
  .desktop-nav { display: none; }
}
@media (min-width: 768px) {
  .mobile-toggle { display: none; }
}

/* Utility */
.container-x { max-width: 1200px; margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }

/* Form */
.form-field label { display: block; font-weight: 600; margin-bottom: .375rem; color: var(--navy); font-size: .9rem; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%; padding: .75rem 1rem; border: 1px solid #D1D5DB; border-radius: 12px;
  font-family: inherit; font-size: 1rem; background: #fff; color: var(--navy);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: var(--yellow-dark); outline-color: var(--yellow-dark); }
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field .error {
  color: #B91C1C; font-size: .85rem; margin-top: .35rem; display: none;
}
.form-field.invalid .error { display: block; }
.form-field.invalid input,
.form-field.invalid select,
.form-field.invalid textarea { border-color: #B91C1C; }

.form-success {
  display: none; background: var(--yellow-soft); color: var(--navy); border: 2px solid var(--yellow);
  padding: 1rem 1.25rem; border-radius: 12px; margin-top: 1rem; font-weight: 600;
}
.form-success.show { display: block; }

/* Prose (long-form pages) */
.prose { color: var(--navy); font-size: 1.05rem; }
.prose h2 { margin-top: 2.5rem; font-size: 1.75rem; position: relative; padding-left: 1rem; }
.prose h2::before {
  content: ""; position: absolute; left: 0; top: .35em; bottom: .35em;
  width: 5px; background: var(--yellow); border-radius: 3px;
}
.prose h3 { margin-top: 1.75rem; font-size: 1.25rem; color: var(--navy); }
.prose p { margin: 0 0 1rem; }
.prose ul { padding-left: 1.25rem; margin: 0 0 1rem; list-style: none; }
.prose ul li { margin-bottom: .5rem; position: relative; padding-left: 1.5rem; }
.prose ul li::before {
  content: "★"; position: absolute; left: 0; top: 0; color: var(--yellow-dark);
}
.prose strong { color: var(--navy); }
.prose a { color: var(--yellow-dark); text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 3px; }

/* FAQ */
details.faq {
  border: 1px solid #E7DCC8;
  border-radius: 12px; padding: 1rem 1.25rem; background: #fff;
}
details.faq + details.faq { margin-top: .75rem; }
details.faq summary {
  cursor: pointer; font-weight: 700; color: var(--navy);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--yellow-dark); font-size: 1.5rem; line-height: 1; font-weight: 700; }
details.faq[open] summary::after { content: "−"; }
details.faq p { margin-top: .75rem; color: var(--gray); }

/* Logo image sizing */
.brand-logo { height: 110px; width: auto; display: block; }

/* Yellow highlight utility for inline text */
.highlight-yellow {
  background: linear-gradient(180deg, transparent 60%, var(--yellow) 60%);
  padding: 0 .15em;
}

/* Polaroid trip cards */
.polaroid-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  max-width: 1000px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .polaroid-grid { grid-template-columns: repeat(2, 1fr); }
}

.polaroid-card {
  background: var(--white);
  padding: 1rem;
  padding-bottom: 1.75rem;
  box-shadow: 0 10px 35px rgba(31, 42, 68, 0.12);
  transform: rotate(-1.5deg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.polaroid-card:nth-child(even) { transform: rotate(1.5deg); }
.polaroid-card:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 0 16px 45px rgba(31, 42, 68, 0.18);
}
.polaroid-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: var(--gray-light);
}
.polaroid-card h3 {
  font-family: 'Dancing Script', 'Playfair Display', cursive;
  text-align: center;
  margin-top: 1.25rem;
  font-size: 1.5rem;
  color: var(--navy);
  line-height: 1.2;
}
.polaroid-card p {
  text-align: center;
  color: var(--gray);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  line-height: 1.55;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--yellow-dark);
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
}
.contact-link:hover { text-decoration: underline; }

/* Persona overlay cards (Business Trips — Who I work with) */
.persona-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 768px) {
  .persona-grid-top { grid-template-columns: 1fr 1fr; }
  .persona-grid-bottom { grid-template-columns: 1fr 1fr 1fr; }
}
.persona-card {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  isolation: isolate;
  box-shadow: 0 10px 30px rgba(31,42,68,0.15);
  transition: transform .3s ease, box-shadow .3s ease;
}
.persona-card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -12px rgba(31,42,68,.45); }
.persona-card img.persona-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2;
  transition: transform .5s ease;
}
.persona-card:hover img.persona-bg { transform: scale(1.05); }
.persona-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(30,41,59,0.15) 0%, rgba(30,41,59,0.55) 55%, rgba(30,41,59,0.85) 100%);
}
.persona-card .persona-body { padding: 2rem 2rem 1.75rem; max-width: 620px; }
.persona-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  color: #fff;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.1;
  margin: 0 0 0.9rem;
}
.persona-card p {
  color: rgba(255,255,255,0.92);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 1.1rem;
}
.persona-cta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: #F59E60; font-weight: 700; text-decoration: none;
  font-size: 0.95rem;
}
.persona-cta:hover { color: #FFB27A; }
.persona-cta .arrow { display: inline-block; transition: transform .2s cubic-bezier(0.25, 1, .5, 1); }
.persona-cta:hover .arrow { transform: translateX(4px); }

/* Motion: hero entrance (one signature reveal per page, plays once on load) */
.hero-text-enter {
  opacity: 0; transform: translateY(18px);
  animation: heroTextEnter .7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-image-enter {
  opacity: 0; transform: translateY(18px) scale(.97);
  animation: heroImageEnter .8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: .15s;
}
@keyframes heroTextEnter { to { opacity: 1; transform: none; } }
@keyframes heroImageEnter { to { opacity: 1; transform: none; } }

/* Motion: ambient pan/zoom loop for a single hero photo (business-trips —
   "through the clouds"). Frame clips + entrance-reveals; photo drifts inside
   it, so the one-shot entrance and the infinite loop never fight over
   `transform` on the same element. */
.hero-image-frame { overflow: hidden; border-radius: 24px; box-shadow: 0 30px 60px -20px rgba(31,42,68,.35), 0 0 0 6px var(--yellow); }
.hero-image-loop { animation: heroImagePan 13s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate; }
@keyframes heroImagePan {
  from { transform: scale(1.05) translate(0, 0); }
  to   { transform: scale(1.16) translate(-6%, 4%); }
}

/* Motion: card-grid reveal on scroll (sibling stagger, JS-gated so content
   stays visible with no JS — see .reveal-ready in main.js) */
/* :where() keeps this at zero specificity so component hover states
   (e.g. .persona-card:hover) always win once a card has revealed. */
:where(.reveal-group.reveal-ready) > * {
  opacity: 0; transform: translateY(16px);
  transition: opacity .5s cubic-bezier(0.25, 1, .5, 1), transform .5s cubic-bezier(0.25, 1, .5, 1);
}
:where(.reveal-group.reveal-ready.is-visible) > * { opacity: 1; transform: none; }
:where(.reveal-group.reveal-ready) > *:nth-child(1) { transition-delay: 0ms; }
:where(.reveal-group.reveal-ready) > *:nth-child(2) { transition-delay: 60ms; }
:where(.reveal-group.reveal-ready) > *:nth-child(3) { transition-delay: 120ms; }
:where(.reveal-group.reveal-ready) > *:nth-child(4) { transition-delay: 180ms; }
:where(.reveal-group.reveal-ready) > *:nth-child(5) { transition-delay: 240ms; }
:where(.reveal-group.reveal-ready) > *:nth-child(6) { transition-delay: 300ms; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
  .hero-text-enter, .hero-image-enter, .reveal-group.reveal-ready > * {
    opacity: 1 !important; transform: none !important;
  }
}
