/* ═══════════════════════════════════════════════════════════
   Re:gular Studio — Phase 1
   Cream / Vintage-Gold aesthetic
   ═══════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --cream:        #f5f0e8;
  --cream-soft:   #faf6ef;
  --cream-warm:   #efe6d6;
  --gold:         #b8974f;
  --gold-soft:    #c9a86a;
  --gold-pale:    #e4d3a8;
  --ink:          #2a2622;
  --ink-soft:     #4a4239;
  --ink-muted:    #8a7f70;
  --line:         rgba(184, 151, 79, 0.28);
  --line-strong:  rgba(184, 151, 79, 0.5);

  --serif:  "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --sans:   "Inter", "Jost", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --lao:    "Noto Sans Lao", "Cormorant Garamond", serif;

  --ease-out:  cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  --radius-sm: 6px;
  --radius-md: 12px;

  --pad-x-lg:  clamp(24px, 6vw, 96px);
  --gap-lg:    clamp(48px, 8vw, 120px);

  --nav-h:     64px;
  --nav-h-sm:  56px;
}

/* ── Reset / base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.005em;
  margin: 0;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
:lang(lo) { font-family: var(--lao); }

/* ── Section shell ──────────────────────────────────────── */
.section {
  padding: var(--gap-lg) var(--pad-x-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.section-head { text-align: center; margin-bottom: clamp(48px, 6vw, 80px); }
.section-title {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.15;
}
.section-sub {
  margin-top: 14px;
  font-size: 0.98rem;
  color: var(--ink-muted);
  font-style: italic;
  font-family: var(--serif);
  letter-spacing: 0.02em;
}

/* Ornament (thin gold rule with diamond) */
.ornament {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  color: var(--gold);
}
.ornament-line {
  display: inline-block;
  width: clamp(40px, 8vw, 80px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 45%, var(--gold) 55%, transparent);
}
.ornament-diamond {
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0;
}

/* ═══════════════════════ NAV ═══════════════════════ */
.nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(245, 240, 232, 0.82);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px var(--pad-x-lg);
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  height: 40px;
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.nav-logo:hover { opacity: 0.72; transform: translateY(-1px); }
.nav-logo img {
  height: 100%;
  width: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* Anchor offset so sticky nav doesn't cover section tops */
#packages, #wardrobe, #contact { scroll-margin-top: var(--nav-h); }

/* ═══════════════════════ HERO ═══════════════════════ */
.hero {
  min-height: 70vh;
  padding: clamp(80px, 12vh, 140px) var(--pad-x-lg) clamp(60px, 8vh, 100px);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(233, 213, 168, 0.32), transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(184, 151, 79, 0.10), transparent 55%),
    var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  overflow: hidden;
}
/* subtle top + bottom hairline */
.hero::before, .hero::after {
  content: "";
  position: absolute;
  left: var(--pad-x-lg);
  right: var(--pad-x-lg);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 50%, transparent);
}
.hero::before { top: 24px; }
.hero::after  { bottom: 24px; }

.hero-inner {
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(22px, 3vw, 34px);
}

.hero-mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 400;
}
.hero-mark-line {
  width: clamp(30px, 6vw, 60px);
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
}

.hero-title {
  /* Image-only heading — collapse text metrics */
  font-size: 0;
  line-height: 0;
  color: var(--ink);
  margin: 0;
  padding: 0;
}
.hero-logo {
  height: clamp(72px, 11vw, 120px);
  width: auto;
  max-width: min(560px, 88vw);
  display: block;
  margin: 0 auto;
  user-select: none;
  -webkit-user-drag: none;
}

.hero-slogan {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-muted);
  font-style: italic;
  letter-spacing: 0.02em;
  max-width: 34ch;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 46px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.hero-scroll-dot {
  width: 3px;
  height: 6px;
  background: var(--gold);
  border-radius: 2px;
  animation: scrollDot 1.8s var(--ease-soft) infinite;
}
@keyframes scrollDot {
  0%   { transform: translateY(0);    opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid transparent;
  transition:
    background 0.4s var(--ease-out),
    color 0.4s var(--ease-out),
    border-color 0.4s var(--ease-out),
    transform 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--cream-soft);
  border-color: var(--ink);
}
.btn-primary:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--cream-soft);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -12px rgba(184, 151, 79, 0.5);
}
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--gold);
}
.btn-outline:hover {
  background: var(--gold);
  color: var(--cream-soft);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -14px rgba(184, 151, 79, 0.6);
}
.arrow-down, .arrow-right {
  font-family: var(--serif);
  font-size: 1.1em;
  transition: transform 0.4s var(--ease-out);
  display: inline-block;
}
.btn:hover .arrow-down { transform: translateY(3px); }
.btn:hover .arrow-right { transform: translateX(4px); }

/* ═══════════════════════ PACKAGES ═══════════════════════ */
.packages { background: var(--cream); }

.category {
  padding: clamp(48px, 7vw, 90px) 0;
  border-top: 1px solid var(--line);
}
.category:first-of-type { border-top: 0; }

.category-head {
  text-align: center;
  margin-bottom: clamp(32px, 5vw, 52px);
}
.category-index {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--gold);
  letter-spacing: 0.2em;
  margin-bottom: 10px;
}
.category-name {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 500;
  letter-spacing: 0.005em;
}
.category-lao {
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}

/* Body: arch image left, cards right */
.category-body {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 1.35fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.category:nth-of-type(even) .category-body {
  grid-template-columns: 1.35fr minmax(220px, 1fr);
}
.category:nth-of-type(even) .arch-image { order: 2; }
.category:nth-of-type(even) .packages-grid { order: 1; }

/* Arch image (vintage frame) */
.arch-image {
  position: relative;
  aspect-ratio: 3 / 4;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  border-radius: 999px 999px 6px 6px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--cream-warm), var(--cream));
  border: 1px solid var(--line-strong);
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
  box-shadow: 0 10px 40px -30px rgba(42, 38, 34, 0.4);
}
.arch-image::before {
  /* inner double-line frame — sits above slides */
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--line);
  border-radius: 999px 999px 3px 3px;
  pointer-events: none;
  z-index: 3;
}
/* Slideshow layer inside the arch frame */
.arch-slides {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--cream-warm), var(--cream));
}
.arch-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s var(--ease-out);
  will-change: opacity;
  user-select: none;
  -webkit-user-drag: none;
}
.arch-slide.is-active { opacity: 1; }
/* Soft warm tint over slides to keep vintage cream mood */
.arch-slides::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 20%, transparent 50%, rgba(184, 151, 79, 0.10) 100%),
    linear-gradient(180deg, rgba(245, 240, 232, 0.06), rgba(42, 38, 34, 0.08));
  pointer-events: none;
  z-index: 2;
  border-radius: inherit;
}
@media (prefers-reduced-motion: reduce) {
  .arch-slide { transition: none; }
}
.arch-image:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px -30px rgba(42, 38, 34, 0.35);
}
.arch-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--ink-muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.arch-placeholder-mark {
  color: var(--gold);
  font-size: 0.9rem;
  letter-spacing: 0;
}

/* Packages sub-grid */
.packages-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.pkg-card {
  padding: 22px 26px;
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition:
    transform 0.4s var(--ease-out),
    border-color 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out),
    background 0.4s var(--ease-out);
}
.pkg-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-soft);
  background: #fff;
  box-shadow: 0 12px 28px -18px rgba(184, 151, 79, 0.4);
}
.pkg-card-tag {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}
.pkg-card-body {
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-style: italic;
}

.category-foot { text-align: center; }

/* ═══════════════════════ WARDROBE ═══════════════════════ */
.wardrobe { background: var(--cream-soft); }

/* Carousel shell (holds nav buttons + track) */
.wardrobe-carousel {
  position: relative;
  --card-gap: clamp(18px, 3vw, 32px);
  --card-visible: 3;
}
.wardrobe-track {
  display: flex;
  gap: var(--card-gap);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 8px 4px 28px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 4px;
}
.wardrobe-track::-webkit-scrollbar { display: none; }

.wardrobe-card {
  flex: 0 0 calc((100% - (var(--card-visible) - 1) * var(--card-gap)) / var(--card-visible));
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 22px;
  padding: clamp(24px, 3vw, 36px);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), border-color 0.5s var(--ease-out);
}
.wardrobe-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-soft);
  box-shadow: 0 24px 50px -30px rgba(184, 151, 79, 0.4);
}
.wardrobe-card .arch-image { max-width: 260px; }
.wardrobe-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.wardrobe-title {
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1.15;
}
.wardrobe-lao {
  color: var(--ink-muted);
  font-size: 0.95rem;
  min-height: 1.4em;
}
.wardrobe-desc {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-muted);
  font-size: 0.98rem;
  margin: 2px 0 8px;
}

/* Carousel nav buttons — desktop */
.carousel-nav {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  z-index: 6;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: var(--cream-soft);
  border: 1px solid var(--gold);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 3px;
  cursor: pointer;
  transition: background 0.35s var(--ease-out), color 0.35s var(--ease-out),
              box-shadow 0.35s var(--ease-out), transform 0.35s var(--ease-out),
              opacity 0.3s var(--ease-out);
  box-shadow: 0 12px 26px -18px rgba(42, 38, 34, 0.35);
}
.carousel-nav:hover:not(:disabled) {
  background: var(--gold);
  color: var(--cream-soft);
  transform: translateY(calc(-50% - 2px));
}
.carousel-nav:disabled {
  opacity: 0.28;
  cursor: default;
  box-shadow: none;
}
.carousel-nav--prev { left: -12px; }
.carousel-nav--next { right: -12px; }

/* ═══════════════════════ CONTACT ═══════════════════════ */
.contact { background: var(--cream); }
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2vw, 28px);
  max-width: 900px;
  margin: 0 auto;
}
.contact-item { display: flex; }
.contact-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 30px 18px;
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  transition: transform 0.4s var(--ease-out), border-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), background 0.4s var(--ease-out);
}
.contact-link:hover {
  transform: translateY(-4px);
  background: #fff;
  border-color: var(--gold-soft);
  box-shadow: 0 16px 32px -20px rgba(184, 151, 79, 0.45);
}
.contact-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--gold);
  border: 1px solid var(--line-strong);
  transition: background 0.4s var(--ease-out), color 0.4s var(--ease-out);
}
.contact-link:hover .contact-icon {
  background: var(--gold);
  color: var(--cream-soft);
}
.contact-icon svg { width: 22px; height: 22px; }
.contact-label {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}
.contact-hint {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--ink-muted);
  font-style: italic;
  letter-spacing: 0.05em;
}

/* ═══════════════════════ FOOTER ═══════════════════════ */
.footer {
  background: var(--cream-warm);
  padding: 44px var(--pad-x-lg);
  border-top: 1px solid var(--line-strong);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.footer-mark {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.footer-line {
  flex: 1;
  min-width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}
.footer-meta {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: inline-flex;
  gap: 10px;
  align-items: center;
}
.footer-dot { color: var(--gold); }

/* ── Placeholder text styling ───────────────────────────── */
.placeholder-text {
  font-style: italic;
  color: var(--ink-muted);
  opacity: 0.7;
}

/* ═══════════════════════ REVEAL / MOVEMENT ═══════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: 0ms;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-scroll-dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* ═══════════════════════ RESPONSIVE ═══════════════════════ */
@media (max-width: 900px) {
  .category-body,
  .category:nth-of-type(even) .category-body {
    grid-template-columns: 1fr;
  }
  .category:nth-of-type(even) .arch-image { order: 0; }
  .category:nth-of-type(even) .packages-grid { order: 0; }
  .arch-image { max-width: 260px; }

  .wardrobe-carousel { --card-visible: 2; }
  .carousel-nav { display: none; }

  .contact-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .nav-inner { padding: 8px var(--pad-x-lg); min-height: var(--nav-h-sm); }
  .nav-logo { height: 32px; }
  #packages, #wardrobe, #contact { scroll-margin-top: var(--nav-h-sm); }
  .hero { min-height: 62vh; }
  .hero-mark { font-size: 0.7rem; letter-spacing: 0.28em; }
  .hero-logo { height: clamp(56px, 14vw, 88px); }
  .hero-scroll-hint { display: none; }
  .btn { padding: 12px 22px; font-size: 0.78rem; letter-spacing: 0.18em; }
  .section-title { font-size: clamp(1.8rem, 7vw, 2.4rem); }
  .arch-image { max-width: 220px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-line { display: none; }

  /* Mobile: one big card with a peek of the next */
  .wardrobe-carousel { --card-gap: 14px; }
  .wardrobe-card {
    flex: 0 0 82%;
    scroll-snap-align: center;
  }
  .wardrobe-track { padding: 8px 9% 24px; }
  .wardrobe-card .arch-image { max-width: 240px; }
}
