@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,400&display=swap');

:root {
  --color-terracotta: #874232;
  --color-terracotta-dark: #743425;
  --color-cream: #f6f0e6;
  --color-cream-dark: #ebe3d5;
  --color-manila: #e6d3b3;
  --color-manila-dark: #d8c29d;
  --color-text-dark: #2c2420;
  --color-text-muted: #6e645e;
  --color-pill-active: #d6beaa;
  --color-pill-text: #3c2921;
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--color-text-dark);
  background-color: #1a1614;
  overflow-x: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.font-serif {
  font-family: 'Playfair Display', serif;
}

.font-editorial {
  font-family: 'Cormorant Garamond', serif;
}

/* Texture overlay for paper effect */
.paper-texture {
  position: relative;
}

.paper-texture::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.06'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* Top Floating Pill Navbar */
.nav-pill-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  background: rgba(40, 30, 25, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  max-width: 95vw;
}

.nav-item {
  padding: 6px 18px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #ffffff;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-decoration: none;
  display: inline-block;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.nav-item.active {
  background-color: var(--color-pill-active);
  color: var(--color-pill-text);
  font-weight: 600;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

/* Navbar theme adaptation for light section (contact) */
[data-section="contact"] .nav-pill-container {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(0, 0, 0, 0.12);
}

[data-section="contact"] .nav-item {
  color: #3f3630;
}

[data-section="contact"] .nav-item.active {
  background-color: #54443c;
  color: #ffffff;
}

/* Fullscreen Section Container */
.page-section {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100vw;
  position: relative;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.page-section.active-page {
  display: block;
  opacity: 1;
}

/* SECTION 1: HOME (RETRO DESKTOP) */
#section-home {
  height: 100vh;
  height: 100dvh;
  background-color: #12100e;
  position: relative;
  overflow: hidden;
}

.home-bg-image {
  position: absolute;
  inset: 0;
  background-image: url('assets/images/bg-group.jpg');
  background-size: cover;
  background-position: center 30%;
  filter: brightness(0.92) contrast(1.04);
}

.home-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);
  pointer-events: none;
}

.desktop-screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Desktop Icons & Drag items */
.desktop-icon {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: grab;
  padding: 6px;
  border-radius: 8px;
  transition: transform 0.18s ease, filter 0.18s ease;
  z-index: 10;
  touch-action: none;
}

.desktop-icon:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

.desktop-icon:active {
  cursor: grabbing;
}

.desktop-icon-label {
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 2px 8px rgba(0, 0, 0, 0.7);
  letter-spacing: 0.02em;
  text-align: center;
  white-space: nowrap;
}

/* Mini Photo Thumbnail Icon */
.photo-thumbnail-box {
  width: 58px;
  height: 58px;
  background: #ffffff;
  padding: 3px;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.photo-thumbnail-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
}

/* System Icons */
.system-icon-box {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.system-icon-box img,
.system-icon-box svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

/* SECTION 2: ABOUT ("BANGSAWAN HIGHLIGHTS") */
#section-about {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--color-terracotta);
  padding: 68px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.about-header {
  text-align: center;
  margin-bottom: 14px;
  z-index: 2;
}

.about-title {
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  font-weight: 500;
  color: #fcf4e8;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-transform: lowercase;
}

.cards-container {
  display: flex;
  justify-content: center;
  gap: 18px;
  max-width: 1120px;
  width: 100%;
  z-index: 2;
  flex-wrap: wrap;
}

/* Manila Folder Card */
.manila-card {
  flex: 1;
  min-width: 260px;
  max-width: 340px;
  background: var(--color-manila);
  border-radius: 10px 24px 12px 12px;
  padding: 14px 14px 16px;
  position: relative;
  box-shadow: 0 10px 26px rgba(45, 15, 10, 0.28), 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
}

.manila-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 34px rgba(45, 15, 10, 0.35), 0 4px 8px rgba(0, 0, 0, 0.12);
}

/* Manila folder tab */
.folder-tab {
  position: absolute;
  top: -12px;
  right: 14px;
  background: var(--color-manila-dark);
  color: #5c4535;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 6px 6px 0 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

/* Collage Area inside Card */
.folder-collage {
  position: relative;
  height: 165px;
  width: 100%;
  margin-bottom: 12px;
}

/* Polaroids inside collage */
.polaroid {
  position: absolute;
  background: #ffffff;
  padding: 5px 5px 12px 5px;
  border-radius: 3px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.polaroid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

.polaroid:hover {
  transform: scale(1.12) rotate(0deg) !important;
  z-index: 25 !important;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

.card-content {
  margin-top: auto;
  text-align: left;
}

.card-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #3b2820;
  margin-bottom: 4px;
  font-family: 'Playfair Display', serif;
}

.card-desc {
  font-size: 0.78rem;
  line-height: 1.45;
  color: #5d4a40;
}

/* SECTION 3: CONTACT ("SILATURAHMI") */
#section-contact {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--color-cream);
  padding: 68px 24px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 36px;
  max-width: 1020px;
  width: 100%;
  align-items: center;
  z-index: 2;
}

/* Open Folder & Scattered Photos */
.spilled-folder-container {
  position: relative;
  width: 100%;
  height: 370px;
}

.spilled-folder-base {
  position: absolute;
  width: 82%;
  height: 85%;
  left: 8%;
  top: 10%;
  background: var(--color-manila);
  border-radius: 16px;
  transform: rotate(-6deg);
  box-shadow: 0 20px 45px rgba(70, 50, 40, 0.15), 0 3px 8px rgba(0, 0, 0, 0.08);
}

.receipt-slip {
  position: absolute;
  top: 5%;
  left: -2%;
  background: #fdfcf9;
  border: 1px dashed #cfc8be;
  padding: 10px 12px;
  width: 135px;
  font-family: monospace;
  font-size: 0.62rem;
  color: #7d7265;
  transform: rotate(-15deg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 8;
}

.contact-info-col {
  padding-left: 12px;
}

.contact-heading {
  font-size: clamp(2.2rem, 3.8vw, 3.6rem);
  font-weight: 500;
  color: #2b221d;
  line-height: 1.05;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.contact-text {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #554840;
  margin-bottom: 22px;
  max-width: 440px;
}

.btn-contact {
  display: inline-block;
  padding: 10px 36px;
  border-radius: 9999px;
  border: 1.5px solid #4a3e36;
  background: transparent;
  color: #3b2f28;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.02em;
}

.btn-contact:hover {
  background: #3b2f28;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(59, 47, 40, 0.2);
}

/* MODALS */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 14, 12, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-backdrop.open {
  display: flex;
  opacity: 1;
}

/* Newsletter Subscribe Card */
.modal-card {
  background: #ffffff;
  border-radius: 24px;
  width: 100%;
  max-width: 470px;
  padding: 36px 30px 28px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  position: relative;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-backdrop.open .modal-card {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 20px;
  background: #f4eee9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  color: #6a574c;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: #e6dcce;
  color: #2b221d;
}

.newsletter-title {
  font-size: 2rem;
  color: #4b3429;
  font-weight: 600;
  margin-bottom: 22px;
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
}

.form-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 500;
  color: #4f4239;
  margin-bottom: 8px;
}

.input-field {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #ded5cb;
  border-radius: 12px;
  font-size: 0.95rem;
  color: #2c2420;
  outline: none;
  margin-bottom: 20px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field:focus {
  border-color: #aa7b6a;
  box-shadow: 0 0 0 3px rgba(170, 123, 106, 0.2);
}

.btn-join {
  width: 100%;
  padding: 13px;
  background-color: #be8e7e;
  border: none;
  border-radius: 9999px;
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 18px rgba(190, 142, 126, 0.35);
}

.btn-join:hover {
  background-color: #ab7968;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(190, 142, 126, 0.45);
}

.modal-note {
  font-size: 0.74rem;
  color: #8c7e75;
  text-align: center;
  margin-top: 16px;
  line-height: 1.4;
}

/* Photo Lightbox Modal */
.lightbox-card {
  background: #ffffff;
  padding: 12px 12px 24px 12px;
  border-radius: 12px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  max-width: 600px;
  width: 92vw;
  text-align: center;
  position: relative;
}

.lightbox-card img {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

.lightbox-caption {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: #3b2a22;
  margin-top: 12px;
  font-weight: 600;
}

/* Retro Window Modal for Finder/Culture folder */
.retro-window {
  background: #e8e3dc;
  border: 2px solid #5a4b41;
  border-radius: 10px;
  box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.35);
  width: 94%;
  max-width: 640px;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.retro-window-header {
  background: #6a574b;
  color: #ffffff;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
}

.retro-window-body {
  padding: 16px;
  max-height: 55vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
  gap: 12px;
}

/* Paperclip styling */
.paperclip {
  position: absolute;
  top: -12px;
  left: 24px;
  width: 22px;
  height: 48px;
  border: 3px solid #8e9499;
  border-radius: 12px;
  z-index: 20;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.25);
  transform: rotate(8deg);
}

/* Toast alert */
.toast-alert {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #2b221d;
  color: #ffffff;
  padding: 12px 22px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  z-index: 200;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  width: max-content;
  max-width: 90vw;
  text-align: center;
}

.toast-alert.show {
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================
   MOBILE & TABLET RESPONSIVE STYLES
   ========================================================== */
@media (max-width: 768px) {
  /* Navbar: Compact floating bar with smooth scroll */
  .nav-pill-container {
    top: 14px;
    padding: 4px 6px;
    gap: 4px;
    max-width: 94vw;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .nav-pill-container::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    padding: 5px 12px;
    font-size: 0.74rem;
    letter-spacing: 0;
  }

  /* Section 1: Home desktop on mobile portrait */
  .home-bg-image {
    background-position: center 25%;
  }

  .photo-thumbnail-box {
    width: 46px;
    height: 46px;
    padding: 2.5px;
  }

  .system-icon-box {
    width: 46px;
    height: 46px;
  }

  .desktop-icon-label {
    font-size: 0.62rem;
  }

  .desktop-icon {
    padding: 4px;
    gap: 3px;
  }

  /* Reposition icons neatly on mobile portrait */
  #section-home .desktop-icon[data-title="Explore"] {
    top: 15% !important;
    left: 6% !important;
  }

  #section-home .desktop-icon[data-title="Finder"] {
    top: 22% !important;
    left: auto !important;
    right: 8% !important;
  }

  #section-home .desktop-icon[data-title="Bangsawan"] {
    bottom: 8% !important;
    right: 8% !important;
  }

  /* Photo icons reposition for portrait screen */
  #icon-photo-1 { top: 32% !important; left: 8% !important; }
  #icon-photo-2 { top: 44% !important; left: 16% !important; }
  #icon-photo-3 { top: 56% !important; left: 8% !important; }
  #icon-photo-4 { top: 68% !important; left: 12% !important; }
  #icon-photo-5 { top: 78% !important; left: 32% !important; }
  #icon-photo-6 { top: 70% !important; left: auto !important; right: 18% !important; }
  #icon-photo-7 { top: 56% !important; left: auto !important; right: 8% !important; }
  #icon-photo-8 { top: 40% !important; left: auto !important; right: 10% !important; }
  #icon-photo-10 { top: 82% !important; left: auto !important; right: 8% !important; }

  /* Section 2: About / Highlights */
  #section-about {
    padding: 60px 14px 24px;
  }

  .about-header {
    margin-bottom: 12px;
  }

  .about-title {
    font-size: 1.7rem;
  }

  .cards-container {
    gap: 16px;
  }

  .manila-card {
    min-width: 100%;
    max-width: 100%;
    padding: 14px 12px 16px;
  }

  .folder-collage {
    height: 150px;
    margin-bottom: 12px;
  }

  /* Section 3: Contact / Silaturahmi */
  #section-contact {
    padding: 65px 14px 30px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .contact-info-col {
    padding-left: 0;
  }

  .contact-heading {
    font-size: 2rem;
    margin-bottom: 12px;
  }

  .contact-text {
    font-size: 0.85rem;
    margin: 0 auto 20px;
  }

  .spilled-folder-container {
    height: 290px;
    max-width: 340px;
    margin: 0 auto;
  }

  .spilled-folder-container .polaroid {
    transform-origin: center center;
  }

  .spilled-folder-container .polaroid:nth-child(4) {
    width: 130px !important;
    height: 140px !important;
    top: 10% !important;
    left: 8% !important;
  }

  .spilled-folder-container .polaroid:nth-child(5) {
    width: 120px !important;
    height: 120px !important;
    top: 25% !important;
    right: 8% !important;
  }

  .spilled-folder-container .polaroid:nth-child(6) {
    width: 125px !important;
    height: 135px !important;
    bottom: 8% !important;
    left: 12% !important;
  }

  .spilled-folder-container .polaroid:nth-child(7) {
    width: 110px !important;
    height: 125px !important;
    bottom: 6% !important;
    right: 14% !important;
  }

  /* Modals on small screens */
  .modal-card {
    padding: 28px 20px 22px;
    border-radius: 20px;
  }

  .newsletter-title {
    font-size: 1.6rem;
  }
}
