/* The surf home (Pages/Shared/_HomeSurf.cshtml, _HomeHeroLive.cshtml, Helpers/SurfHome.cs): the hero's live card
   with its side column, the coast row, today's waves, the moments, and the organizers' opening. Builds on
   landing.css and spots.css. */

/* ---- the hero: the headline wraps on phones ("Check the waves." is longer than "Judge it."), the live heat sits
   beside what else is happening */
.ag-hero--surf .ag-hero__phrase { white-space: normal; }
.ag-hero__inner--live { align-items: stretch; text-align: left; }
.ag-hero__live { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; width: 100%; max-width: 1120px; margin: 0 auto; }
@media (min-width: 960px) {
    .ag-hero__live { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: 20px 24px; align-items: start; }
    .ag-hero__live > .ag-eyebrow, .ag-hero__live > .ag-actions { grid-column: 1 / -1; }
}
.ag-hero__live > .ag-eyebrow { color: var(--ag-sky); }
.ag-hero__live .ag-livecard { width: 100%; background: var(--ag-deepest); box-shadow: 0 24px 60px rgba(4, 30, 36, 0.45); }
.ag-hero__live .ag-livecard__name { font-size: clamp(26px, 3.2vw, 40px); }
.ag-hero__live .ag-actions { margin-top: 0; justify-content: center; }
.ag-hero__side { display: grid; gap: 16px; align-content: start; }
.ag-hero__side h2 { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ag-sky); }
.ag-hero__side .ag-minis { grid-auto-flow: row; }
.ag-hero__side .ag-mini__clock { margin-left: 6px; font-variant-numeric: tabular-nums; }
.ag-hero__side .sp-spot { background: #FFFFFF; }

/* the monsoon, in the eyebrow: amihan or habagat */
/* the Moments head: the title and lead at left, Share a photo at the right (under them on phones) */
.ag-section__head--split .ag-moments__share { flex-shrink: 0; align-self: center; }
@media (max-width: 767px) { .ag-section__head--split .ag-moments__share { align-self: flex-start; margin-top: 4px; } }

/* ---- the coast row: the flow chips' line with today's waves on it */
.ag-coast .ag-flow__chip { gap: calc(var(--chip-h) * 0.03); color: var(--ag-ink); text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; }
.ag-coast a.ag-flow__chip:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(4, 30, 36, 0.35); }
.ag-coast .ag-flow__score { font-size: calc(var(--chip-h) * 0.3); }
.ag-coast .ag-flow__chip--today { box-shadow: 0 0 0 3px var(--ag-live); }
.ag-coast .ag-flow__chip--model { background: var(--ag-tint); }
.ag-coast .ag-flow__chip--model .ag-flow__meta { color: var(--ag-muted); }
.ag-coast .ag-flow__live { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; padding: 1px 7px; border-radius: 999px; background: var(--ag-live); color: #FFFFFF; font-size: calc(var(--chip-h) * 0.085); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.ag-coast .ag-flow__live .ag-badge__dot { width: 5px; height: 5px; background: #FFFFFF; }
.ag-hero--surf .ag-flow { margin-top: 64px; }

/* ---- today's waves on the home: one featured spot, the next ones in a list */
.sp-home { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .sp-home { grid-template-columns: minmax(0, 1fr); } }
.sp-feature { display: grid; grid-template-rows: auto 1fr; border-radius: 20px; overflow: hidden; border: 1px solid var(--ag-line); background: #FFFFFF; color: inherit; text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.sp-feature:hover { border-color: var(--ag-arc); transform: translateY(-2px); }
.sp-feature__pic { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--ag-tint); overflow: hidden; }
.sp-feature__pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sp-feature__body { display: grid; gap: 10px; padding: 18px 20px 20px; }
.sp-feature__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sp-feature__name { display: block; font-family: var(--ag-font-display); font-size: 22px; font-weight: 600; line-height: 1.2; color: var(--ag-ink); }
.sp-feature__where { display: block; margin-top: 2px; font-size: 14px; color: var(--ag-muted); }
.sp-feature__meta { font-size: 14px; color: var(--ag-text); }
.sp-home__list { display: grid; gap: 10px; }
.sp-home__more { margin: 4px 0 0; display: flex; justify-content: flex-end; }
/* a spot as one row (also the hero's side column) */
.sp-spot { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 14px 10px 10px; border: 1px solid var(--ag-line); border-radius: 16px; background: #FFFFFF; color: inherit; text-decoration: none; transition: border-color 0.15s; }
.sp-spot:hover { border-color: var(--ag-arc); }
.sp-spot__pic { width: 64px; height: 48px; border-radius: 10px; overflow: hidden; background: var(--ag-tint); }
.sp-spot__pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sp-spot__pic--none { background: linear-gradient(180deg, #DDEFF4 0%, #A9D8E6 50%, #2C8FA9 51%, #0E6B82 100%); }
.sp-spot__text { display: grid; min-width: 0; }
.sp-spot__name { font-weight: 700; color: var(--ag-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-spot__meta { font-size: 13px; color: var(--ag-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-spot .sp-size__num { font-size: 18px; }
.sp-spot .sp-rating { margin-top: 4px; }

/* ---- moments: share cards as they are, and photos from the beach */
.ag-moments { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: 16px; margin: 0; padding: 0; list-style: none; }
/* the mosaic: wide pieces (a heat's landscape card, a photo from the beach) span two columns between the posters */
.ag-moments li.is-wide { grid-column: span 2; }
.ag-moment__pic.ag-moment__pic--wide { aspect-ratio: 1200 / 630; }
@media (max-width: 1000px) { .ag-moments { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ag-moments { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -16px; padding: 4px 16px 10px; } .ag-moments::-webkit-scrollbar { display: none; } .ag-moments li { flex: none; width: 72vw; max-width: 280px; scroll-snap-align: center; } .ag-moments li.is-wide { width: 88vw; max-width: 420px; } }
.ag-moment { display: grid; gap: 10px; color: inherit; text-decoration: none; }
.ag-moment__pic { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: var(--ag-tint); box-shadow: 0 12px 30px rgba(6, 47, 56, 0.18); transition: transform 0.15s; }
.ag-moment:hover .ag-moment__pic { transform: translateY(-2px); }
.ag-moment__pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ag-moment__kind { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; background: rgba(6, 47, 56, 0.6); color: #FFFFFF; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; backdrop-filter: blur(4px); }
.ag-moment__over { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 14px 14px; display: grid; gap: 2px; color: #FFFFFF; background: linear-gradient(180deg, rgba(6, 47, 56, 0) 0%, rgba(6, 47, 56, 0.85) 100%); }
.ag-moment__head { font-family: var(--ag-font-display); font-weight: 700; font-size: 20px; line-height: 1.1; }
.ag-moment__sub { font-size: 13px; font-weight: 600; opacity: 0.92; }
.ag-moment__cap { font-size: 14px; line-height: 1.4; color: var(--ag-text); }
.ag-moment__cap b { color: var(--ag-ink); }

/* ---- the organizers' half opens with its own dark band and the flow chips */
.ag-orghead { position: relative; overflow: hidden; background: var(--ag-deep); color: #FFFFFF; padding-block: 64px 72px; --chip-h: 118px; --node-gap: 20px; }
.ag-orghead__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: center; }
@media (max-width: 760px) { .ag-orghead__inner { grid-template-columns: minmax(0, 1fr); } }
.ag-orghead .ag-eyebrow { color: var(--ag-sky); }
.ag-orghead h2 { margin: 6px 0 8px; font-family: var(--ag-font-display); font-size: clamp(26px, 3.2vw, 40px); font-weight: 600; line-height: 1.15; }
.ag-orghead p { margin: 0; max-width: 58ch; color: #D5EEF3; font-size: 17px; }
.ag-orghead .ag-actions { margin: 0; flex-wrap: wrap; }
.ag-orghead .ag-btn { min-height: 56px; }
.ag-orghead .ag-flow { margin-top: 56px; }

/* "Near you" under the hero's search: a tap, then the nearest spot's waves and tide */
.ag-near { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; margin: 16px 0 0; font-size: 14px; color: var(--ag-on-deep); }
.ag-near__ask { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; background: transparent; color: #FFFFFF; font-family: var(--ag-font-body); font-size: 14px; font-weight: 700; cursor: pointer; transition: background 0.15s; }
.ag-near__ask:hover { background: rgba(255, 255, 255, 0.12); }
.ag-near__ask[hidden], .ag-near__hint[hidden], .ag-near__hit[hidden] { display: none; }
.ag-near__hint { max-width: 420px; text-align: center; }
.ag-near__hit { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; max-width: 100%; padding: 9px 18px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); color: #FFFFFF; text-decoration: none; font-size: 14px; font-variant-numeric: tabular-nums; }
.ag-near__hit:hover { background: rgba(255, 255, 255, 0.2); }
.ag-near__hit b { font-weight: 800; }
.ag-near__label { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ag-sky); margin-right: 2px; }
.ag-near__go { font-weight: 700; color: var(--ag-sky); margin-left: 2px; }

/* the wave card: picture, words, then the size at the right (spots.css puts .sp-size in column 2 of the list cards) */
.sp-spot__text { grid-column: 2; }
.sp-spot .sp-size { grid-column: 3; justify-self: end; text-align: right; }
/* a featured spot without a picture: the brand horizon, not a blank */
.sp-feature__pic.sp-pic--none { background: linear-gradient(180deg, #DDEFF4 0%, #A9D8E6 46%, #2C8FA9 47%, #0E6B82 100%); }
.sp-feature__pic.sp-pic--none::before { content: ""; position: absolute; left: -6%; right: -6%; top: 48%; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, 0.55); filter: blur(3px); }
/* Near you on its own line under the search */
.ag-near { flex-basis: 100%; }

/* Near you reads as one sentence; the wave cards keep their tide on phones (a second line) */
.ag-near__hit { display: inline-block; text-align: center; line-height: 1.6; }
@media (max-width: 767px) { .sp-spot__meta { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .ag-near { margin-top: 12px; } }

/* the Moments grid: the first card large, the rest around it (the cards also take the three styles in turn) */
@media (min-width: 992px) { .ag-moments li:first-child { grid-column: span 2; grid-row: span 2; } .ag-moments li:first-child .ag-moment__cap { font-size: 16px; } }

/* amihan or habagat first in the eyebrow line, in its own colour (gold for amihan, coral for habagat), the wind beside it */
.ag-monsoon { --monsoon: #F6C66B; display: inline-flex; align-items: center; gap: 8px; color: var(--monsoon); font-weight: 800; cursor: help; white-space: nowrap; }
.ag-monsoon::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--monsoon); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14), 0 0 14px var(--monsoon); }
.ag-monsoon--habagat { --monsoon: #FF9B7A; }
.ag-monsoon__wind { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, 0.28); font-size: 11px; font-weight: 800; letter-spacing: 0.14em; color: var(--monsoon); }
.ag-monsoon__arrow { flex-shrink: 0; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* the coast row's switch: Best right now or Near you (home-near.js) */
.ag-coast__head { display: flex; justify-content: center; gap: 6px; margin: 0 0 6px; }
.ag-coast__tab { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 999px; background: transparent; color: var(--ag-on-deep); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: background 0.15s, color 0.15s; }
.ag-coast__tab:hover { background: rgba(255, 255, 255, 0.1); color: #FFFFFF; }
.ag-coast__tab.is-on { border-color: #FFFFFF; background: #FFFFFF; color: var(--ag-deep); }
.ag-coast__tab .ag-icon { color: currentColor; }
@media (max-width: 767px) { .ag-coast__head { display: none; } }

/* the home search's suggestions: the surf spots that match as you type (home-near.js) */
.ag-find .ag-search { position: relative; }
.ag-suggest { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 40; margin: 0; padding: 6px; list-style: none; border-radius: 20px; background: #FFFFFF; box-shadow: 0 24px 60px rgba(4, 30, 37, 0.35); text-align: left; }
.ag-suggest[hidden] { display: none; }
.ag-suggest__opt a, .ag-suggest__opt button { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 12px; border: 0; border-radius: 14px; background: none; color: var(--ag-ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.ag-suggest__opt.is-active a, .ag-suggest__opt.is-active button, .ag-suggest__opt a:hover, .ag-suggest__opt button:hover { background: var(--ag-tint); }
.ag-suggest__words { min-width: 0; }
.ag-suggest__words b { display: block; overflow: hidden; font-size: 15px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.ag-suggest__words small { display: block; overflow: hidden; font-size: 12.5px; color: var(--ag-muted); text-overflow: ellipsis; white-space: nowrap; }
.ag-suggest__opt em { font-family: var(--ag-font-display); font-size: 15px; font-style: normal; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ag-suggest__dot { width: 10px; height: 10px; border-radius: 50%; background: #8FA9B0; }
.ag-suggest__dot--good { background: #22A06B; } .ag-suggest__dot--fair { background: #0E9DBE; } .ag-suggest__dot--big { background: #E8590C; } .ag-suggest__dot--choppy { background: #C98A00; }
.ag-suggest__opt--events button { grid-template-columns: 16px minmax(0, 1fr); border-top: 1px solid var(--ag-line-2); border-radius: 0 0 14px 14px; color: var(--ag-cyan-ink); font-size: 14.5px; }
.ag-suggest__opt--events b { color: var(--ag-ink); }
