/* Shared Survide-style primitives for Sprint. Page CSS builds on these classes. */
@import url("./tokens.css");

@font-face {
  font-family: "Allo";
  src: url("/fonts/allo/AlloVariable-1.0.3.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; font-variation-settings: "ROND" var(--rond); }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5;
  color: var(--light); background: var(--base);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; max-width: 100%; }
svg { display: block; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type roles ---------- */
.t-display { --rond: var(--rond-display); font-weight: 340; letter-spacing: -0.015em; line-height: .98; text-wrap: balance; }
.t-heading { --rond: var(--rond-heading); font-weight: 560; letter-spacing: -0.01em; }
.t-label   { --rond: var(--rond-label); font-size: 12.5px; color: var(--muted); }
.t-mono    { font-family: var(--mono); font-variation-settings: normal; }
.tabular   { font-variant-numeric: tabular-nums; }
.muted     { color: var(--muted); }
h1, h2, h3 { text-wrap: balance; }

/* ---------- Glass: landing version ---------- */
:root {
  --glass: rgb(var(--deep-rgb) / .74);
  --glass-edge: rgb(var(--light-rgb) / .22);
  --glass-shine: rgba(255, 255, 255, .10);
}
.glass {
  background: linear-gradient(140deg, var(--glass-shine), transparent 45%), var(--glass);
  border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
          backdrop-filter: blur(26px) saturate(150%);
  box-shadow:
    0 1px 2px rgba(0,0,0,.35),
    0 12px 28px -10px rgba(0,0,0,.55),
    0 40px 80px -30px rgba(0,0,0,.75),
    inset 0 1px 0 rgba(255,255,255,.16),
    inset 0 -1px 0 rgba(0,0,0,.35);
}

/* ---------- Glass: dashboard tile version ---------- */
:root {
  --glass-bg: linear-gradient(160deg, rgb(var(--light-base-rgb) / .66), rgb(var(--near-black-rgb) / .8) 70%);
  --glass-line: rgb(var(--light-rgb) / .16);
  --glass-shadow:
    inset 0 1px 0 rgba(255,255,255,.2),
    inset 0 0 0 1px rgba(255,255,255,.03),
    inset 0 -1px 0 rgba(0,0,0,.4),
    0 1px 2px rgba(0,0,0,.35),
    0 24px 48px -20px rgba(0,0,0,.75);
  --blur: blur(20px) saturate(1.4);
}
.tile {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  min-width: 0; min-height: 228px; padding: 20px;
  border: 1px solid var(--glass-line); border-radius: 28px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--glass-shadow);
  transition: border-color .15s var(--ease);
}
.tile:hover { border-color: rgb(var(--light-rgb) / .28); }
.tile-title { --rond: var(--rond-label); font-size: 13px; color: var(--muted); }
.tile-note  { --rond: var(--rond-label); font-size: 12.5px; color: var(--muted); }
.tile.is-light {
  border-color: transparent;
  background: linear-gradient(160deg, var(--light-hi), var(--light-lo));
  -webkit-backdrop-filter: none; backdrop-filter: none;
  color: var(--on-light);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 24px 48px -20px rgba(0,0,0,.75);
}
.is-light .tile-title, .is-light .tile-note, .is-light .muted { color: var(--on-light-muted); }

/* ---------- Buttons ---------- */
.pill-cta {
  --rond: var(--rond-button);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px 0 22px; border-radius: 999px;
  background: var(--accent); color: var(--on-light);
  font-size: 15px; font-weight: 600; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 10px 34px -10px rgb(var(--accent-rgb) / .6);
  transition: transform .25s var(--ease), background-color .25s var(--ease), box-shadow .25s var(--ease);
}
.pill-cta:hover { background: var(--accent-hi); transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 16px 40px -10px rgb(var(--accent-rgb) / .7); }
.pill-cta:active { transform: scale(.97); }
.pill-cta.lg { height: 52px; padding: 0 20px 0 24px; }
.pill-cta.sm { height: 38px; padding: 0 14px 0 16px; font-size: 14px; }

.arrow-ico { transition: transform .25s var(--ease); }
a:hover > .arrow-ico, button:hover > .arrow-ico { transform: translate(2px, -2px); }

.text-link {
  --rond: var(--rond-button);
  display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 560;
  color: var(--light); transition: color .2s var(--ease);
}
.text-link:hover { color: var(--accent); }

.orb {
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgb(var(--deep-rgb) / .6); color: var(--light);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 8px 20px -10px rgba(0,0,0,.6);
  transition: background-color .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}
.orb:hover { background: rgb(var(--light-rgb) / .12); }
.orb:active { transform: scale(.95); }
.orb.is-solid { background: var(--light); color: var(--on-light); border-color: transparent; }
.orb.is-solid:hover { background: var(--light-hi); }
.orb.is-accent { background: var(--accent); color: var(--on-light); border-color: transparent; }
.orb.is-accent:hover { background: var(--accent-hi); }
.orb[aria-pressed="true"] { color: var(--accent); }
.orb .orb-count {
  --rond: var(--rond-label); position: absolute; right: -3px; top: -3px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  font-size: 11px; line-height: 18px; text-align: center;
  background: var(--light); color: var(--on-light); font-variant-numeric: tabular-nums;
}

.square-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  transition: transform .25s var(--ease), background-color .2s var(--ease);
}
.square-btn:hover { transform: translateY(-2px); }
.square-btn:active { transform: scale(.95); }
.square-btn.is-light { background: var(--light); color: var(--on-light); box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 10px 24px -12px rgba(0,0,0,.6); }

.btn {
  --rond: var(--rond-button);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px; border-radius: 11px;
  background: rgb(var(--light-rgb) / .06); border: 1px solid rgb(var(--light-rgb) / .28);
  font-size: 14.5px; font-weight: 560; white-space: nowrap;
  transition: background-color .2s var(--ease), transform .2s var(--ease), color .2s var(--ease);
}
.btn:hover { background: rgb(var(--light-rgb) / .13); }
.btn:active { transform: scale(.97); }
.btn.sm { min-height: 32px; padding: 5px 12px; font-size: 13.5px; border-radius: 10px; }
.btn.is-primary { background: var(--accent); color: var(--on-light); border-color: transparent; }
.btn.is-primary:hover { background: var(--accent-hi); }
.btn.is-quiet { background: transparent; border-color: transparent; color: var(--muted); }
.btn.is-quiet:hover { color: var(--light); background: rgb(var(--light-rgb) / .08); }
.btn.is-danger { color: var(--red); border-color: rgb(var(--red-rgb) / .5); }
.is-light .btn { border-color: rgb(var(--on-light-rgb) / .25); background: rgb(var(--on-light-rgb) / .04); }

/* ---------- Inputs ---------- */
.field-round {
  display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 16px; border-radius: 999px;
  background: rgb(var(--deep-rgb) / .7); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--glass-shadow);
  transition: border-color .2s var(--ease);
}
.field-round:focus-within { border-color: var(--accent); }
.field-round input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; }
.field-round input::placeholder { color: rgb(var(--light-rgb) / .55); }
.input {
  width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 10px;
  background: rgba(0,0,0,.22); border: 1px solid rgb(var(--light-rgb) / .28); outline: 0;
}
.input:focus { outline: 2px solid var(--accent); border-color: transparent; }
input[type="checkbox"] { accent-color: var(--accent); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 18px; flex-wrap: wrap; }
.tab {
  --rond: var(--rond-button);
  padding: 6px 0; font-size: 14.5px; color: var(--muted);
  border-bottom: 2px solid transparent; transition: color .15s var(--ease), border-color .15s var(--ease);
}
.tab:hover { color: var(--light); }
.tab[aria-selected="true"], .tab.is-active { color: var(--light); border-bottom-color: var(--accent); }

/* ---------- Rows ---------- */
.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 8px; border-radius: 12px; transition: background-color .15s var(--ease);
}
.row + .row { box-shadow: 0 -1px 0 var(--glass-line); }
.row:hover { background: rgb(var(--light-rgb) / .10); }
.row .row-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .row-time { --rond: var(--rond-label); font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Dropdown ---------- */
.menu {
  position: absolute; min-width: 190px; padding: 6px; border-radius: 18px;
  background: rgb(var(--base-rgb) / .92);
  border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(26px) saturate(150%); backdrop-filter: blur(26px) saturate(150%);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.12);
  animation: open .3s var(--ease) both;
  z-index: 50;
}
.menu[hidden] { display: none; }
.menu-item {
  --rond: var(--rond-button);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 9px 12px; border-radius: 11px; font-size: 14.5px; text-align: left;
  transition: background-color .15s var(--ease);
}
.menu-item:hover, .menu-item:focus-visible { background: rgba(255,255,255,.09); }
.menu-item[aria-checked="true"]::after, .menu-item.is-active::after {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}

/* ---------- Status text & notices ---------- */
.status { --rond: var(--rond-label); font-size: 13px; color: var(--muted); }
.status.is-accent { color: var(--accent); }
.status.is-red { color: var(--red); }
.status.is-green { color: var(--green); }
.notice { padding: 10px 12px; border-radius: 10px; font-size: 14px; border: 1px solid rgb(var(--light-rgb) / .25); background: rgb(var(--light-rgb) / .06); }
.notice.is-red { border-color: rgb(var(--red-rgb) / .5); background: rgb(var(--red-rgb) / .1); }
.notice.is-green { border-color: rgb(var(--green-rgb) / .5); background: rgb(var(--green-rgb) / .1); }

/* ---------- Logo ---------- */
.logo-mark {
  width: 36px; height: 36px; display: block; flex: none; position: relative;
  filter: drop-shadow(0 0 10px rgb(var(--light-rgb) / .28));
}
.logo-mark canvas, .logo-mark img { width: 100%; height: 100%; display: block; }

/* ---------- Fluted glass layers ---------- */
.flutes-hero {
  position: absolute; inset: 0;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  background: repeating-linear-gradient(90deg,
    rgba(255,255,255,.075) 0px, rgba(255,255,255,.01) 3px, rgba(0,0,0,0) 9px,
    rgba(0,0,0,.2) 15px, rgba(0,0,0,.3) 16px);
}
.flutes-wave {
  background: repeating-linear-gradient(90deg,
    rgba(255,255,255,.13) 0px, rgba(255,255,255,.04) 5px, rgba(255,255,255,0) 14px,
    rgba(0,0,0,0) 22px, rgba(0,0,0,.16) 34px, rgba(0,0,0,.32) 39px, rgba(0,0,0,.38) 40px);
  mix-blend-mode: hard-light;
}
.flutes-art {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg,
    rgba(255,255,255,.2) 0px, rgba(255,255,255,.07) 3px, rgba(255,255,255,0) 9px,
    rgba(0,0,0,0) 14px, rgba(0,0,0,.2) 22px, rgba(0,0,0,.42) 25px, rgba(0,0,0,.5) 26px);
  mix-blend-mode: hard-light;
}
.shader-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- Keyframes ---------- */
@keyframes rise   { from { opacity: 0; transform: translateY(24px); } }
@keyframes fade   { from { opacity: 0; } }
@keyframes open   { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes pop    { from { transform: scale(.4); opacity: 0; } }
@keyframes row-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes pulse-soft { 50% { opacity: .55; } }
.skeleton { background: rgb(var(--light-rgb) / .08); border-radius: 8px; animation: pulse-soft 1.6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
