/* Same palette and type as the guest app (guest-app/public/css/style.css),
   so diria.world and my.diria.world read as one brand. */
:root {
  --ivory: #FAF7F0;
  --pearl: #FFFDF8;
  --sand: #E8DDCB;
  --linen: #F1E9DC;
  --champagne: #D7C49A;
  --gold: #C8A24A;
  --gold-deep: #A9852F;
  --stone: #B8AE9E;
  --sea: #6F9698;
  --palm: #8E9B7A;
  --charcoal: #25231F;
  --muted: #6B655A;

  --font-display: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', serif;
  --font-ui: -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --gutter: 20px;
  --max: 1080px;
}

/* Bilingual markup: every text exists as lang="en" and lang="es"; only the
   active one is shown. Without JS the page stays English. */
html[data-lang="en"] [lang="es"]:not(html),
html[data-lang="es"] [lang="en"]:not(html) { display: none !important; }

* { box-sizing: border-box; }
/* `hidden` must win over component display rules (.chip-list is flex). */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: normal; line-height: 1.15; margin: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(250, 247, 240, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--linen);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.wordmark { text-decoration: none; display: flex; align-items: baseline; gap: 8px; }
.wordmark-main { font-family: var(--font-display); font-size: 1.45rem; letter-spacing: 0.32em; color: var(--charcoal); }
.wordmark-sub { font-size: 0.68rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-deep); }
.header-actions { display: flex; align-items: center; gap: 10px; }

.lang-switch { display: inline-flex; border: 1px solid var(--sand); border-radius: var(--radius-pill); overflow: hidden; }
.lang-switch button {
  border: 0; background: transparent; font: inherit; font-size: 0.75rem; letter-spacing: 0.08em;
  padding: 6px 11px; cursor: pointer; color: var(--muted);
}
.lang-switch button[aria-pressed="true"] { background: var(--charcoal); color: var(--pearl); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--radius-pill);
  text-decoration: none; font-size: 0.92rem; letter-spacing: 0.04em;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-gold { background: var(--gold); color: var(--charcoal); }
.btn-gold:hover { background: var(--champagne); }
.btn-line { border: 1px solid var(--charcoal); color: var(--charcoal); }
.btn-line:hover { background: var(--charcoal); color: var(--pearl); }
.btn-small { padding: 8px 16px; font-size: 0.8rem; }
.btn-light { border: 1px solid var(--champagne); color: var(--pearl); }
.btn-light:hover { background: var(--pearl); color: var(--charcoal); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 88px 0 96px;
  background:
    radial-gradient(120% 70% at 50% 115%, rgba(111, 150, 152, 0.28), transparent 60%),
    radial-gradient(90% 60% at 85% -10%, rgba(215, 196, 154, 0.45), transparent 60%),
    var(--ivory);
}
.hero::after {
  /* horizon line: sea meets sand */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: linear-gradient(90deg, var(--sea), var(--champagne), var(--palm));
  opacity: 0.55;
}
.eyebrow { font-size: 0.74rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold-deep); margin: 0 0 18px; }
.hero h1 { font-size: clamp(2.3rem, 7vw, 4.4rem); max-width: 18ch; }
.hero h1 em { font-style: italic; color: var(--gold-deep); }
.hero-lead { font-size: 1.12rem; color: var(--muted); max-width: 40ch; margin: 22px 0 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- sections ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--pearl); border-top: 1px solid var(--linen); border-bottom: 1px solid var(--linen); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.8rem, 4.4vw, 2.6rem); }
.section-head p { color: var(--muted); margin: 14px 0 0; }
.kicker { font-size: 0.72rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--sea); margin: 0 0 10px; }

/* today in tamarindo (weather & tides), just before the map */
.today { background: var(--pearl); border-top: 1px solid var(--linen); padding: 56px 0 48px; }
.today-head { margin-bottom: 16px; }
.today-head .kicker { margin: 0; }
.today-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.today-tile { background: var(--ivory); border: 1px solid var(--linen); border-radius: var(--radius); padding: 14px 16px; }
.today-label { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.today-value { font-family: var(--font-display); font-size: 1.55rem; line-height: 1.2; margin-top: 4px; }
.today-sub { font-size: 0.82rem; color: var(--muted); }
.today-tile--weather .today-value { font-size: 1.9rem; }
.today-icon { margin-right: 6px; }

.tide-card { margin-top: 12px; background: var(--ivory); border: 1px solid var(--linen); border-radius: var(--radius); padding: 14px 16px 8px; }
.tide-chart { display: block; width: 100%; height: auto; margin-top: 6px; }
.tide-grid { stroke: var(--sand); stroke-width: 1; }
.tide-axis { fill: var(--stone); font-size: 11px; }
.tide-area { fill: var(--sea); fill-opacity: 0.16; }
.tide-line { fill: none; stroke: var(--sea); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.tide-dot { fill: var(--gold); stroke: var(--pearl); stroke-width: 2; }
.tide-label { fill: var(--charcoal); font-size: 12px; font-weight: 700; font-family: var(--font-ui); }
.tide-now-line { stroke: var(--charcoal); stroke-width: 1.2; stroke-dasharray: 4 4; }
.tide-now-dot { fill: var(--charcoal); stroke: var(--pearl); stroke-width: 2; }

/* properties */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.logo-card {
  background: #fff; border: 1px solid var(--linen); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 3 / 2; padding: 22px;
}
.logo-card img { max-height: 100%; width: auto; object-fit: contain; }

/* restaurants-only map (iframe of the guest app's #/dining) */
.dining-frame {
  position: relative; margin-top: 28px; height: 460px;
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--linen); background: var(--linen);
}
.dining-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* phones: the map switches to two logo columns (diningMap.js) and needs height */
@media (max-width: 520px) { .dining-frame { height: 540px; } }


/* restaurant dialog (native <dialog>, js/restaurants.js) */
.restaurant-dialog {
  width: min(560px, calc(100% - 32px)); max-height: 86vh; padding: 0; border: 0;
  border-radius: var(--radius-lg); background: var(--pearl); color: var(--charcoal);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3); overflow: hidden;
}
/* the body scrolls, the close button stays put in the dialog's corner */
#restaurantDialogBody { max-height: 86vh; overflow: auto; }
.restaurant-dialog::backdrop { background: rgba(37, 35, 31, 0.55); }
.dialog-close {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--sand);
  background: var(--pearl); font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--charcoal);
}
.dialog-logo { background: #fff; border-bottom: 1px solid var(--linen); padding: 34px 48px; display: flex; justify-content: center; }
.dialog-logo img { max-height: 150px; width: auto; object-fit: contain; }
.dialog-content { padding: 24px 26px 28px; }
.dialog-content h3 { font-size: 1.7rem; }
.dialog-cuisine { color: var(--gold-deep); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; margin: 6px 0 0; }
.dialog-body { color: #3f3b34; margin-top: 16px; }
.dialog-body p { margin: 0 0 12px; }
.dialog-body ul { margin: 0 0 12px; padding-left: 20px; }
.dialog-address { font-size: 0.86rem; color: var(--muted); border-top: 1px solid var(--linen); padding-top: 14px; margin-top: 8px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.dialog-actions .btn { flex: 1 1 180px; }
.dialog-status { padding: 60px 26px; text-align: center; color: var(--muted); }

/* restaurants */
.chip-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chip-list li {
  border: 1px solid var(--sand); border-radius: var(--radius-pill);
  padding: 9px 18px; font-family: var(--font-display); font-size: 1.02rem; background: var(--ivory);
}
.chip-list li.chip-accent { border-color: var(--champagne); background: var(--linen); }

/* experiences */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.card {
  background: var(--pearl); border: 1px solid var(--linen); border-radius: var(--radius-lg);
  padding: 26px 24px;
}
.card-icon { font-size: 1.6rem; line-height: 1; margin-bottom: 14px; }
.card h3 { font-size: 1.32rem; margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: 0.95rem; }
.card .note { display: inline-block; margin-top: 12px; font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-deep); }

/* club band */
.club { background: var(--charcoal); color: var(--pearl); padding: 88px 0; }
.club .kicker { color: var(--champagne); }
.club h2 { font-size: clamp(1.9rem, 4.6vw, 2.8rem); }
.club-grid { display: grid; gap: 40px; align-items: center; grid-template-columns: 1fr; }
.club-copy p { color: var(--stone); max-width: 46ch; }
.club-card {
  /* CR80 proportions, like the printed Club card */
  aspect-ratio: 85.6 / 54; max-width: 380px; width: 100%; justify-self: center;
  border-radius: 18px; padding: 22px 24px;
  background: linear-gradient(135deg, #2f2b25 0%, #3a342b 45%, #5a4a2a 100%);
  border: 1px solid rgba(215, 196, 154, 0.45);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  display: flex; flex-direction: column; justify-content: space-between;
}
.club-card-top { display: flex; justify-content: space-between; align-items: baseline; }
.club-card-name { font-family: var(--font-display); letter-spacing: 0.3em; font-size: 1.1rem; color: var(--champagne); }
.club-card-tier { font-size: 0.66rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--stone); }
.club-card-qr {
  width: 58px; height: 58px; border-radius: 8px; align-self: flex-end;
  background:
    linear-gradient(90deg, var(--charcoal) 50%, transparent 0) 0 0 / 12px 12px,
    linear-gradient(var(--charcoal) 50%, transparent 0) 0 0 / 12px 12px,
    var(--pearl);
  opacity: 0.9;
}
.ranks { list-style: none; padding: 0; margin: 26px 0 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.ranks li {
  font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase;
  border: 1px solid rgba(215, 196, 154, 0.5); color: var(--champagne);
  padding: 6px 12px; border-radius: var(--radius-pill);
}
.club-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* live tamarindo */
.live { text-align: center; }
.live .section-head { margin: 0 auto 30px; }
.live-rule { width: 64px; height: 1px; background: var(--gold); margin: 0 auto 26px; border: 0; }

/* embedded guest-app map */
.map-frame {
  position: relative; width: 100%; height: 75vh; min-height: 440px; max-height: 820px;
  border-top: 1px solid var(--linen); border-bottom: 1px solid var(--linen);
  background: var(--linen);
}
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-more { margin: 24px 0 0; text-align: center; }

/* footer */
.site-footer { border-top: 1px solid var(--linen); padding: 34px 0 44px; font-size: 0.85rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--charcoal); text-decoration: underline; }

/* privacy page */
.legal { padding: 56px 0 80px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 8px; }
.legal h2 { font-size: 1.35rem; margin: 36px 0 10px; }
.legal p, .legal li { color: #3f3b34; }
.legal .updated { color: var(--muted); font-size: 0.85rem; margin: 0 0 30px; }
.todo { background: #fff3cd; padding: 0 4px; border-radius: 4px; }

@media (min-width: 820px) {
  .club-grid { grid-template-columns: 1.2fr 1fr; }
  .hero { padding: 120px 0 128px; }
  .section { padding: 104px 0; }
}

@media (max-width: 520px) {
  .wordmark-main { font-size: 1.3rem; letter-spacing: 0.28em; }
  .wordmark-sub { font-size: 0.62rem; letter-spacing: 0.2em; }
  .header-cta { display: none; }
  .logo-grid { grid-template-columns: 1fr 1fr; }
  .logo-card { padding: 14px; }
  .hero-actions .btn, .club-actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
