/*
 * Solar Mendonça — shared iOS-inspired refinement layer.
 * Loaded after each page's own CSS so the existing identity and responsive
 * structure remain intact while surfaces, motion and touch feedback align.
 */

:root {
  --ios-cream: #f7f1ea;
  --ios-surface: rgba(255, 252, 247, .82);
  --ios-surface-strong: rgba(255, 253, 250, .94);
  --ios-dark-surface: rgba(25, 22, 19, .86);
  --ios-line: rgba(129, 101, 72, .16);
  --ios-line-strong: rgba(201, 154, 90, .34);
  --ios-gold: #c99a5a;
  --ios-gold-soft: #e0b978;
  --ios-accent: #c83a12;
  --ios-ink: #181513;
  --ios-muted: #6e655d;
  --ios-radius-sm: 14px;
  --ios-radius: 22px;
  --ios-radius-lg: 30px;
  --ios-shadow: 0 18px 55px rgba(42, 29, 19, .10), 0 2px 9px rgba(42, 29, 19, .05);
  --ios-shadow-hover: 0 26px 68px rgba(42, 29, 19, .16), 0 4px 14px rgba(42, 29, 19, .07);
  --ios-spring: cubic-bezier(.2, .8, .2, 1);
}

html {
  scroll-padding-top: 92px;
}

body.ios-polish {
  position: relative;
  min-height: 100%;
  background-color: var(--ios-cream);
  background-image:
    radial-gradient(circle at 8% 4%, rgba(224, 185, 120, .16), transparent 28rem),
    radial-gradient(circle at 94% 30%, rgba(83, 147, 163, .08), transparent 32rem),
    linear-gradient(180deg, rgba(255,255,255,.18), transparent 35rem);
  font-feature-settings: "kern" 1, "liga" 1;
}

.ios-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ios-ambient::before,
.ios-ambient::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(80px);
  opacity: .22;
}

.ios-ambient::before {
  top: 12vh;
  left: -240px;
  background: #e6b96c;
}

.ios-ambient::after {
  right: -250px;
  bottom: 8vh;
  background: #7fb4bf;
}

.ios-scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 99999;
  height: 3px;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
}

.ios-scroll-progress > span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--ios-accent), var(--ios-gold-soft));
  box-shadow: 0 0 12px rgba(201,154,90,.5);
  will-change: transform;
}

body.ios-polish :where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid rgba(201, 154, 90, .46);
  outline-offset: 3px;
}

body.ios-polish :where(.btn, .mini-btn, .filter-btn, .lang-btn, .back, .back-link) {
  min-height: 42px;
  border-radius: 999px !important;
  transition:
    transform .22s var(--ios-spring),
    box-shadow .22s ease,
    border-color .22s ease,
    background-color .22s ease,
    color .22s ease;
}

body.ios-polish :where(.btn, .mini-btn, .filter-btn, .lang-btn, .back, .back-link):active {
  transform: scale(.965);
}

body.ios-polish :where(input, select, textarea) {
  border-radius: var(--ios-radius-sm) !important;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

body.ios-polish :where(input, select, textarea):focus {
  border-color: var(--ios-gold) !important;
  box-shadow: 0 0 0 4px rgba(201,154,90,.14) !important;
}

.ios-reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0) scale(.99);
  transition:
    opacity .7s var(--ios-spring),
    transform .7s var(--ios-spring);
  transition-delay: var(--ios-delay, 0ms);
}

.ios-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Home / hotel pages */
.ios-home :where(.card, .panel, .booking-panel, .benefit, .review, .location-card) {
  border-color: var(--ios-line) !important;
  box-shadow: var(--ios-shadow) !important;
}

.ios-home :where(.card, .panel, .booking-panel) {
  border-radius: var(--ios-radius-lg) !important;
  overflow: hidden;
}

.ios-home .card-media,
.ios-home .card-media img,
.ios-home .faro-card {
  overflow: hidden;
  border-radius: var(--ios-radius) !important;
}

.ios-home :where(.card-media img, .faro-card) {
  transition: transform .65s var(--ios-spring), filter .45s ease, box-shadow .35s ease;
}

.ios-home .benefits {
  position: relative;
  z-index: 2;
}

.ios-home .benefit {
  border-radius: 18px;
  background: rgba(255,255,255,.36);
  backdrop-filter: blur(16px) saturate(125%);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
}

.ios-home .panel {
  background: var(--ios-surface-strong);
}

.ios-home .dark-panel {
  background:
    radial-gradient(circle at 10% 0, rgba(201,154,90,.16), transparent 36%),
    linear-gradient(145deg, #191613, #0f0e0d) !important;
}

.ios-home .booking-panel {
  background: rgba(255,252,247,.88) !important;
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}

/* Shared footer newsletter */
.ios-polish .footer .newsletter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: stretch;
  width: min(100%, 320px);
  min-height: 48px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  background: rgba(255,255,255,.07);
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  transition: border-color .22s ease, box-shadow .22s ease, background .22s ease;
}

.ios-polish .footer .newsletter:focus-within {
  border-color: rgba(239,208,144,.76);
  background: rgba(255,255,255,.1);
  box-shadow: 0 0 0 4px rgba(201,154,90,.12), 0 12px 34px rgba(0,0,0,.24);
}

.ios-polish .footer .newsletter input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0;
  color: #fff !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: .82rem;
}

.ios-polish .footer .newsletter input::placeholder {
  color: rgba(255,255,255,.5);
  opacity: 1;
}

.ios-polish .footer .newsletter button {
  display: grid;
  width: 48px;
  min-width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  border: 0;
  border-left: 1px solid rgba(255,255,255,.12);
  border-radius: 0;
  color: #18130d;
  background: linear-gradient(145deg, #e6bd78, #bd853c);
  cursor: pointer;
  transition: filter .2s ease, transform .2s var(--ios-spring);
}

.ios-polish .footer .newsletter button:hover {
  filter: brightness(1.08);
}

.ios-polish .footer .newsletter button:active {
  transform: scale(.94);
}

.ios-polish .footer .newsletter button svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

/* Our History: keep header/navigation untouched; refine content only. */
.ios-history .about-story {
  position: relative;
  overflow: hidden;
}

.ios-history .about-grid {
  position: relative;
  gap: clamp(28px, 5vw, 64px) !important;
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid var(--ios-line);
  border-radius: var(--ios-radius-lg) !important;
  background: linear-gradient(145deg, rgba(255,253,249,.90), rgba(255,249,242,.72));
  box-shadow: var(--ios-shadow);
  backdrop-filter: blur(24px) saturate(130%);
  -webkit-backdrop-filter: blur(24px) saturate(130%);
}

.ios-history .about-grid::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--ios-gold-soft), rgba(201,154,90,.05));
}

.ios-history .about-image {
  border-radius: 24px !important;
  box-shadow: 0 18px 42px rgba(30,23,18,.16);
}

.ios-history .about-image img {
  transition: transform .8s var(--ios-spring), filter .5s ease;
}

.ios-history .about-text {
  align-self: center;
}

.ios-history .about-text h2 {
  letter-spacing: -.035em;
}

.ios-history .about-text p {
  line-height: 1.72 !important;
}

.ios-history .stats-bar {
  margin: 24px 16px;
  border-radius: var(--ios-radius-lg);
  background:
    radial-gradient(circle at 50% -40%, rgba(224,185,120,.22), transparent 52%),
    linear-gradient(145deg, #1c1815, #0f0e0d) !important;
  box-shadow: 0 28px 70px rgba(24,19,15,.22);
}

.ios-history .stats-grid > div {
  padding: 18px 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.035);
}

.ios-history .award-card {
  border: 1px solid var(--ios-line) !important;
  border-radius: 24px !important;
  background: var(--ios-surface-strong);
  box-shadow: var(--ios-shadow);
  transition: transform .35s var(--ios-spring), box-shadow .35s ease, border-color .35s ease;
}

.ios-history .awards-section {
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.48));
}

/* Standalone legal and help pages */
body.ios-standalone {
  padding: clamp(18px, 4vw, 48px) 16px !important;
}

body.ios-standalone > .container {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 32px !important;
  background: var(--ios-surface) !important;
  box-shadow: var(--ios-shadow) !important;
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
}

body.ios-legal > .container:has(.page-header) {
  padding: 0 22px;
  background: rgba(255,255,255,.54) !important;
}

body.ios-legal > .container:has(.legal-card) {
  border: 0;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.ios-legal .page-header {
  min-height: 74px;
  margin: 0 !important;
  padding: 12px 0 !important;
  border: 0 !important;
}

.ios-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--ios-ink);
  text-decoration: none;
}

.ios-brand-lockup img {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 13px;
  box-shadow: 0 8px 22px rgba(34,25,18,.18);
}

.ios-brand-lockup span {
  display: grid;
  gap: 1px;
  min-width: 0;
  font-size: .92rem;
  font-weight: 760;
  line-height: 1.15;
}

.ios-brand-lockup small {
  overflow: hidden;
  color: var(--ios-muted);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.ios-standalone > .container > .ios-brand-lockup {
  margin-bottom: 22px;
}

.ios-legal .legal-card {
  border: 1px solid rgba(255,255,255,.86) !important;
  border-radius: 32px !important;
  background: var(--ios-surface-strong) !important;
  box-shadow: var(--ios-shadow) !important;
  padding: clamp(26px, 5vw, 52px) !important;
}

.ios-standalone :where(h1) {
  color: var(--ios-ink);
  font-size: clamp(2rem, 5vw, 3.15rem) !important;
  font-weight: 780;
  letter-spacing: -.045em;
  line-height: 1.02;
}

.ios-standalone :where(.subtitle, .updated) {
  color: var(--ios-muted);
}

.ios-legal :where(.legal-card, .lang-content) h2 {
  position: relative;
  margin-top: 34px !important;
  padding: 15px 18px;
  border: 1px solid rgba(201,154,90,.19);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(201,154,90,.13), rgba(255,255,255,.46));
  color: var(--ios-ink);
  letter-spacing: -.018em;
}

.ios-legal :where(.legal-card, .lang-content) p,
.ios-legal :where(.legal-card, .lang-content) li {
  color: #4f4841 !important;
  line-height: 1.76 !important;
}

.ios-legal :where(.legal-card, .lang-content) ul {
  margin-left: 0 !important;
  padding: 18px 20px 12px 40px !important;
  border: 1px solid var(--ios-line);
  border-radius: 18px;
  background: rgba(245,238,231,.62);
}

.ios-standalone .lang-bar {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 30px auto !important;
  padding: 5px;
  overflow-x: auto;
  flex-wrap: nowrap !important;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 999px;
  background: rgba(250,247,243,.84);
  box-shadow: 0 10px 28px rgba(42,29,19,.10);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  scrollbar-width: none;
}

.ios-standalone .lang-bar::-webkit-scrollbar {
  display: none;
}

.ios-standalone .lang-btn {
  min-height: 34px;
  flex: 0 0 auto;
  border: 0 !important;
  padding: 7px 13px !important;
  background: transparent !important;
}

.ios-standalone .lang-btn.is-active {
  color: #fff !important;
  background: linear-gradient(145deg, #d04b23, #b92f0d) !important;
  box-shadow: 0 6px 14px rgba(200,58,18,.23);
}

.ios-standalone .lang-content.is-visible {
  animation: ios-content-in .42s var(--ios-spring) both;
}

@keyframes ios-content-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* FAQs and contact directories */
.ios-help .faq-item {
  margin-bottom: 11px;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid var(--ios-line) !important;
  border-radius: 18px;
  background: rgba(255,255,255,.58);
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s var(--ios-spring);
}

.ios-help .faq-q {
  min-height: 58px;
  padding: 16px 18px;
}

.ios-help .faq-q::after {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  margin-left: 14px;
  border-radius: 999px;
  background: rgba(200,58,18,.10);
}

.ios-help .faq-a {
  padding-right: 18px;
  padding-left: 18px;
}

.ios-help .faq-item.is-open {
  border-color: rgba(201,154,90,.42) !important;
  box-shadow: 0 14px 34px rgba(42,29,19,.09);
}

.ios-help :where(.contact-card, .contact-group) {
  position: relative;
  margin-bottom: 14px !important;
  overflow: hidden;
  border: 1px solid var(--ios-line) !important;
  border-left: 1px solid var(--ios-line) !important;
  border-radius: 20px !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,.78), rgba(247,240,233,.62)) !important;
  box-shadow: 0 10px 28px rgba(42,29,19,.07);
  transition: transform .3s var(--ios-spring), box-shadow .3s ease, border-color .3s ease;
}

.ios-help :where(.contact-card, .contact-group)::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--ios-accent), var(--ios-gold-soft));
}

.ios-help :where(.contact-card, .contact-group) a {
  text-underline-offset: 3px;
}

/* Discover Faro */
.ios-explore .filters {
  position: sticky;
  top: 70px;
  z-index: 50;
  background: rgba(247,241,234,.78);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}

.ios-explore .filters .container {
  scrollbar-width: none;
}

.ios-explore .filters .container::-webkit-scrollbar {
  display: none;
}

.ios-explore .filter-btn {
  border-color: var(--ios-line) !important;
  background: rgba(255,255,255,.60) !important;
  box-shadow: 0 7px 18px rgba(42,29,19,.06);
}

.ios-explore .filter-btn.is-active {
  color: #fff !important;
  border-color: transparent !important;
  background: linear-gradient(145deg, #d04b23, #b92f0d) !important;
}

.ios-explore .place-card {
  overflow: hidden;
  border: 1px solid var(--ios-line) !important;
  border-radius: 24px !important;
  background: var(--ios-surface-strong);
  box-shadow: var(--ios-shadow) !important;
  transition: transform .35s var(--ios-spring), box-shadow .35s ease, border-color .35s ease;
}

.ios-explore .place-media {
  overflow: hidden;
}

.ios-explore .place-media img {
  transition: transform .7s var(--ios-spring), filter .45s ease;
}

.ios-explore .map-panel {
  overflow: hidden;
  border: 1px solid var(--ios-line) !important;
  border-radius: var(--ios-radius-lg) !important;
  background: var(--ios-surface-strong);
  box-shadow: var(--ios-shadow);
}

/* Restaurant */
.ios-restaurant :where(.mesa-card, .menu-card, .info-card) {
  overflow: hidden;
  border: 1px solid rgba(201,154,90,.19) !important;
  border-radius: 26px !important;
  box-shadow: var(--ios-shadow) !important;
  transition: transform .35s var(--ios-spring), box-shadow .35s ease, border-color .35s ease;
}

.ios-restaurant :where(.mesa-card, .menu-card) img {
  transition: transform .75s var(--ios-spring), filter .45s ease;
}

.ios-restaurant .info-card {
  background:
    radial-gradient(circle at 50% 0, rgba(201,154,90,.12), transparent 65%),
    rgba(255,255,255,.035) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.ios-restaurant .gallery-item {
  overflow: hidden;
  border-radius: 22px !important;
  box-shadow: 0 14px 38px rgba(20,16,13,.14);
}

.ios-restaurant .gallery-item img {
  transition: transform .7s var(--ios-spring), filter .45s ease;
}

/* Pointer-specific depth without compromising touch behaviour. */
@media (hover: hover) and (pointer: fine) {
  .ios-home .card:hover,
  .ios-home .faro-card:hover,
  .ios-history .award-card:hover,
  .ios-explore .place-card:hover,
  .ios-restaurant :where(.mesa-card, .menu-card, .info-card):hover,
  .ios-help :where(.contact-card, .contact-group):hover {
    z-index: 2;
    transform: translateY(-6px);
    border-color: var(--ios-line-strong) !important;
    box-shadow: var(--ios-shadow-hover) !important;
  }

  .ios-home .card:hover .card-media img,
  .ios-history .about-grid:hover .about-image img,
  .ios-explore .place-card:hover .place-media img,
  .ios-restaurant :where(.mesa-card, .menu-card):hover img,
  .ios-restaurant .gallery-item:hover img {
    transform: scale(1.035);
    filter: saturate(1.04) contrast(1.02);
  }

  body.ios-polish :where(.btn, .mini-btn, .filter-btn, .back, .back-link):hover {
    transform: translateY(-2px);
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 74px;
  }

  body.ios-polish .icon-btn.menu-toggle {
    position: relative;
    display: inline-grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(230,190,124,.34);
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.055));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 22px rgba(0,0,0,.18);
  }

  body.ios-polish .icon-btn.menu-toggle > svg {
    position: absolute;
    width: 22px;
    height: 22px;
    pointer-events: none;
  }

  body.ios-polish .menu-toggle[aria-expanded="true"] {
    position: fixed;
    top: 10px;
    right: 16px;
    border-color: rgba(230,190,124,.34);
    background: rgba(31,28,25,.92);
  }

  body.ios-polish .menu-hamburger {
    display: inline;
  }

  body.ios-polish .menu-close {
    display: none;
  }

  body.ios-polish .menu-toggle[aria-expanded="true"] .menu-hamburger {
    display: none;
  }

  body.ios-polish .menu-toggle[aria-expanded="true"] .menu-close {
    display: inline;
  }

  .ios-home .benefit-grid {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }

  .ios-home .benefit-grid::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  body.ios-standalone {
    padding: 12px 10px calc(20px + env(safe-area-inset-bottom)) !important;
  }

  body.ios-standalone > .container {
    border-radius: 26px !important;
    padding: 22px 16px !important;
  }

  body.ios-legal > .container:has(.page-header) {
    padding: 0 14px !important;
  }

  body.ios-legal > .container:has(.legal-card) {
    padding: 0 !important;
  }

  .ios-legal .legal-card {
    border-radius: 26px !important;
    padding: 26px 19px !important;
  }

  .ios-legal .page-header {
    min-height: 68px;
  }

  .ios-brand-lockup img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .ios-brand-lockup small {
    max-width: 150px;
  }

  .ios-standalone .lang-bar {
    top: 7px;
    width: 100%;
    margin-bottom: 24px !important;
  }

  .ios-history .about-grid {
    margin: 22px 10px !important;
    padding: 14px 14px 24px !important;
    border-radius: 26px !important;
  }

  .ios-history .about-image {
    border-radius: 20px !important;
  }

  .ios-history .about-text {
    padding: 2px 4px 0 !important;
  }

  .ios-history .stats-bar {
    margin-right: 10px;
    margin-left: 10px;
    border-radius: 26px;
  }

  .ios-home :where(.card, .panel, .booking-panel),
  .ios-explore .map-panel {
    border-radius: 24px !important;
  }

  .ios-explore .filters {
    top: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ios-reveal,
  .ios-reveal.is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  body.ios-polish *,
  body.ios-polish *::before,
  body.ios-polish *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
