/* Villa Cordella, public site. Tokens from docs/public-site/DESIGN.md. Mobile first, one breakpoint at 960 px. */

:root {
  --bg: #FFFFFF;
  --stone: #F4F3EF;
  --ink: #18201C;
  --ink2: #3C453F;
  --muted: #5C665F;
  --line: #E3E4DF;
  --input: #C9CCC4;
  --btn-line: #D5D7D0;
  --accent: #0F5F59;
  --accent-hover: #0B4A45;
  --accent-soft: #E3F0EE;
  --accent-soft-ink: #0B4A45;
  --star: #B8862B;
  --dark: #18201C;
  --dark-ink: #B9C2BC;
  --dark-line: #4A544E;
  --dark-icon: #8FD3C6;
  --footer: #111816;
  --footer-ink: #B9C2BC;
  --footer-line: #2A332F;
  --photo-1: #CFCBC1;
  --photo-2: #DCD9D1;
  --photo-3: #E5E2DB;

  --font-head: Manrope, Inter, system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-card: 18px;
  --radius-tile: 14px;
  --radius-btn: 12px;
  --header-h: 64px;
  --gutter: 20px;
  --mobile-bar-h: 71px;
}

@media (min-width: 960px) {
  :root {
    --header-h: 76px;
    --gutter: 32px;
    --radius-btn: 10px;
    --mobile-bar-h: 0px;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--mobile-bar-h) + env(safe-area-inset-bottom));
}

main { flex: 1 0 auto; }
main:focus { outline: none; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-head);
  letter-spacing: -0.02em;
  line-height: 1.12;
}
p, ul, ol, blockquote, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: var(--radius-btn);
  background: var(--ink);
  color: #FFFFFF;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: #FFFFFF; }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { flex: none; width: 20px; height: 20px; }
.icon--14 { width: 14px; height: 14px; }
.icon--15 { width: 15px; height: 15px; }
.icon--16 { width: 16px; height: 16px; }
.icon--18 { width: 18px; height: 18px; }
.icon--20 { width: 20px; height: 20px; }
.icon--28 { width: 28px; height: 28px; }
.star { color: var(--star); }

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.stack-md { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 960px) {
  .stack-md { gap: 32px; }
}

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.lead { font-size: 15px; color: var(--muted); }

@media (min-width: 960px) {
  .eyebrow { font-size: 13px; }
  .lead { font-size: 17px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
@media (min-width: 960px) {
  .btn { min-height: 48px; padding: 0 22px; }
}
.btn-primary { background: var(--accent); color: #FFFFFF; }
.btn-primary:hover { background: var(--accent-hover); color: #FFFFFF; }
.btn-ghost { background: #FFFFFF; color: var(--ink); border-color: var(--btn-line); }
.btn-ghost:hover { background: var(--stone); color: var(--ink); }
.btn-light { background: #FFFFFF; color: var(--ink); }
.btn-light:hover { background: #E9EBE5; color: var(--ink); }
/* WhatsApp brand green; dark text keeps the contrast that white on #25D366 would not. */
.btn-whatsapp { background: #25D366; color: #0B2E1C; }
.btn-whatsapp:hover { background: #1EBE5B; color: #0B2E1C; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand__logo { width: 32px; height: 32px; }
.brand__name {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.main-nav { display: none; }
.nav-list { display: flex; gap: 4px; }
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.nav-link:hover { background: var(--stone); color: var(--accent); }
.nav-link[aria-current="page"] { color: var(--accent); }

.site-header__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lang-switch {
  display: flex;
  border: 1px solid var(--btn-line);
  border-radius: 8px;
  overflow: hidden;
}
.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 42px;
  padding: 0 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.lang-switch a:hover { background: var(--stone); }
.lang-switch a[aria-current="true"] { background: var(--ink); color: #FFFFFF; }
.site-header__cta { display: none; }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--btn-line);
  border-radius: 10px;
  background: #FFFFFF;
  color: var(--ink);
  cursor: pointer;
}
.menu-toggle__close,
.menu-toggle[aria-expanded="true"] .menu-toggle__open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__close { display: block; }

.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 8px 0 20px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(24, 32, 28, .08);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu .nav-list { flex-direction: column; gap: 0; }
.mobile-menu .nav-link {
  display: flex;
  min-height: 48px;
  padding: 12px 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}
.mobile-menu .nav-link:hover { background: none; }
.mobile-menu__cta { width: 100%; margin-top: 16px; }

@media (min-width: 960px) {
  .site-header__inner { gap: 24px; }
  .brand { gap: 10px; }
  .brand__logo { width: 34px; height: 34px; }
  .brand__name { font-size: 19px; }
  .main-nav { display: block; margin-left: 4px; }
  .site-header__actions { gap: 12px; }
  .menu-toggle, .mobile-menu { display: none !important; }
}
/* The header CTA needs room next to the full menu. */
@media (min-width: 1180px) {
  .main-nav { margin-left: 16px; }
  .site-header__cta { display: inline-flex; }
}

/* ---------- Mobile quick-action bar ---------- */
.mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: #FFFFFF;
  border-top: 1px solid var(--line);
}
.mobile-bar__call { flex: none; width: 50px; padding: 0; }
.mobile-bar__request { flex: 1 1 auto; }
@media (min-width: 960px) {
  .mobile-bar { display: none; }
}

/* ---------- Language suggestion (wwwroot/js/site.js) ---------- */
.lang-suggest {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--mobile-bar-h) + env(safe-area-inset-bottom) + 12px);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-tile);
  background: #FFFFFF;
  box-shadow: 0 10px 30px rgba(24, 32, 28, .16);
}
.lang-suggest[hidden] { display: none; }
.lang-suggest__text { margin: 0; flex: 1 1 auto; font-size: 14px; color: var(--ink2); }
.lang-suggest__actions { display: flex; align-items: center; gap: 4px; flex: none; }
.lang-suggest__go { min-height: 40px; padding: 0 14px; font-size: 14px; }
.lang-suggest__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.lang-suggest__close:hover { background: var(--stone); color: var(--ink); }
@media (max-width: 479px) {
  .lang-suggest { flex-wrap: wrap; }
  .lang-suggest__actions { width: 100%; }
  .lang-suggest__go { flex: 1 1 auto; }
}
@media (min-width: 960px) {
  .lang-suggest { left: auto; right: 24px; bottom: 24px; max-width: 460px; }
}

/* ---------- Photo placeholders ---------- */
.photo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--photo-2);
  color: var(--ink2);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
}
.photo--1 { background: var(--photo-1); }
.photo--2 { background: var(--photo-2); }
.photo--3 { background: var(--photo-3); }

/* Google Maps Embed iframe: takes the size of the placeholder it replaces, without its padding
   (element + class, so it wins over the page stylesheets loaded after this one). */
iframe.map-embed { display: block; width: 100%; padding: 0; border: 0; background: var(--photo-3); }

/* Box shown in place of the map until the visitor asks for it (Pages/Shared/_MapEmbed.cshtml). */
.map-consent { flex-direction: column; gap: 10px; padding: 16px 24px; text-align: center; }
.map-consent__text { max-width: 44ch; margin: 0; font-size: 13px; line-height: 1.45; letter-spacing: 0; }
.map-consent__text a { color: inherit; text-decoration: underline; }
/* .btn sets display, which would beat the hidden attribute: the map buttons are hidden until site.js runs. */
.map-consent__button[hidden], .map-choice [hidden] { display: none; }

/* ---------- Notice (info box on stone) ---------- */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-tile);
  background: var(--stone);
  color: var(--ink2);
  font-size: 15px;
}
.notice .icon { margin-top: 2px; color: var(--accent); }
.notice a { font-weight: 600; white-space: nowrap; }

/* ---------- Sections ---------- */
.section { padding: 40px 0; }
.section--stone { background: var(--stone); padding: 36px 0; }
@media (min-width: 960px) {
  .section { padding: 88px 0; }
  .section--stone { padding: 80px 0; }
}

/* ---------- Card link: the whole card is clickable through its title link ---------- */
.stretched-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.stretched-link:focus-visible { outline: none; }
.stretched-link:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--radius-card); }

/* ---------- Reviews ---------- */
.review {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-tile);
}
.review__stars { display: flex; gap: 2px; }
.review__text {
  flex: 1 1 auto;
  font-size: 15px;
  color: var(--ink2);
}
.review__text p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 10;
  line-clamp: 10;
  overflow: hidden;
}
/* display above beats the UA [hidden] rule: keep the not-yet-shown translation hidden */
.review__text p[hidden] { display: none; }
.review__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.review__author { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.review__author a { color: var(--ink); }
.review__author a:hover { color: var(--accent); }
.review__author time { font-weight: 400; color: var(--muted); }
.review__avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--stone); }
/* "Translate" under a review text (home and villa page): wwwroot/js/site.js */
.review-translate { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0; font-size: 13px; }
.review-translate[hidden] { display: none; }
.review-translate__button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.review-translate__button:hover { color: var(--ink); }
.review-translate__note { color: var(--muted); }
@media (min-width: 960px) {
  .review { gap: 14px; padding: 26px; border-radius: var(--radius-card); }
  .review__text { font-size: 16px; }
  .review__meta { padding-top: 14px; }
}

/* ---------- Tile link ---------- */
.tile-link {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  min-height: 44px;
  padding: 14px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-tile);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}
.tile-link:hover { color: var(--accent); border-color: var(--input); }
.tile-link .icon { color: var(--accent); }
@media (min-width: 960px) {
  .tile-link { padding: 16px; font-size: 16px; }
}

/* ---------- Icon box ---------- */
.icon-box {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-soft-ink);
}
@media (min-width: 960px) {
  .icon-box { width: 44px; height: 44px; border-radius: 12px; }
}

/* ---------- Footer ----------
   Light stone band, like the inner pages: after the dark photo that closes the home it reads as the end of the
   page instead of melting into it. Titles share the brand's 44 px row so the first lines of every column align. */
.site-footer {
  padding: 32px 0 28px;
  /* A shade darker than --stone, so it still parts from a stone section right above (villa page, "Le altre ville"). */
  background: #ECEAE3;
  border-top: 1px solid var(--line);
  color: var(--ink2);
  font-size: 14px;
}
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--ink2);
  text-decoration: none;
}
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 20px;
}
.site-footer__about { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; }
/* 6 px: half of the gap between the 32 px link boxes and their text, so the paragraph starts on the links' line. */
.site-footer__about p { max-width: 320px; padding-top: 6px; }
.site-footer .site-footer__place { gap: 6px; min-height: 0; }
.site-footer__place .icon { color: var(--accent); }
.site-footer .site-footer__brand { align-self: flex-start; min-height: 44px; color: var(--ink); }
.site-footer .site-footer__brand:hover { color: var(--ink); text-decoration: none; }
.site-footer__col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.site-footer__col ul { display: flex; flex-direction: column; gap: 2px; }
.site-footer__col a { overflow-wrap: anywhere; }
/* Phone: own full row, so the e-mail address fits on one line instead of breaking in a half-width column. */
.site-footer__col--contacts { grid-column: 1 / -1; }
.site-footer__title {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ink);
}
.site-footer .site-footer__title a { min-height: 0; color: inherit; }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--btn-line);
  color: var(--muted);
  font-size: 13px;
}
.site-footer__bottom a { color: var(--muted); }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 0 20px; }
.site-footer__legal a { min-height: 44px; }
@media (min-width: 960px) {
  /* Desktop is mouse-driven: link rows drop to 28 px (still above the 24 px WCAG target size) to keep the band compact. */
  .site-footer { padding: 32px 0 8px; }
  .site-footer a { min-height: 28px; }
  .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
  .site-footer__col { gap: 4px; }
  .site-footer__col ul { gap: 0; }
  .site-footer__about,
  .site-footer__col--contacts { grid-column: auto; }
  .site-footer__bottom { margin-top: 24px; padding-top: 4px; }
  .site-footer__legal a { min-height: 36px; }
}

/* ---------- Coming soon ---------- */
.soon__inner { display: flex; flex-direction: column; gap: 18px; max-width: 760px; margin-left: 0; }
.soon__title { font-size: 36px; font-weight: 800; }
.soon__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
@media (min-width: 960px) {
  .soon { padding: 120px 0; }
  .soon__inner { gap: 24px; margin: 0 auto; max-width: 1240px; }
  .soon__title { font-size: 56px; }
  .soon__actions { gap: 12px; }
}

/* ---------- Inner pages: header, "read more" ---------- */
.page-head { display: flex; flex-direction: column; gap: 12px; padding-top: 28px; padding-bottom: 24px; }
.page-head__title { font-size: 34px; font-weight: 800; max-width: 760px; overflow-wrap: anywhere; }
.page-head__lead { font-size: 16px; color: var(--muted); max-width: 720px; }
@media (min-width: 960px) {
  .page-head { padding-top: 64px; padding-bottom: 40px; }
  .page-head__title { font-size: 52px; }
  .page-head__lead { font-size: 18px; }
}

/* Native disclosure for long descriptions (no script). */
.more { font-size: 15px; color: var(--ink2); }
.more__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.more__toggle::-webkit-details-marker { display: none; }
.more__toggle:hover { color: var(--accent-hover); text-decoration: underline; }
.more__chevron { transform: rotate(90deg); transition: transform .15s; }
.more[open] .more__chevron { transform: rotate(-90deg); }
.more__body { display: flex; flex-direction: column; gap: 10px; padding-bottom: 4px; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) {
  .more__chevron { transition: none; }
}
