/**
 * Template 5: The Terra — Warm Terracotta (Photo-Free Sand, Clay, Terra, & Umber)
 * Architectural Arches, Craft Paper Shadow, Fraunces & DM Sans Typography
 */

:root {
  --sand: #F2E5D8;
  --clay: #D9A58C;
  --terra: #B66E50;
  --umber: #63483D;
  --paper: #FBF3EA;
}

body.theme-terra {
  background-color: var(--sand);
  color: var(--umber);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.theme-terra.locked {
  overflow: hidden;
  height: 100dvh;
}

/* Tekstur kertas kraf halus */
body.theme-terra::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: .35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .39 0 0 0 0 .28 0 0 0 0 .24 0 0 0 .1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

body.theme-terra h1,
body.theme-terra h2,
body.theme-terra h3,
body.theme-terra .serif {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
}

/* Arch & Organic Blobs */
.arch {
  border-radius: 999px 999px 0 0;
}

.paper.arch {
  border-radius: 999px 999px 1.75rem 1.75rem;
}

.org {
  border-radius: 62% 38% 46% 54% / 55% 45% 55% 45%;
}

.org2 {
  border-radius: 40% 60% 55% 45% / 50% 60% 40% 50%;
}

.blob {
  position: absolute;
  pointer-events: none;
}

/* Craft Paper Card with Solid Umber Drop Shadow */
.paper {
  background: var(--paper);
  border: 1.5px solid var(--umber);
  border-radius: 1.75rem;
  box-shadow: 5px 6px 0 var(--umber);
}

/* Buttons */
.btn-terra {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .9rem 2rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  border: 1.5px solid var(--umber);
  transition: transform .25s, box-shadow .25s, background .25s, color .25s;
}

.btn-solid {
  background: var(--umber);
  color: var(--sand);
  box-shadow: 3px 4px 0 var(--terra);
}

.btn-solid:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 6px 0 var(--terra);
}

.btn-solid:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 2px 0 var(--terra);
}

.btn-line {
  background: transparent;
  color: var(--umber);
}

.btn-line:hover {
  background: var(--umber);
  color: var(--sand);
}

/* Form Fields */
.field-terra {
  width: 100%;
  background: var(--paper);
  border: 1.5px solid var(--umber);
  border-radius: 1rem;
  padding: .75rem 1rem;
  font-size: .95rem;
  color: var(--umber);
}

.field-terra:focus {
  outline: none;
  box-shadow: 3px 3px 0 var(--terra);
}

.ico {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Sticky Guestbook Notes */
.note:nth-child(odd) {
  transform: rotate(-.8deg);
  background: var(--paper);
}

.note:nth-child(even) {
  transform: rotate(.9deg);
  background: #EBC7B3;
}

/* Scroll Reveal */
.rev {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.22, 1, .36, 1);
}

.rev.on,
.rev.is-visible {
  opacity: 1 !important;
  transform: none !important;
}

/* Fallback: when body is unlocked or cover dismissed, sections must show immediately */
body.theme-terra:not(.locked) .rev,
#cover.gone ~ main .rev {
  opacity: 1 !important;
  transform: none !important;
}

/* Cover Dismiss */
#cover {
  transition: opacity .9s ease, transform 1.1s cubic-bezier(.22, 1, .36, 1), visibility .9s;
}

#cover.gone {
  opacity: 0;
  transform: translateY(-6%) scale(1.03);
  visibility: hidden;
  pointer-events: none;
}

/* Organic Drift Animation */
.drift {
  animation: drift 14s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% {
    transform: translate(0, 0) rotate(0);
  }
  50% {
    transform: translate(10px, -14px) rotate(6deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rev {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .drift {
    animation: none;
  }
  html {
    scroll-behavior: auto !important;
  }
}

::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: var(--sand);
}
::-webkit-scrollbar-thumb {
  background: var(--clay);
  border-radius: 7px;
}

