/* The Four Wellness Forecast (hub v3).
   A live weather report: today's Tallaght weather picks today's house, and the week pairs each day's
   weather with real sessions. No scroll choreography: the data is the motion. */

:root {
  --night: var(--fw-night); --bone: var(--fw-bone);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --ink: #1c1d19; --soft: #55534a; --rule: #cfc9b4;
  --sky-a: #efe9da; --sky-b: #e2dccb;
  --el: var(--fw-earth); --el-l: var(--fw-earth-light);
}
html { background: var(--night); }
body { margin: 0; background: var(--bone); color: var(--ink); font: 400 17px/1.6 var(--fw-text); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
.c-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[data-el="earth"] { --el: var(--fw-earth); --el-l: var(--fw-earth-light); }
[data-el="fire"]  { --el: var(--fw-fire);  --el-l: var(--fw-fire-light); }
[data-el="water"] { --el: var(--fw-water); --el-l: var(--fw-water-light); }
[data-el="air"]   { --el: var(--fw-air);   --el-l: var(--fw-air-light); }

.f-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 22px; background: var(--ink); color: var(--bone); font: 700 13px/1.1 var(--fw-text); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; border-radius: var(--fw-radius); transition: background-color .2s var(--fw-ease), color .2s var(--fw-ease); }
.f-btn::after { content: ""; flex: none; width: 7px; height: 7px; border-right: 2px solid; border-bottom: 2px solid; transform: rotate(-45deg); }
.f-btn--line { background: none; color: var(--ink); border: 1.5px solid var(--ink); }
.f-btn:focus-visible, .f-face:focus-visible, .f-day a:focus-visible, .f-key a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .f-btn:hover { background: var(--el); } .f-btn--line:hover { background: var(--ink); color: var(--bone); } }

/* ---------------- today ---------------- */
.f-today { position: relative; overflow: hidden; color: var(--ink); background: linear-gradient(180deg, var(--sky-a), var(--sky-b)); min-height: calc(100svh - var(--fw-bar-h)); display: flex; }
.f-today[data-sky="clear"] { --sky-a: #f6eedb; --sky-b: #ebe1c8; }
.f-today[data-sky="cloud"] { --sky-a: #ebe8df; --sky-b: #dcd8cd; }
.f-today[data-sky="rain"], .f-today[data-sky="storm"] { --sky-a: #dfe2dd; --sky-b: #cdd2cc; }
.f-today[data-sky="fog"]   { --sky-a: #e9e8e3; --sky-b: #dddcd5; }
.f-today[data-sky="snow"]  { --sky-a: #f1f1ee; --sky-b: #e2e3e0; }
.is-night .f-today { color: var(--bone); --sky-a: #1d1c14; --sky-b: #2a2a1f; }
.is-night .f-today[data-sky="rain"], .is-night .f-today[data-sky="storm"] { --sky-a: #1a1d1b; --sky-b: #252a27; }

.f-today__in { position: relative; z-index: 1; width: 100%; max-width: 1360px; margin: 0 auto; padding: clamp(22px, 3.4vw, 48px) clamp(20px, 4vw, 56px) clamp(32px, 4vw, 56px);
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); grid-template-areas: "mast mast" "now mark" "read mark"; column-gap: clamp(24px, 5vw, 80px); align-content: center; }
.f-mast { grid-area: mast; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; padding-bottom: 12px; border-bottom: 2px solid currentColor; }
.f-mast__title { margin: 0; font: 800 clamp(22px, 2.6vw, 34px)/1 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.f-mast__line { margin: 0; font: 600 12px/1.4 var(--fw-text); letter-spacing: .14em; text-transform: uppercase; opacity: .78; }

.f-now { grid-area: now; display: flex; align-items: flex-end; gap: clamp(16px, 3vw, 40px); padding: clamp(18px, 3vw, 36px) 0 clamp(12px, 2vw, 24px); border-bottom: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
.f-temp { margin: 0; display: flex; align-items: flex-start; font: 800 clamp(120px, 15vw, 230px)/.78 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.f-deg { font-size: .42em; line-height: 1; margin-left: .04em; }
.f-facts { min-width: 12.5em; display: grid; grid-template-columns: auto auto; gap: 8px 22px; margin: 0 0 6px; font-size: 15px; }
.f-facts div { display: contents; }
.f-facts dt { font: 700 11px/1.9 var(--fw-text); letter-spacing: .16em; text-transform: uppercase; opacity: .7; }
.f-facts dd { margin: 0; font-weight: 600; white-space: nowrap; }

.f-read { grid-area: read; padding-top: clamp(18px, 2.4vw, 30px); }
.f-read__kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 700 11px/1 var(--fw-text); letter-spacing: .2em; text-transform: uppercase; }
.f-read__kicker::before { content: ""; width: 9px; height: 9px; transform: rotate(45deg); background: var(--el); }
.is-night .f-read__kicker::before { background: var(--el-l); }
.f-read__h { margin: 0; font: 800 clamp(46px, 5.6vw, 84px)/.88 var(--display); text-transform: uppercase; letter-spacing: -.005em; text-wrap: balance; }
.f-read__h em { font-style: normal; color: var(--el); }
.is-night .f-read__h em { color: var(--el-l); }
.f-read__why { margin: 14px 0 0; font-weight: 700; font-size: 17px; }
.f-read__line { margin: 6px 0 0; max-width: 46ch; color: var(--soft); }
.is-night .f-read__line { color: #cfc9b6; }
.f-read__go { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 22px 0 0; }
.f-read__meta { font-size: 14px; font-weight: 600; opacity: .8; }
.is-night .f-today .f-btn { background: var(--bone); color: var(--night); }

/* the mark: four sides, today's lit with its house */
.f-mark { grid-area: mark; position: relative; align-self: center; justify-self: center; width: min(100%, 520px, 62svh); aspect-ratio: 1; margin-top: clamp(16px, 3vw, 40px); }
.f-face { --c: polygon(10% 0, 90% 0, 50% 40%); position: absolute; inset: 0; padding: 0; border: 0; margin: 0; background: color-mix(in srgb, var(--el) 78%, #000); clip-path: var(--c); cursor: pointer; transition: transform .5s var(--fw-ease); -webkit-tap-highlight-color: transparent; }
.f-face[data-el="water"] { --c: polygon(100% 10%, 100% 90%, 60% 50%); }
.f-face[data-el="earth"] { --c: polygon(90% 100%, 10% 100%, 50% 60%); }
.f-face[data-el="fire"]  { --c: polygon(0 90%, 0 10%, 40% 50%); }
.f-face img { width: 100%; height: 100%; object-fit: cover; opacity: .16; transition: opacity .6s var(--fw-ease); }
.f-face[data-el="earth"] img { object-position: 70% 40%; }
.f-face[data-el="water"] img { object-position: 70% 45%; }
.f-face span { position: absolute; font: 800 clamp(14px, 1.5vw, 19px)/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--bone); text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.f-face[data-el="air"] span   { top: 13%; left: 50%; transform: translateX(-50%); }
.f-face[data-el="water"] span { right: 9%; top: 50%; transform: translateY(-50%); }
.f-face[data-el="earth"] span { bottom: 13%; left: 50%; transform: translateX(-50%); }
.f-face[data-el="fire"] span  { left: 9%; top: 50%; transform: translateY(-50%); }
.f-face[aria-pressed="true"] img { opacity: 1; }
.f-face[aria-pressed="true"][data-el="air"]   { transform: translateY(-2.5%); }
.f-face[aria-pressed="true"][data-el="water"] { transform: translateX(2.5%); }
.f-face[aria-pressed="true"][data-el="earth"] { transform: translateY(2.5%); }
.f-face[aria-pressed="true"][data-el="fire"]  { transform: translateX(-2.5%); }
.f-face:focus-visible { outline: none; filter: brightness(1.15); }
.f-mark__hint { position: absolute; left: 0; right: 0; bottom: -34px; margin: 0; text-align: center; font: 600 13px/1.3 var(--fw-text); opacity: .72; }

/* the weather itself, drawn lightly in the sky behind everything (transform-only CSS animation) */
.f-sky { position: absolute; inset: 0; pointer-events: none; }
.f-sky i { position: absolute; top: -12%; left: var(--x); width: 1.5px; height: var(--h, 64px); background: linear-gradient(to bottom, transparent, color-mix(in srgb, currentColor 30%, transparent)); transform: translate3d(0, 0, 0) rotate(12deg); animation: f-fall var(--d, 1.1s) linear var(--t, 0s) infinite; will-change: transform; }
.f-sky[data-kind="wind"] i { top: var(--y); left: -20%; width: var(--h, 120px); height: 1.5px; background: linear-gradient(to right, transparent, color-mix(in srgb, currentColor 26%, transparent), transparent); transform: none; animation: f-gust var(--d, 2.6s) linear var(--t, 0s) infinite; }
.f-sky[data-kind="stars"] i { top: var(--y); width: 2px; height: 2px; border-radius: 50%; background: currentColor; opacity: .35; animation: none; will-change: auto; }
@keyframes f-fall { from { transform: translate3d(0, 0, 0) rotate(12deg); } to { transform: translate3d(-22vh, 125svh, 0) rotate(12deg); } }
@keyframes f-gust { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(140vw, 0, 0); } }
.f-sky.is-paused i { animation-play-state: paused; }

/* ---------------- the week ---------------- */
.f-wrap { max-width: 1360px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 56px); }
.f-week { padding: clamp(72px, 9vw, 130px) 0 clamp(56px, 7vw, 100px); }
.f-week__head { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 64px; align-items: end; margin-bottom: 34px; }
.f-h2 { margin: 0; font: 800 clamp(48px, 6.2vw, 92px)/.86 var(--display); text-transform: uppercase; letter-spacing: -.005em; }
.f-week__head p { margin: 0; max-width: 50ch; color: var(--soft); }
.f-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.f-days__wait { grid-column: 1 / -1; padding: 24px 0; color: var(--soft); }
.f-day { display: flex; flex-direction: column; gap: 10px; padding: 18px 14px 22px; border-right: 1px solid var(--rule); min-width: 0; }
.f-day:last-child { border-right: 0; }
.f-day.is-today { background: color-mix(in srgb, var(--el) 9%, transparent); }
.f-day__name { margin: 0; font: 800 22px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.f-day__date { display: block; margin-top: 4px; font: 600 11px/1 var(--fw-text); letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.f-day__wx { display: flex; align-items: center; gap: 10px; }
.f-day__wx svg { width: 34px; height: 34px; flex: none; color: var(--ink); }
.f-day__t { font: 700 26px/1 var(--display); font-variant-numeric: tabular-nums; }
.f-day__t small { font-size: .7em; color: var(--soft); margin-left: 4px; }
.f-day__sky { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--soft); line-height: 1.35; }
.f-day__el { white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; padding: 7px 10px 7px 8px; background: var(--el); color: var(--bone); font: 700 10.5px/1 var(--fw-text); letter-spacing: .1em; text-transform: uppercase; border-radius: var(--fw-radius); }
.f-day__el .fw-mark { font-size: 14px; }
.f-day__el .fw-mark path { stroke: var(--bone); }
.f-day ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.f-day li a, .f-day li span.f-note { display: block; padding: 8px 0 0; border-top: 1px solid var(--rule); font-size: 13px; line-height: 1.35; text-decoration: none; }
.f-day li b { display: block; font: 700 17px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.f-day li a:hover { color: var(--el); }
.f-day .f-more { font-size: 12.5px; font-weight: 700; color: var(--el); text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- the key ---------------- */
.f-key { padding: 0 0 clamp(64px, 8vw, 110px); }
.f-key .f-h2 { padding-top: 32px; border-top: 2px solid var(--ink); margin-bottom: 28px; }
.f-key__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.f-key a { display: grid; gap: 8px; text-decoration: none; }
.f-key img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: 4px solid var(--el); }
.f-key__el { display: flex; align-items: center; gap: 8px; margin-top: 6px; font: 700 11px/1.2 var(--fw-text); letter-spacing: .16em; text-transform: uppercase; color: var(--el); }
.f-key__el i { font-size: 14px; display: inline-flex; }
.f-key__name { font: 800 26px/1 var(--display); text-transform: uppercase; }
.f-key__line { font-size: 14.5px; color: var(--soft); }
@media (hover: hover) and (pointer: fine) { .f-key a:hover .f-key__name { color: var(--el); } }
.f-desk { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-top: 48px; padding: 26px 30px; background: #e9e4d5; }
.f-desk p { margin: 0; font-weight: 700; }
.f-desk .f-btn { text-transform: none; letter-spacing: .02em; font-size: 15px; }

/* ---------------- phones and tablets ---------------- */
@media (max-width: 980px) {
  .f-days { grid-template-columns: 1fr; }
  .f-day { display: grid; grid-template-columns: 92px 1fr auto; grid-template-areas: "name wx el" "name sky el" "list list list"; gap: 6px 14px; padding: 16px 0; border-right: 0; border-bottom: 1px solid var(--rule); }
  .f-day.is-today { margin: 0 calc(-1 * clamp(20px, 4vw, 56px)); padding-left: clamp(20px, 4vw, 56px); padding-right: clamp(20px, 4vw, 56px); }
  .f-day__name { grid-area: name; }
  .f-day__wx { grid-area: wx; }
  .f-day__sky { grid-area: sky; }
  .f-day__el { grid-area: el; align-self: start; }
  .f-day ul { grid-area: list; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 14px; }
  .f-key__list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .f-today { min-height: 0; }
  .f-today__in { grid-template-columns: 1fr; grid-template-areas: "mast" "now" "mark" "read"; }
  .f-mast__line { letter-spacing: .1em; font-size: 11px; }
  .f-now { padding-top: 16px; }
  .f-temp { font-size: clamp(104px, 34vw, 150px); }
  .f-facts { gap: 4px 14px; font-size: 14px; }
  .f-mark { width: min(78vw, 340px); margin-top: 22px; }
  .f-mark__hint { bottom: -28px; font-size: 12px; }
  .f-read { padding-top: 46px; }
  .f-read__h { font-size: clamp(42px, 13vw, 60px); }
  .f-week__head { grid-template-columns: 1fr; }
  .f-day { grid-template-columns: 74px 1fr auto; }
  .f-day__name { font-size: 20px; }
  .f-day ul { grid-template-columns: 1fr 1fr; }
  .f-key__list { gap: 22px 14px; }
  .f-key__name { font-size: 22px; }
  .f-desk { padding: 22px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .f-sky { display: none; }
  .f-face, .f-face img, .f-btn { transition: none; }
}

/* live text arrives after first paint: hold its space so nothing below moves */
.f-read__why { min-height: 1.6em; }
.f-read__line { min-height: 4.8em; }
.f-read__go { min-height: 50px; }
.f-days[aria-busy="true"] { min-height: 420px; }
@media (max-width: 760px) { .f-mast__line { min-height: 2.8em; } .f-read__why { min-height: 3.2em; } .f-read__line { min-height: 6.4em; } .f-days[aria-busy="true"] { min-height: 1400px; } }
.f-temp [data-f="temp"] { display: inline-block; min-width: 1.12em; text-align: right; }
@media (max-width: 760px) { .f-read__h { min-height: 1.76em; } }
