/* =========================================================
   Anat's Home · Barcelona — minisite
   Palette grounded in the apartment itself: Mediterranean
   azure (the blue ceramics, chairs & rug) + warm oak/brass
   + crisp white. Signature: the L5 blue metro line.
   ========================================================= */

:root {
  --ink:     #16273f;   /* primary text — deep navy */
  --sea:     #2b6f9e;   /* primary accent — Mediterranean azure (= metro L5) */
  --sea-700: #1d5479;
  --deep:    #122d49;   /* dark section background */
  --deep-2:  #0d2238;
  --brass:   #b0823c;   /* warm secondary — oak / brass */
  --brass-d: #8f6a2f;
  --sand:    #e7dcc8;   /* warm sand */
  --paper:   #f1ede5;   /* warm off-white section bg */
  --cream:   #faf7f1;
  --white:   #ffffff;
  --muted:   #5b6776;
  --line:    rgba(18, 45, 73, .12);
  --line-2:  rgba(18, 45, 73, .08);
  --wa:      #25a766;   /* whatsapp green, slightly muted to fit palette */
  --wa-d:    #1d8a54;

  --shadow-sm: 0 2px 10px rgba(18, 45, 73, .06);
  --shadow:    0 14px 40px rgba(18, 45, 73, .12);
  --shadow-lg: 0 30px 70px rgba(18, 45, 73, .22);

  --radius:    18px;
  --radius-sm: 12px;
  --radius-lg: 26px;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Assistant', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap: 1180px;
  --header-h: 72px;
}

html.lang-he { --font-display: 'Frank Ruhl Libre', 'Assistant', Georgia, serif; }

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 17px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font: inherit; color: inherit; }

/* ---------- layout helpers ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(20px, 5vw, 48px); }
.section { padding-block: clamp(64px, 9vw, 118px); }

.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--sea);
  display: inline-flex; align-items: center; gap: .6em; margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--brass); border-radius: 2px; }
html.lang-he .eyebrow { letter-spacing: .08em; }
.eyebrow-light { color: #bcdcf2; }
.eyebrow-light::before { background: var(--brass); }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4.4vw, 50px);
  line-height: 1.08;
  letter-spacing: -.01em;
  color: var(--ink);
}
.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-sub { color: var(--muted); font-size: 1.06rem; margin-top: 14px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: .98rem;
  line-height: 1; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap; cursor: pointer; border: 1.5px solid transparent;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--sea); color: #fff; box-shadow: 0 8px 22px rgba(43, 111, 158, .34); }
.btn-primary:hover { background: var(--sea-700); box-shadow: 0 12px 28px rgba(43, 111, 158, .42); transform: translateY(-2px); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 8px 22px rgba(37, 167, 102, .32); }
.btn-wa:hover { background: var(--wa-d); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--sea); border-color: rgba(43, 111, 158, .4); }
.btn-outline:hover { background: var(--sea); color: #fff; border-color: var(--sea); }
.btn-ghost-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.6); backdrop-filter: blur(6px); }
.btn-ghost-light:hover { background: #fff; color: var(--ink); border-color: #fff; transform: translateY(-2px); }
.btn-sm { padding: 9px 16px; font-size: .86rem; }
.btn-block { width: 100%; }
.ico-wa { flex: none; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.header-inner { display: flex; align-items: center; gap: 18px; width: 100%; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: #fff; transition: color .3s ease; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.16); color: #fff;
  border: 1px solid rgba(255,255,255,.35); transition: all .3s ease;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; letter-spacing: .01em; }
.brand-sub { font-size: .68rem; letter-spacing: .26em; text-transform: uppercase; opacity: .85; }

.main-nav { display: flex; gap: 26px; margin-inline: auto; }
.main-nav a {
  color: rgba(255,255,255,.92); font-weight: 500; font-size: .96rem; position: relative;
  transition: color .2s ease; padding-block: 6px;
}
.main-nav a::after {
  content: ""; position: absolute; inset-block-end: 0; inset-inline-start: 0;
  width: 100%; height: 2px; background: var(--brass);
  transform: scaleX(0); transform-origin: inline-start; transition: transform .25s ease;
}
.main-nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-switch {
  display: inline-flex; padding: 3px; border-radius: 999px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3);
}
.lang-switch button {
  padding: 6px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700;
  color: rgba(255,255,255,.85); letter-spacing: .04em; transition: all .2s ease;
}
.lang-switch button.is-active { background: #fff; color: var(--ink); }

/* header solid state (set by JS once scrolled past hero) */
.site-header.scrolled { background: rgba(255,255,255,.92); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line), var(--shadow-sm); }
.site-header.scrolled .brand { color: var(--ink); }
.site-header.scrolled .brand-mark { background: var(--sea); color: #fff; border-color: transparent; }
.site-header.scrolled .brand-sub { opacity: .7; }
.site-header.scrolled .main-nav a { color: var(--ink); }
.site-header.scrolled .lang-switch { background: var(--paper); border-color: var(--line); }
.site-header.scrolled .lang-switch button { color: var(--muted); }
.site-header.scrolled .lang-switch button.is-active { background: var(--sea); color: #fff; }
.header-cta { padding: 10px 18px; font-size: .9rem; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  color: #fff; overflow: hidden;
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(10, 28, 46, .86) 0%, rgba(10, 28, 46, .32) 42%, rgba(10, 28, 46, .12) 70%, rgba(10, 28, 46, .42) 100%),
    linear-gradient(to var(--inline-end, right), rgba(10, 28, 46, .5), rgba(10, 28, 46, 0) 60%);
}
.hero-content { position: relative; z-index: 2; padding-block: clamp(96px, 16vh, 168px) clamp(56px, 9vh, 96px); max-width: 760px; }
.hero-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(40px, 7.6vw, 84px); line-height: 1.02; letter-spacing: -.015em;
  margin-block: 6px 18px; text-wrap: balance;
}
.hero-sub { font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 560px; color: rgba(255,255,255,.92); font-weight: 300; }
.hero-chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; margin-block: 26px 30px; }
.hero-chips li {
  font-size: .9rem; font-weight: 600; padding: 8px 15px; border-radius: 999px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(6px);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 13px; }
.hero-scroll {
  position: absolute; inset-block-end: 22px; inset-inline-start: 50%; transform: translateX(-50%);
  z-index: 2; color: rgba(255,255,255,.8); animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- overview / amenities ---------- */
.overview { background: var(--white); }
.grid-overview { display: grid; grid-template-columns: 1.25fr .85fr; gap: clamp(34px, 6vw, 78px); align-items: start; }
.lead { font-size: 1.24rem; line-height: 1.6; color: var(--ink); margin-block: 8px 20px; font-weight: 400; }
.body { color: var(--muted); font-size: 1.07rem; }

.amenities { background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: clamp(26px, 3.4vw, 38px); }
.amenities-title { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; margin-bottom: 18px; }
.amenities-list { list-style: none; padding: 0; display: grid; gap: 4px; }
.amenities-list li { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line-2); font-weight: 500; }
.amenities-list li:first-child { border-top: none; }
.am-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--sea); border: 1px solid var(--line); }

/* ---------- gallery ---------- */
.gallery-section { background: var(--cream); }
.gallery-grid { columns: 4 240px; column-gap: 16px; }
.g-item {
  position: relative; break-inside: avoid; margin-bottom: 16px; border-radius: var(--radius-sm);
  overflow: hidden; cursor: pointer; box-shadow: var(--shadow-sm); background: var(--sand);
  display: block;
}
.g-item img { width: 100%; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.g-item::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,28,46,.4), transparent 45%);
  opacity: 0; transition: opacity .3s ease;
}
.g-cap {
  position: absolute; inset-block-end: 12px; inset-inline-start: 14px; z-index: 2;
  color: #fff; font-weight: 600; font-size: .9rem; opacity: 0; transform: translateY(6px);
  transition: opacity .3s ease, transform .3s ease; text-shadow: 0 1px 6px rgba(0,0,0,.4);
}
.g-item:hover img { transform: scale(1.06); }
.g-item:hover::after { opacity: 1; }
.g-item:hover .g-cap { opacity: 1; transform: translateY(0); }
.g-zoom {
  position: absolute; inset-block-start: 12px; inset-inline-end: 12px; z-index: 2;
  width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center;
  background: rgba(255,255,255,.9); color: var(--ink); opacity: 0; transform: scale(.85); transition: all .25s ease;
}
.g-item:hover .g-zoom { opacity: 1; transform: scale(1); }

/* ---------- location ---------- */
.location { background: var(--white); }
.location-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(26px, 4vw, 48px); align-items: stretch; }
.map-card { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); display: flex; flex-direction: column; background: #fff; }
.map-frame { width: 100%; height: 100%; min-height: 380px; border: 0; flex: 1; filter: saturate(.9); }
.map-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; flex-wrap: wrap; }
.map-addr { display: flex; align-items: center; gap: 9px; font-size: .92rem; font-weight: 500; color: var(--ink); }
.map-pin { color: var(--sea); flex: none; }

.location-aside { display: flex; flex-direction: column; gap: 26px; }
.loc-highlights { list-style: none; padding: 0; display: grid; gap: 18px; }
.loc-highlights li { display: flex; align-items: flex-start; gap: 14px; }
.loc-ico { flex: none; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--paper); color: var(--brass); border: 1px solid var(--line); }
.loc-highlights strong { display: block; font-weight: 700; font-size: 1.04rem; }
.loc-highlights span span,
.loc-highlights div span { color: var(--muted); font-size: .96rem; }
.loc-highlights div strong { color: var(--ink); }

/* metro signature */
.metro { margin-block-start: auto; background: linear-gradient(135deg, var(--deep), var(--deep-2)); color: #fff; border-radius: var(--radius); padding: 24px 26px 30px; box-shadow: var(--shadow); }
.metro-head { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.metro-badge {
  font-family: var(--font-body); font-weight: 800; font-size: 1rem; letter-spacing: .02em;
  width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center;
  background: var(--sea); color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.3); flex: none;
}
.metro-label { font-weight: 600; font-size: 1.02rem; }
.metro-line { position: relative; display: flex; align-items: flex-start; justify-content: space-between; padding-block-start: 6px; }
.metro-line::before {
  content: ""; position: absolute; inset-block-start: 12px; inset-inline: 7px; height: 4px; border-radius: 4px;
  background: rgba(255,255,255,.22);
}
.metro-line::after {
  content: ""; position: absolute; inset-block-start: 12px; inset-inline-start: 7px; height: 4px; border-radius: 4px;
  width: 0; background: var(--sea); transition: width 1.1s cubic-bezier(.4,0,.2,1);
}
html[dir="rtl"] .metro-line::after { inset-inline-start: auto; inset-inline-end: 7px; }
.metro.in .metro-line::after { width: calc(100% - 14px); }
.stop { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.stop i { width: 14px; height: 14px; border-radius: 999px; background: var(--deep); border: 3px solid rgba(255,255,255,.45); transition: border-color .3s ease, background .3s ease, transform .3s ease; }
.metro.in .stop i { border-color: var(--sea); }
.stop-start i, .stop-end i { width: 17px; height: 17px; background: #fff; border-color: var(--sea); }
.metro.in .stop-start i, .metro.in .stop-end i { box-shadow: 0 0 0 4px rgba(43,111,158,.35); }
.stop b { font-size: .82rem; font-weight: 700; white-space: nowrap; }
.stop:not(.stop-start):not(.stop-end) b { display: none; }

/* ---------- availability ---------- */
.availability { background: linear-gradient(160deg, var(--deep) 0%, var(--deep-2) 100%); color: #fff; position: relative; }
.availability .section-title { color: #fff; }
.availability .section-sub { color: rgba(255,255,255,.78); }
.avail-card {
  background: var(--white); color: var(--ink); border-radius: var(--radius-lg);
  padding: clamp(24px, 3.4vw, 38px); box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 18px 20px; align-items: end;
  max-width: 920px;
}
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.field input, .field select {
  appearance: none; -webkit-appearance: none;
  padding: 13px 15px; border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  background: var(--cream); color: var(--ink); font-weight: 500; width: 100%; transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 4px rgba(43,111,158,.14); }
.field select { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235b6776' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m4 6 4 4 4-4'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; padding-inline-end: 38px; }
html[dir="rtl"] .field select { background-position: left 14px center; padding-inline-end: 15px; padding-inline-start: 38px; }
.avail-actions { grid-column: 1 / -1; display: flex; gap: 12px; flex-wrap: wrap; }
.avail-actions .btn { flex: 1 1 220px; }
.avail-error { grid-column: 1 / -1; color: #c0392b; font-weight: 600; font-size: .95rem; background: #fdecea; padding: 10px 14px; border-radius: 10px; }
.avail-note { grid-column: 1 / -1; color: var(--muted); font-size: .9rem; margin: 0; }

/* ---------- contact ---------- */
.contact { background: var(--paper); }
.contact-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(34px, 5vw, 64px); text-align: center; box-shadow: var(--shadow); }
.contact-card .eyebrow, .contact-card .section-head { justify-content: center; }
.contact-card .eyebrow { margin-inline: auto; }
.contact-card .section-sub { margin-inline: auto; max-width: 520px; }
.contact-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-block-start: 36px; }
.contact-btn { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--cream); text-align: start; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.contact-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cm-ico { flex: none; width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.contact-btn.wa .cm-ico { background: var(--wa); }
.contact-btn.email .cm-ico { background: var(--sea); }
.contact-btn.phone .cm-ico { background: var(--brass); }
.contact-btn.wa:hover { border-color: var(--wa); }
.contact-btn.email:hover { border-color: var(--sea); }
.contact-btn.phone:hover { border-color: var(--brass); }
.cm-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.cm-text strong { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.cm-text span:last-child { font-weight: 600; font-size: 1.02rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }

/* ---------- footer ---------- */
.site-footer { background: var(--deep-2); color: rgba(255,255,255,.78); padding-block: 40px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.footer-brand .brand-name { color: #fff; font-size: 1.3rem; }
.footer-brand .brand-sub { letter-spacing: .12em; font-size: .8rem; opacity: .8; }
.footer-meta { font-size: .92rem; }
.footer-rights { font-size: .82rem; opacity: .65; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(8, 20, 33, .94); display: flex; align-items: center; justify-content: center; padding: 4vh 4vw; backdrop-filter: blur(4px); }
.lightbox[hidden] { display: none; }
.lb-figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lb-img { max-width: min(94vw, 1300px); max-height: 82vh; width: auto; object-fit: contain; border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lb-caption { color: rgba(255,255,255,.85); font-weight: 500; font-size: .96rem; }
.lb-count { color: rgba(255,255,255,.55); margin-inline-start: 8px; }
.lb-close { position: absolute; inset-block-start: 18px; inset-inline-end: 22px; color: #fff; width: 46px; height: 46px; border-radius: 999px; display: grid; place-items: center; background: rgba(255,255,255,.1); transition: background .2s ease; }
.lb-close:hover { background: rgba(255,255,255,.22); }
.lb-nav { position: absolute; inset-block-start: 50%; transform: translateY(-50%); color: #fff; width: 54px; height: 54px; border-radius: 999px; display: grid; place-items: center; background: rgba(255,255,255,.1); transition: background .2s ease; }
.lb-nav:hover { background: rgba(255,255,255,.24); }
.lb-prev { inset-inline-start: 18px; }
.lb-next { inset-inline-end: 18px; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .main-nav { display: none; }
  .grid-overview { grid-template-columns: 1fr; }
  .location-grid { grid-template-columns: 1fr; }
  .map-frame { min-height: 320px; }
  .gallery-grid { columns: 3 200px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .header-cta span { display: none; }
  .header-cta { padding: 10px; }
  .avail-card { grid-template-columns: 1fr 1fr; }
  .avail-card .field:nth-child(3) { grid-column: 1 / -1; }
  .contact-methods { grid-template-columns: 1fr; }
  .gallery-grid { columns: 2 150px; column-gap: 12px; }
  .g-item { margin-bottom: 12px; }
  .hero-chips li { font-size: .82rem; padding: 7px 12px; }
  .lb-nav { width: 44px; height: 44px; }
}
@media (max-width: 460px) {
  .brand-sub { display: none; }
  .lang-switch button { padding: 6px 9px; }
  .avail-card { grid-template-columns: 1fr; }
  .stop b { font-size: .72rem; }
}

/* ---------- accessibility ---------- */
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .metro.in .metro-line::after { transition: none; }
}
