/* Base reset -------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: "Space Mono", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #221c16;
  background-color: #f5f1eb;
  background-image: url("./Images/Palmarina%20Background.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='64' height='64' style='font-size: 48px;'><text y='48'>🌴</text></svg>") 16 16, auto;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Layout ------------------------------------------------------------------ */

.page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 0, rgba(255, 255, 255, 0.2), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(210, 176, 138, 0.16), transparent 60%);
}

.page.is-ready {
  opacity: 1;
  transform: translateY(0);
}

.page-spacer {
  display: none;
}

.panel {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.card {
  position: relative;
  max-width: 420px;
  width: min(100%, 420px);
  padding: clamp(2.6rem, 5.4vw, 3.4rem) clamp(3.2rem, 7vw, 4.8rem);
  border-radius: 28px;
  background: linear-gradient(
      135deg,
      rgba(252, 246, 239, 0.96),
      rgba(244, 234, 223, 0.98)
    );
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-align: center;
  min-height: 260px;
}

.card-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  padding-inline: clamp(1.2rem, 3vw, 1.6rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
}

.wordmark {
  margin: 0;
  font-family: "Playfair Display", "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0.35em;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  text-transform: uppercase;
}

.tagline {
  margin: 0;
  font-size: 0.86rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 400;
}

.trademark {
  font-size: 0.65em;
  vertical-align: super;
  margin-left: 0.08em;
}

.coordinates-block {
  margin-top: 2.5rem;
}

.coordinates {
  margin: 0 auto;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(151, 129, 107, 0.4);
  background-color: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  color: inherit;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.coordinates:active {
  background-color: rgba(255, 255, 255, 0.9);
}

.copy-feedback {
  margin: 0.6rem 0 0;
  font-size: 0.7rem;
  text-transform: none;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 200ms ease-out;
}

.copy-feedback.is-visible {
  opacity: 0.8;
}

/* Desktop layout ---------------------------------------------------------- */

@media (min-width: 900px) {
  .page {
    flex-direction: row;
    align-items: center;
    padding: 2.75rem 3.5rem;
  }

  .page-spacer {
    display: block;
    flex: 1 1 50%;
  }

  .panel {
    flex: 0 0 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .card {
    max-width: 520px;
    width: 100%;
    padding-block: clamp(3.1rem, 4.8vw, 3.7rem);
    min-height: 300px;
  }
}

/* Very small devices tweaks ----------------------------------------------- */

@media (max-width: 360px) {
  .content-panel {
    padding-inline: 1.25rem;
  }

  .coordinates {
    letter-spacing: 0.12em;
    font-size: 0.72rem;
  }
}

/* -------------------------------------------------------------------------- */
/* Lovable layout: full-screen background + right-side centered content       */
/* -------------------------------------------------------------------------- */

:root {
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-mono: "Space Mono", monospace;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 0.9;
  font-size: clamp(2rem, 7vw, 5.5rem);
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(245, 241, 235, 0.5);
  margin: 0;
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 1.4vw, 0.85rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0;
}

.coordinates {
  font-family: var(--font-mono);
  font-size: clamp(0.58rem, 1.2vw, 0.7rem);
  letter-spacing: 0.13em;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  white-space: nowrap;
  max-width: 100%;
  overflow-x: auto;
  text-align: center;
  -webkit-overflow-scrolling: touch;
  margin-top: clamp(0.25rem, 0.6vw, 0.5rem);
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' style='font-size: 24px;'><text y='24'>🥥</text></svg>") 8 8, pointer;
}

.coordinates:hover {
  opacity: 1;
}

.fullscreen-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.fullscreen-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.fullscreen-content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.content-container {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(76vw, 720px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(0.5rem, 1.2vw, 0.9rem);
  padding: clamp(1.4rem, 3.5vw, 3.1rem) clamp(1.2rem, 3.2vw, 3.4rem);
  background-color: hsla(35, 30%, 96%, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 2px;
  box-shadow: 0 4px 30px hsla(25, 15%, 15%, 0.05);
}

@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
  .content-container {
    background: linear-gradient(
      135deg,
      hsla(35, 30%, 96%, 0.72) 0%,
      hsla(35, 25%, 94%, 0.55) 100%
    );
  }
}

/* Tablet and smaller desktop */
@media (max-width: 1024px) and (min-width: 769px) {
  .content-container {
    width: min(85vw, 680px);
    padding: clamp(1.8rem, 4vw, 2.8rem) clamp(1.6rem, 3.8vw, 3rem);
  }
}

/* Mobile landscape and small tablets */
@media (max-width: 768px) {
  .content-container {
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(88vw, 500px);
    padding: clamp(1.5rem, 4.5vw, 2.5rem) clamp(1.3rem, 4vw, 2.3rem);
  }
}

/* Small phones (iPhone SE, small Android) */
@media (max-width: 480px) {
  .content-container {
    width: min(90vw, 420px);
    padding: clamp(1rem, 4.5vw, 1.8rem) clamp(0.8rem, 4vw, 1.5rem);
    gap: clamp(0.3rem, 0.9vw, 0.6rem);
  }
}

/* Very small phones */
@media (max-width: 360px) {
  .content-container {
    width: min(88vw, 340px);
    padding: clamp(0.8rem, 5vw, 1.5rem) clamp(0.7rem, 4.5vw, 1.3rem);
    gap: clamp(0.25rem, 0.8vw, 0.5rem);
  }
}

/* Mobile landscape orientation */
@media (max-width: 768px) and (orientation: landscape) {
  .content-container {
    width: min(75vw, 600px);
    padding: clamp(1.3rem, 3.5vw, 2.2rem) clamp(1.2rem, 3.2vw, 2rem);
  }
}

/* Small mobile landscape */
@media (max-width: 480px) and (orientation: landscape) {
  .content-container {
    width: min(80vw, 500px);
    padding: clamp(1.1rem, 4vw, 1.8rem) clamp(1rem, 3.8vw, 1.7rem);
  }
}

/* Typography adjustments for small phones */
@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(1.8rem, 7.5vw, 2.5rem);
    line-height: 0.95;
    letter-spacing: 0.12em;
  }

  .hero-subtitle {
    font-size: clamp(0.55rem, 1.8vw, 0.75rem);
    letter-spacing: 0.18em;
  }

  .coordinates {
    font-size: clamp(0.45rem, 1.6vw, 0.6rem);
    letter-spacing: 0.1em;
    padding: clamp(0.45rem, 1.3vw, 0.6rem) clamp(0.8rem, 2.5vw, 1.2rem);
    white-space: normal;
    word-break: break-all;
    line-height: 1.3;
  }
}

/* Typography adjustments for very small phones */
@media (max-width: 360px) {
  .hero-title {
    font-size: clamp(1.5rem, 8vw, 2.2rem);
    letter-spacing: 0.1em;
  }

  .hero-subtitle {
    font-size: clamp(0.5rem, 2vw, 0.7rem);
    letter-spacing: 0.16em;
  }

  .coordinates {
    font-size: clamp(0.4rem, 1.7vw, 0.55rem);
    padding: clamp(0.4rem, 1.2vw, 0.55rem) clamp(0.7rem, 2.3vw, 1.1rem);
    white-space: normal;
    word-break: break-all;
    line-height: 1.3;
  }
}

.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  z-index: 1000;
}

.corner-detail {
  position: absolute;
  bottom: clamp(0.8rem, 3vw, 1.5rem);
  right: clamp(0.8rem, 3vw, 1.5rem);
  font-family: var(--font-mono);
  font-size: clamp(0.45rem, 1.8vw, 0.6rem);
  letter-spacing: clamp(0.18em, 1vw, 0.25em);
  text-transform: uppercase;
  opacity: 0.5;
}

.copy-feedback {
  margin-top: 0.4rem;
  font-size: 0.7rem;
}

/* Animations --------------------------------------------------------------- */

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes reveal-title {
  from {
    opacity: 0;
    letter-spacing: 0.3em;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    letter-spacing: 0.15em;
    transform: translateY(0);
  }
}

@keyframes subtle-zoom {
  from {
    transform: scale(1.08);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.animate-fade-in-up {
  animation: fade-in-up 1.2s var(--ease-out-expo) forwards;
}

.animate-fade-in {
  animation: fade-in 1.5s ease forwards;
}

.animate-reveal-title {
  animation: reveal-title 1.8s var(--ease-out-expo) forwards;
}

.animate-subtle-zoom {
  animation: subtle-zoom 2s var(--ease-out-expo) forwards;
}

.delay-500 {
  animation-delay: 500ms;
}

.delay-1000 {
  animation-delay: 1000ms;
}

/* Ultra small phones (320px and below) */
@media (max-width: 320px) {
  .content-container {
    width: min(86vw, 300px);
    padding: clamp(0.7rem, 4.5vw, 1.3rem) clamp(0.6rem, 4vw, 1.1rem);
    gap: clamp(0.2rem, 0.7vw, 0.4rem);
  }

  .hero-title {
    font-size: clamp(1.3rem, 7.5vw, 1.9rem);
    letter-spacing: 0.08em;
  }

  .hero-subtitle {
    font-size: clamp(0.45rem, 1.8vw, 0.65rem);
    letter-spacing: 0.14em;
  }

  .coordinates {
    font-size: clamp(0.35rem, 1.5vw, 0.5rem);
    padding: clamp(0.35rem, 1.1vw, 0.5rem) clamp(0.6rem, 2vw, 1rem);
  }
}

/* Map Modal ---------------------------------------------------------------- */

.map-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.map-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.map-modal-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.map-modal-content {
  position: relative;
  width: min(90vw, 900px);
  height: min(80vh, 600px);
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s var(--ease-out-expo);
}

.map-modal.is-visible .map-modal-content {
  transform: scale(1);
}

.map-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #221c16;
  font-size: 2rem;
  line-height: 1;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' style='font-size: 24px;'><text y='24'>🥥</text></svg>") 8 8, pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.map-modal-close:hover {
  background: white;
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.map-modal-close:active {
  transform: scale(0.95);
}

.map-container {
  width: 100%;
  height: 100%;
}

.map-container iframe {
  display: block;
}

/* Mobile adjustments for map modal */
@media (max-width: 768px) {
  .map-modal-content {
    width: 90vw;
    height: 70vh;
    border-radius: 8px;
  }

  .map-modal-close {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.8rem;
    top: 0.75rem;
    right: 0.75rem;
  }
}

@media (max-width: 480px) {
  .map-modal-content {
    width: 90vw;
    height: 65vh;
    border-radius: 8px;
  }

  .map-modal-close {
    width: 2rem;
    height: 2rem;
    font-size: 1.6rem;
    top: 0.5rem;
    right: 0.5rem;
  }
}

