/* IslandBook page: the sea.
   A deep green-black ground, lit in full colour from above. The title is a pair of words:
   ISLAND is a row of windows onto the bright surface, with light falling out of the letters,
   and BOOK is solid. A marble woman, sunk and looking up at the surface, floats in front of them. */

/* ================= Hero ================= */

.ibh {
  --gx: max(var(--gutter), (100vw - 1760px) / 2);
  position: relative; display: grid; align-content: end;
  min-height: max(100svh, 740px);
  padding: calc(var(--nav-h) + 12px) var(--gx) 70px;
  overflow: clip;
  background:
    radial-gradient(60% 70% at 70% 10%, rgba(20, 150, 140, .36), transparent 70%),
    radial-gradient(50% 50% at 10% 100%, rgba(6, 60, 70, .5), transparent 70%),
    var(--ground);
}
.ibh::before { content: ""; position: absolute; z-index: 5; inset: 0 0 auto 0; height: 150px; background: linear-gradient(rgba(3, 16, 15, .78), transparent); pointer-events: none; }
.ibh > .light { z-index: 0; --lit: .8; -webkit-mask: linear-gradient(transparent 42%, #000); mask: linear-gradient(transparent 42%, #000); }

/* The statue. Behind the title, the light she is looking up into; in front of it, the marble
   itself, cooled by the water, darker toward the deep, with the surface light moving over it. */
.ibh__figure {
  position: absolute; right: calc(var(--gx) - 1vw); bottom: -7%;
  height: min(96%, 72vw); aspect-ratio: 2 / 3; pointer-events: none;
}
/* Her water: shafts of sun, reef fish and bubbles, feathered into the page on every side. */
.ibh__scene {
  position: absolute; z-index: 0; right: calc(var(--gx) - 13vw); top: -6%; height: 132%; aspect-ratio: 5 / 6; pointer-events: none;
  background: url(/assets/art/sea-water.webp) 50% 0 / cover no-repeat;
  -webkit-mask: radial-gradient(50% 52% at 50% 45%, #000 74%, transparent 100%); mask: radial-gradient(50% 52% at 50% 45%, #000 74%, transparent 100%);
}
/* Bubbles rise past her, slowly, each at its own pace. */
.ibh__bubbles i { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .9), rgba(190, 255, 240, .18) 42%, rgba(190, 255, 240, 0) 62%); box-shadow: inset 0 0 0 1px rgba(210, 255, 244, .42); animation: ibh-rise var(--d) linear var(--w) infinite; }
@keyframes ibh-rise { from { transform: translate3d(0, 0, 0); opacity: 0; } 12% { opacity: .9; } 50% { transform: translate3d(calc(var(--s) * 1.4), -34vh, 0); } 88% { opacity: .7; } to { transform: translate3d(0, -68vh, 0); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ibh__bubbles { display: none; } }
.ibh__figure { --shape: url(/assets/art/sea-muse.webp) center / 100% 100% no-repeat; z-index: 3; filter: drop-shadow(-30px 24px 50px rgba(0, 10, 9, .6)); }
.ibh__figure img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.82) brightness(.94) hue-rotate(8deg); }
/* The marble's grade is all here, in two still layers cut to her outline: the water's tint,
   and its weight. The canvas above them only adds the moving light, so she looks the same
   before the script runs as after it. The figure is its own group (the drop shadow makes it
   one), so these blends never reach past her. */
.ibh__figure::before, .ibh__figure::after { content: ""; position: absolute; inset: 0; -webkit-mask: var(--shape); mask: var(--shape); }
.ibh__figure::before { z-index: 1; background: #000; opacity: .5; mix-blend-mode: soft-light; }
.ibh__figure::after { background: linear-gradient(rgba(150, 255, 232, .1), rgba(6, 70, 68, .34) 46%, rgba(2, 22, 22, .9)); mix-blend-mode: multiply; }
.ibh__figure .light { z-index: 1; mix-blend-mode: soft-light; -webkit-mask: var(--shape); mask: var(--shape); }

/* The title block sets one font size; the words and the notes beside them are placed in ems of it. */
.ibh__head {
  position: absolute; z-index: 2; left: var(--gx); top: calc(var(--nav-h) + 1.4vw);
  font-size: clamp(4.4rem, 15.6vw, 19rem);
}
/* At this size the face's display cut would thin its hairlines to nothing, so the title uses a
   text-size cut (a low optical size), which keeps the thin strokes of A, N and K visible. */
.ibh__title { margin: 0; font: 900 1em/.79 var(--bodoni); font-optical-sizing: none; font-variation-settings: "opsz" 22; letter-spacing: -.012em; text-transform: uppercase; color: var(--ink); }
.ibh__title > span { display: block; position: relative; }
.ibh__island {
  background-image: url(/assets/art/sea-surface.webp);
  background-size: 150% auto;
  background-position: calc(42% + var(--px, 0) * -2.2%) calc(46% + var(--py, 0) * -3%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.ibh__island { display: inline-block; filter: saturate(1.12) brightness(1.08); animation: swell 26s ease-in-out infinite alternate; }
@keyframes swell { from { background-size: 150% auto; } to { background-size: 172% auto; } }
/* Light falling out of the letters: the same word, stretched downward and blurred. The
   wrapper is larger than the word and feathered on every side, so the glow has no edge. */
.ibh__rays {
  position: absolute; z-index: -1; left: -18%; right: -18%; top: -10%; height: 560%; pointer-events: none; user-select: none;
  -webkit-mask-image: linear-gradient(transparent, #000 16%, transparent 74%), linear-gradient(90deg, transparent 2%, #000 20%, #000 80%, transparent 98%);
  mask-image: linear-gradient(transparent, #000 16%, transparent 74%), linear-gradient(90deg, transparent 2%, #000 20%, #000 80%, transparent 98%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.ibh__rays i {
  position: absolute; left: 13.235%; top: 1.8%; font-style: normal;
  background: url(/assets/art/sea-surface.webp) 42% 46% / 150% auto; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  transform-origin: 50% 20%; transform: translateY(30%) scaleY(4.4) skewX(-9deg);
  filter: blur(30px) brightness(1.5) saturate(1.3); opacity: .42;
}
.ibh__book { text-shadow: 0 0 80px rgba(120, 240, 220, .22); }

.ibh__copy { position: relative; z-index: 4; max-width: 31rem; }
.ibh__copy .label { margin-bottom: 20px; }
.ibh__sub { font: 400 clamp(1.5rem, 1.2vw + 1rem, 2.3rem)/1.08 var(--bodoni); letter-spacing: -.012em; color: var(--ink); max-width: 12em; text-wrap: balance; }
.ibh__copy .btn { margin-top: clamp(22px, 2.2vw, 36px); }

.ibh__base { position: absolute; z-index: 4; left: var(--gx); right: var(--gx); bottom: 26px; display: flex; justify-content: space-between; gap: 20px; font: 500 .6875rem/1 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--mute); }

@media (max-width: 900px) {
  .ibh { min-height: max(100svh, 700px); padding-bottom: 64px; }
  .ibh__head { font-size: 21.8vw; top: calc(var(--nav-h) + 3vw); }
  .ibh__figure { right: 50%; bottom: 24%; height: 50%; transform: translateX(50%); }
  .ibh__scene { right: 50%; top: 8%; height: 76%; transform: translateX(50%); }
  .ibh__copy::before { content: ""; position: absolute; z-index: -1; inset: -110px calc(-1 * var(--gx)) -70px; background: linear-gradient(transparent, rgba(3, 16, 15, .92) 40%); }
  .ibh__base span:last-child { display: none; }
}

/* ================= What it handles: four pieces of the product itself ================= */

.ibx { padding-top: clamp(30px, 4vw, 60px); }
.ibx__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 1.8vw, 32px); margin: clamp(34px, 4vw, 64px) 0 0; padding: 0; list-style: none; }
.ibx__item { display: flex; flex-direction: column; }
.ibx .ibx__ui { display: flex; flex-direction: column; justify-content: center; height: clamp(264px, 19vw, 300px); margin-bottom: 24px; padding: 18px; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px rgba(196, 248, 236, .5), 0 0 50px rgba(60, 220, 190, .16), 0 30px 60px rgba(0, 0, 0, .5); }
.ibx__item > h3 { margin-bottom: 10px; font: 700 clamp(1.3rem, .6vw + 1.1rem, 1.62rem)/1.14 var(--bodoni); letter-spacing: -.01em; }
.ibx__item > p { font-size: 1.02rem; line-height: 1.5; }
/* Everything it does, in plain words, by who uses it. */
.ibx__all { margin-top: clamp(50px, 6vw, 96px); padding-top: 26px; border-top: 1px solid var(--line-2); }
.ibx__all > h3 { margin-bottom: clamp(26px, 3vw, 44px); font: 700 clamp(1.5rem, .9vw + 1.2rem, 2.1rem)/1.1 var(--bodoni); letter-spacing: -.01em; color: var(--ink); }
.ibx__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px clamp(20px, 2.4vw, 40px); }
.ibx__cols h4 { margin: 0 0 14px; font: 500 .75rem/1.4 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--label); }
.ibx__cols ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-2); }
.ibx__cols li { padding: 11px 0 12px; border-bottom: 1px solid var(--line); font-size: 1.02rem; line-height: 1.4; color: var(--ink); }
@media (max-width: 1100px) { .ibx__cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ibx__cols { grid-template-columns: 1fr; } }
.ibx__custom { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px; margin-top: clamp(44px, 5vw, 80px); padding-top: 26px; border-top: 1px solid var(--line-2); }
.ibx__custom p { font-size: 1.12rem; color: var(--ink); }
.ibx__custom ul { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ibx__custom li { padding: 9px 14px 10px; border: 1px solid var(--line-2); font: 500 .6875rem/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--label); }
@media (max-width: 1100px) { .ibx__grid { grid-template-columns: 1fr 1fr; row-gap: 44px; } }
@media (max-width: 560px) { .ibx__grid { grid-template-columns: 1fr; } .ibx__ui { height: auto; min-height: 220px; } }

/* ================= Island life: the waterline ================= */

.isle { padding-bottom: 0; }
.isle__head { display: flex; justify-content: space-between; align-items: end; gap: 30px; flex-wrap: wrap; margin-bottom: clamp(36px, 4.4vw, 70px); }
.isle__head p { font: italic 400 clamp(1.1rem, .5vw + 1rem, 1.36rem)/1.4 var(--serif); text-align: right; }
.isle__band { position: relative; height: clamp(360px, 46vw, 780px); overflow: hidden; }
.isle__band img { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; object-position: 50% 42%; transform: translateY(calc((var(--p, .5) - .5) * -9%)); will-change: transform; }
.isle__band img { filter: saturate(.86); }
.isle__band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(3, 16, 15, .5), transparent 16%, transparent 82%, rgba(3, 16, 15, .6)); pointer-events: none; }
/* What the islands ask of a booking system. */
.isle__facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(20px, 2.4vw, 40px); margin-block: clamp(40px, 4.6vw, 72px) 0; padding-bottom: clamp(60px, 7vw, 110px); border-top: 1px solid var(--line-2); }
.isle__facts div { padding-top: 18px; }
.isle__facts dt { margin-bottom: 8px; font: 500 .75rem/1.4 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--label); }
.isle__facts dd { margin: 0; font-size: 1.02rem; line-height: 1.5; color: var(--ink); }
@media (max-width: 980px) { .isle__facts { grid-template-columns: 1fr 1fr; row-gap: 20px; } }
@media (max-width: 520px) { .isle__facts { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .isle__head p { text-align: left; } }

/* A named operator (src/partials/operator.html). Not on the page until there is one. */
.ib-op { padding-block: 0 clamp(70px, 8vw, 130px); }
.ib-op__in { padding-top: 26px; border-top: 1px solid var(--line-2); }
.ib-op .label { margin-bottom: clamp(24px, 3vw, 44px); }
.ib-op__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(26px, 5vw, 96px); align-items: center; }
.ib-op__shot { display: block; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px rgba(196, 248, 236, .5), 0 30px 70px rgba(0, 0, 0, .55); }
.ib-op__shot img { display: block; width: 100%; }
.ib-op__place { margin-top: 12px; font: 500 .75rem/1.4 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--label); }
.ib-op__runs { margin-top: 22px; font-size: 1.12rem; color: var(--ink); max-width: 34em; }
.ib-op blockquote { margin: 26px 0 0; padding-left: 22px; border-left: 2px solid var(--accent); }
.ib-op blockquote p { font: italic 400 clamp(1.2rem, .6vw + 1.05rem, 1.5rem)/1.45 var(--serif); color: var(--ink); max-width: 30em; }
.ib-op blockquote footer { margin-top: 12px; font: 500 .75rem/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.ib-op .link { margin-top: 28px; }
@media (max-width: 900px) { .ib-op__grid { grid-template-columns: 1fr; } }

/* ================= Setup and support: on sand ================= */

.setup {
  --ground: #e9dfc8; --ground-2: #ddd1b5; --ink: #0d2421; --text: rgba(13, 36, 33, .82); --mute: rgba(13, 36, 33, .56);
  --line: rgba(13, 36, 33, .16); --line-2: rgba(13, 36, 33, .4); --line-3: rgba(13, 36, 33, .88);
  --accent: #0f6f66; --accent-hi: #0a554e; --label: #0f6f66; --on-accent: #f4ecd8; --dw: 700;
  background: var(--ground) var(--grain-dark); color: var(--text);
}
.setup::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; background: radial-gradient(40% 60% at 80% 0%, rgba(255, 255, 255, .7), transparent 70%); }
.setup__grid { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(30px, 6vw, 120px); align-items: start; }
.setup__intro h2 { margin-bottom: 26px; }
.setup__intro .btn { margin-top: 30px; }
.steps { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-3); counter-reset: step; }
.steps li { display: grid; grid-template-columns: clamp(3.6rem, 6.4vw, 7.4rem) minmax(0, 1fr); gap: 6px 14px; align-items: start; padding: 26px 0 28px; border-bottom: 1px solid var(--line); counter-increment: step; }
.steps li::before { content: counter(step); grid-row: 1 / 3; font: 900 clamp(4rem, 6.2vw, 7.4rem)/.8 var(--bodoni); font-optical-sizing: none; font-variation-settings: "opsz" 22; color: var(--accent); }
.steps h3 { grid-column: 2; font: 500 clamp(1.3rem, .5vw + 1.15rem, 1.6rem)/1.16 var(--bodoni); letter-spacing: -.008em; }
.steps p { grid-column: 2; font-size: 1.04rem; }
@media (max-width: 900px) { .setup__grid { grid-template-columns: 1fr; } }

/* ================= Contact ================= */

.contact--sea { background: radial-gradient(70% 50% at 20% 0%, rgba(16, 120, 112, .34), transparent 70%), var(--ground); }
.contact--sea > .light { --lit: .4; -webkit-mask: linear-gradient(transparent, #000 60%); mask: linear-gradient(transparent, #000 60%); }
.contact--sea > :not(.light) { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) { .ibh__island { animation: none; } }
