:root {
  color-scheme:only light;
  --ink:#151515;
  --paper:#ffffff;
  --surface:#ffffff;
  --line:#e1e1e1;
  --muted:#454545;
  --accent:#ffa451;
  --accent-soft:#fff2e5;
  --neutral:#f5f5f5;
  --green:#31684b;
  --blue:#355c90;
  --red:#a14739;
  --shadow:0 12px 32px #00000014;
  --heading-weight:700;
  --heading-tracking:-.04em;
  font-family:Arial,Helvetica,sans-serif;
  color:var(--ink);
  background:var(--paper);
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  background:#fff;
  color:var(--ink);
}

button,a {
  -webkit-tap-highlight-color:transparent;
}

button {
  font:inherit;
  color:inherit;
  cursor:pointer;
}

button:focus-visible,a:focus-visible {
  outline:3px solid var(--ink);
  outline-offset:3px;
}

button:disabled {
  cursor:default;
  opacity:.5;
}

a {
  color:inherit;
}

button svg,a svg {
  width:20px;
  height:20px;
  flex:none;
}

svg {
  vertical-align:middle;
}

button {
  border:0;
  background:none;
}

h1,h2,h3,p {
  margin:0;
}

h1,h2,h3 {
  font-weight:var(--heading-weight);
  letter-spacing:var(--heading-tracking);
}

[hidden] {
  display:none!important;
}

.icon {
  width:22px;
  height:22px;
}

.sprite {
  position:absolute;
  width:0;
  height:0;
  overflow:hidden;
}

header {
  height:78px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 clamp(22px,5vw,76px);
  gap:22px;
}

.brand {
  display:flex;
  align-items:center;
  gap:14px;
  padding:0;
  text-align:left;
}

.brand strong {
  font-size:clamp(23px,3vw,34px);
  font-weight:900;
  letter-spacing:-.088em;
  line-height:1;
}

.brand small {
  border-left:1px solid var(--line);
  padding-left:13px;
  font-size:12px;
  line-height:1.15;
  color:var(--muted);
  max-width:85px;
}

.nav,.lang {
  display:flex;
  align-items:center;
  gap:4px;
}

.nav {
  gap:clamp(7px,1.3vw,20px);
}

.nav a {
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 15px;
  border-radius:100px;
  font-size:14px;
  font-weight:700;
  color:var(--muted);
  white-space:nowrap;
}

.nav a[aria-current=page] {
  background:var(--accent);
  color:var(--ink);
}

.lang {
  padding:3px;
  border:1px solid var(--line);
  border-radius:100px;
}

.lang button {
  font-size:12px;
  font-weight:800;
  border-radius:100px;
  padding:8px;
}

.lang button[aria-pressed=true] {
  background:var(--accent);
  color:var(--ink);
}

main {
  width:min(1440px,100%);
  margin:auto;
  padding:35px clamp(22px,5vw,76px) 25px;
}

.layout {
  display:grid;
  grid-template-columns:minmax(320px,.82fr) minmax(0,1.18fr);
  gap:clamp(26px,4vw,62px);
  align-items:start;
}

.left {
  min-width:0;
}

.overline {
  font-size:12px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  display:flex;
  align-items:center;
  gap:9px;
  color:var(--ink);
}

.overline:before {
  content:"";
  width:20px;
  height:2px;
  background:var(--accent);
}

.hero {
  padding:14px 0 25px;
}

.hero h1 {
  font-size:clamp(46px,5.6vw,82px);
  line-height:1.04;
  text-wrap:balance;
  margin:19px 0 17px;
}

.hero p,.intro p {
  font-size:16px;
  line-height:1.55;
  color:var(--muted);
  max-width:36ch;
}

.image {
  background:#252525 center 52% / cover no-repeat;
  background-image:linear-gradient(0deg,#000000d9,transparent 71%),var(--photo,linear-gradient(127deg,#2b2b2b,#5d5d5d 56%,#8d8d8d));
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
  color:white;
  min-height:180px;
  border-radius:18px;
  padding:18px 20px;
  overflow:hidden;
  text-align:left;
  width:100%;
}

.image span {
  display:block;
  color:#ffffff;
  font-size:12px;
  letter-spacing:.11em;
  text-transform:uppercase;
  margin-bottom:4px;
}

.image strong {
  font-size:32px;
  font-weight:var(--heading-weight);
  line-height:1.1;
  letter-spacing:var(--heading-tracking);
}

.image .round {
  background:#ffffff24;
  border:1px solid #ffffff73;
}

.round {
  width:40px;
  height:40px;
  border-radius:50%;
  display:grid;
  place-items:center;
  flex:none;
}

.menu {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
  margin-top:12px;
}

.menu a,.event-row,.destination {
  display:flex;
  align-items:center;
  gap:11px;
  text-align:left;
  border:1px solid var(--line);
  background:var(--surface);
  border-radius:12px;
  padding:12px 11px;
  font-size:14px;
  font-weight:750;
  min-height:52px;
}

.menu a:hover,.destination:hover,.event-row:hover {
  border-color:var(--ink);
}

.menu .primary {
  grid-column:1/-1;
  background:var(--accent);
  border-color:var(--accent);
  color:var(--ink);
  min-height:55px;
}

.menu .primary:hover {
  border-color:var(--ink);
}

.menu .info {
  grid-column:1/-1;
}

.push {
  margin-left:auto;
}

.map-card {
  border:1px solid var(--line);
  background:var(--surface);
  border-radius:22px;
  overflow:hidden;
  box-shadow:var(--shadow);
  position:relative;
}

.map-head {
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  padding:17px 19px 15px;
}

.map-head h2 {
  font-size:19px;
}

.map-head .round {
  background:var(--neutral);
}

.map-stage {
  position:relative;
}

.map-window {
  height:clamp(450px,61vh,640px);
  position:relative;
  background:#ecebdd;
  overflow:hidden;
  touch-action:none;
  cursor:grab;
}

.map-window.dragging {
  cursor:grabbing;
}

.map-world {
  position:absolute;
  width:600px;
  height:600px;
  left:50%;
  top:50%;
  transform-origin:50% 50%;
  will-change:transform;
}

.map-world canvas {
  position:absolute;
  left:-300px;
  top:-300px;
  width:1200px;
  height:1200px;
}

.map-label,.pin,.you {
  position:absolute;
  transform:translate(-50%,-50%);
  white-space:nowrap;
}

.map-label {
  font-size:13px;
  font-weight:800;
  text-shadow:0 1px 3px #fff,0 -1px 3px #fff,1px 0 3px #fff,-1px 0 3px #fff;
  pointer-events:none;
  color:#344a37;
}

.map-label.rose {
  background:#fffaf0;
  border:1px solid #e4cebc;
  border-radius:7px;
  padding:5px 8px;
  color:#754533;
}

.map-label.lake {
  color:#35616b;
}

.map-label[data-pin] {
  z-index:2;
  pointer-events:auto;
  background:var(--surface);
  color:var(--ink);
  border:1px solid var(--line);
  border-radius:8px;
  min-height:28px;
  padding:4px 8px;
  text-shadow:none;
  transform:translate(-50%,-50%) scale(var(--label-scale,1));
}

.map-label[data-pin]:hover,.map-label[data-pin][aria-pressed=true] {
  background:var(--accent);
}

.map-places {
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:6px;
  padding:8px;
  border-top:1px solid var(--line);
}

.map-places button {
  min-height:44px;
  background:var(--neutral);
  border-radius:8px;
  padding:6px 10px;
  font-size:13px;
  font-weight:700;
}

.map-places button[aria-pressed=true] {
  background:var(--accent);
}

.pin {
  width:40px;
  height:40px;
  border-radius:50%;
  color:white;
  border:2px solid white;
  display:grid;
  place-items:center;
  box-shadow:0 3px 12px #20372555;
  z-index:3;
  transition:box-shadow .15s;
}

.pin svg {
  width:17px;
  height:17px;
}

.pin:hover,.pin[aria-pressed=true] {
  box-shadow:0 0 0 4px #fff9,0 4px 13px #12282777;
}

.green {
  background:var(--green);
}

.blue {
  background:var(--blue);
}

.red {
  background:var(--red);
}

.you {
  border-radius:50%;
  background:#21392f;
  border:3px solid #fff;
  width:31px;
  height:31px;
  display:grid;
  place-items:center;
  color:#fff;
  z-index:2;
  pointer-events:none;
  box-shadow:0 2px 6px #21392f50;
}

.you svg {
  width:16px;
  height:16px;
}

.you span {
  position:absolute;
  left:34px;
  background:#fffefa;
  border-radius:6px;
  padding:5px 7px;
  font-size:11px;
  color:#243b31;
  font-weight:800;
  box-shadow:0 2px 8px #13281822;
}

.map-controls {
  position:absolute;
  right:13px;
  top:14px;
  display:grid;
  gap:6px;
}

.map-controls button,.north {
  background:var(--surface);
  box-shadow:0 2px 10px #00000020;
  border:1px solid var(--line);
  border-radius:10px;
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
}

.map-controls button:hover {
  background:var(--accent-soft);
}

.north {
  position:absolute;
  top:14px;
  left:13px;
  pointer-events:none;
  font-size:10px;
  font-weight:800;
  line-height:1;
  align-content:center;
  gap:1px;
}

.north svg {
  width:14px;
  height:14px;
}

.map-note {
  font-size:11px;
  position:absolute;
  left:10px;
  bottom:8px;
  border-radius:5px;
  background:#ffffffeb;
  padding:4px 6px;
  color:var(--muted);
  pointer-events:none;
}

.legend {
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:9px 16px;
  padding:12px 9px;
}

.legend button {
  display:flex;
  align-items:center;
  gap:6px;
  padding:4px;
  font-size:12px;
  font-weight:700;
  color:var(--muted);
}

.legend i {
  width:19px;
  height:19px;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:white;
}

.legend svg {
  width:12px;
  height:12px;
}

.intro {
  padding:14px 0 24px;
}

.intro h1 {
  font-size:clamp(39px,5vw,68px);
  line-height:1.04;
  margin:15px 0;
}

.box,.details {
  padding:20px;
  border:1px solid var(--line);
  background:var(--surface);
  border-radius:17px;
}

.box h2,.details h2 {
  font-size:27px;
  margin:8px 0 10px;
}

.box p,.details p {
  line-height:1.55;
  color:var(--muted);
}

.box p+p,.details p+p {
  margin-top:12px;
}

.details {
  position:absolute;
  z-index:4;
  bottom:12px;
  left:12px;
  right:12px;
  box-shadow:0 9px 30px #00000049;
  max-height:70%;
  overflow:auto;
  touch-action:pan-y;
}

.detail-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.detail-top .round {
  background:var(--neutral);
  width:35px;
  height:35px;
}

.category {
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:var(--ink);
  font-size:13px;
  font-weight:800;
}

.category i {
  display:grid;
  place-items:center;
  width:26px;
  height:26px;
  border-radius:50%;
  color:white;
}

.category svg {
  width:15px;
  height:15px;
}

.chips {
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:13px;
}

.chips span {
  padding:6px 9px;
  background:var(--accent-soft);
  border-radius:100px;
  color:var(--ink);
  font-size:12px;
  font-weight:700;
}

.small-link {
  display:inline-flex;
  margin-top:12px;
  font-weight:700;
  font-size:13px;
  text-underline-offset:3px;
}

.details .map-note {
  position:static;
  display:block;
  padding:0;
  margin-top:10px;
  background:none;
}

.cta {
  display:inline-flex;
  gap:8px;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:var(--accent);
  color:var(--ink);
  padding:11px 15px;
  font-weight:750;
  font-size:14px;
  min-height:42px;
}

.details .cta {
  margin-top:13px;
}

.destinations {
  display:grid;
  gap:8px;
}

.destination {
  width:100%;
}

.destination[aria-pressed=true] {
  border-color:var(--ink);
  background:var(--accent-soft);
}

.destination svg:first-child {
  color:var(--ink);
}

.back,.pace {
  font-size:14px;
  text-decoration:underline;
  text-underline-offset:4px;
  font-weight:700;
  padding:10px 0;
}

.details .pace {
  margin-left:10px;
}

.tabs {
  display:flex;
  gap:6px;
  margin-bottom:13px;
  background:var(--neutral);
  padding:4px;
  border-radius:12px;
}

.tabs button {
  flex:1;
  padding:10px 14px;
  border-radius:9px;
  font-weight:750;
  font-size:14px;
}

.tabs button[aria-pressed=true] {
  background:var(--accent);
  box-shadow:0 1px 4px #00000020;
}

.event-feature {
  padding:19px;
  min-height:146px;
  border-radius:15px;
  background:var(--accent-soft);
  color:var(--ink);
  position:relative;
  overflow:hidden;
  display:block;
  text-decoration:none;
}

.event-feature:after {
  content:"";
  position:absolute;
  right:-60px;
  bottom:-80px;
  width:175px;
  height:175px;
  border-radius:50%;
  border:28px solid var(--accent);
  pointer-events:none;
}

.event-feature h2 {
  font-size:clamp(25px,3vw,38px);
  line-height:1.08;
  margin:9px 0;
  max-width:15ch;
}

.event-feature small,.event-feature p {
  font-weight:750;
  font-size:13px;
}

.event-list {
  display:grid;
  gap:7px;
  margin-top:11px;
}

.event-row {
  text-decoration:none;
  justify-content:space-between;
}

.event-row span span {
  display:block;
  font-size:12px;
  font-weight:400;
  color:var(--muted);
  margin-top:4px;
}

.event-row svg {
  width:16px;
  height:16px;
}

footer {
  margin-top:19px;
  font-size:12px;
  color:var(--muted);
  display:flex;
  flex-wrap:wrap;
  gap:6px 16px;
  justify-content:space-between;
}

footer a {
  text-underline-offset:3px;
}

.mobile-nav {
  display:none;
}

@media(min-width:1100px) {
  .image {
    min-height:204px;
  }
}

@media(max-width:900px) {
  .layout {
    gap:24px;
    grid-template-columns:minmax(270px,.88fr) minmax(0,1.12fr);
  }
  main {
    padding-top:24px;
  }
  .hero h1 {
    font-size:clamp(43px,6.4vw,62px);
  }
  .nav a {
    padding:8px 9px;
  }
  .map-window {
    height:500px;
  }
}

@media(max-width:800px) {
  :root {
    --mobile-nav-space:calc(65px + env(safe-area-inset-bottom, 0px));
    scroll-padding-bottom:var(--mobile-nav-space);
  }
  header {
    height:auto;
    min-height:calc(65px + env(safe-area-inset-top, 0px));
    padding:calc(8px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
    gap:10px;
  }
  .brand {
    min-width:0;
    gap:8px;
    min-height:44px;
  }
  .brand small {
    padding-left:8px;
    font-size:11px;
  }
  .lang {
    flex:none;
    padding:0;
  }
  .lang button {
    min-width:44px;
    min-height:44px;
  }
  .nav {
    display:none;
  }
  main {
    max-width:620px;
    padding:16px max(14px, env(safe-area-inset-right, 0px)) calc(20px + var(--mobile-nav-space)) max(14px, env(safe-area-inset-left, 0px));
  }
  .layout {
    grid-template-columns:minmax(0,1fr);
    gap:20px;
  }
  .hero {
    padding:8px 0 18px;
  }
  .hero h1 {
    font-size:clamp(36px, 10.5vw, 64px);
    margin:13px 0;
    overflow-wrap:anywhere;
  }
  .hero p {
    font-size:16px;
  }
  .image {
    min-height:164px;
  }
  .menu,.destinations {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .menu a,.destination,.cta,.tabs button {
    min-height:48px;
  }
  .menu .push {
    width:16px;
    height:16px;
  }
  .map-card {
    border-radius:17px;
  }
  .map-head {
    padding:10px 14px;
  }
  .map-head .round,.map-controls button,.detail-top .round {
    width:44px;
    height:44px;
  }
  .map-stage {
    display:flex;
    flex-direction:column;
  }
  .map-window {
    height:clamp(260px, 57vh, 500px);
    height:clamp(260px, 57svh, 500px);
  }
  body[data-view=home] .map-window {
    height:clamp(230px, 45svh, 340px);
    touch-action:pan-y pinch-zoom;
  }
  body[data-view=map] .left {
    display:none;
  }
  body[data-view=route] .intro {
    padding:4px 0 12px;
  }
  body[data-view=route] .intro h1 {
    margin:8px 0;
    font-size:34px;
  }
  body[data-view=route] .destination {
    font-size:13px;
    padding:8px;
  }
  body[data-view=route] .back {
    display:none;
  }
  body[data-view=agenda] .map-card,body[data-view=info] .map-card {
    display:none;
  }
  .mobile-nav {
    position:fixed;
    z-index:6;
    bottom:0;
    left:0;
    right:0;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:4px;
    padding:6px max(10px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
    background:var(--surface);
    border-top:1px solid var(--line);
    box-shadow:0 -4px 20px #00000012;
  }
  .mobile-nav a {
    min-height:48px;
    display:grid;
    justify-items:center;
    align-content:center;
    gap:6px;
    padding:4px 2px;
    border-radius:10px;
    font-size:11px;
    font-weight:800;
    color:var(--muted);
  }
  .mobile-nav a[aria-current=page] {
    background:var(--accent);
    color:var(--ink);
  }
  .mobile-nav svg {
    width:18px;
    height:18px;
  }
  footer {
    margin-top:15px;
  }
  .details {
    position:static;
    max-height:none;
    overflow:visible;
    margin:10px;
    border-radius:12px;
    padding:14px;
    box-shadow:none;
  }
  body[data-view=route] .details:not(.pin-details) {
    order:-1;
  }
  .details h2 {
    font-size:24px;
  }
  .details p {
    font-size:15px;
  }
  .legend {
    gap:0 6px;
    padding:5px 8px;
  }
  .legend button {
    min-height:44px;
  }
}

@media(max-width:360px) {
  .brand {
    flex-wrap:wrap;
    gap:2px 6px;
  }
  .brand small {
    border:0;
    padding:0;
  }
  .menu {
    grid-template-columns:1fr;
  }
  .menu .push {
    width:20px;
    height:20px;
  }
  .event-feature:after {
    display:none;
  }
}

@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto!important;
    transition:none!important;
  }
}

:root {
  --photo:url("../images/roseiral.jpg");
}

#serralves-guide header,#serralves-guide main {
  background:#fff;
}

#serralves-guide .brand strong,#serralves-guide .hero h1,#serralves-guide .lang button {
  color:var(--ink);
}

#serralves-guide {
  min-height:100vh;
  background:var(--paper);
}

.brand,.nav a,.mobile-nav a,.menu a,.image,.details .cta {
  text-decoration:none;
}

.box .info-section {
  margin-top:24px;
}

.pin[data-pin=nature] {
  left:322px;
  top:212px;
}

.pin[data-pin=history] {
  left:280px;
  top:258px;
}

.pin[data-pin=signs] {
  left:388px;
  top:321px;
}
