/* Transilvania | Extravaganza — landing styles (WordPress-ready) */

:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --muted: #3d3d3d;
  /* Poster green — page background in text section */
  --accent: #77ab7a;
  --text-on-green: #f7f5f0;
  --muted-on-green: rgba(255, 255, 255, 0.86);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  /* Vizual Site.ai — ABC Daily Scotch + Sweet Sans Pro */
  --font-display: "ABC Daily Scotch", Georgia, "Times New Roman", serif;
  --font-ui: "Sweet Sans Pro", system-ui, -apple-system, sans-serif;
  /* poster.png export from Vizual Site.ai (2400×1696) */
  --poster-aspect: 2400 / 1696;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 400;
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 1.125rem;
  -webkit-font-smoothing: antialiased;
  transition:
    background-color 0.9s var(--ease-out),
    color 0.65s var(--ease-out);
}

/* Green wash when the article enters view (see main.js) */
body.tc-page--green {
  background-color: var(--accent);
  color: var(--text-on-green);
}

/* ——— Hero: same poster image in 3 clipped layers for independent entrance ——— */

.tc-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  overflow: hidden;
  padding-top: env(safe-area-inset-top);
}

.tc-hero__inner {
  position: relative;
  width: min(100%, 96vw);
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(0.5rem, 2vw, 1.25rem);
  padding-left: max(clamp(0.5rem, 2vw, 1.25rem), env(safe-area-inset-left));
  padding-right: max(clamp(0.5rem, 2vw, 1.25rem), env(safe-area-inset-right));
  min-height: min(92vh, 960px);
}

.tc-hero__stack {
  position: relative;
  width: 100%;
  aspect-ratio: var(--poster-aspect);
  max-height: min(92vh, 1240px);
  max-height: min(92dvh, 1240px);
  margin: 0 auto;
}

.tc-hero__layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  pointer-events: none;
  will-change: opacity, transform;
}

/* Top band — tuned for landscape artboard (≈2400×1696); adjust if you re-export */
.tc-hero__layer--text {
  clip-path: inset(0 0 70% 0);
  animation: tcRevealDown 1.1s var(--ease-out) 0.15s both;
}

/* Middle: illustration + central title */
.tc-hero__layer--picture {
  clip-path: inset(28% 0 22% 0);
  animation: tcRevealScale 1.15s var(--ease-out) 0.45s both;
}

/* Bottom: logos + rule */
.tc-hero__layer--logos {
  clip-path: inset(76% 0 0 0);
  animation: tcRevealUp 1s var(--ease-out) 0.75s both;
}

/* Accessible title (visible only to assistive tech) */
.tc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes tcRevealDown {
  from {
    opacity: 0;
    transform: translateY(-28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tcRevealScale {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@media (prefers-reduced-motion: reduce) {
  body {
    transition-duration: 0.01ms;
  }

  .tc-hero__actions {
    animation: none;
    opacity: 0.85;
  }

  .tc-hero__layer--text,
  .tc-hero__layer--picture,
  .tc-hero__layer--logos {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .tc-content__block {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Hero actions — Despre, Bilete, Site */
.tc-hero__actions {
  position: absolute;
  bottom: clamp(0.75rem, 3vw, 1.5rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 1.25rem;
  max-width: calc(100% - 2rem);
  padding-bottom: env(safe-area-inset-bottom, 0);
  opacity: 0.8;
  animation: tcFadePulse 2.5s ease-in-out infinite;
}

.tc-hero__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.1rem;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease;
}

.tc-hero__action:hover {
  color: var(--ink);
}

.tc-hero__action:focus {
  outline: none;
}

.tc-hero__action:focus-visible {
  color: var(--ink);
  border-color: rgba(10, 10, 10, 0.35);
}

.tc-hero__action-note {
  font-size: 0.72em;
  letter-spacing: 0.1em;
  font-weight: 500;
  opacity: 0.78;
  margin-left: 0.15em;
  white-space: nowrap;
}

.tc-hero__action--soon {
  cursor: not-allowed;
  opacity: 0.92;
}

.tc-hero__action--soon:hover {
  color: var(--muted);
}

.tc-hero__action--soon:focus-visible {
  border-color: rgba(10, 10, 10, 0.25);
}

@keyframes tcFadePulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.75;
  }
}

/* ——— Body copy (below fold) ——— */

.tc-content {
  padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 5vw, 3rem) clamp(5rem, 12vw, 8rem);
  padding-left: max(clamp(1.25rem, 5vw, 3rem), env(safe-area-inset-left));
  padding-right: max(clamp(1.25rem, 5vw, 3rem), env(safe-area-inset-right));
  padding-bottom: max(clamp(5rem, 12vw, 8rem), env(safe-area-inset-bottom));
  max-width: 42rem;
  margin: 0 auto;
}

.tc-content__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.65rem, 4.2vw, 2.25rem);
  line-height: 1.2;
  margin: 0 0 2rem;
  letter-spacing: 0.01em;
  transition: color 0.65s var(--ease-out);
}

/* Event name: keep “Transilvania | Extravaganza” on one line (title + paragraphs) */
.tc-brand-name {
  white-space: nowrap;
}

.tc-content__title .tc-brand-name {
  letter-spacing: -0.015em;
}

@media (max-width: 24rem) {
  .tc-content__title .tc-brand-name {
    font-size: clamp(0.78em, 4.2vw, 1em);
  }
}

.tc-content__footer-note .tc-brand-name {
  font-size: 0.98em;
}

.tc-content__block {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  color: var(--muted);
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.75s var(--ease-out),
    transform 0.75s var(--ease-out),
    color 0.65s var(--ease-out);
}

.tc-content__block.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.tc-content__block:last-child {
  margin-bottom: 0;
}

.tc-content__footer-note {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 0.95rem;
  color: var(--muted);
  transition:
    color 0.65s var(--ease-out),
    border-color 0.65s var(--ease-out);
}

body.tc-page--green .tc-content__title {
  color: var(--text-on-green);
}

body.tc-page--green .tc-content__block {
  color: var(--muted-on-green);
}

body.tc-page--green .tc-content__footer-note {
  color: rgba(255, 255, 255, 0.78);
  border-top-color: rgba(255, 255, 255, 0.22);
}

/* ——— Mobile / narrow screens ——— */

@media (max-width: 900px) {
  .tc-hero {
    /* Let hero height follow content — avoids a tall empty band under the poster */
    min-height: auto;
  }

  .tc-hero__inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding-top: max(0.75rem, env(safe-area-inset-top));
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  }

  /* Poster uses full width; height comes from aspect ratio (no vertical squeeze) */
  .tc-hero__stack {
    max-height: none;
    flex-shrink: 0;
  }

  /* Nav sits below the artwork (matches design: logos in image, buttons under) */
  .tc-hero__actions {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    margin-top: 1.25rem;
    margin-left: auto;
    margin-right: auto;
    max-width: 18.5rem;
    width: 100%;
    padding: 0 0.5rem;
    padding-bottom: env(safe-area-inset-bottom, 0);
    opacity: 1;
    animation: none;
    /* Mockup: Despre | Bilete, then Site centered */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 0.85rem;
    align-items: stretch;
  }

  .tc-hero__actions .tc-hero__action:last-child {
    grid-column: 1 / -1;
    justify-self: center;
    min-width: min(100%, 11rem);
  }

  .tc-hero__action {
    min-height: 3rem;
    padding: 0.65rem 1rem;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(10, 10, 10, 0.18);
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .tc-hero__action:hover {
    background: #fff;
    border-color: rgba(10, 10, 10, 0.28);
  }

  .tc-hero__action:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(119, 171, 122, 0.35);
  }

  .tc-hero__action--soon {
    opacity: 1;
  }

  .tc-hero__action--soon:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(10, 10, 10, 0.18);
  }
}

@media (max-width: 640px) {
  body {
    font-size: 1.0625rem;
  }

  .tc-content {
    padding-top: clamp(2.25rem, 7vw, 6rem);
  }

  .tc-content__title {
    font-size: clamp(1.45rem, 6.5vw, 2rem);
    margin-bottom: 1.5rem;
  }

  .tc-content__block {
    font-size: 1rem;
  }
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 520px) {
  .tc-hero__inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem 1.25rem;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }

  .tc-hero__stack {
    flex: 0 1 auto;
    max-width: min(58vw, 480px);
    width: auto;
    margin: 0;
  }

  .tc-hero__actions {
    flex: 0 1 13rem;
    max-width: 13rem;
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    align-self: center;
  }
}
