/* ============================================================
   La Riviera di Ulisse — Stile editoriale / cartografia nautica
   Ispirato a: approdo.pages.dev
   ============================================================ */

/* ── Reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; color-scheme: light only; }

body {
  font-family: var(--rp-font-body);
  font-size: 16px;
  color: var(--rp-ink);
  background: var(--rp-sabbia);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--rp-oro); text-decoration: none; transition: color .2s; }
a:hover { color: var(--rp-oro-lt); }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--rp-font-display);
  font-weight: 700;
  line-height: 1.1;
  color: var(--rp-ink);
}


/* ============================================================
   NAV — barra scura editoriale
   ============================================================ */
.rp-nav {
  background: var(--rp-nav-bg);
  border-bottom: 2px solid var(--rp-oro);
  padding: 0 32px;
  display: flex;
  align-items: center;
  height: 58px;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.rp-nav__logo {
  font-family: var(--rp-font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--rp-sabbia);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.rp-nav__logo:hover { color: var(--rp-oro-lt); }
.rp-nav__logo img { width: 30px; height: 30px; }
.rp-nav__links {
  display: flex;
  gap: 8px;
  flex: 1;
}
.rp-nav__link {
  font-family: var(--rp-font-ui);
  font-size: 11px;
  font-weight: 600;
  color: var(--rp-nav-text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .16em;
  padding: 6px 12px;
  transition: color .2s, background .2s;
}
.rp-nav__link:hover {
  color: var(--rp-oro-lt);
  background: rgba(156, 123, 43, .12);
}
.rp-nav__link--active {
  color: var(--rp-oro-lt);
}
.rp-nav__cta {
  font-family: var(--rp-font-ui);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .16em;
  background: var(--rp-oro);
  color: var(--rp-ink);
  padding: 8px 20px;
  text-decoration: none;
  flex-shrink: 0;
  border: none;
  transition: background .2s;
}
.rp-nav__cta:hover { background: var(--rp-oro-lt); color: var(--rp-ink); }

.rp-nav__hamburger {
  display: none;
  background: transparent;
  border: 0;
  width: 44px; height: 44px;
  color: var(--rp-sabbia);
  margin-left: auto;
  align-items: center;
  justify-content: center;
  z-index: 1010;
  position: relative;
}
.rp-nav__hamburger * { pointer-events: none; }

@media (max-width: 900px) {
  .rp-nav { padding: 0 16px; gap: 12px; }
  .rp-nav__hamburger { display: inline-flex; }
  .rp-nav__links, .rp-nav__cta { display: none; }
  .rp-nav__links {
    position: absolute;
    top: 58px; left: 0; right: 0;
    background: var(--rp-ink);
    flex-direction: column;
    padding: 8px 0;
    gap: 0;
    border-top: 1px solid rgba(240,230,200,.08);
    z-index: 1005;
  }
  .rp-nav__links.is-open { display: flex !important; }
  .rp-nav__link {
    padding: 16px 24px !important;
    font-size: 12px;
    border-bottom: 1px solid rgba(240,230,200,.06);
  }
}


/* ============================================================
   BOTTOM BAR (mobile)
   ============================================================ */
.rp-bottom-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--rp-sabbia);
  border-top: 1px solid var(--rp-nebbia-lt);
  display: flex;
  align-items: flex-end;
  padding: 6px 0 max(env(safe-area-inset-bottom), 10px);
  height: calc(var(--rp-bottom-bar-height) + env(safe-area-inset-bottom, 0px));
}
.rp-bottom-bar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: var(--rp-nebbia);
  -webkit-tap-highlight-color: transparent;
  transition: color .2s;
}
.rp-bottom-bar__icon { line-height: 1; display: flex; align-items: center; justify-content: center; }
.rp-bottom-bar__icon svg {
  width: 20px; height: 20px;
  stroke: currentColor; fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.rp-bottom-bar__label {
  font-family: var(--rp-font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.rp-bottom-bar__item--active { color: var(--rp-oro); }
.rp-bottom-bar__item--active .rp-bottom-bar__label { font-weight: 500; }

@media (max-width: 900px) {
  #main { padding-bottom: calc(var(--rp-bottom-bar-height) + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 901px) {
  .rp-bottom-bar { display: none; }
}


/* ============================================================
   FOOTER — editoriale scuro
   ============================================================ */
.rp-footer-stripe { display: flex; height: 3px; }
.rp-footer-stripe > span:nth-child(1) { flex:1; background: var(--rp-footer-verde); }
.rp-footer-stripe > span:nth-child(2) { flex:1; background: var(--rp-footer-bianco); }
.rp-footer-stripe > span:nth-child(3) { flex:1; background: var(--rp-footer-rosso); }

.rp-footer {
  background: var(--rp-footer-bg);
  border-top: 3px solid var(--rp-oro);
  padding: 48px 32px 32px;
  color: rgba(240, 230, 200, .55);
  font-family: var(--rp-font-body);
  font-size: 13px;
  line-height: 1.8;
}
.rp-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 768px) {
  .rp-footer__grid { grid-template-columns: 1fr; gap: 28px; }
}
.rp-footer__brand {
  font-family: var(--rp-font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--rp-sabbia);
  display: block;
  margin-bottom: 8px;
}
.rp-footer strong {
  font-family: var(--rp-font-ui);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--rp-oro-lt);
  display: block;
  margin-bottom: 12px;
}
.rp-footer a {
  color: rgba(240, 230, 200, .55);
  transition: color .2s;
}
.rp-footer a:hover { color: var(--rp-oro-lt); text-decoration: none; }
.rp-footer__legal {
  font-family: var(--rp-font-mono);
  font-size: 9px;
  letter-spacing: .04em;
  color: rgba(240, 230, 200, .25);
  border-top: 1px solid rgba(240, 230, 200, .08);
  padding-top: 20px;
  max-width: 1200px;
  margin: 0 auto;
}


/* ============================================================
   HERO
   ============================================================ */
.rp-hero {
  background: var(--rp-ink);
  padding: clamp(64px, 10vw, 120px) 32px clamp(56px, 8vw, 100px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.rp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(156,123,43,.08) 0%, transparent 70%);
  pointer-events: none;
}
.rp-hero__eyebrow {
  font-family: var(--rp-font-mono);
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--rp-oro-lt);
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
}
.rp-hero__eyebrow::before {
  content: '';
  position: absolute;
  left: -40px;
  top: 50%;
  width: 32px;
  height: 1px;
  background: var(--rp-oro);
}
.rp-hero__title {
  font-family: var(--rp-font-display);
  font-size: clamp(36px, 7vw, 72px);
  font-weight: 700;
  color: var(--rp-sabbia);
  letter-spacing: -0.02em;
  line-height: 1.06;
  margin-bottom: 12px;
}
.rp-hero__tagline {
  font-family: var(--rp-font-body);
  font-size: clamp(16px, 2.5vw, 20px);
  color: rgba(240, 230, 200, .55);
  font-style: italic;
  margin-bottom: 20px;
}
.rp-hero__sub {
  font-family: var(--rp-font-body);
  font-size: 15px;
  color: rgba(240, 230, 200, .45);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.rp-hero__ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }


/* ============================================================
   BUTTONS — editoriali, sharp
   ============================================================ */
.rp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--rp-font-ui);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .2em;
  padding: 12px 28px;
  text-decoration: none;
  text-align: center;
  transition: background .2s, color .2s, border-color .2s;
  border: none;
  cursor: pointer;
}
.rp-btn--primary {
  background: var(--rp-oro);
  color: var(--rp-ink);
}
.rp-btn--primary:hover { background: var(--rp-oro-lt); color: var(--rp-ink); }
.rp-btn--outline {
  background: transparent;
  color: rgba(240, 230, 200, .7);
  border: 1px solid rgba(156, 123, 43, .4);
}
.rp-btn--outline:hover {
  color: var(--rp-oro-lt);
  border-color: var(--rp-oro-lt);
}
.rp-btn--cta {
  background: var(--rp-tramonto);
  color: var(--rp-sabbia);
}
.rp-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }


/* ============================================================
   SECTIONS
   ============================================================ */
.rp-section {
  padding: clamp(48px, 7vw, 72px) 32px;
  max-width: 1200px;
  margin: 0 auto;
}
.rp-section__eyebrow {
  font-family: var(--rp-font-mono);
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--rp-oro);
  margin-bottom: 8px;
}
.rp-section__title {
  font-family: var(--rp-font-display);
  font-weight: 700;
  font-size: clamp(24px, 3.5vw, 32px);
  color: var(--rp-ink);
  margin-bottom: 8px;
  line-height: 1.15;
}
.rp-section__lead {
  font-family: var(--rp-font-body);
  color: var(--rp-nebbia);
  font-size: 15px;
  margin-bottom: 32px;
  max-width: 560px;
  line-height: 1.7;
}


/* ============================================================
   CARD GRID — mortar-line technique
   ============================================================ */
.rp-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2px;
  background: var(--rp-nebbia-lt);
}
.rp-card {
  background: var(--rp-sabbia-lt);
  overflow: hidden;
  text-decoration: none;
  color: var(--rp-ink);
  padding: 28px;
  border-top: 3px solid var(--rp-oro);
  transition: background .2s;
  display: flex;
  flex-direction: column;
}
.rp-card:hover {
  background: var(--rp-sabbia);
  color: var(--rp-ink);
}
.rp-card__icon {
  margin-bottom: 16px;
}
.rp-card__icon svg {
  width: 32px; height: 32px;
  stroke: var(--rp-oro);
  fill: none;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rp-card__eyebrow {
  font-family: var(--rp-font-mono);
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--rp-nebbia);
  margin-bottom: 6px;
}
.rp-card__title {
  font-family: var(--rp-font-display);
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--rp-ink);
  line-height: 1.2;
}
.rp-card__meta {
  font-family: var(--rp-font-body);
  font-size: 14px;
  color: var(--rp-nebbia);
  line-height: 1.65;
  flex: 1;
}
.rp-card__tag {
  font-family: var(--rp-font-mono);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--rp-oro);
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--rp-nebbia-lt);
}


/* ============================================================
   STAT GRID (homepage: numeri in evidenza)
   ============================================================ */
.rp-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 2px;
  background: var(--rp-nebbia-lt);
  margin: 32px 0;
}
.rp-stat {
  background: var(--rp-sabbia-lt);
  padding: 24px;
  text-align: center;
}
.rp-stat__num {
  font-family: var(--rp-font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--rp-ink);
  line-height: 1;
  margin-bottom: 4px;
}
.rp-stat__label {
  font-family: var(--rp-font-mono);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--rp-nebbia);
}


/* ============================================================
   BADGES
   ============================================================ */
.rp-badge {
  display: inline-block;
  font-family: var(--rp-font-mono);
  font-size: 9px;
  font-weight: 500;
  padding: 3px 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid;
}
.rp-badge--gold     { border-color: var(--rp-oro);    color: var(--rp-oro); }
.rp-badge--silver   { border-color: #888;             color: #888; }
.rp-badge--bronze   { border-color: var(--rp-tufo);   color: var(--rp-tufo); }
.rp-badge--verified { border-color: var(--rp-circeo); color: var(--rp-circeo); }
.rp-badge--bike     { border-color: var(--rp-mare);   color: var(--rp-mare); }
.rp-badge--storia   { border-color: var(--rp-tufo);   color: var(--rp-tufo); }
.rp-badge--natura   { border-color: var(--rp-circeo); color: var(--rp-circeo); }
.rp-badge--km       { border-color: var(--rp-nebbia); color: var(--rp-nebbia); }


/* ============================================================
   MAPPA
   ============================================================ */
#mappa {
  height: calc(100dvh - 58px);
  width: 100%;
  background: var(--rp-cielo);
}
@media (max-width: 900px) {
  #mappa {
    height: calc(100dvh - 58px - var(--rp-bottom-bar-height) - env(safe-area-inset-bottom, 0px));
  }
}
.rp-mini-map {
  height: 420px;
  width: 100%;
  border: 1px solid var(--rp-nebbia-lt);
}
@media (max-width: 768px) {
  .rp-mini-map { height: 300px; }
}


/* ============================================================
   PAGE HERO (pagine interne)
   ============================================================ */
.rp-page-hero {
  background: var(--rp-sabbia);
  padding: clamp(40px, 6vw, 64px) 32px;
  text-align: center;
  border-bottom: 1px solid var(--rp-nebbia-lt);
}
.rp-page-hero__eyebrow {
  font-family: var(--rp-font-mono);
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--rp-oro);
  margin-bottom: 12px;
}
.rp-page-hero h1 {
  font-family: var(--rp-font-display);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 48px);
  color: var(--rp-ink);
  margin-bottom: 12px;
  line-height: 1.1;
}
.rp-page-hero p {
  font-family: var(--rp-font-body);
  color: var(--rp-nebbia);
  max-width: 560px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.7;
}


/* ============================================================
   SPONSOR HIGHLIGHT
   ============================================================ */
.rp-sponsor-highlight {
  background: var(--rp-sabbia-lt);
  border-top: 3px solid var(--rp-oro);
  padding: clamp(32px, 5vw, 48px);
  text-align: center;
}
.rp-sponsor-highlight__eyebrow {
  font-family: var(--rp-font-mono);
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--rp-oro);
  margin-bottom: 10px;
}
.rp-sponsor-highlight__title {
  font-family: var(--rp-font-display);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 28px);
  color: var(--rp-ink);
  margin-bottom: 12px;
}


/* ============================================================
   BREADCRUMB
   ============================================================ */
.rp-breadcrumb {
  font-family: var(--rp-font-mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--rp-nebbia);
  padding: 14px 32px;
  max-width: 1200px;
  margin: 0 auto;
}
.rp-breadcrumb a { color: var(--rp-oro); }


/* ============================================================
   INLINE SVG ICONS
   ============================================================ */
.rp-i {
  display: inline-block;
  vertical-align: -0.15em;
  width: 1em; height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
