/* ============================================
   TravelMediaFive — style.css
   Editorial travel magazine
   ============================================ */

/* ============================================
   1. VARIABLES
   ============================================ */
:root {
  /* Brand colors */
  --ink: #111114;
  --coral: #FF4D2E;
  --teal: #06C39A;
  --cobalt: #2B50FF;
  --sun: #FFC21A;
  --white: #FFFFFF;

  /* Surfaces */
  --surface: #FFFFFF;
  --surface-alt: #F7F7F5;
  --border: rgba(17, 17, 20, 0.08);
  --border-strong: rgba(17, 17, 20, 0.15);

  /* Text */
  --text-primary: var(--ink);
  --text-secondary: rgba(17, 17, 20, 0.55);
  --text-inverse: rgba(255, 255, 255, 0.55);

  /* Typography */
  --font-body: "Montserrat", sans-serif;
  --font-serif: "Playfair Display", serif;

  /* Layout */
  --space-x: clamp(1.25rem, 5vw, 3rem);
  --content-max: 72rem;
  --content-narrow: 40rem;
  --section-py: clamp(4rem, 10vw, 7rem);
  --radius: 12px;
  --radius-pill: 999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration-fast: 0.2s;
  --duration: 0.4s;
  --duration-slow: 0.8s;

  /* Accordion */
  --accordion-gap: 0;
  --accordion-opacity-distant: 0.4;
  --accordion-opacity-near: 0.7;
  --accordion-scale: 1;
}

/* ============================================
   2. RESET / BASE
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

::selection {
  background: rgba(6, 195, 154, 0.15);
  color: var(--ink);
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */
.section-eyebrow {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--coral);
  margin-bottom: 0.75rem;
}

.section-eyebrow--light {
  color: var(--sun);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.section-title--large {
  font-size: clamp(1.75rem, 4.5vw, 3.25rem);
}

.section-body {
  color: var(--text-secondary);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  line-height: 1.8;
  max-width: 38rem;
  margin-bottom: 1rem;
}

.section-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.section-note {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-secondary);
  opacity: 0.7;
}

/* ============================================
   4. LAYOUT UTILITIES
   ============================================ */
.section-container {
  max-width: var(--content-max);
  margin: 0 auto;
}

.section-container--narrow {
  max-width: var(--content-narrow);
  text-align: center;
}

.section-container--narrow .section-body,
.section-container--narrow .contact-body {
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   5. HEADER
   ============================================ */
#siteHeader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration) ease, background var(--duration) ease;
}

#siteHeader.scrolled {
  border-bottom-color: var(--border);
  background: rgba(255, 255, 255, 0.95);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem var(--space-x);
  max-width: var(--content-max);
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo-img {
  height: clamp(30px, 8vw, 42px);
  width: auto;
  max-width: calc(100vw - 2 * var(--space-x));
  object-fit: contain;
  transition: opacity var(--duration-fast) ease;
}

.nav-logo:hover .nav-logo-img {
  opacity: 0.8;
}

.nav-tagline {
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.nav-sep {
  margin: 0 0.3em;
  color: var(--coral);
}

/* ============================================
   6. HERO
   ============================================ */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 120px var(--space-x) 60px;
  overflow: hidden;
}

.hero-content-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -6vh;
}

.hero-headline {
  font-family: var(--font-body);
  text-align: center;
  margin-bottom: 0;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-line-small {
  font-weight: 400;
  font-size: clamp(1.25rem, 3.5vw, 2.5rem);
  letter-spacing: 0.15em;
  color: var(--ink);
  opacity: 0.45;
  text-transform: lowercase;
  line-height: 1.3;
}

.hero-line-big {
  font-weight: 700;
  font-size: clamp(4rem, 15vw, 12rem);
  line-height: 0.85;
  letter-spacing: -0.03em;
  color: #AD822A;
  opacity: 0.18;
}

/* Hero Cards */
.hero-cards {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  justify-content: center;
  align-items: flex-start;
  margin-top: -16px;
  position: relative;
  z-index: 2;
}

.hero-card {
  width: clamp(130px, 18vw, 220px);
  aspect-ratio: 3 / 4.2;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow:
    0 16px 48px rgba(17, 17, 20, 0.18),
    0 4px 12px rgba(17, 17, 20, 0.08);
  transition: transform var(--duration) var(--ease-smooth),
              box-shadow var(--duration) ease;
}

.hero-card--1 {
  transform: rotate(-3deg) translateY(8px);
}

.hero-card--2 {
  transform: rotate(2deg) translateY(-6px);
}

.hero-card--3 {
  transform: rotate(-1.5deg) translateY(12px);
}

.hero-card--4 {
  transform: rotate(3deg) translateY(-4px);
}

.hero-card--3,
.hero-card--4 {
  display: none;
}

.hero-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow:
    0 24px 64px rgba(17, 17, 20, 0.25),
    0 6px 18px rgba(17, 17, 20, 0.12);
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration) var(--ease-smooth);
}

.hero-card:hover img {
  transform: scale(1.06);
}

.hero-card-label {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--white);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}

/* Hero Bottom */
.hero-bottom-text {
  position: absolute;
  bottom: 2rem;
  left: var(--space-x);
  max-width: 320px;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-secondary);
  min-height: 3em;
  z-index: 3;
}

/* ============================================
   7. SHARED SECTION STYLES
   ============================================ */
.stories-section,
.collaboration-section,
.steps-section,
.why-section,
.guidelines-section,
.social-section,
.share-section {
  padding: var(--section-py) var(--space-x);
  background: var(--surface);
}

.collab-lead {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

/* Pullquote */
.pullquote {
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  color: var(--text-primary);
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--teal);
  background: rgba(6, 195, 154, 0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
  max-width: 38rem;
}

/* CTA Pill */
.cta-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 2rem;
  border: 1px solid var(--teal);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--teal);
  background: transparent;
  transition: background var(--duration-fast) ease, color var(--duration-fast) ease,
              box-shadow var(--duration-fast) ease;
  min-height: 44px;
}

.cta-pill:hover {
  background: var(--teal);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(6, 195, 154, 0.25);
}

.cta-pill:active {
  transform: scale(0.98);
}

.cta-pill--large {
  padding: 0.875rem 2.5rem;
  font-size: 0.85rem;
  border-color: var(--sun);
  color: var(--sun);
}

.cta-pill--large:hover {
  background: var(--sun);
  color: var(--ink);
  box-shadow: 0 4px 16px rgba(255, 194, 26, 0.3);
}

/* ============================================
   8. INDIVIDUAL SECTIONS
   ============================================ */

/* --- Stories --- */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
}

.story-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-decoration: none;
  border-radius: var(--radius);
  transition: transform var(--duration-fast) var(--ease-smooth);
}

.story-card:hover {
  transform: translateY(-4px);
}

.story-card:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
  border-radius: var(--radius);
}

.story-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-alt);
}

.story-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration) var(--ease-smooth);
}

.story-card:hover .story-thumb img,
.story-card:focus-visible .story-thumb img {
  transform: scale(1.05);
}

.story-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 17, 20, 0.3);
  opacity: 0;
  transition: opacity var(--duration-fast) ease;
}

.story-card:hover .story-play,
.story-card:focus-visible .story-play {
  opacity: 1;
}

.story-play svg {
  width: 40px;
  height: 40px;
  color: var(--white);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.story-title {
  font-size: clamp(0.8rem, 1.2vw, 0.9rem);
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

/* --- Steps --- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 1.25rem;
}

.step-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}

.step-card:hover {
  border-color: var(--teal);
  box-shadow: 0 4px 20px rgba(6, 195, 154, 0.08);
}

.step-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--teal);
  opacity: 0.25;
  line-height: 1;
}

.step-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0.75rem 0 0.5rem;
  line-height: 1.3;
}

.step-body {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.7;
}

/* --- Why --- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.25rem;
}

.why-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}

.why-card:hover {
  border-color: var(--coral);
  box-shadow: 0 4px 20px rgba(255, 77, 46, 0.06);
}

.why-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.why-card-body {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.7;
}

/* --- Guidelines --- */
.guidelines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 2.5rem;
}

.guidelines-heading {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.guidelines-heading--spaced {
  margin-top: 1.5rem;
}

.guidelines-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.65;
}

.guidelines-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 600;
}

/* --- Social --- */
.social-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.social-tag {
  padding: 0.45rem 1rem;
  background: var(--surface-alt);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: background var(--duration-fast) ease, color var(--duration-fast) ease;
  border: 1px solid var(--border);
}

.social-tag:hover {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}

/* --- Share --- */
.share-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.share-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}

.share-card:hover {
  border-color: var(--cobalt);
  box-shadow: 0 4px 20px rgba(43, 80, 255, 0.06);
}

.share-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.share-card-body {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.7;
}

/* --- Join --- */
.join-section {
  padding: var(--section-py) var(--space-x);
  background: var(--ink);
  text-align: center;
}

.join-headline {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 3rem);
  color: var(--white);
  margin-bottom: 1.5rem;
  line-height: 1.15;
}

.join-body {
  color: var(--text-inverse);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  line-height: 1.8;
  max-width: 36rem;
  margin: 0 auto 1rem;
}

.join-cta {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--white);
  margin: 2rem 0 1.5rem;
}

/* --- Contact --- */
.contact-section {
  padding: var(--section-py) var(--space-x) calc(var(--section-py) + 2rem);
  background: var(--ink);
}

.contact-headline {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 3rem);
  color: var(--white);
  margin-bottom: 1.25rem;
  line-height: 1.15;
}

.contact-body {
  color: var(--text-inverse);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  line-height: 1.8;
  margin-bottom: 2rem;
  max-width: 34rem;
  text-align: center;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  font-size: 0.9rem;
  padding: 0.5rem 0;
  transition: color var(--duration-fast) ease;
  min-height: 44px;
}

.contact-link:hover { color: var(--sun); }
.contact-link svg { flex-shrink: 0; opacity: 0.4; }

/* ============================================
   9. ANIMATION SYSTEM
   ============================================ */

/* Section reveal */
.section-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.section-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Accordion sections */
.section-accordion {
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out),
              filter var(--duration-slow) var(--ease-out);
  will-change: opacity, transform, filter;
}

.section-accordion.accordion-past {
  opacity: var(--accordion-opacity-distant);
  transform: translateY(0) scale(0.97);
  filter: blur(0.5px);
}

.section-accordion.accordion-near {
  opacity: var(--accordion-opacity-near);
  transform: translateY(0) scale(0.99);
  filter: none;
}

.section-accordion.accordion-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: none;
}

/* Hero entrance */
.hero-headline,
.hero-cards,
.hero-bottom-text {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.hero-headline.entered,
.hero-cards.entered,
.hero-bottom-text.entered {
  opacity: 1;
  transform: translateY(0);
}

.hero-cards { transition-delay: 0.15s; }
.hero-bottom-text { transition-delay: 0.35s; }

/* ============================================
   10. ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

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

  .section-accordion {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .hero-headline,
  .hero-cards,
  .hero-bottom-text {
    opacity: 1;
    transform: none;
  }
}

/* ============================================
   11. RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
  .hero-line-small { font-size: clamp(1.5rem, 4vw, 2.5rem); }
  .hero-line-big { font-size: clamp(5rem, 16vw, 10rem); }
  .hero-card { width: clamp(140px, 22vw, 240px); }
}

/* Large screens — show all 4 cards */
@media (min-width: 1025px) {
  .hero-card--3,
  .hero-card--4 { display: block; }
}

/* Mobile */
@media (max-width: 768px) {
  .nav-tagline { display: none; }

  .navbar {
    padding: 0.65rem var(--space-x);
    justify-content: center;
  }

  .hero {
    padding-top: 90px;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .hero-line-big {
    font-size: clamp(3.5rem, 18vw, 7rem);
  }

  .hero-cards {
    flex-direction: row;
    gap: 0.6rem;
    margin-top: -10px;
  }

  .hero-card {
    width: clamp(120px, 38vw, 160px);
    aspect-ratio: 3 / 4;
  }

  .hero-card--1 { transform: rotate(-2deg); }
  .hero-card--2 { transform: rotate(1.5deg); }

  .hero-bottom-text {
    bottom: 12px;
    left: var(--space-x);
    right: var(--space-x);
    width: auto;
    max-width: none;
    text-align: center;
    font-size: 0.75rem;
  }

  .stories-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .steps-grid,
  .why-grid,
  .guidelines-grid,
  .share-grid {
    grid-template-columns: 1fr;
  }

  .social-tags { justify-content: center; }

  .section-container--narrow {
    text-align: center;
  }
}

/* Small phones */
@media (max-width: 375px) {
  .hero-card {
    width: clamp(110px, 40vw, 140px);
  }

  .hero-line-big {
    font-size: clamp(3rem, 16vw, 5rem);
  }
}

/* Large screens */
@media (min-width: 1440px) {
  .hero-line-big {
    font-size: 13rem;
  }
}

/* ============================================
   12. SCROLL BUTTON
   ============================================ */
.scroll-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(17, 17, 20, 0.3);
  transition: transform var(--duration-fast) var(--ease-smooth),
              background var(--duration-fast) ease,
              opacity var(--duration-fast) ease;
  opacity: 0;
  pointer-events: none;
}

.scroll-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-btn:hover {
  background: var(--teal);
  transform: scale(1.08);
}

.scroll-btn:active {
  transform: scale(0.95);
}

.scroll-btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.scroll-btn-icon {
  transition: transform var(--duration-fast) var(--ease-smooth);
}

.scroll-btn.at-bottom .scroll-btn-icon {
  transform: rotate(180deg);
}

@media (max-width: 768px) {
  .scroll-btn {
    bottom: 1rem;
    right: 1rem;
    width: 42px;
    height: 42px;
  }
}
