/* ==========================================================================
   AWOOGA — Why She Floats
   --------------------------------------------------------------------------
   The physics page. Scoped to .fl-* ; colors and type all come from the shared
   tokens in style.css. Three interactive beats: the waterline, hull speed, and
   the length-to-beam ratio.
   ========================================================================== */

/* ---------- Hero --------------------------------------------------------- */
.fl-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(110% 130% at 15% -20%, rgba(29, 77, 120, 0.55), transparent 60%),
    linear-gradient(180deg, var(--navy-900), var(--navy-800));
  color: var(--cream);
  padding: clamp(2.8rem, 6vw, 4.8rem) 0 0;
}
.fl-hero .eyebrow { color: var(--brass-lt); }
.fl-hero h1 { color: var(--cream); font-size: clamp(2.2rem, 6vw, 3.7rem); margin-bottom: 0.5rem; }
.fl-hero h1 em { font-style: italic; color: var(--brass-lt); }
.fl-hero .lead { color: rgba(247, 241, 227, 0.88); max-width: 58ch; }
/* A lazy swell across the bottom of the hero. */
.fl-hero__swell { display: block; width: 100%; height: clamp(40px, 7vw, 78px); margin-top: clamp(1.6rem, 4vw, 2.6rem); }
.fl-hero__swell path { fill: var(--bg); }

.fl-quick {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; margin-top: clamp(1.6rem, 4vw, 2.4rem);
  background: rgba(247, 241, 227, 0.16);
  border: 1px solid rgba(247, 241, 227, 0.16); border-radius: var(--radius);
  overflow: hidden;
}
.fl-quick div { background: rgba(12, 32, 52, 0.72); padding: 1rem 1.1rem; }
.fl-quick dt { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass-lt); margin-bottom: 0.3rem; }
.fl-quick dd { margin: 0; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fl-quick dd small { display: block; font-family: var(--font-sans); font-size: 0.76rem; font-weight: 400; color: rgba(247, 241, 227, 0.6); margin-top: 0.2rem; }

/* ---------- Shared lab card ---------------------------------------------- */
.fl-lab {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: clamp(1.3rem, 3.5vw, 2.2rem);
  margin-top: clamp(1.6rem, 4vw, 2.4rem);
}
.fl-lab__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr); gap: clamp(1.4rem, 4vw, 2.6rem); align-items: start; }
@media (max-width: 880px) { .fl-lab__grid { grid-template-columns: 1fr; } }

/* ---------- 1. The waterline --------------------------------------------- */
.fl-tank { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--navy-900); }
.fl-tank svg { display: block; width: 100%; height: auto; }
/* The waterline and everything below it slide together as load goes on. */
.fl-water { transition: transform 0.45s var(--ease); }
@media (prefers-reduced-motion: reduce) { .fl-water { transition: none; } }
.fl-tank__readout {
  position: absolute; right: 0.8rem; top: 0.8rem;
  display: flex; flex-direction: column; gap: 0.1rem; align-items: flex-end;
  padding: 0.6rem 0.85rem; border-radius: var(--radius-sm);
  background: rgba(12, 32, 52, 0.8); border: 1px solid rgba(227, 195, 90, 0.45);
  color: var(--cream);
}
.fl-tank__big { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: var(--brass-lt); }
.fl-tank__small { font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(247, 241, 227, 0.65); }

.fl-load { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.fl-load li {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.8rem;
  padding: 0.6rem 0.75rem; border-radius: var(--radius-sm);
  background: var(--paper); border: 1px solid var(--line);
}
.fl-load__name { font-weight: 600; font-size: 0.94rem; }
.fl-load__lb { display: block; font-size: 0.78rem; font-weight: 400; color: var(--text-soft); }
.fl-stepper { display: inline-flex; align-items: center; gap: 0.15rem; }
.fl-stepper button {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--navy-800); font-size: 1.15rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
  transition: background-color 0.18s, border-color 0.18s, color 0.18s;
}
.fl-stepper button:hover:not(:disabled) { background: var(--navy-900); border-color: var(--navy-900); color: var(--cream); }
.fl-stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.fl-stepper button:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.fl-stepper output { min-width: 2ch; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

.fl-cap { margin-top: 1rem; }
.fl-cap__bar { height: 10px; border-radius: 999px; background: rgba(12, 32, 52, 0.1); overflow: hidden; }
.fl-cap__fill { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--navy-600); transition: width 0.4s var(--ease), background-color 0.4s var(--ease); }
.fl-cap.is-full .fl-cap__fill { background: var(--red); }
@media (prefers-reduced-motion: reduce) { .fl-cap__fill { transition: none; } }
.fl-cap__label { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 0.4rem; font-size: 0.82rem; color: var(--text-soft); }
.fl-cap__label b { color: var(--navy-900); }
.fl-reset { margin-top: 0.9rem; background: none; border: 0; color: var(--wood-dk); font-weight: 700; font-size: 0.85rem; text-decoration: underline; padding: 0.3rem 0; }
.fl-reset:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

/* ---------- 2. Hull speed ------------------------------------------------- */
.fl-speed__dial { display: flex; flex-direction: column; gap: 0.5rem; }
.fl-speed__value { font-family: var(--font-display); font-size: clamp(2.4rem, 7vw, 3.6rem); font-weight: 700; line-height: 1; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.fl-speed__value span { font-size: 0.4em; color: var(--text-soft); margin-left: 0.3rem; }
.fl-range { width: 100%; accent-color: var(--brass); }
.fl-range:focus-visible { outline: 2px solid var(--brass); outline-offset: 4px; }
.fl-speed__scale { display: flex; justify-content: space-between; font-size: 0.76rem; color: var(--text-soft); }
.fl-speed__her {
  display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.4rem;
  padding: 0.35rem 0.7rem; border-radius: 999px; align-self: flex-start;
  background: var(--cream-2); border: 1px solid rgba(201, 162, 39, 0.5);
  font-size: 0.8rem; font-weight: 700; color: var(--wood-dk);
}
.fl-compare { list-style: none; margin: 1.2rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.fl-compare li { display: grid; grid-template-columns: 8.5rem 1fr auto; align-items: center; gap: 0.7rem; font-size: 0.86rem; }
@media (max-width: 520px) { .fl-compare li { grid-template-columns: 6.5rem 1fr auto; font-size: 0.8rem; } }
.fl-compare__name { color: var(--text-soft); }
.fl-compare__track { height: 8px; border-radius: 999px; background: rgba(12, 32, 52, 0.09); overflow: hidden; }
.fl-compare__fill { display: block; height: 100%; border-radius: 999px; background: var(--navy-600); }
.fl-compare li.is-her .fl-compare__name { color: var(--navy-900); font-weight: 700; }
.fl-compare li.is-her .fl-compare__fill { background: var(--brass); }
.fl-compare__kn { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--navy-800); }

/* ---------- 3. Beam ------------------------------------------------------- */
.fl-ratio { display: flex; flex-direction: column; gap: 1.1rem; margin-top: clamp(1.4rem, 3.5vw, 2rem); }
.fl-ratio__row { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; align-items: center; }
@media (max-width: 620px) { .fl-ratio__row { grid-template-columns: 1fr; gap: 0.35rem; } }
.fl-ratio__label { font-size: 0.88rem; }
.fl-ratio__label b { display: block; font-family: var(--font-display); font-size: 1.05rem; color: var(--navy-900); }
.fl-ratio__label span { color: var(--text-soft); font-variant-numeric: tabular-nums; }
/* A top-down silhouette. Every hull is drawn to the SAME length and its
   height set from the length:beam ratio, so the bars compare beam directly —
   a 30:1 racing shell can share a row with a 2:1 tug without running off the
   page. The caption on the section says so. */
.fl-ratio__track { display: flex; align-items: center; min-height: 54px; }
.fl-ratio__shape {
  width: 100%; height: var(--h, 34px); min-height: 4px;
  border-radius: 999px / 50%;
  background: var(--navy-700);
  box-shadow: var(--shadow-sm);
  transition: height 0.4s var(--ease);
}
@media (prefers-reduced-motion: reduce) { .fl-ratio__shape { transition: none; } }
.fl-ratio__row.is-her .fl-ratio__shape { background: var(--brass); }
.fl-ratio__row.is-her .fl-ratio__label b { color: var(--wood-dk); }

/* ---------- Show your work ----------------------------------------------- */
.fl-work {
  margin-top: clamp(1.6rem, 4vw, 2.4rem);
  border: 1px solid rgba(201, 162, 39, 0.45); border-radius: var(--radius);
  background: var(--cream-2);
  overflow: hidden;
}
.fl-work > summary {
  cursor: pointer; list-style: none; padding: 1rem 1.2rem;
  font-weight: 700; color: var(--navy-900);
  display: flex; align-items: center; gap: 0.6rem;
}
.fl-work > summary::-webkit-details-marker { display: none; }
.fl-work > summary::after { content: "+"; margin-left: auto; font-size: 1.3rem; color: var(--wood-dk); line-height: 1; }
.fl-work[open] > summary::after { content: "\2013"; }
.fl-work > summary:focus-visible { outline: 3px solid var(--brass); outline-offset: -3px; }
.fl-work__body { padding: 0 1.2rem 1.3rem; }
.fl-work__body p { color: var(--text-soft); font-size: 0.92rem; }
.fl-work__body p:last-child { margin-bottom: 0; }
.fl-eq {
  display: block; margin: 0.6rem 0 1rem; padding: 0.8rem 1rem;
  background: var(--surface); border-left: 3px solid var(--brass);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem; color: var(--navy-900);
  overflow-x: auto; white-space: nowrap;
}
.fl-work__body dl { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; margin: 0 0 1rem; font-size: 0.88rem; }
.fl-work__body dt { font-weight: 700; color: var(--navy-800); }
.fl-work__body dd { margin: 0; color: var(--text-soft); }

/* ---------- Takeaway ------------------------------------------------------ */
.fl-takeaway {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem; margin-top: clamp(1.4rem, 3.5vw, 2rem);
}
.fl-takeaway div {
  padding: 1.3rem 1.4rem; border-radius: var(--radius);
  background: rgba(247, 241, 227, 0.06); border: 1px solid rgba(247, 241, 227, 0.18);
}
.fl-takeaway h3 { color: var(--cream); font-size: 1.05rem; margin-bottom: 0.3rem; }
.fl-takeaway p { margin: 0; font-size: 0.92rem; color: rgba(247, 241, 227, 0.75); }

/* ---------- "Where to next" cards ----------------------------------------
   Same pattern every content page uses (see about.css); repeated here so the
   page stands alone without depending on another page's stylesheet. */
.next-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; }
.next-link { padding: 1.4rem 1.4rem; display: flex; flex-direction: column; gap: 0.3rem; }
.next-link h3 { font-size: 1.15rem; margin: 0; }
.next-link p { margin: 0; color: var(--text-soft); font-size: 0.92rem; }
.next-link .xcard__arrow { color: var(--red); font-weight: 700; font-size: 0.9rem; margin-top: 0.6rem; }
