/* =====================================================================
   AskGranCanaria design layer: "the island".
   Loaded after site.css and overrides it. Delete or rename this file to go back.
   ===================================================================== */

/* Headings font, stored on this server (no Google request). Put the file in /assets/fonts/.
   Without it, headings fall back to the system font and everything else still works. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

/* ---------- Colours taken from the island ---------- */
:root {
  --basalt: #1F2426;       /* volcanic stone */
  --pumice: #F5F4F1;       /* cool off-white */
  --dune: #E3C68E;         /* Maspalomas sand */
  --dune-soft: #F3EAD6;
  --atlantic: #1D5C8A;     /* the ocean */
  --balcony: #2E5B3B;      /* traditional Canarian wooden balconies */

  --bg: var(--pumice);
  --surface: #FFFFFF;
  --text: var(--basalt);
  --muted: #5C6569;
  --line: #DCDCD7;
  --accent: var(--atlantic);
  --accent-soft: #E3ECF3;
  --on-accent: #FFFFFF;
  --feat: #B88A2E;
  --feat-bg: var(--dune-soft);
  --feat-text: #6B4E12;
  --ok: var(--balcony);
  --ok-bg: #E2EDE5;
  --land: #EFE3C8;
  --land-line: #CDB887;
  --glow: rgb(227 198 142 / 42%);          /* sand, from the bottom-right corner */
  --glow-size: 125% 45%;                   /* light: a low band of warmth */
  --glass-bg: rgb(255 255 255 / 70%);
  --glass-line: rgb(255 255 255 / 80%);
  --glass-shadow: rgb(29 92 138 / 27%);      /* Atlantic */

  --owners-bg: #1D5C8A;                    /* the "for businesses" band on the home page */
  --top-bg: rgb(245 244 241 / 80%);        /* frosted top bar */
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15191B;
    --surface: #1F2426;
    --text: #ECEBE7;
    --muted: #A3A9AA;
    --line: #30373A;
    --accent: #7FB3DB;
    --accent-soft: #1B2D3A;
    --on-accent: #0E1A22;
    --feat-bg: #3A3019;
    --feat-text: #EBD3A0;
    --ok: #86BA93;
    --ok-bg: #1D2E22;
    --land: #2C2A22;
    --land-line: #5E5439;
    --glow: rgb(29 92 138 / 34%);           /* Atlantic */
    --glow-size: 175% 165%;                 /* dark: a wide glow */
    --glass-bg: rgb(42 50 54 / 70%);
    --glass-line: rgb(255 255 255 / 9%);
    --glass-shadow: rgb(0 0 0 / 45%);
    --owners-bg: #173F5C;
    --top-bg: rgb(21 25 27 / 80%);
    --ig-b1: #9CCBEF; --ig-b2: #4F93C7;     /* icon outline, lighter on dark */
    --tile-big-bg: #22394A;
  }
}
:root[data-theme="dark"] {
  --owners-bg: #173F5C;
  --top-bg: rgb(21 25 27 / 80%);
  --ig-b1: #9CCBEF; --ig-b2: #4F93C7;
  --tile-big-bg: #22394A;
  --bg: #15191B;
  --surface: #1F2426;
  --text: #ECEBE7;
  --muted: #A3A9AA;
  --line: #30373A;
  --accent: #7FB3DB;
  --accent-soft: #1B2D3A;
  --on-accent: #0E1A22;
  --feat-bg: #3A3019;
  --feat-text: #EBD3A0;
  --ok: #86BA93;
  --ok-bg: #1D2E22;
  --land: #2C2A22;
  --land-line: #5E5439;
  --glow: rgb(29 92 138 / 34%);
  --glow-size: 175% 165%;
  --glass-bg: rgb(42 50 54 / 70%);
  --glass-line: rgb(255 255 255 / 9%);
  --glass-shadow: rgb(0 0 0 / 45%);
}

/* ---------- Type: the headings carry the personality ---------- */
h1, h2, h3, .h3, .brand, .card__title { font-family: var(--display); }
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); font-weight: 750; line-height: 1.02; letter-spacing: -0.025em; max-width: 20ch; }
h2 { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.01em; }
h3, .h3 { font-weight: 650; }
.lead { font-size: 1.15rem; max-width: 56ch; }
.brand { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.brand b { color: var(--accent); font-weight: 800; }

/* ---------- Header and footer ---------- */
.top { background: var(--top-bg); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
/* The bar stays at the top while scrolling. */
.top { position: sticky; top: 0; z-index: 50; }
html { scroll-padding-top: 4.5rem; }   /* in-page jumps don't end up under the bar */

/* Phones: two rows, a small language row on top, logo + light/dark button below.
   A negative sticky top hides the TOP part of the bar while scrolling: that's the language
   row, so the logo row stays in view. Back at the top of the page, the languages return. */
@media (max-width: 699px) {
  .top__in { flex-wrap: wrap; row-gap: .4rem; padding: .5rem 0 .6rem; }
  .top__right { display: contents; }
  .langs { order: -1; width: 100%; height: 2rem; align-items: center; flex-wrap: nowrap; overflow-x: auto; }
  .brand { order: 0; flex: 1 1 auto; }
  .theme { order: 1; }
  .top { top: -2.9rem; }                 /* .5rem padding + 2rem language row + .4rem gap */
  html { scroll-padding-top: 3.8rem; }
}
.foot { background: var(--basalt); color: #C9CDCC; border-top: 0; }
.foot a { color: var(--dune); }
.foot .muted { color: #8E9596; }

/* ---------- The island locator ---------- */
.island { display: block; margin: 0; }
.island svg { display: block; width: 100%; height: auto; overflow: visible; }
.island__land { fill: var(--land); stroke: var(--land-line); stroke-width: 3; stroke-linejoin: round; }
.island__dot { fill: var(--accent); stroke: var(--bg); stroke-width: 3; }
.island__dot--on { fill: var(--accent); }
.island__halo { fill: var(--accent); opacity: .18; transform-box: fill-box; transform-origin: center; }
/* The business's (or area's) dot pulses gently: a ring grows out of it and fades. */
@keyframes island-pulse {
  0%   { transform: scale(.45); opacity: .45; }
  70%  { transform: scale(1.6);  opacity: 0; }
  100% { transform: scale(1.6);  opacity: 0; }
}
.island__halo { animation: island-pulse 2.4s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { .island__halo { animation: none; } }
.island a .island__dot { transition: r .15s; cursor: pointer; }
.island a:hover .island__dot, .island a:focus-visible .island__dot { r: 11; fill: var(--feat); }
.island--biz { width: 9.5rem; margin-top: 1.2rem; }
.island--home { width: min(26rem, 100%); margin: .5rem 0 1.2rem; }
.island--area { width: 8.5rem; flex: 0 0 auto; }
.areahead { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
@media (max-width: 560px) { .areahead { flex-direction: column; align-items: flex-start; } .island--area { width: 7rem; } }

/* ---------- Lists read like a guidebook: photo beside the text, not a grid of boxes ---------- */
.cards { grid-template-columns: repeat(auto-fill, minmax(min(31rem, 100%), 1fr)); gap: 0 2.5rem; }
.card {
  display: grid; grid-template-columns: 40% 1fr; gap: 1.1rem; align-items: start;
  background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 1.2rem 0;
}
.card__img { aspect-ratio: 4 / 3; border-radius: 4px; }
.card__body { padding: 0; }
.card__title { font-size: 1.2rem; font-weight: 700; margin: 0 0 .25rem; }
.card__text { margin-top: .45rem; }
/* Featured: a wider entry on sand, instead of just a label */
.card--feat {
  grid-column: 1 / -1; grid-template-columns: minmax(0, 1.25fr) 1fr; gap: 1.6rem;
  background: var(--feat-bg); border: 0; border-radius: 6px; padding: 1.2rem; margin: 1rem 0 .4rem;
}
.card--feat .card__title { font-size: 1.6rem; }
.card--feat .card__img { aspect-ratio: 16 / 10; }
@media (max-width: 560px) {
  .card, .card--feat { grid-template-columns: 1fr; }
}

/* Meta lines: category in colour, area plain, no dot in between */
.meta > span + span::before { content: none; }
.meta { display: flex; flex-wrap: wrap; gap: .15rem .7rem; }
.meta__cat { color: var(--accent); font-weight: 600; }

/* ---------- Category overviews: sand-edged blocks instead of identical boxes ---------- */
.maincat { background: none; border: 0; border-left: 4px solid var(--dune); border-radius: 0; padding: .2rem 0 .2rem 1rem; }
.chips li { border-radius: 4px; }
.chips--areas li { background: none; }

/* ---------- Business page ---------- */
.biz__head h1 { max-width: 24ch; }
.tag { border-radius: 4px; }
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.gallery__main, .gallery__thumb { border-radius: 4px; }
.hours th, .hours td { border-bottom-style: dotted; }
.claim { border: 2px solid var(--text); border-radius: 0; background: none; }
.near li { border-radius: 4px; }

/* ---------- Background glow: fixed to the screen, the page scrolls over it ---------- */
html { background: var(--bg); }
body { background: transparent; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse var(--glow-size) at 100% 100%, var(--glow), transparent 70%);
}

/* ---------- Nearby: frosted glass ---------- */
.near li {
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 6px 8px var(--glass-shadow);
}

/* ---------- Light mode: category chips as solid Atlantic buttons (area chips stay outlined) ---------- */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .chips:not(.chips--areas) li { background: var(--accent); color: var(--on-accent); }
  :root:not([data-theme="dark"]) .chips:not(.chips--areas) a { color: var(--on-accent); }
  :root:not([data-theme="dark"]) .chips:not(.chips--areas) .count { color: rgb(255 255 255 / 75%); }
  :root:not([data-theme="dark"]) .chips:not(.chips--areas) li:has(a):hover { background: #174C73; }
}
:root[data-theme="light"] .chips:not(.chips--areas) li { background: var(--accent); color: var(--on-accent); }
:root[data-theme="light"] .chips:not(.chips--areas) a { color: var(--on-accent); }
:root[data-theme="light"] .chips:not(.chips--areas) .count { color: rgb(255 255 255 / 75%); }
:root[data-theme="light"] .chips:not(.chips--areas) li:has(a):hover { background: #174C73; }

/* ---------- Logo in dark mode: island and "GranCanaria" in one matching, lighter Atlantic blue ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand__mark { filter: brightness(1.45) saturate(1.1); }
  :root:not([data-theme="light"]) .brand b { color: #3F86B8; }
}
:root[data-theme="dark"] .brand__mark { filter: brightness(1.45) saturate(1.1); }
:root[data-theme="dark"] .brand b { color: #3F86B8; }

/* ---------- Home: headings and tiles in the display font ---------- */
.hx h1, .hsec h2, .how h2, .how__steps h3 { font-family: var(--display); }
.hx h1 { font-weight: 750; }
.door__name { font-family: var(--display); }

/* === polish start === (delete everything up to "polish end" to go back) */
:root { --ease-out: cubic-bezier(.23, 1, .32, 1); }

/* 1. No "stuck" hover after a tap on phones and tablets */
@media (hover: none) {
  .tile a:hover, .door:hover { transform: none; box-shadow: none; border-color: var(--line); }
  .root__btn:hover { transform: none; }
  .door:hover .door__arrow { transform: none; }
  .gallery__thumb:hover img, .favs a:hover .favs__img img { transform: none; }
}

/* 2. Press feedback: everything you tap gives a little */
.tile a, .door, .root__btn, .top__cta, .searchbar button, .owners__row button {
  transition: transform .12s var(--ease-out), box-shadow .15s ease, border-color .15s ease, filter .15s ease;
}
.tile a:active, .door:active { transform: scale(.98); }
.root__btn:active, .top__cta:active, .searchbar button:active, .owners__row button:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) {
  .tile a, .door, .root__btn, .top__cta, .searchbar button, .owners__row button { transition: none; }
}
/* === polish end === */

/* === living start === (home pages only: hero entrance, island dots, live badge, sections appearing on scroll.
   Delete everything up to "living end" to go back.) */

/* 1. Hero entrance: text lines rise in one after another, the island settles in */
@keyframes live-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes live-settle { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.hx__text > * { animation: live-rise .45s var(--ease-out) both; }
.hx__text > :nth-child(2) { animation-delay: .06s; }
.hx__text > :nth-child(3) { animation-delay: .12s; }
.hx__text > :nth-child(4) { animation-delay: .18s; }
.hx__text > :nth-child(5) { animation-delay: .24s; }
.hx__map { animation: live-settle .6s var(--ease-out) .1s both; }

/* 2. Island dots pop in one by one (site.js sets the order; without JS they all come at once) */
@keyframes live-dot { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
.island--hero .island__dot { transform-box: fill-box; transform-origin: center; animation: live-dot .35s var(--ease-out) .5s both; }

/* 3. The badge dot breathes: the directory is alive and checked */
.hx__badge span { position: relative; }
.hx__badge span::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor;
                         animation: live-ping 2.4s var(--ease-out) 1s infinite; }
@keyframes live-ping { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(2.8); opacity: 0; } }

/* 4. Sections further down appear when you scroll to them (site.js adds .rv / .rv--in, only below the fold) */
.rv { opacity: 0; transform: translateY(14px); }
.rv--in { opacity: 1; transform: none; transition: opacity .45s var(--ease-out), transform .45s var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  .hx__text > *, .hx__map, .island--hero .island__dot { animation: live-fade .2s ease both; }
  .hx__badge span::after { animation: none; display: none; }
  .rv { transform: none; }
  .rv--in { transition: opacity .2s ease; }
}
@keyframes live-fade { from { opacity: 0; } to { opacity: 1; } }
/* === living end === */
