/* =========================================================
   Palm of Piece — Global Stylesheet
   Design system: custom properties, reusable components
   ========================================================= */

:root {
  /* Colors */
  --color-primary: #16493f;
  --color-primary-dark: #0d2f28;
  --color-primary-light: #23705f;
  --color-accent: #c9a15a;
  --color-accent-dark: #a97f3a;
  --color-bg: #ffffff;
  --color-surface: #f4f1ea;
  --color-surface-alt: #eef2ef;
  --color-text: #1c2420;
  --color-text-muted: #5a6560;
  --color-border: #e0ddd3;
  --color-success: #1f8a4c;
  --color-error: #c23b3b;
  --color-overlay: rgba(13, 24, 20, 0.65);

  /* Typography */
  --font-heading: "Georgia", "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.25rem;
  --fs-3xl: 3rem;

  /* Spacing scale */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;

  /* Misc */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(13, 24, 20, 0.08);
  --shadow-md: 0 10px 30px rgba(13, 24, 20, 0.12);
  --shadow-lg: 0 20px 50px rgba(13, 24, 20, 0.18);
  --transition-base: 220ms ease;
  --transition-slow: 420ms ease;
  --header-height: 152px;
  --max-width: 1240px;
}

/* =========================
   Reset & base
   ========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin: 0 0 var(--space-sm);
  color: var(--color-primary-dark);
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); }

p { margin: 0 0 var(--space-md); color: var(--color-text-muted); }

a {
  color: inherit;
  text-decoration: none;
}

ul { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; cursor: pointer; }

input, select, textarea {
  font-family: inherit;
  font-size: var(--fs-base);
}

/* Visible focus states everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-2xl) 0;
}

.section--alt {
  background: var(--color-surface);
}

.section-head {
  max-width: 640px;
  margin: 0 auto var(--space-xl);
  text-align: center;
}

.eyebrow {
  display: inline-block;
  color: var(--color-accent-dark);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: var(--fs-xs);
  margin-bottom: var(--space-xs);
}

.section-head p { margin-top: var(--space-sm); }

/* =========================
   Buttons
   ========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.85em 1.6em;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base), color var(--transition-base);
  white-space: nowrap;
}

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

.btn--primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-primary-dark);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--color-accent-dark); border-color: var(--color-accent-dark); box-shadow: var(--shadow-md); }

.btn--outline {
  background: transparent;
  border-color: currentColor;
  color: var(--color-primary);
}
.btn--outline:hover { background: var(--color-primary); color: #fff; }

.btn--light {
  background: #fff;
  color: var(--color-primary-dark);
  border-color: #fff;
}
.btn--light:hover { background: var(--color-surface); }

.btn--block { width: 100%; }

.btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: currentColor;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =========================
   Header / Nav
   ========================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--color-primary-dark);
}

.logo span {
  color: var(--color-accent-dark);
}

.logo-img {
  height: 44px;
  width: auto;
  display: block;
}

.site-header .logo-img { height: 120px; }

.footer-grid .logo-img { height: 110px; }

@media (max-width: 480px) {
  .logo-img { height: 36px; }
  .site-header .logo-img { height: 60px; }
}

@media (max-width: 900px) {
  :root { --header-height: 96px; }
  .site-header .logo-img { height: 76px; }
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-links {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.nav-links a {
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--color-text);
  padding: var(--space-2xs) var(--space-2xs);
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition-base);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  width: 100%;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--color-primary-dark);
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================
   Hero
   ========================= */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}

.page-hero {
  min-height: 46vh;
}

.hero-media {
  position: absolute;
  inset: 0;
  background-color: var(--color-surface);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 24, 20, 0.55), rgba(13, 24, 20, 0.78));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero-content h1 { color: #fff; }
.hero-content p.lead { color: rgba(255, 255, 255, 0.88); font-size: var(--fs-md); }

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

.hero-form {
  margin-top: var(--space-lg);
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  color: var(--color-text);
  box-shadow: var(--shadow-lg);
  max-width: 560px;
}

.hero-form h2 { font-size: var(--fs-md); color: var(--color-primary-dark); }

/* =========================
   Cards
   ========================= */
.grid {
  display: grid;
  gap: var(--space-lg);
}

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

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.card-media {
  aspect-ratio: 4 / 3;
  background: var(--color-surface);
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.card-body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.card-body h3 { margin-bottom: var(--space-2xs); }

.card-body .btn { margin-top: auto; align-self: flex-start; }

.card--icon {
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  align-items: center;
}

.icon-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.icon-badge svg { width: 30px; height: 30px; stroke: currentColor; }

/* Stat cards */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.stat-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
}

.stat-card .stat-number {
  font-family: var(--font-heading);
  font-size: var(--fs-2xl);
  color: var(--color-primary);
  display: block;
}

.stat-card .stat-label {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

/* =========================
   Forms
   ========================= */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  margin-bottom: var(--space-md);
}

.form-field.full { grid-column: 1 / -1; }

.form-field label {
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--color-text);
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 0.75em 0.9em;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(22, 73, 63, 0.15);
  outline: none;
}

.form-field textarea { resize: vertical; min-height: 110px; }

.form-field.checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-xs);
}

.form-field.checkbox input { margin-top: 4px; width: 18px; height: 18px; flex-shrink: 0; }
.form-field.checkbox label { font-weight: 400; font-size: var(--fs-sm); }

.field-error {
  color: var(--color-error);
  font-size: var(--fs-xs);
  min-height: 1em;
}

.form-field.invalid input,
.form-field.invalid select,
.form-field.invalid textarea {
  border-color: var(--color-error);
}

.form-note {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

/* =========================
   Footer
   ========================= */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.82);
  padding: var(--space-2xl) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-grid h4 {
  color: #fff;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
}

.footer-grid .logo { color: #fff; }
.footer-grid .logo span { color: var(--color-accent); }

.footer-links li,
.footer-contact li {
  margin-bottom: var(--space-xs);
  font-size: var(--fs-sm);
}

.footer-links a:hover { color: var(--color-accent); }

.social-icons {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.social-icons a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-base), border-color var(--transition-base);
}

.social-icons a:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.social-icons svg { width: 18px; height: 18px; fill: currentColor; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  font-size: var(--fs-xs);
}

.footer-bottom a:hover { color: var(--color-accent); }

/* =========================
   Modal
   ========================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  z-index: 1000;
}

.modal-overlay.is-open { display: flex; }

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #fff;
  font-size: var(--fs-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover { background: var(--color-surface); }

/* =========================
   Toast
   ========================= */
.toast-region {
  position: fixed;
  bottom: var(--space-md);
  right: var(--space-md);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  max-width: 340px;
}

.toast {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  color: #fff;
  box-shadow: var(--shadow-md);
  font-size: var(--fs-sm);
  animation: toast-in var(--transition-slow);
}

.toast--success { background: var(--color-success); }
.toast--error { background: var(--color-error); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================
   Gallery / Lightbox
   ========================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}

.gallery-item {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
  border: none;
  padding: 0;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-item:hover img { transform: scale(1.08); }

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 12, 10, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  padding: var(--space-md);
}

.lightbox-overlay.is-open { display: flex; }

.lightbox-content {
  position: relative;
  max-width: 900px;
  width: 100%;
}

.lightbox-content img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox-caption {
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  margin-top: var(--space-sm);
  font-size: var(--fs-sm);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-lg);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: var(--color-accent); }

.lightbox-close { top: -60px; right: 0; }
.lightbox-prev { left: -60px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: -60px; top: 50%; transform: translateY(-50%); }

/* =========================
   Misc components
   ========================= */
.back-to-top {
  position: fixed;
  bottom: var(--space-md);
  left: var(--space-md);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
  z-index: 800;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover { background: var(--color-primary-light); }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

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

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

table.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-md);
}

table.specs-table th,
table.specs-table td {
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--fs-sm);
}

table.specs-table th {
  background: var(--color-surface);
  color: var(--color-primary-dark);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin: var(--space-sm) 0;
}

.tag {
  background: var(--color-surface-alt);
  color: var(--color-primary-dark);
  padding: 0.3em 0.9em;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.map-embed {
  width: 100%;
  aspect-ratio: 16 / 8;
  border: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.attraction-list li {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--fs-sm);
}

.attraction-list li span:last-child {
  color: var(--color-accent-dark);
  font-weight: 700;
}

.legal-content h2 { margin-top: var(--space-xl); }
.legal-content { max-width: 780px; margin: 0 auto; }

/* =========================
   Responsive
   ========================= */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-md);
    gap: var(--space-md);
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-130%);
    opacity: 0;
    transition: transform var(--transition-base), opacity var(--transition-base);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }

  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .header-actions .btn--primary { width: 100%; }
  .hamburger { display: flex; }

  .two-col { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  h1 { font-size: var(--fs-2xl); }
  h2 { font-size: var(--fs-xl); }
  .lightbox-prev { left: var(--space-xs); }
  .lightbox-next { right: var(--space-xs); }
  .lightbox-close { top: var(--space-xs); right: var(--space-xs); }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr; }
  .hero { min-height: 78vh; }
}
