/* ============================================================
   MONTFRUT — Links Landing Page
   assets/css/styles.css
   ============================================================ */

/* ---- CSS Variables ---------------------------------------- */
:root {
  --almond-cream: #feeed5;
  --midnight-blue: #253245;
  --steel-teal: #586667;
  --coral-blush: #ffaa96;
  --fiery-coral: #f25850;
  --mint-aqua: #b5d9d7;
  --sea-glass: #68a19b;
  --desert-sand: #c1935b;
  --blood-crimson: #0d1e32;
  --vanilla-cream: #fceac6;

  --btn-border: rgba(193, 147, 91, 0.42);
  --btn-bg: linear-gradient(150deg, rgba(255, 253, 245, 0.88) 0%, rgba(254, 238, 213, 0.82) 100%);
  --btn-shadow: 0 4px 16px rgba(13, 30, 50, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.65);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Montserrat', system-ui, sans-serif;
  --font-accent: 'Lora', Georgia, serif;
}

/* ---- Reset & Base ----------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--blood-crimson);
  background-color: var(--vanilla-cream);
  background-image: url('../img/bg-mobile.png');
  background-image: image-set(url('../img/bg-mobile.webp') type('image/webp'), url('../img/bg-mobile.png') type('image/png'));
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow-x: hidden;
}

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

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

/* ---- Language Bar ----------------------------------------- */
.language-bar {
  position: relative;
  z-index: 200;
  display: flex;
  justify-content: flex-end;
  padding: .65rem 1.1rem;
  pointer-events: none;
}

.language-switch {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  min-height: 44px;
  max-width: 100%;
  padding: .38rem .8rem;
  border-radius: 999px;
  border: 1px solid rgba(193, 147, 91, 0.5);
  background: var(--blood-crimson);
  color: var(--vanilla-cream);
  font-family: var(--font-body);
  font-size: .8rem;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  transition: background .22s ease, border-color .22s ease;
}

.language-switch img {
  width: 18px;
  height: 13px;
  object-fit: cover;
  border-radius: 2px;
  display: inline-block;
  flex-shrink: 0;
}

.language-switch:hover {
  background: var(--midnight-blue);
  color: var(--vanilla-cream);
  border-color: rgba(193, 147, 91, 0.8);
}

/* ---- Page Wrapper ----------------------------------------- */
.page-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1.2rem 1rem 1.5rem;
}

/* ---- Main Card (fully transparent) ----------------------- */
.main-card {
  width: 100%;
  max-width: 400px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0 .5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* ---- Brand Header ----------------------------------------- */
.brand-title {
  display: flex;
  justify-content: center;
  margin: 0;
  font-size: inherit;
  line-height: 1;
}

.brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  padding-bottom: .5rem;
}

.brand-logo {
  width: min(65vw, 195px);
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(13, 30, 50, 0.22));
  margin-bottom: 1rem;
}

.brand-subtitle {
  font-family: var(--font-display);
  font-size: clamp(.98rem, 3.8vw, 1.22rem);
  font-weight: 600;
  color: var(--blood-crimson);
  line-height: 1.2;
  margin-bottom: .5rem;
}

/* ---- Ornament / Divider — coral ----------------------------- */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  margin-bottom: .7rem;
}

.ornament--bottom {
  margin-top: .7rem;
  margin-bottom: .6rem;
}

.ornament-line {
  flex: 1;
  max-width: 72px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--fiery-coral), transparent);
  display: block;
}

.ornament-heart {
  color: var(--fiery-coral);
  font-size: .7rem;
  flex-shrink: 0;
}

/* ---- Links Nav -------------------------------------------- */
.links-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  width: 100%;
}

/* ---- Link Buttons ----------------------------------------- */
.link-btn {
  display: grid;
  grid-template-columns: 42px 1fr 18px;
  align-items: center;
  gap: .7rem;
  padding: .48rem .75rem .48rem .52rem;
  width: 100%;
  max-width: 280px;
  min-height: 56px;
  border-radius: 10px;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  box-shadow: var(--btn-shadow);
  color: var(--blood-crimson);
  cursor: pointer;
  transform: translateZ(0);
  transition:
    transform .26s cubic-bezier(.34, 1.56, .64, 1),
    box-shadow .26s ease,
    border-color .26s ease;
  will-change: transform;
  position: relative;
  overflow: hidden;
}

.link-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(193, 147, 91, 0) 0%, rgba(193, 147, 91, 0.09) 100%);
  opacity: 0;
  transition: opacity .26s ease;
}

.link-btn:hover,
.link-btn:focus-visible {
  color: var(--blood-crimson);
  transform: translateY(-3px) scale(1.015);
  border-color: rgba(193, 147, 91, 0.80);
  box-shadow: 0 12px 28px rgba(13, 30, 50, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.link-btn:hover::before,
.link-btn:focus-visible::before {
  opacity: 1;
}

/* WhatsApp variant */
.link-btn--whatsapp {
  background: linear-gradient(150deg, rgba(13, 30, 50, 0.90) 0%, rgba(20, 42, 65, 0.93) 100%);
  border-color: rgba(37, 211, 102, 0.35);
  box-shadow: 0 4px 20px rgba(13, 30, 50, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--vanilla-cream);
}

.link-btn--whatsapp .btn-body strong {
  color: var(--vanilla-cream);
}

.link-btn--whatsapp .btn-body small {
  color: rgba(252, 234, 198, 0.65);
}

.link-btn--whatsapp .btn-arrow {
  color: #25D366;
}

.link-btn--whatsapp::before {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0) 0%, rgba(37, 211, 102, 0.10) 100%);
}

.link-btn--whatsapp:hover,
.link-btn--whatsapp:focus-visible {
  color: var(--vanilla-cream);
  border-color: rgba(37, 211, 102, 0.65);
  box-shadow: 0 12px 28px rgba(13, 30, 50, 0.40), 0 0 0 1px rgba(37, 211, 102, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ---- Button parts ----------------------------------------- */
.btn-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--blood-crimson);
  color: var(--desert-sand);
  font-size: 1.05rem;
  box-shadow: inset 0 0 0 1px rgba(193, 147, 91, 0.22), 0 3px 10px rgba(13, 30, 50, 0.22);
  transition: transform .26s ease;
}

.link-btn--whatsapp .btn-icon {
  background: rgba(37, 211, 102, 0.14);
  color: #25D366;
  border: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
  font-size: 1.45rem;
}

.link-btn:hover .btn-icon {
  transform: scale(1.08);
}

.btn-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .08rem;
}

.btn-body strong {
  display: block;
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  line-height: 1.35;
}

/* MOBILE: small descriptions hidden */
.btn-body small {
  display: none;
  font-family: var(--font-accent);
  font-size: .875rem;
  line-height: 1.35;
  color: rgba(13, 30, 50, 0.68);
  font-style: italic;
}

.btn-arrow {
  color: var(--desert-sand);
  font-size: .82rem;
  transition: transform .26s cubic-bezier(.34, 1.56, .64, 1);
  flex-shrink: 0;
}

.link-btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* ---- Social Row ------------------------------------------- */
.social-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  flex-wrap: wrap;
}

/* Dark icons keep their contrast on the cream buttons. */
.social-row a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--vanilla-cream);
  color: var(--blood-crimson);
  border: 1px solid rgba(193, 147, 91, 0.40);
  font-size: .95rem;
  transition:
    transform .22s ease,
    background .22s ease,
    color .22s ease,
    border-color .22s ease,
    box-shadow .22s ease;
}

/* Hover: coral with glow */
.social-row a:hover {
  transform: translateY(-3px) scale(1.12);
  background: var(--fiery-coral);
  color: #fff;
  border-color: var(--fiery-coral);
  box-shadow: 0 6px 18px rgba(242, 88, 80, 0.45);
}

/* Two-color keyboard focus remains distinct from light and dark backgrounds. */
.language-switch:focus-visible,
.link-btn:focus-visible,
.social-row a:focus-visible {
  outline: 3px solid var(--blood-crimson);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--vanilla-cream);
  transform: none;
  animation: none;
}

/* ---- Animations ------------------------------------------- */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.anim-entry {
  animation: fadeSlideUp .58s ease backwards;
}

/* ---- Tablet (>= 576px) ------------------------------------ */
@media (min-width: 576px) {
  body {
    background-image: url('../img/bg-tablet.png');
    background-image: image-set(url('../img/bg-tablet.webp') type('image/webp'), url('../img/bg-tablet.png') type('image/png'));
  }

  .page-wrap {
    padding: 2rem 1.5rem 2rem;
  }

  .main-card {
    max-width: 500px;
    padding: 0 1rem;
  }

  .brand-logo {
    width: min(48vw, 235px);
  }

  .brand-subtitle {
    font-size: clamp(1.12rem, 3vw, 1.4rem);
  }

  /* small stays hidden on tablet */
  .btn-body small {
    display: none;
  }

  .links-nav {
    gap: 1.1rem;
  }

  .link-btn {
    grid-template-columns: 48px 1fr 22px;
    min-height: 68px;
    max-width: 300px;
    padding: .6rem .9rem .6rem .62rem;
    border-radius: 11px;
    gap: .8rem;
  }

  .link-btn::before {
    border-radius: 11px;
  }

  .btn-icon {
    width: 46px;
    height: 46px;
    font-size: 1.12rem;
    border-radius: 9px;
  }

  .link-btn--whatsapp .btn-icon {
    font-size: 1.52rem;
  }

  .btn-body strong {
    font-size: .88rem;
  }

  .ornament-line {
    max-width: 90px;
  }
}

/* ---- Desktop (>= 992px) ----------------------------------- */
@media (min-width: 992px) {
  body {
    background-image: url('../img/bg-desktop2.png');
    background-image: image-set(url('../img/bg-desktop2.webp') type('image/webp'), url('../img/bg-desktop2.png') type('image/png'));
  }

  .page-wrap {
    padding: 2.5rem 2rem 2rem;
  }

  .main-card {
    max-width: 520px;
    padding: 0 1.2rem;
  }

  .brand-logo {
    width: min(32vw, 255px);
  }

  .brand-subtitle {
    font-size: clamp(1.22rem, 2.5vw, 1.5rem);
  }

  /* Reveal small descriptions only on desktop */
  .btn-body small {
    display: block;
    font-size: .875rem;
  }

  .links-nav {
    gap: 1.1rem;
  }

  .link-btn {
    grid-template-columns: 52px 1fr 24px;
    min-height: 72px;
    max-width: 460px;
    border-radius: 12px;
    gap: .88rem;
  }

  .link-btn::before {
    border-radius: 12px;
  }

  .btn-icon {
    width: 50px;
    height: 50px;
    font-size: 1.18rem;
    border-radius: 10px;
  }

  .link-btn--whatsapp .btn-icon {
    font-size: 1.58rem;
  }

  .btn-body strong {
    font-size: .88rem;
  }

  .ornament-line {
    max-width: 110px;
  }

  .social-row a {
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }
}

/* ---- Regional statistics notice and privacy link ----------- */
.analytics-privacy {
  width: 100%;
  margin: 0.85rem 0 0;
  padding-bottom: var(--analytics-notice-space, 0px);
  color: var(--blood-crimson);
  font-size: 0.875rem;
  text-align: center;
}
.analytics-consent {
  position: fixed;
  z-index: 1000;
  bottom: 1rem;
  right: 1rem;
  width: min(330px, calc(100% - 2rem));
  max-height: calc(50vh - 1rem);
  max-height: calc(50dvh - 1rem);
  overflow-y: auto;
  padding: 0.9rem;
  border: 1px solid rgba(193, 147, 91, 0.4);
  border-radius: 14px;
  background: var(--almond-cream);
  text-align: left;
  box-shadow: 0 3px 14px rgba(13, 30, 50, 0.09);
}
.analytics-consent h2 {
  font-family: var(--font-accent);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.analytics-consent p { margin-bottom: 0.5rem; }
.analytics-policy-link {
  display: inline-block;
  padding: 0.35rem 0;
  margin-bottom: 0.25rem;
  color: var(--blood-crimson);
  text-decoration: underline;
}
.analytics-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.analytics-button {
  flex: 1 1 7rem;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(37, 50, 69, 0.55);
  border-radius: 8px;
  background: var(--almond-cream);
  color: var(--blood-crimson);
  font: inherit;
  line-height: 1.5;
  cursor: pointer;
}
.analytics-settings {
  display: inline-block;
  padding: 0.3rem 0.45rem;
  color: var(--midnight-blue);
  font-size: 0.8125rem;
  line-height: 1.5;
  letter-spacing: 0.025em;
  text-underline-offset: 0.2em;
}
.analytics-settings:hover { color: var(--blood-crimson); text-decoration: underline; }
.analytics-button:hover { background: var(--vanilla-cream); }
.analytics-button:focus-visible,
.analytics-settings:focus-visible,
.analytics-policy-link:focus-visible {
  outline: 3px solid var(--blood-crimson);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--almond-cream);
}
.analytics-consent[hidden] { display: none; }
/* Reserve only the measured notice height when it overlaps the content column. */
html { scroll-padding-bottom: var(--analytics-notice-space, 0px); }

/* ---- Reduced motion --------------------------------------- */
@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .anim-entry,
  .link-btn,
  .link-btn .btn-icon,
  .link-btn .btn-arrow,
  .social-row a {
    transform: none !important;
  }
}
