/* The Point Marbella — gateway
 *
 * Two photographic doors, side by side on wide screens and stacked on phones.
 * No JavaScript. Each door is one link; the scrims are dark enough that the
 * white text keeps at least 4.5:1 contrast even over a pure white photograph
 * (see the README's Gateway section). */

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/outfit-latin-300-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/inter-latin-500-normal.woff2") format("woff2");
}

:root {
  --night: #04151F;
  --sand: #F1E9DD;         /* warm white: the brand sand, lifted for contrast */
  --sea-pale: #DDF1F4;     /* cool white: the brand sea, lifted for contrast */
  --rule: rgba(255, 255, 255, .24);
  --land: 24, 15, 8;       /* warm scrim, restaurant side */
  --sea: 0, 32, 52;        /* deep-water scrim, jet ski side */
  --ease: cubic-bezier(.22, .9, .3, 1);
  --ff: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ff-b: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html, body { margin: 0; background: var(--night); color: #fff; }
body {
  font-family: var(--ff);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
main { display: block; }

/* ── Logo, centred over the seam ─────────────────────────────────────── */
.mark {
  position: absolute;
  z-index: 3;
  top: clamp(22px, 4.5vh, 48px);
  left: 50%;
  margin: 0;
  transform: translateX(-50%);
  line-height: 0;
  pointer-events: none;
}
.mark img { width: 128px; height: auto; }

/* ── The two doors ───────────────────────────────────────────────────── */
.doors {
  display: flex;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
}

.door {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  transition: flex-grow .9s var(--ease);
}
.door + .door { border-left: 1px solid var(--rule); }

.door-img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 1.6s var(--ease), filter .9s var(--ease);
}
.door--land .door-img { object-position: 38% 50%; }
.door--sea .door-img { object-position: 66% 50%; }

/* Bottom scrim carries the text; top scrim carries the logo. */
.door::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
/* lighter on the restaurant side: the room and the sea stay bright, the scrim only under the text and logo */
.door--land::after {
  background:
    linear-gradient(to top, rgba(var(--land), .74) 0%, rgba(var(--land), .42) 34%, rgba(var(--land), 0) 62%),
    linear-gradient(to bottom, rgba(var(--land), .34) 0%, rgba(var(--land), 0) 22%);
}
.door--sea::after {
  background:
    linear-gradient(to top, rgba(var(--sea), .9) 0%, rgba(var(--sea), .72) 40%, rgba(var(--sea), 0) 78%),
    linear-gradient(to bottom, rgba(var(--sea), .5) 0%, rgba(var(--sea), 0) 26%);
}

.door-body {
  display: block;
  width: 100%;
  padding: 0 clamp(28px, 4.6vw, 76px) clamp(40px, 8vh, 96px);
}

.door-title {
  display: block;
  max-width: 11ch;
  font-weight: 300;
  font-size: clamp(2.4rem, 4vw, 4.25rem);
  line-height: 1;
  letter-spacing: -.025em;
}
.door-es {
  display: block;
  margin-top: .85rem;
  font-weight: 300;
  font-size: clamp(1.05rem, 1.35vw, 1.3rem);
  letter-spacing: .005em;
}
.door--land .door-es { color: var(--sand); }
.door--sea .door-es { color: var(--sea-pale); }

.door-cta {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  margin-top: clamp(1.6rem, 3.6vh, 2.6rem);
  padding-bottom: .7rem;
  border-bottom: 1px solid rgba(255, 255, 255, .55);
  font: 500 .75rem/1 var(--ff-b);
  letter-spacing: .22em;
  text-transform: uppercase;
  transition: border-color .5s var(--ease);
}
.door-cta-es::before { content: "·"; margin-right: .7rem; }
.door-cta svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .6s var(--ease);
}

/* Keyboard focus: an inset frame around the whole door. */
.door:focus { outline: none; }
.door:focus-visible::before {
  content: "";
  position: absolute;
  inset: 14px;
  z-index: 2;
  border: 2px solid #fff;
  pointer-events: none;
}
.door:focus-visible .door-cta { border-color: #fff; }
.door:focus-visible .door-cta svg { transform: translateX(6px); }

/* Pointer devices: the chosen door opens a little; the other recedes. */
@media (hover: hover) and (min-width: 761px) and (orientation: landscape) {
  .door:hover, .door:focus-visible { flex-grow: 1.14; }
  .door:hover .door-img { transform: scale(1.06); }
  .doors:hover .door:not(:hover) .door-img { filter: brightness(.78) saturate(.9); }
  .door:hover .door-cta { border-color: #fff; }
  .door:hover .door-cta svg { transform: translateX(6px); }
}

/* ── Phones and portrait tablets: stacked doors, both visible without
 *    scrolling ─────────────────────────────────────────────────────────── */
@media (max-width: 760px), (max-width: 1100px) and (orientation: portrait) {
  .mark { top: max(18px, env(safe-area-inset-top)); }
  .mark img { width: 96px; }

  .doors {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
  }
  .door { flex: 1 0 50vh; flex-basis: 50svh; min-height: 300px; }
  .door + .door { border-left: 0; border-top: 1px solid var(--rule); }
  .door--land .door-img { object-position: 50% 62%; }
  .door--sea .door-img { object-position: 68% 50%; }

  .door-body { padding: 0 24px 30px; }
  .door-title { max-width: none; font-size: clamp(2rem, 8.6vw, 2.75rem); }
  .door-es { margin-top: .5rem; font-size: 1.05rem; }
  .door-cta { margin-top: 1.1rem; }
  .door:focus-visible::before { inset: 8px; }
}

/* Short landscape screens (phones on their side): fit the viewport exactly. */
@media (min-width: 761px) and (max-height: 560px) {
  .doors { min-height: 0; }
  .mark { top: 14px; }
  .mark img { width: 84px; }
  .door-title { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
  .door-es { margin-top: .4rem; font-size: 1rem; }
  .door-cta { margin-top: 1rem; }
  .door-body { padding-bottom: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .door, .door-img, .door-cta, .door-cta svg { transition: none; }
  .door-img, .door:hover .door-img { transform: none; }
}
