:root {
  /* Palette diambil dari logo.jpg */
  --bg: #1a3522;
  --bg-deep: #0b1a10;
  --bg-glow: #3f7350;
  --ember: rgba(184, 88, 58, 0.22);
  --ink: #f3ead8;
  --cream: #f3ead8;
  --muted: rgba(243, 234, 216, 0.66);
  --faint: rgba(243, 234, 216, 0.6);
  --accent: #b8583a;
  --line: rgba(243, 234, 216, 0.16);
  --line-strong: rgba(243, 234, 216, 0.32);
  --card: linear-gradient(160deg, rgba(52, 92, 62, 0.55), rgba(24, 46, 31, 0.72));
  --serif: "Cormorant Garamond", Georgia, serif;
  --gutter: clamp(16px, 3vw, 28px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #142b1b;
    --bg-deep: #07120a;
    --bg-glow: #335f42;
    --ember: rgba(201, 106, 74, 0.18);
    --accent: #c96a4a;
    --card: linear-gradient(160deg, rgba(40, 74, 49, 0.55), rgba(16, 32, 21, 0.78));
  }
}

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

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100svh; /* tinggi layar mobile tanpa ketutup address bar */
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: var(--gutter);
  padding:
    max(var(--gutter), env(safe-area-inset-top))
    max(var(--gutter), env(safe-area-inset-right))
    max(var(--gutter), env(safe-area-inset-bottom))
    max(var(--gutter), env(safe-area-inset-left));
  -webkit-tap-highlight-color: transparent;
  font-family: "Jost", system-ui, sans-serif;
  color: var(--ink);
  background:
    /* sorot lampu dari atas */
    radial-gradient(ellipse 70% 55% at 50% -5%, var(--bg-glow), transparent 70%),
    /* bara hangat terakota di sudut */
    radial-gradient(ellipse 45% 40% at 0% 100%, var(--ember), transparent 70%),
    radial-gradient(ellipse 35% 30% at 100% 85%, rgba(243, 234, 216, 0.05), transparent 70%),
    /* vignette gelap di tepi */
    radial-gradient(ellipse 120% 90% at 50% 40%, transparent 45%, var(--bg-deep) 100%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Pola garis diagonal tipis (mengikuti sudut huruf K) + cahaya yang bergerak pelan */
body::after {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(90, 150, 105, 0.22), transparent) 30% 20% / 60% 60% no-repeat,
    radial-gradient(closest-side, rgba(184, 88, 58, 0.10), transparent) 75% 80% / 50% 50% no-repeat,
    repeating-linear-gradient(135deg, rgba(243, 234, 216, 0.035) 0 1px, transparent 1px 22px);
  -webkit-mask-image: radial-gradient(ellipse 55% 50% at 50% 50%, #000 20%, transparent 80%);
  mask-image: radial-gradient(ellipse 55% 50% at 50% 50%, #000 20%, transparent 80%);
  animation: drift 24s ease-in-out infinite alternate;
  will-change: transform;
}

/* Tekstur grain halus agar terasa seperti kertas/kemasan premium */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Bingkai halaman ---------- */

.frame {
  position: absolute;
  inset:
    max(var(--gutter), env(safe-area-inset-top))
    max(var(--gutter), env(safe-area-inset-right))
    max(var(--gutter), env(safe-area-inset-bottom))
    max(var(--gutter), env(safe-area-inset-left));
  border: 1px solid var(--line);
  pointer-events: none;
  z-index: 1;
}
.corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 0 solid var(--line-strong);
}
.corner.tl { top: -6px; left: -6px; border-top-width: 1px; border-left-width: 1px; }
.corner.tr { top: -6px; right: -6px; border-top-width: 1px; border-right-width: 1px; }
.corner.bl { bottom: -6px; left: -6px; border-bottom-width: 1px; border-left-width: 1px; }
.corner.br { bottom: -6px; right: -6px; border-bottom-width: 1px; border-right-width: 1px; }

/* Sorot cahaya yang mengikuti kursor */
.hero::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 40%), rgba(243, 234, 216, 0.05), transparent 70%);
}

/* ---------- Header ---------- */

.topbar,
.bottombar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(16px, 2.4vh, 22px) clamp(20px, 4vw, 44px);
}
.topbar { border-bottom: 1px solid var(--line); }

.brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.brand svg { width: 28px; height: 28px; }

.meta,
.label,
.copy {
  font-size: 10.5px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--faint);
}

.k-cream { fill: var(--cream); }
.k-accent { fill: var(--accent); }

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(28px, 4vh, 56px) 20px;
}

.emblem {
  position: relative;
  width: clamp(120px, min(18vw, 17vh), 160px);
  aspect-ratio: 1;
  margin-bottom: clamp(22px, 3.5vh, 36px);
  display: grid;
  place-items: center;
}
.emblem::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243, 234, 216, 0.08), transparent 70%);
}
.ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 40s linear infinite;
  will-change: transform;
}
.ring-line { fill: none; stroke: var(--line); stroke-width: 1; }
.ring-text {
  fill: var(--muted);
  font-family: "Jost", system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.3em;
}
.k { position: relative; z-index: 1; width: 38%; height: 38%; }

h1 {
  font-weight: 300;
  font-size: clamp(48px, min(11vw, 13vh), 124px);
  line-height: 0.95;
  letter-spacing: 0.16em;
  padding-left: 0.16em; /* imbangi tracking agar tetap center */
  text-transform: uppercase;
  background: linear-gradient(180deg, #fbf5e9 0%, var(--cream) 55%, #d9cdb4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h1 span {
  display: block;
  margin-top: 0.28em;
  font-size: max(0.2em, 13px);
  font-weight: 400;
  letter-spacing: 0.9em;
  padding-left: 0.9em;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: clamp(20px, 3.5vh, 34px) auto clamp(14px, 2.5vh, 22px);
}
.ornament::before,
.ornament::after {
  content: "";
  width: 72px;
  height: 1px;
}
.ornament::before { background: linear-gradient(to left, var(--line-strong), transparent); }
.ornament::after { background: linear-gradient(to right, var(--line-strong), transparent); }
.ornament i {
  width: 6px;
  height: 6px;
  background: var(--accent);
  transform: rotate(45deg);
}

.tagline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.4;
  color: var(--cream);
  opacity: 0.88;
  text-wrap: balance;
}

/* ---------- Media sosial ---------- */

.socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(24px, 4.5vh, 44px);
}
.socials a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 14px 26px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(243, 234, 216, 0.03);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
  isolation: isolate;
  transition: color 0.45s ease, border-color 0.45s ease, transform 0.45s ease;
}
.socials a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--cream);
  transform: translateY(101%);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.socials a svg { width: 17px; height: 17px; }
.socials a:hover,
.socials a:focus-visible {
  color: var(--bg-deep);
  border-color: var(--cream);
  transform: translateY(-2px);
  outline: none;
}
.socials a:hover::before,
.socials a:focus-visible::before { transform: none; }

/* ---------- Footer ---------- */

.bottombar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  border-top: 1px solid var(--line);
  align-items: end;
}
.visit { font-style: normal; text-align: left; }
.label { margin-bottom: 8px; }
.addr {
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--muted);
}

.directions {
  display: inline-flex;
  align-items: flex-end; /* teks & garis bawah tetap rapat walau area sentuh 44px */
  gap: 8px;
  min-height: 44px;
  padding-bottom: 4px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: var(--cream);
  background: linear-gradient(var(--accent), var(--accent)) no-repeat left bottom / 0 1px,
              linear-gradient(var(--line-strong), var(--line-strong)) no-repeat left bottom / 100% 1px;
  transition: background-size 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.directions svg { width: 16px; height: 16px; color: var(--accent); }
.directions .arrow { width: 14px; height: 14px; color: var(--cream); transition: transform 0.4s ease; }
.directions:hover,
.directions:focus-visible { background-size: 100% 1px, 100% 1px; outline: none; }
.directions:hover .arrow,
.directions:focus-visible .arrow { transform: translateX(4px); }

.copy { text-align: right; }

/* ---------- Animasi ---------- */

.reveal { animation: fade 1s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(0.15s + var(--i) * 0.1s); }

@keyframes fade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) rotate(0deg); }
  to { transform: translate3d(2%, 1.5%, 0) rotate(1.5deg); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsif ---------- */

/* Sorot kursor hanya untuk perangkat dengan mouse */
@media (hover: none) {
  .hero::before { display: none; }
}

/* Tablet & HP: footer ditumpuk di tengah */
@media (max-width: 900px) {
  .bottombar {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding-top: 28px;
    padding-bottom: 28px;
  }
  .visit, .copy { text-align: center; }
  .copy { margin-top: 4px; }
}

@media (max-width: 600px) {
  .addr br { display: none; }
  .addr { max-width: 34ch; margin: 0 auto; }
}

@media (max-width: 480px) {
  .topbar { padding: 14px 16px; }
  .brand span { display: none; }
  .meta { letter-spacing: 0.28em; }
  .hero { padding: 36px 12px; }
  .socials { gap: 10px; }
  .socials a { padding: 12px 18px; letter-spacing: 0.16em; gap: 8px; }
  .ornament::before, .ornament::after { width: 48px; }
}

/* HP sangat kecil (iPhone SE 1st gen, dll.) */
@media (max-width: 360px) {
  .meta { font-size: 9.5px; letter-spacing: 0.22em; }
  .socials a { padding: 11px 14px; font-size: 10.5px; letter-spacing: 0.12em; }
  .socials a svg { width: 15px; height: 15px; }
}

/* Layar pendek / HP landscape: versi ringkas */
@media (max-height: 560px) and (orientation: landscape) {
  .hero { padding: 24px 20px; }
  .emblem { width: 92px; margin-bottom: 16px; }
  h1 { font-size: clamp(40px, 9vh, 64px); }
  .ornament { margin: 16px auto 12px; }
  .socials { margin-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .ring, body::after { animation: none; }
}
