/* "Il mare" — the sea graphics of the home page.
 * Nautical chart lines, water light, bubbles, anchors, rope, sea floor and big lettering on the
 * real site. Logo, palette, type and texts stay the site's own. Everything here is decoration:
 * aria-hidden, no pointer events, and still (but present) under reduced motion. */

:root {
  --rope: #c9a46a;
  --rope-dark: #8a6a3a;
  --deep: #163840;
}

html, body { overflow-x: clip; }

/* Every decorated block holds a .deco layer under its content. */
.section, .hero__left, .site-footer, .footer { isolation: isolate; }
.deco { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.section > .container { position: relative; z-index: 2; }
.deco svg { display: block; }
.hero__bubbles { display: none; } /* replaced by real bubbles */

/* --- Nautical chart: depth contours drawn on scroll --- */
.chart { position: absolute; inset: 0; width: 100%; height: 100%; }
.chart path { fill: none; stroke: var(--color-accent); stroke-width: 1; opacity: 0.22; vector-effect: non-scaling-stroke; }
.section--dark .chart path, .section--accent .chart path { stroke: #fff; opacity: 0.09; }

/* --- Water light (caustics) on the warm sections --- */
.caustic { position: absolute; left: -15%; top: -15%; width: 130%; height: 130%; mix-blend-mode: soft-light; }

/* --- Bubbles canvas --- */
.bub { position: absolute; inset: 0; width: 100%; height: 100%; }

/* --- Big outline lettering --- */
.giant {
  position: absolute; font-family: var(--font-display, Raleway), sans-serif; font-weight: 900;
  font-size: clamp(110px, 17vw, 300px); line-height: 0.8; letter-spacing: -0.04em; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1.5px var(--color-accent); opacity: 0.22; user-select: none;
}
.section--dark .giant, .section--accent .giant { -webkit-text-stroke-color: #fff; opacity: 0.12; }

/* --- Illustrations --- */
.art { position: absolute; color: var(--color-primary); }
.art--soft { opacity: 0.1; }
.art--line { color: var(--color-accent); opacity: 0.35; }
.section--dark .art, .section--accent .art { color: #fff; }
.rope { fill: none; stroke: var(--rope); stroke-width: 3; stroke-linecap: round; }
.rope--twist { stroke: var(--rope-dark); stroke-width: 3; stroke-dasharray: 2 5; }

.hang { position: absolute; top: 0; transform-origin: 50% 0; }
@media (max-width: 1024px) { #cta .hang { display: none; } }  /* it would hang over the heading */
@media (max-width: 768px) {  /* a window narrowed after load keeps the anchor off the text */
  .hero__left .hang { left: auto !important; right: 14px; }
}
.hang svg { overflow: visible; }

/* --- Waves (bottom of hero text, dividers) --- */
.waves { position: absolute; left: 0; right: 0; bottom: -1px; height: 90px; }
.waves svg { position: absolute; bottom: 0; left: 0; width: 200%; height: 100%; }
.wave-divider { position: relative; height: 60px; overflow: hidden; }
.wave-divider .layer { position: absolute; bottom: 0; left: 0; width: 200%; height: 100%; }

/* --- Rays of light from the surface --- */
.rays { position: absolute; inset: -10% -10% 30%; opacity: 0.5;
  background: repeating-linear-gradient(100deg, transparent 0 60px, rgba(255,255,255,.09) 60px 90px, transparent 90px 170px);
  mask-image: linear-gradient(#000, transparent 85%); -webkit-mask-image: linear-gradient(#000, transparent 85%);
  transform-origin: 50% 0; }

/* --- Sea floor --- */
.floor { position: absolute; left: 0; right: 0; bottom: 0; height: 240px; }
.floor svg { width: 100%; height: 100%; }
.weed { position: absolute; bottom: 0; transform-origin: 50% 100%; color: var(--color-accent); }
.section--dark .weed { color: #2e6e7a; }

/* --- Lettering band --- */
.marquee {
  position: relative; z-index: 3; overflow: hidden; padding: 18px 0; background: var(--color-primary); color: #fff;
  transform: rotate(-1.6deg); margin: -14px -2% -14px; box-shadow: 0 10px 30px rgba(22, 56, 64, 0.25);
}
.marquee--light { background: var(--color-warm); color: var(--color-primary); transform: rotate(1.2deg); box-shadow: none; }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__run { display: flex; align-items: center; gap: 34px; padding-right: 34px; }
.marquee span {
  font-family: var(--font-display, Raleway), sans-serif; font-weight: 900; text-transform: uppercase;
  font-size: clamp(30px, 4.6vw, 64px); letter-spacing: -0.02em; line-height: 1; white-space: nowrap;
}
.marquee span.o { color: transparent; -webkit-text-stroke: 1.5px currentColor; }
.marquee .glyph { width: clamp(26px, 3vw, 40px); height: auto; flex: none; color: var(--color-accent-light, #7fc1cf); }
.marquee--light .glyph { color: var(--color-accent); }

/* --- Handwritten notes with a drawn arrow --- */
.note {
  position: relative; display: inline-flex; align-items: flex-end; gap: 6px; margin-top: 18px;
  font-family: "Caveat", cursive; font-size: 30px; line-height: 1; color: var(--color-accent); transform: rotate(-3deg);
}
.note span { white-space: nowrap; }
.note svg { width: 86px; height: 52px; flex: none; overflow: visible; }
.note path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.note--left { flex-direction: row-reverse; }
.note--left svg { transform: scaleX(-1); }

/* --- Hero (left side): chart, compass, hanging anchor, bubbles, waves --- */
.hero__left { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--color-warm-light, #f2f8f9) 0%, var(--color-warm) 100%); }
.hero__left > .hero__content { z-index: 3; }
.hero .giant { right: -3%; bottom: 70px; font-size: clamp(90px, 11vw, 190px); }

@media (max-width: 768px) {
  .giant { font-size: 120px; opacity: 0.16; }
  .hero .giant { font-size: 84px; bottom: 60px; }
  .waves { height: 56px; }
  /* On phones the aquarium sits right under the text: no wave band between them. */
  .hero__left .waves { display: none; }
  .floor { height: 150px; }
  /* Phones: the photo is below the note, so the arrow goes under the words and points down. */
  .note, .note--left { flex-direction: column; align-items: flex-start; gap: 0; font-size: 23px; }
  .note svg { width: 48px; height: 30px; margin: 12px 0 8px 18px; transform: rotate(90deg); }
  .note--left svg { transform: scaleX(-1) rotate(90deg); }
  .marquee { padding: 12px 0; }
  .marquee__run { gap: 20px; padding-right: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { transform: none !important; }
}
