/* Carnival Lights — Phuket festival culture journal */
@import url("https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Shrikhand&display=swap");

:root {
  --hot: #ff2d6a;
  --sun: #ffc93c;
  --lagoon: #00b8a9;
  --palm: #0d3b36;
  --ink: #1a1f2e;
  --paper: #f3fffc;
  --mist: #d7f5ef;
  --mute: #5a6b72;
  --white: #ffffff;
  --display: "Shrikhand", Georgia, serif;
  --body: "Figtree", "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1180px;
  --nav-h: 4.25rem;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(255, 45, 106, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(255, 201, 60, 0.18), transparent 50%),
    linear-gradient(180deg, var(--paper) 0%, var(--mist) 45%, var(--paper) 100%);
  background-attachment: fixed;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--palm); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--hot); }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { list-style: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* —— Nav —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(243, 255, 252, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 3px solid var(--palm);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--palm);
}

.brand:hover { color: var(--palm); }

.brand-marks {
  display: flex;
  gap: 0.2rem;
}

.brand-marks i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  display: block;
  animation: pulseLight 2.4s ease-in-out infinite;
}

.brand-marks i:nth-child(1) { background: var(--hot); }
.brand-marks i:nth-child(2) { background: var(--sun); animation-delay: 0.35s; }
.brand-marks i:nth-child(3) { background: var(--lagoon); animation-delay: 0.7s; }

@keyframes pulseLight {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.75; }
}

.brand-name {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  line-height: 1;
}

.brand-name span {
  display: block;
  font-family: var(--body);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  margin-top: 0.2rem;
}

.nav-links {
  display: none;
  gap: 1.6rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--hot); }

.nav-toggle {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border: 2px solid var(--palm);
  border-radius: 0.4rem;
  background: var(--white);
}

.nav-toggle span {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--palm);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--palm);
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.nav-drawer {
  display: none;
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--palm);
  padding: 1.25rem;
  flex-direction: column;
  gap: 0.85rem;
  border-bottom: 4px solid var(--sun);
}

.nav-drawer.is-open { display: flex; }

.nav-drawer a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
}

.nav-drawer a:hover { color: var(--sun); }

@media (min-width: 860px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .nav-drawer { display: none !important; }
}

/* —— Marquee —— */
.marquee {
  overflow: hidden;
  background: var(--hot);
  color: var(--white);
  border-bottom: 3px solid var(--palm);
  padding: 0.55rem 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 2.5rem;
  animation: marquee 32s linear infinite;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.marquee-track span::before {
  content: "✦";
  margin-right: 2.5rem;
  color: var(--sun);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: grid;
  align-items: end;
  color: var(--white);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: heroDrift 18s var(--ease) infinite alternate;
}

@keyframes heroDrift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.1) translate3d(-1.5%, -1%, 0); }
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(13, 59, 54, 0.25) 0%, rgba(13, 59, 54, 0.15) 40%, rgba(13, 59, 54, 0.88) 100%),
    linear-gradient(90deg, rgba(255, 45, 106, 0.22), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 5rem 1.25rem 3.5rem;
}

.hero-brand {
  font-family: var(--display);
  font-size: clamp(2.8rem, 9vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  margin-bottom: 0.85rem;
  animation: riseIn 0.9s var(--ease) both;
}

.hero-brand em {
  font-style: normal;
  color: var(--sun);
}

.hero h1 {
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  max-width: 28ch;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  animation: riseIn 0.9s var(--ease) 0.12s both;
}

.hero-lede {
  max-width: 42ch;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
  animation: riseIn 0.9s var(--ease) 0.22s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: riseIn 0.9s var(--ease) 0.32s both;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.35rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 999px;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s;
}

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

.btn-primary {
  background: var(--sun);
  color: var(--palm);
}

.btn-primary:hover { background: var(--white); color: var(--palm); }

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.65);
}

.btn-ghost:hover {
  background: var(--white);
  color: var(--palm);
  border-color: var(--white);
}

/* —— Sections —— */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4.5rem 1.25rem;
}

.section-head {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 2rem;
  max-width: 48ch;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hot);
}

.section-head h2 {
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.05;
  color: var(--palm);
}

.section-head p {
  color: var(--mute);
  font-size: 1.05rem;
}

/* Featured asymmetric */
.featured {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .featured {
    grid-template-columns: 1.35fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
  }
}

.feature-main {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  min-height: 420px;
  overflow: hidden;
  border: 3px solid var(--palm);
}

.feature-main img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.feature-main:hover img { transform: scale(1.05); }

.feature-main .feature-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 1.35rem 1.35rem;
  background: linear-gradient(180deg, transparent, rgba(13, 59, 54, 0.92));
  color: var(--white);
}

.feature-main .feature-copy h3 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.1;
  margin: 0.35rem 0 0.5rem;
}

.feature-main .feature-copy p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  max-width: 42ch;
}

.feature-stack {
  display: grid;
  gap: 1.25rem;
}

.feature-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 3px solid var(--palm);
  padding: 0.65rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.feature-item:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--lagoon);
}

.feature-item img {
  width: 100%;
  height: 100%;
  min-height: 110px;
  object-fit: cover;
}

.feature-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0.25rem 0 0.35rem;
  color: var(--palm);
}

.feature-item p {
  font-size: 0.88rem;
  color: var(--mute);
}

.tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hot);
}

/* Article grid — color-block editorial, not card-heavy */
.story-grid {
  display: grid;
  gap: 1.35rem;
}

@media (min-width: 700px) {
  .story-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
  .story-grid { grid-template-columns: repeat(3, 1fr); }
}

.story {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 3px solid var(--palm);
  overflow: hidden;
  transition: transform 0.3s var(--ease);
}

.story:nth-child(3n+1) { border-top: 8px solid var(--hot); }
.story:nth-child(3n+2) { border-top: 8px solid var(--sun); }
.story:nth-child(3n) { border-top: 8px solid var(--lagoon); }

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

.story-media {
  aspect-ratio: 16 / 11;
  overflow: hidden;
}

.story-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.story:hover .story-media img { transform: scale(1.06); }

.story-body {
  padding: 1.15rem 1.15rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.story-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--palm);
}

.story-body p {
  font-size: 0.92rem;
  color: var(--mute);
  flex: 1;
}

.story-meta {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--lagoon);
}

/* Color band */
.band {
  background: var(--palm);
  color: var(--white);
  padding: 3.5rem 1.25rem;
  margin: 1rem 0 0;
}

.band-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 800px) {
  .band-inner {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
  }
}

.band h2 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.1;
  color: var(--sun);
}

.band p { color: rgba(255, 255, 255, 0.88); max-width: 48ch; }

.band .btn-primary { margin-top: 1rem; }

/* Page hero (inner) */
.page-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 1.25rem 1.5rem;
}

.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.05;
  color: var(--palm);
  margin: 0.4rem 0 0.75rem;
}

.page-hero p {
  max-width: 52ch;
  color: var(--mute);
  font-size: 1.08rem;
}

/* Article page */
.article-hero {
  position: relative;
  min-height: 52vh;
  display: grid;
  align-items: end;
  color: var(--white);
  overflow: hidden;
}

.article-hero .hero-media { position: absolute; inset: 0; }
.article-hero .hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: none;
  transform: none;
}

.article-hero .hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 59, 54, 0.2), rgba(13, 59, 54, 0.9));
}

.article-hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  padding: 4rem 1.25rem 2.5rem;
}

.article-hero-content h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
  max-width: 18ch;
  margin: 0.4rem 0 0.75rem;
}

.article-hero-content .lede {
  max-width: 48ch;
  color: rgba(255, 255, 255, 0.9);
}

.article-layout {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.75rem 1.25rem 4rem;
}

.article-layout .byline {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mute);
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 2px dashed rgba(13, 59, 54, 0.25);
}

.article-layout h2 {
  font-family: var(--display);
  font-size: 1.7rem;
  color: var(--palm);
  margin: 2rem 0 0.75rem;
  line-height: 1.15;
}

.article-layout p {
  margin-bottom: 1.15rem;
  font-size: 1.05rem;
}

.article-layout blockquote {
  margin: 1.75rem 0;
  padding: 1.15rem 1.25rem;
  background: var(--mist);
  border-left: 6px solid var(--hot);
  font-family: var(--display);
  font-size: 1.35rem;
  line-height: 1.3;
  color: var(--palm);
}

.article-layout figure {
  margin: 1.75rem 0;
}

.article-layout figure img {
  width: 100%;
  border: 3px solid var(--palm);
}

.article-layout figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--mute);
}

.article-end {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 3px solid var(--palm);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
}

/* Legal / about prose */
.prose-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1.25rem 4.5rem;
}

.prose-page h2 {
  font-family: var(--display);
  font-size: 1.55rem;
  color: var(--palm);
  margin: 2rem 0 0.65rem;
}

.prose-page h3 {
  font-size: 1.1rem;
  margin: 1.4rem 0 0.45rem;
  color: var(--ink);
}

.prose-page p,
.prose-page li {
  margin-bottom: 0.9rem;
  color: var(--ink);
  font-size: 1.02rem;
}

.prose-page ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.prose-page a { color: var(--hot); }

/* About mosaic */
.about-mosaic {
  display: grid;
  gap: 0.75rem;
  margin: 2rem 0;
}

@media (min-width: 700px) {
  .about-mosaic {
    grid-template-columns: 1.2fr 1fr;
    grid-template-rows: 200px 200px;
  }
  .about-mosaic img:first-child { grid-row: span 2; height: 100%; }
}

.about-mosaic img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border: 3px solid var(--palm);
}

@media (min-width: 700px) {
  .about-mosaic img { height: 100%; }
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.82);
  padding: 3rem 1.25rem 2rem;
  border-top: 6px solid var(--sun);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}

@media (min-width: 800px) {
  .footer-inner {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-brand {
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--sun);
  margin-bottom: 0.65rem;
}

.site-footer p { font-size: 0.92rem; max-width: 40ch; }

.site-footer h3 {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lagoon);
  margin-bottom: 0.75rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
}

.site-footer a:hover { color: var(--sun); }

.footer-bottom {
  max-width: var(--max);
  margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}

/* Cookie notice */
.cookie-bar {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 200;
  max-width: 520px;
  margin: 0 auto;
  background: var(--palm);
  color: var(--white);
  border: 3px solid var(--sun);
  padding: 1.15rem 1.2rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.45s var(--ease), opacity 0.45s;
}

.cookie-bar.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.cookie-bar p {
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
  line-height: 1.5;
}

.cookie-bar a { color: var(--sun); }

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.cookie-actions .btn {
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
}

.cookie-actions .btn-ghost {
  border-color: rgba(255, 255, 255, 0.45);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track { animation: none; }
  .hero-media img { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
