/* ===========================================================================
   Sunset Villa — Ibiza
   ---------------------------------------------------------------------------
   Cormorant Garamond throughout, self-hosted so the page works offline when
   opened straight from disk. One variable file covers weights 300–700.

   The text colour is a warm cream, oklch(95.4% 0.038 75.164) = #FFEDD4.
   That colour has only 1.03–1.16:1 contrast on white or light grey, i.e.
   invisible, so every surface on the site is dark. Cream serif on deep navy
   is the classic luxury-property pairing and gives 15:1 contrast.
   To go back to dark-text-on-light, swap --ink and --bg.
   =========================================================================== */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-latin.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-latin-ext.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Tokens -------------------------------------------------------------- */
:root {
  /* Text — the colour you specified, plus two softened steps for secondary
     copy. Written as oklch with an alpha slash so all three stay in step if
     you change the base. */
  --ink:       oklch(95.4% 0.038 75.164);
  --ink-soft:  oklch(95.4% 0.038 75.164 / .74);
  --ink-faint: oklch(95.4% 0.038 75.164 / .5);
  --line:      oklch(95.4% 0.038 75.164 / .17);

  /* Surfaces, darkest to lightest */
  --bg-deep: #0A1522;
  --bg:      #0E1B2B;
  --bg-alt:  #132132;
  --bg-soft: #182839;

  --accent: #C9B99C;   /* beige — hairlines, icons, the kicker */

  --serif: "Cormorant Garamond", Cormorant, Garamond, Georgia, serif;

  /* Cormorant is a delicate high-contrast serif: it needs more weight in
     small caps labels than a sans would, and less in display sizes. */
  --w-display: 500;
  --w-head:    500;
  --w-label:   600;
  --w-body:    400;

  --track-head:  -.005em;
  --track-label:  .2em;

  /* ---- WHERE THE HERO TEXT SITS -----------------------------------------
     Change these three lines to move the whole hero text block. Nothing
     else needs touching.
       --hero-x  across:  flex-start (left) | center | flex-end (right)
       --hero-y  down:    flex-start (top)  | center | flex-end (bottom)
       --hero-align       left | center | right   (match it to --hero-x)
     ---------------------------------------------------------------------- */
  --hero-x: flex-start;
  --hero-y: flex-end;
  --hero-align: left;

  /* Sand — the hero text colour, sitting over the dark pine canopy. */
  --sand: #DFCDA8;

  --gut: clamp(1.25rem, 4vw, 3rem);
  --sec-y: clamp(4.5rem, 10vw, 9rem);
  --head-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* --- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--head-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--serif);
  font-weight: var(--w-body);
  /* Cormorant has a small x-height, so it needs a larger base size and more
     leading than a sans to read comfortably. */
  font-size: clamp(1.12rem, 1.04rem + .35vw, 1.25rem);
  line-height: 1.72;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: var(--w-head); line-height: 1.12;
             letter-spacing: var(--track-head); }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* fill/stroke must be set on the <svg> that holds the <use>, not on the
   <symbol> in the sprite — they are inherited into the referenced content,
   whereas rules matching the symbol itself never reach the rendered copy. */
.icon {
  fill: none; stroke: currentColor; stroke-width: 1.4;
  stroke-linecap: round; stroke-linejoin: round;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  padding: .75rem 1.25rem; background: var(--bg-deep); color: var(--ink);
}
.skip:focus { left: .5rem; top: .5rem; }

/* --- Layout -------------------------------------------------------------- */
.wrap { width: min(100% - 2 * var(--gut), 1120px); margin-inline: auto; }
.wrap-wide { width: min(100% - 2 * var(--gut), 1440px); }

.sec { padding-block: var(--sec-y); background: var(--bg); }
.sec-alt { background: var(--bg-alt); }
.sec-beige { background: var(--bg-soft); }

.eyebrow {
  font-size: .82rem;
  font-weight: var(--w-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.eyebrow::after {
  content: ""; display: block; width: 46px; height: 1px;
  background: var(--accent); margin-top: 1.1rem; opacity: .55;
}
.sec h2 {
  font-size: clamp(1.9rem, 1.2rem + 2.2vw, 2.9rem);
  max-width: 24ch;      /* wide enough for "Modern Country House for Rent in Ibiza" */
  text-wrap: balance;   /* keeps the last line from being a single orphan word */
}
/* Full --ink, not the softened step: Cormorant is a fine, high-contrast serif
   and dimming it to 74% made running text look washed out on the dark ground.
   --ink-soft is kept for genuinely secondary text (notes, captions, footer). */
.lede {
  margin-top: 1.6rem;
  max-width: 60ch;
  font-size: clamp(1.14rem, 1.05rem + .45vw, 1.4rem);
  color: var(--ink);
}
.body-copy { margin-top: 1.15rem; max-width: 62ch; color: var(--ink); }
.body-copy p + p { margin-top: 1.05rem; }

/* --- Header -------------------------------------------------------------- */
/* The bar is solid from the top rather than transparent-over-photo. Measured
   over the hero, cream nav text on the bright sky came out at 1.28:1 — the
   links were effectively invisible. This is UI chrome, not a scrim on the
   photograph: the picture below it stays at full brightness.
   To go back to transparent-until-scrolled, move the background/box-shadow
   into the .is-solid rule below. */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--head-h);
  display: flex; align-items: center;
  background: var(--bg-deep);
  box-shadow: 0 1px 0 var(--line);
  transition: background .35s var(--ease), box-shadow .35s var(--ease);
}
.head-inner { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem); }

.mark {
  font-size: 1.1rem; letter-spacing: .17em; text-transform: uppercase;
  font-weight: var(--w-label);
  text-decoration: none; color: var(--ink); white-space: nowrap;
}
.mark em { font-style: normal; opacity: .62; margin-left: .5em; letter-spacing: .22em; font-size: .78em; }

.nav { display: flex; gap: clamp(1rem, 2.4vw, 2.1rem); margin-left: auto; }
.nav a {
  position: relative;
  font-size: .92rem; letter-spacing: .15em; text-transform: uppercase;
  font-weight: var(--w-label);
  text-decoration: none; color: var(--ink); padding-block: .4rem;
  white-space: nowrap;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }

.lang { display: flex; align-items: center; gap: .1rem; }
.lang button {
  font-size: .84rem; letter-spacing: .12em; padding: .3rem .45rem;
  font-weight: var(--w-label);
  color: var(--ink); opacity: .55; transition: opacity .25s var(--ease);
}
.lang button:hover { opacity: .9; }
.lang button.is-on { opacity: 1; border-bottom: 1px solid var(--accent); }

.burger { display: none; width: 34px; height: 26px; position: relative; }
.burger span {
  position: absolute; left: 3px; right: 3px; height: 1px; background: var(--ink);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.burger span:nth-child(1) { top: 6px; }
.burger span:nth-child(2) { top: 12.5px; }
.burger span:nth-child(3) { top: 19px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* --- Hero ---------------------------------------------------------------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: var(--hero-y); }
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 60%;
}
/* No blend at the foot — the photograph runs to its edge and simply stops
   where the next section begins. */

.hero-body {
  position: relative; z-index: 2;
  width: 100%;              /* full bleed, so --hero-x has an edge to push to */
  display: flex; flex-direction: column;
  align-items: var(--hero-x);
  text-align: var(--hero-align);
  padding-top: clamp(5rem, 12vh, 9rem);
}

/* A horizontal strip run along the foot of the picture, built exactly like the
   banner at the top of the page: the same solid dark blue, the same sand type.
   Top and bottom of the hero are then bracketed by matching bands.
   Solid, not translucent — no blur, no gradient, no radius. It stops short of
   the right edge and sits low, so it clears the house and the pool. */
.hero-strip {
  width: 100%;
  /* Vertical padding as before; horizontal padding matches the content
     column, so the title lines up with SUNSET VILLA in the bar above and
     THE PROPERTY in the section below. */
  padding-block: clamp(1.1rem, 2vw, 1.6rem);
  padding-inline: max(var(--gut), calc((100% - 1120px) / 2));
  color: var(--sand);
  background: var(--bg-deep);
  box-shadow: 0 -1px 0 rgba(223, 205, 168, .18);
}
.hero .hero-strip h1,
.hero .hero-strip .hero-tagline,
.hero .hero-strip .hero-sub { max-width: none; }

.hero .hero-strip .hero-kicker {
  font-size: .72rem; letter-spacing: .3em; margin-bottom: .55rem;
  color: rgba(223, 205, 168, .68);
}
/* Title and location share a line, divided by a hairline, so the block stays
   shallow enough to read as a strip rather than a panel. */
.hero-line {
  display: flex; align-items: baseline; flex-wrap: wrap;
  column-gap: clamp(.9rem, 1.8vw, 1.5rem); row-gap: .2rem;
}
.hero .hero-strip h1 {
  font-size: clamp(1.5rem, 1.05rem + 1.4vw, 2.15rem);
  line-height: 1.15;
}
.hero .hero-strip .hero-tagline {
  margin-top: 0;
  font-size: clamp(.92rem, .88rem + .25vw, 1.05rem);
  padding-left: clamp(.9rem, 1.8vw, 1.5rem);
  border-left: 1px solid rgba(223, 205, 168, .28);
  opacity: .9;
}
.hero .hero-strip .hero-sub {
  margin-top: .5rem;
  font-size: .84rem; line-height: 1.55; opacity: .68;
}
.hero-kicker {
  font-size: clamp(1.15rem, .95rem + 1vw, 1.75rem);
  font-weight: var(--w-label);
  line-height: 1;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: inherit;
  margin-bottom: .8rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 1.15rem + 3.4vw, 4.1rem);
  font-weight: var(--w-display);
  line-height: 1.04;
  max-width: 16ch;
  text-wrap: balance;
}
/* Same size as the kicker above the headline, so the two frame the title. */
.hero-tagline {
  margin-top: .8rem;
  max-width: 30ch;
  font-size: clamp(1.15rem, .95rem + 1vw, 1.75rem);
  font-weight: var(--w-body);
  line-height: 1.3;
  color: inherit;
}
.hero-sub {
  margin-top: 1.35rem;
  max-width: 46ch;
  font-size: clamp(1rem, .95rem + .3vw, 1.14rem);
  line-height: 1.7;
  color: inherit; opacity: .88;
}

/* --- Features ------------------------------------------------------------ */
/* Rules are drawn per-tile rather than as a 1px grid gap, so that a partly
   filled last row ends cleanly instead of leaving a block of empty colour.
   The owner can add or remove tiles freely without the grid looking broken. */
.feature-grid {
  list-style: none; margin: clamp(2.5rem, 5vw, 4rem) 0 0; padding: 0;
  display: grid; gap: 0;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.feature-grid li {
  padding: clamp(1.4rem, 3vw, 2rem) clamp(1.1rem, 2.4vw, 1.6rem);
  display: flex; flex-direction: column; gap: .95rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.feature-grid svg { width: 26px; height: 26px; color: var(--accent); flex: none; }
.feature-grid span { font-size: 1.04rem; line-height: 1.45; color: var(--ink); }

/* --- Gallery ------------------------------------------------------------- */
.gallery-grid {
  list-style: none; margin: clamp(2.2rem, 5vw, 3.4rem) 0 0; padding: 0;
  display: grid; gap: clamp(.5rem, 1.2vw, 1rem);
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
}
.gallery-grid li { margin: 0; }

.shot {
  display: block; width: 100%; padding: 0; overflow: hidden;
  aspect-ratio: 4 / 3; background: var(--bg-soft); position: relative;
}
.shot img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease), opacity .5s var(--ease);
}
.shot:hover img { transform: scale(1.045); }
.shot::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(10, 21, 34, .3); opacity: 0;
  transition: opacity .4s var(--ease);
}
.shot:hover::after { opacity: 1; }

.slot {
  aspect-ratio: 4 / 3;
  background: repeating-linear-gradient(-45deg,
    var(--bg-soft) 0 10px, var(--bg-alt) 10px 20px);
  display: grid; place-content: center; gap: .35rem; text-align: center;
  color: var(--ink-faint);
  border: 1px solid var(--line);
}
.slot b { font-size: 1.5rem; font-weight: var(--w-label); }
.slot span { font-size: .76rem; letter-spacing: .18em; text-transform: uppercase; }

/* --- Prices -------------------------------------------------------------- */

.consult {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: clamp(1.8rem, 4vw, 2.6rem);
  background: var(--bg-deep);
  border: 1px solid var(--line);
  max-width: 640px;
}
.consult h3 {
  font-size: .8rem; font-weight: var(--w-label);
  letter-spacing: .3em; text-transform: uppercase; color: var(--accent);
}
.consult p { margin-top: .8rem; font-size: clamp(1.4rem, 1.1rem + .9vw, 2rem); line-height: 1.3; }

/* --- Contact ------------------------------------------------------------- */
.contact-list {
  margin: clamp(2.4rem, 5vw, 3.4rem) 0 0;
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  background: var(--line);
  border: 1px solid var(--line);
}
.contact-list > div { background: var(--bg-soft); padding: clamp(1.5rem, 3vw, 2.1rem); }
.contact-list dt {
  font-size: .78rem; font-weight: var(--w-label);
  letter-spacing: .26em; text-transform: uppercase; color: var(--accent);
  margin-bottom: .85rem;
}
.contact-list dd { margin: 0; font-size: 1.14rem; line-height: 1.6; white-space: pre-line; }
.contact-list a { text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.contact-list a:hover { border-bottom-color: var(--ink); }
/* Placeholder email/phone carry no href — don't dress them up as links. */
.contact-list a:not([href]) { border-bottom: 0; color: var(--ink-soft); }

/* --- Footer -------------------------------------------------------------- */
.site-foot { background: var(--bg-deep); color: var(--ink-faint); padding-block: 2.6rem; }
.site-foot p { font-size: .86rem; letter-spacing: .13em; text-transform: uppercase; }

/* --- Lightbox ------------------------------------------------------------ */
.lb {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(6, 12, 20, .96);
  display: grid; place-items: center;
  padding: clamp(2.75rem, 6vw, 4rem);
}
.lb[hidden] { display: none; }
.lb-figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; gap: 1rem; }
.lb-figure img {
  max-width: 100%; max-height: calc(100svh - 11rem);
  width: auto; height: auto; margin-inline: auto; object-fit: contain;
}
.lb-figure figcaption {
  text-align: center; color: var(--ink-soft);
  font-size: .95rem; letter-spacing: .06em;
}
.lb-count { color: var(--ink-faint); margin-left: .6rem; }
.lb-close, .lb-nav { position: absolute; color: var(--ink); opacity: .65; transition: opacity .25s var(--ease); }
.lb-close:hover, .lb-nav:hover { opacity: 1; }
.lb-close { top: 1rem; right: 1.25rem; font-size: 2.4rem; line-height: 1; width: 44px; height: 44px; }
.lb-nav { top: 50%; transform: translateY(-50%); font-size: 3rem; line-height: 1; width: 54px; height: 68px; }
.lb-prev { left: .25rem; }
.lb-next { right: .25rem; }
body.lb-open { overflow: hidden; }

/* --- Reveal on scroll ---------------------------------------------------- */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* --- Small screens ------------------------------------------------------- */
@media (max-width: 860px) {
  :root { --head-h: 66px; }
  .burger { display: block; order: 3; margin-left: .25rem; }
  .lang { margin-left: auto; }

  .nav {
    position: fixed; inset: var(--head-h) 0 auto 0;
    flex-direction: column; gap: 0; margin: 0;
    background: var(--bg-deep);
    padding: .5rem var(--gut) 1.75rem;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease);
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding-block: .95rem; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav a::after { display: none; }

  .lb-nav { font-size: 2.4rem; width: 44px; }

  /* 58% of a phone is only ~220px — too narrow to hold a line of title, and
     the block stops reading as a strip. Full width here instead. */
  .hero-strip { width: 100%; }

  /* Decorative and aria-hidden; there is no room for it beside the strip. */
  
@media (max-width: 420px) {
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .feature-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* --- Motion & print ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .rv { opacity: 1; transform: none; }
}

@media print {
  .site-head, .lb, .skip { display: none !important; }
  .hero { min-height: 60vh; }
  body, .sec, .sec-alt, .sec-beige, .consult, .contact-list > div {
    background: #fff !important; color: #000 !important;
  }
}
