/* weysail.com — shared stylesheet. Bump the filename version (site.vN.css)
   on every change: /assets/* is served with a one-year immutable cache. */

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/nunito-sans-latin-v19.woff2") format("woff2");
}

:root {
  --navy: #193b66;
  --teal: #369abb;
  --teal-ink: #23708c; /* teal darkened to pass AA for small text */
  --ink: #0f1b2d;
  --muted: #4f5e6e;
  --surface: #f4f7fa;
  --line: #dce3ea;
  --bg: #ffffff;
  --radius: 12px;
  --gutter: clamp(16px, 4vw, 32px);
  --max: 1080px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--navy);
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--teal-ink);
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 800;
  letter-spacing: -0.01em;
}
h1 {
  font-size: clamp(2rem, 1.5rem + 2.6vw, 3.25rem);
}
h2 {
  font-size: clamp(1.5rem, 1.25rem + 1.2vw, 2.125rem);
}
h3 {
  font-size: 1.125rem;
}
p {
  margin: 0 0 1em;
}

.nowrap {
  white-space: nowrap;
}

.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 8px;
  top: -48px;
  background: var(--navy);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 10;
}
.skip:focus {
  top: 8px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0;
}
.section--alt {
  background: var(--surface);
}
.section__intro {
  max-width: 60ch;
  color: var(--muted);
}

/* ---------- Header ---------- */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  color: var(--navy);
  padding: 6px 0;
}
.brand svg {
  width: 132px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.button:hover {
  background: var(--ink);
  color: #fff;
}
.button--ghost {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--line);
}
.button--ghost:hover {
  background: var(--surface);
  color: var(--navy);
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(1.5rem, 1rem + 3vw, 4rem) 0 clamp(3rem, 2rem + 4vw, 5rem);
}
.hero .wrap {
  display: grid;
  gap: 40px;
  align-items: center;
}
.hero__lead {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  max-width: 34ch;
}
.hero__points {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  gap: 6px;
  color: var(--muted);
}
.hero__points li {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.hero__points li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  transform: translateY(-2px);
}

.stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}
.stores a {
  display: inline-block;
  border-radius: 8px;
}
.stores img {
  height: 48px;
  width: auto;
}
.soon {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border: 2px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 700;
}
.stores__note {
  margin: 14px 0 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

.phone {
  justify-self: center;
  width: min(280px, 72vw);
  border: 10px solid var(--ink);
  border-radius: 40px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 48px -24px rgba(15, 27, 45, 0.45);
}
.phone img {
  width: 100%;
  /* The screenshot includes the device's own rounded corners; trim them. */
  transform: scale(1.04);
}

@media (min-width: 768px) {
  .hero .wrap {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

/* ---------- How it works demo ---------- */

.demo {
  display: grid;
  gap: 32px;
  align-items: center;
  margin-top: 32px;
}
.demo__phone {
  justify-self: center;
  width: min(300px, 78vw);
}
.demo__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  counter-reset: step;
}
.demo__step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 2px 14px;
  width: 100%;
  padding: 14px 16px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.demo__step::before {
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  color: var(--navy);
  font-weight: 800;
}
.demo__step strong {
  color: var(--navy);
  font-size: 1.125rem;
}
.demo__step span {
  color: var(--muted);
  font-size: 0.9375rem;
}
.demo__step:hover {
  background: #fff;
}
.demo__controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}
.demo__controls[hidden] {
  display: none;
}

@media (min-width: 768px) {
  .demo {
    grid-template-columns: 0.8fr 1.2fr;
    gap: 56px;
  }
}

/* App UI inside the SVG */
.app {
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
}
.app .tile {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2;
}
/* Sizes and colours stay as SVG attributes so each glyph can differ. */
.app .glyph {
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
}
.app .ring {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2;
}
.app .icon {
  fill: #000;
}
.app .icon-light {
  fill: #fff;
}
.app .pill {
  fill: var(--teal);
}
.app .pill-text {
  fill: #fff;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
}
.app .big {
  font-weight: 700;
  font-size: 40px;
  dominant-baseline: central;
}

/*
  Demo timeline: one 20s loop, four 5s scenes.
    0–5s   tap B -> compass
    5–10s  long-press X -> info popup -> edit
    10–15s tap locate -> lat/lon update
    15–20s choose a name: A, H8 or a symbol
  Every animated element shares the same duration and the same delay, so the
  JS only has to change --offset to jump to a scene.
*/
.demo {
  --offset: 0s;
}
.demo [data-a] {
  animation-duration: 20s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  animation-delay: calc(0s - var(--offset));
  animation-fill-mode: both;
}
.demo.is-paused [data-a],
.demo.is-paused .demo__step {
  animation-play-state: paused;
}

.a-nav { animation-name: a-nav; }
.a-rose { animation-name: a-rose; transform-origin: 100px 100px; }
.a-popup { animation-name: a-popup; }
.a-edit { animation-name: a-edit; }
.a-picker { animation-name: a-picker; }
.a-press { animation-name: a-press; }
.a-locate { animation-name: a-locate; }
.a-coord-old { animation-name: a-coord-old; }
.a-coord-new { animation-name: a-coord-new; }
.a-pend-h { animation-name: a-pend-h; }
.a-pend-h8 { animation-name: a-pend-h8; }
.a-pend-sym { animation-name: a-pend-sym; }
.a-finger { animation-name: a-finger; animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.a-tap { animation-name: a-tap; animation-timing-function: ease-out; transform-box: fill-box; transform-origin: center; }

/* Compass screen slides in over the grid during scene 1 */
@keyframes a-nav {
  0%, 7.5% { transform: translateX(360px); }
  9.5%, 22% { transform: translateX(0); }
  24.5%, 100% { transform: translateX(360px); }
}
@keyframes a-rose {
  0%, 9% { transform: rotate(-110deg); }
  17%, 100% { transform: rotate(-40deg); }
}
/* Long-press progress ring on X */
@keyframes a-press {
  0%, 29% { stroke-dashoffset: 226; opacity: 0; }
  29.5% { stroke-dashoffset: 226; opacity: 1; }
  34% { stroke-dashoffset: 0; opacity: 1; }
  35%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes a-popup {
  0%, 34.5% { opacity: 0; visibility: hidden; }
  35.5%, 41% { opacity: 1; visibility: visible; }
  42.5%, 100% { opacity: 0; visibility: hidden; }
}
/* Edit screen: in for scenes 2–4, fades out at the end of the loop */
@keyframes a-edit {
  0%, 40.5% { transform: translateX(360px); opacity: 1; }
  42.5%, 97% { transform: translateX(0); opacity: 1; }
  99.5% { transform: translateX(0); opacity: 0; }
  100% { transform: translateX(360px); opacity: 0; }
}
@keyframes a-locate {
  0%, 54% { fill: transparent; }
  55.5% { fill: rgba(54, 154, 187, 0.35); }
  60%, 100% { fill: transparent; }
}
@keyframes a-coord-old {
  0%, 55.5% { opacity: 1; transform: translateY(0); }
  58% { opacity: 0; transform: translateY(-14px); }
  99%, 100% { opacity: 0; transform: translateY(0); }
}
@keyframes a-coord-new {
  0%, 55.5% { opacity: 0; transform: translateY(14px); }
  58%, 98% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(0); }
}
@keyframes a-picker {
  0%, 77% { opacity: 0; visibility: hidden; }
  78.5%, 97% { opacity: 1; visibility: visible; }
  99%, 100% { opacity: 0; visibility: hidden; }
}
/* Pending choice shown in the picker header: H, then H8, then a chart symbol */
@keyframes a-pend-h {
  0%, 82% { opacity: 0; }
  82.5%, 86% { opacity: 1; }
  86.5%, 100% { opacity: 0; }
}
@keyframes a-pend-h8 {
  0%, 86.5% { opacity: 0; }
  87%, 92% { opacity: 1; }
  92.5%, 100% { opacity: 0; }
}
@keyframes a-pend-sym {
  0%, 92.5% { opacity: 0; }
  93%, 98% { opacity: 1; }
  99%, 100% { opacity: 0; }
}

/*
  Finger: travels between targets (positions in SVG user units, see
  scripts/build-site-demo.js). B (139,186) · X (221,432) · edit (290,378)
  locate (122,196) · name tile (196,196) · H (180,290) · 8 (238,580)
  chart symbol (122,638)
*/
@keyframes a-finger {
  0% { transform: translate(250px, 640px); opacity: 0; }
  2% { transform: translate(250px, 640px); opacity: 1; }
  5.5%, 6.5% { transform: translate(139px, 186px); opacity: 1; }
  8% { transform: translate(139px, 186px); opacity: 0; }
  24% { transform: translate(260px, 600px); opacity: 0; }
  26% { transform: translate(260px, 600px); opacity: 1; }
  29%, 34.5% { transform: translate(221px, 432px); opacity: 1; }
  38%, 39.5% { transform: translate(290px, 378px); opacity: 1; }
  41% { transform: translate(290px, 378px); opacity: 0; }
  51% { transform: translate(240px, 500px); opacity: 0; }
  52% { transform: translate(240px, 500px); opacity: 1; }
  54.5%, 55.5% { transform: translate(122px, 196px); opacity: 1; }
  58% { transform: translate(122px, 196px); opacity: 0; }
  74% { transform: translate(260px, 420px); opacity: 0; }
  75% { transform: translate(260px, 420px); opacity: 1; }
  77%, 78% { transform: translate(196px, 196px); opacity: 1; }
  81.5%, 82.5% { transform: translate(180px, 290px); opacity: 1; }
  86%, 87% { transform: translate(238px, 580px); opacity: 1; }
  92%, 93% { transform: translate(122px, 638px); opacity: 1; }
  95% { transform: translate(122px, 638px); opacity: 0; }
  100% { transform: translate(250px, 640px); opacity: 0; }
}
/* Tap ripple: fires at each touch-down in the finger timeline */
@keyframes a-tap {
  0%, 5.5% { transform: scale(0); opacity: 0; }
  5.6% { transform: scale(0.2); opacity: 0.8; }
  7.5% { transform: scale(1); opacity: 0; }
  38% { transform: scale(0); opacity: 0; }
  38.1% { transform: scale(0.2); opacity: 0.8; }
  40% { transform: scale(1); opacity: 0; }
  54.5% { transform: scale(0); opacity: 0; }
  54.6% { transform: scale(0.2); opacity: 0.8; }
  56.5% { transform: scale(1); opacity: 0; }
  77% { transform: scale(0); opacity: 0; }
  77.1% { transform: scale(0.2); opacity: 0.8; }
  79% { transform: scale(1); opacity: 0; }
  82% { transform: scale(0); opacity: 0; }
  82.1% { transform: scale(0.2); opacity: 0.8; }
  84% { transform: scale(1); opacity: 0; }
  86.5% { transform: scale(0); opacity: 0; }
  86.6% { transform: scale(0.2); opacity: 0.8; }
  88.5% { transform: scale(1); opacity: 0; }
  92.5% { transform: scale(0); opacity: 0; }
  92.6% { transform: scale(0.2); opacity: 0.8; }
  94.5% { transform: scale(1); opacity: 0; }
  100% { transform: scale(0); opacity: 0; }
}

/* Captions: highlighted for their 5s quarter of the loop. --d staggers them. */
.demo__step {
  animation: a-step 20s infinite step-end;
  animation-delay: calc(var(--d, 0s) - var(--offset));
}
.demo__steps li:nth-child(2) .demo__step { --d: 5s; }
.demo__steps li:nth-child(3) .demo__step { --d: 10s; }
.demo__steps li:nth-child(4) .demo__step { --d: 15s; }
@keyframes a-step {
  0% { border-color: var(--teal); background: #fff; }
  25%, 100% { border-color: transparent; background: transparent; }
}

/* Reduced motion: freeze on each scene's key frame; captions step through them. */
@media (prefers-reduced-motion: reduce) {
  .demo {
    --offset: 3.5s; /* scene 1's key frame, used when JS hasn't run */
  }
  .demo [data-a],
  .demo__step {
    animation-play-state: paused !important;
  }
  .demo .a-finger,
  .demo .a-tap {
    display: none;
  }
}

/* ---------- Comparison ---------- */

.compare-wrap {
  overflow-x: auto;
  margin-top: 28px;
}
.compare {
  width: 100%;
  max-width: 760px;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);
}
.compare th,
.compare td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}
.compare tbody tr:last-child > * {
  border-bottom: 0;
}
.compare th[scope="row"] {
  text-align: left;
  font-weight: 600;
}
.compare thead th {
  background: var(--surface);
  color: var(--navy);
  font-size: 1.125rem;
  line-height: 1.25;
}
.compare thead th small {
  display: block;
  margin-top: 2px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}
.compare .col-pro {
  background: rgba(54, 154, 187, 0.07);
}
.compare thead .col-pro {
  background: rgba(54, 154, 187, 0.16);
}
.tick {
  display: inline-block;
  width: 24px;
  height: 24px;
  color: var(--teal);
  vertical-align: middle;
}
.dash {
  color: #a7b2be;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: #dfe7f0;
  padding: 40px 0 32px;
  font-size: 0.9375rem;
}
.site-footer a {
  color: #fff;
}
.site-footer .wrap {
  display: grid;
  gap: 20px;
}
.site-footer .brand {
  color: #fff;
}
.site-footer .brand svg {
  width: 112px;
}
.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}
.footer-nav a {
  display: inline-block;
  padding: 10px 0;
  font-weight: 700;
  text-decoration: none;
}
.footer-nav a:hover,
.footer-nav a[aria-current="page"] {
  text-decoration: underline;
}
.legal {
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: #c4d0de;
}
.site-footer :focus-visible {
  outline-color: #fff;
}

@media (min-width: 768px) {
  .site-footer .wrap {
    grid-template-columns: auto 1fr;
    align-items: center;
  }
  .footer-nav ul {
    justify-content: flex-end;
  }
  .legal {
    grid-column: 1 / -1;
  }
}

/* ---------- Legal / support pages ---------- */

.prose {
  max-width: 70ch;
  padding-top: clamp(1.5rem, 1rem + 2vw, 3rem);
  padding-bottom: clamp(3rem, 2rem + 3vw, 5rem);
}
.prose h2 {
  font-size: 1.375rem;
  margin-top: 2em;
}
.prose ul,
.prose ol {
  padding-left: 1.25em;
  margin: 0 0 1em;
}
.prose li {
  margin-bottom: 0.35em;
}
.prose .updated {
  color: var(--muted);
  font-size: 0.9375rem;
}
.callout {
  background: var(--surface);
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  margin: 0 0 1.5em;
}
.callout p:last-child {
  margin-bottom: 0;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5em;
  font-size: 0.9375rem;
}
.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.prose thead th {
  color: var(--navy);
  background: var(--surface);
}
.prose details {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.prose summary {
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  min-height: 28px;
}
.prose details p {
  margin: 10px 0 0;
}
