/* Tre Gof Caravan Park: custom styles layered over Tailwind utilities.
   Colours: keep these variables in step with the palette in tailwind.config.js. */

:root {
  --forest: #1E3A2F;
  --forest-600: #2A4D3F;
  --sand: #F7F5F0;
  --sand-200: #ECE7DC;
  --sand-300: #DDD5C5;
  --ink: #1F2937;
  --amber: #B45309;
  --amber-text: #92400E; /* amber dark enough for small text on sand */
  --amber-soft: #E9B27C;
  --radius: 12px;
}

/* Metric-matched fallbacks: local Arial/Georgia sized like Inter/Lora so text doesn't jump when the web fonts arrive.
   Values measured from the fonts' advance widths and vertical metrics (Inter 400 vs Arial, Lora 600 vs Georgia Bold). */
@font-face {
  font-family: "Inter Fallback"; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Helvetica");
  size-adjust: 106.86%; ascent-override: 90.65%; descent-override: 22.57%; line-gap-override: 0%;
}
@font-face {
  font-family: "Lora Fallback"; src: local("Georgia"), local("Times New Roman");
  size-adjust: 92.73%; ascent-override: 108.48%; descent-override: 29.55%; line-gap-override: 0%;
}
:root { --serif: Lora, "Lora Fallback", Georgia, serif; }

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body { text-rendering: optimizeLegibility; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
strong, b { font-weight: 600; }
::selection { background: var(--amber-soft); color: var(--ink); }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }

/* Skip link */
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 60;
  background: var(--forest); color: var(--sand);
  padding: .6rem 1rem; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* Focus */
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
.contact :focus-visible, .site-footer :focus-visible { outline-color: var(--amber-soft); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgb(247 245 240 / .92);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid rgb(221 213 197 / .7);
}
.nav-link {
  align-items: center; min-height: 40px; padding: 0 .75rem; border-radius: 8px;
  font-size: .9375rem; font-weight: 500; color: var(--ink);
  transition: background-color .15s ease, color .15s ease;
}
.nav-link:hover { background: rgb(30 58 47 / .07); color: var(--forest); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 40px; padding: 0 1rem; border-radius: 8px;
  font-size: .875rem; font-weight: 600; line-height: 1; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.btn:active { transform: scale(.97); }
.btn-lg { min-height: 48px; padding: 0 1.35rem; font-size: 1rem; }
.btn-primary { background: var(--forest); color: var(--sand); }
.btn-primary:hover { background: var(--forest-600); }
.btn-ghost { background: transparent; color: var(--forest); border-color: rgb(30 58 47 / .3); }
.btn-ghost:hover { background: rgb(30 58 47 / .06); border-color: rgb(30 58 47 / .5); }
.btn-on-dark { background: transparent; color: var(--sand); border-color: rgb(247 245 240 / .4); display: inline-grid; }
.btn-on-dark:hover { background: rgb(247 245 240 / .08); border-color: rgb(247 245 240 / .7); }
.btn-on-dark[hidden] { display: none; }

/* Hero */
.status-line {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .875rem; font-weight: 500; color: var(--amber-text);
}
.status-dot {
  width: .5rem; height: .5rem; flex-shrink: 0; border-radius: 999px; background: var(--amber);
  box-shadow: 0 0 0 3px rgb(180 83 9 / .18);
}
.facts {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 2.25rem; padding-top: 1.25rem;
  border-top: 1px solid var(--sand-300);
  font-size: .9375rem; color: rgb(31 41 55 / .8);
}
.facts li { display: flex; align-items: center; gap: .5rem; }
.facts li::before {
  content: ""; width: 5px; height: 5px; flex-shrink: 0; border-radius: 999px; background: var(--amber);
}
@media (max-width: 639px) { .facts { flex-direction: column; } }
.facts strong { color: var(--forest); }

.hero-photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius);
  background: var(--sand-200);
}
@media (max-width: 1023px) { .hero-photo img { aspect-ratio: 4 / 3; } }
.hero-photo figcaption {
  margin-top: .6rem; font-size: .8125rem; color: rgb(31 41 55 / .7);
}

/* Sections */
.section { padding: 4.5rem 0; }
@media (min-width: 768px) { .section { padding: 6rem 0; } }
.section--tint { background: rgb(236 231 220 / .6); border-top: 1px solid var(--sand-300); }
.section-title {
  font-family: var(--serif); font-weight: 600; color: var(--forest);
  font-size: clamp(1.875rem, 1.4rem + 1.8vw, 2.5rem); line-height: 1.15; letter-spacing: -0.01em;
}
.prose-block { margin-top: 1.25rem; max-width: 36rem; display: grid; gap: 1rem; font-size: 1.0625rem; line-height: 1.65; color: rgb(31 41 55 / .85); }

/* The park */
.park-illustration svg { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--sand-300); }
.park-illustration figcaption { margin-top: .6rem; font-size: .8125rem; color: rgb(31 41 55 / .7); }

/* Around the island */
.places { display: grid; gap: 2rem 1.5rem; margin-top: 2.5rem; }
@media (min-width: 640px) { .places { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .places { grid-template-columns: repeat(3, 1fr); } }
.place img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); background: var(--sand-200); }
.place h3 { margin-top: 1rem; font-family: var(--serif); font-weight: 600; font-size: 1.25rem; color: var(--forest); }
.place p { margin-top: .4rem; font-size: .9375rem; line-height: 1.6; color: rgb(31 41 55 / .8); }

/* Find us */
.text-link {
  font-weight: 600; color: var(--forest);
  text-decoration: underline; text-decoration-color: rgb(30 58 47 / .35);
  text-underline-offset: 4px; text-decoration-thickness: 1.5px;
  transition: text-decoration-color .15s ease;
}
.text-link:hover { text-decoration-color: var(--forest); }
.map-frame {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 3; min-height: 280px;
  border: 1px solid var(--sand-300); border-radius: var(--radius); background: var(--sand-200);
}
.map-placeholder { position: absolute; inset: 0; display: grid; place-items: end center; padding: 1.5rem 1.5rem 1.75rem; }
.map-placeholder__art { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--forest); opacity: .5; }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Contact */
.contact { background: var(--forest); color: var(--sand); padding: 5rem 0; }
@media (min-width: 768px) { .contact { padding: 6.5rem 0; } }
.contact__title {
  font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em;
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem); line-height: 1.1;
}
.contact__lead { margin-top: 1rem; max-width: 36rem; font-size: 1.0625rem; line-height: 1.65; color: rgb(247 245 240 / .85); }
.contact__actions { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.email-link {
  font-family: var(--serif); font-weight: 500; color: #FBF4E8;
  font-size: clamp(1.625rem, 1.1rem + 2.6vw, 2.75rem); line-height: 1.2;
  overflow-wrap: anywhere;
  text-decoration: underline; text-decoration-color: rgb(233 178 124 / .6);
  text-decoration-thickness: 2px; text-underline-offset: 6px;
  transition: text-decoration-color .15s ease;
}
.email-link:hover { text-decoration-color: var(--amber-soft); }
#copy-email > span { grid-area: 1 / 1; transition: opacity .15s ease; }
#copy-email .copy-done { opacity: 0; }
#copy-email.is-copied .copy-label { opacity: 0; }
#copy-email.is-copied .copy-done { opacity: 1; }

/* Footer */
.site-footer { background: #17302A; color: var(--sand); border-top: 1px solid rgb(247 245 240 / .08); }
.footer-link {
  display: inline-flex; align-items: center; min-height: 40px;
  color: var(--sand); text-decoration: underline; text-decoration-color: rgb(247 245 240 / .35);
  text-underline-offset: 4px; background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  transition: text-decoration-color .15s ease;
}
.footer-link:hover { text-decoration-color: var(--amber-soft); }
.credits { margin-top: 1.5rem; font-size: .8125rem; color: rgb(247 245 240 / .75); }
.credits summary { cursor: pointer; min-height: 40px; display: inline-flex; align-items: center; gap: .4rem; color: rgb(247 245 240 / .85); list-style: none; }
.credits summary::-webkit-details-marker { display: none; }
.credits summary::after { content: "+"; font-size: 1rem; line-height: 1; color: var(--amber-soft); }
.credits[open] summary::after { content: "\2212"; }
.credits p { margin-top: .25rem; }
.credits ul { margin-top: .5rem; display: grid; gap: .25rem; }
.credits a { color: var(--sand); text-decoration: underline; text-decoration-color: rgb(247 245 240 / .35); text-underline-offset: 2px; }

/* Privacy dialog */
.privacy-dialog {
  width: min(40rem, calc(100vw - 2rem)); max-height: calc(100vh - 3rem);
  padding: 1.5rem; border: 1px solid var(--sand-300); border-radius: 14px;
  background: var(--sand); color: var(--ink);
  box-shadow: 0 24px 60px -20px rgb(0 0 0 / .45);
}
.privacy-dialog::backdrop { background: rgb(20 30 25 / .55); }
.privacy-dialog[open] { animation: rise .2s ease-out both; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 8px; color: var(--forest); background: transparent; border: 0; cursor: pointer;
}
.icon-btn:hover { background: rgb(30 58 47 / .08); }
.icon-btn svg { width: 20px; height: 20px; }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .privacy-dialog[open] { animation: none; }
  .btn:active { transform: none; }
}
