/* StintLoop — site styles. Palette taken from an alpine dawn: snow, ink, lake, pine, mist, apricot. */

@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('fonts/schibsted-grotesk-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('fonts/schibsted-grotesk-latin-ext-wght-normal.woff2') format('woff2-variations');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --snow: #f6f8f9;
  --ink: #16232b;
  --ink-soft: #46575f;
  --lake: #2e6887;
  --lake-deep: #24546d;
  --pine: #23443d;
  --mist: #d9e4e8;
  --apricot: #f2b47e;
  --line: #c9d6dc;
  --surface: #ffffff;
  --focus: #2e6887;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: 2.125rem;
  --step-4: clamp(2.5rem, 2.2vw + 1.9rem, 3.75rem);

  --gutter: clamp(1rem, 4vw, 3rem);
  --measure: 66ch;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--snow);
  color: var(--ink);
  font-family: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: 'kern' 1;
}

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

a {
  color: var(--lake-deep);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--ink);
}

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 {
  font-size: var(--step-4);
  font-weight: 800;
}
h2 {
  font-size: var(--step-3);
  font-weight: 760;
}
h3 {
  font-size: var(--step-1);
  font-weight: 700;
  letter-spacing: -0.01em;
}
p {
  margin: 0;
  text-wrap: pretty;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--ink);
  color: var(--snow);
  padding: 0.5rem 0.875rem;
  border-radius: 6px;
  z-index: 10;
}
.skip:focus {
  left: 0.5rem;
}

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

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

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

.site-header {
  padding-block: 1.25rem;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.brand img {
  width: 30px;
  height: 30px;
}
.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 1.75rem);
  font-size: var(--step--1);
}
.site-nav a:not(.button) {
  color: var(--ink);
  text-decoration: none;
  font-weight: 560;
}
.site-nav a:not(.button):hover {
  text-decoration: underline;
}
@media (max-width: 600px) {
  .site-nav .nav-optional {
    display: none;
  }
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 650;
  font-size: var(--step-0);
  text-decoration: none;
  cursor: pointer;
}
.button-primary {
  background: var(--lake);
  color: #fff;
}
.button-primary:hover {
  background: var(--lake-deep);
  color: #fff;
}
.button-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.button-quiet:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.button-small {
  min-height: 2.25rem;
  padding: 0.35rem 0.9rem;
  font-size: var(--step--1);
}

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

.hero {
  padding-block: clamp(1.5rem, 4vw, 3.5rem) clamp(3rem, 7vw, 6rem);
}
.hero .wrap {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 960px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}
.hero-copy h1 {
  max-width: 13ch;
}
.hero-lead {
  margin-top: 1.25rem;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 34ch;
}
.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.hero-note {
  margin-top: 1rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* The desk: a Mac desktop at dawn with StintLoop open in the menu bar. */
.desk {
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 1px 0 rgb(255 255 255 / 70%) inset,
    0 30px 60px -20px rgb(22 35 43 / 35%);
  font-size: 13px;
  line-height: 1.35;
  container-type: inline-size;
}
.desk-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.glass {
  background: rgb(255 255 255 / 30%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid rgb(255 255 255 / 55%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 70%),
    0 14px 34px -10px rgb(22 35 43 / 30%);
}

.menubar {
  position: absolute;
  inset: 0 0 auto 0;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding-inline: 14px;
  border-width: 0 0 1px 0;
  border-radius: 0;
  color: var(--ink);
  font-weight: 560;
}
.menubar-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.menubar-item.is-active {
  background: rgb(255 255 255 / 45%);
  border-radius: 6px;
  padding: 2px 7px;
  margin-inline: -7px;
}
.menubar-item svg {
  width: 15px;
  height: 15px;
}

.popover {
  position: absolute;
  top: 40px;
  right: clamp(16px, 5cqw, 40px);
  width: min(270px, 46%);
  border-radius: 18px;
  padding: 16px;
  color: var(--ink);
}
.popover-issue {
  display: grid;
  gap: 2px;
}
.issue-key {
  font-weight: 700;
  color: var(--lake-deep);
}
.issue-title {
  font-weight: 560;
}
.ring {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 16px auto 10px;
}
.ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring-track {
  fill: none;
  stroke: rgb(22 35 43 / 12%);
  stroke-width: 9;
}
.ring-progress {
  fill: none;
  stroke: var(--lake);
  stroke-width: 9;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear, stroke 0.4s ease;
}
.ring-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.ring-time {
  font-size: 28px;
  font-weight: 760;
  letter-spacing: -0.01em;
}
.ring-sub {
  font-size: 11.5px;
  color: var(--ink-soft);
}
.popover-actions {
  display: flex;
  gap: 8px;
}
.pill {
  flex: 1;
  border-radius: 999px;
  padding: 6px 10px;
  text-align: center;
  font-weight: 650;
  background: rgb(255 255 255 / 55%);
  border: 1px solid rgb(255 255 255 / 70%);
}
.pill-strong {
  background: var(--lake);
  border-color: var(--lake);
  color: #fff;
}
.popover-confirm {
  display: none;
  gap: 10px;
}
.confirm-actions {
  display: flex;
  gap: 8px;
}
.popover-confirm p {
  font-weight: 560;
}

.issue-card {
  position: absolute;
  left: clamp(14px, 4cqw, 36px);
  bottom: clamp(14px, 4cqw, 36px);
  width: min(300px, 44%);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgb(246 248 249 / 78%);
  color: var(--ink);
}
.issue-card h3 {
  font-size: 13px;
  letter-spacing: 0;
  line-height: 1.35;
}
.worklog {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.worklog li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgb(255 255 255 / 75%);
}
.worklog .who {
  font-weight: 650;
}
.worklog .when {
  color: var(--ink-soft);
}
.worklog .what {
  grid-column: 1 / -1;
  color: var(--ink-soft);
}
.worklog .is-new {
  box-shadow: inset 3px 0 0 var(--apricot);
}

/* Demo states, set by site.js on .desk. Without JS the finished state is shown. */
.desk[data-state='running'] .worklog .is-new {
  display: none;
}
.desk[data-state='confirm'] .popover-confirm {
  display: grid;
}
.desk[data-state='confirm'] .popover-actions,
.desk[data-state='logged'] .popover-actions {
  display: none;
}
.desk[data-state='logged'] .popover-confirm {
  display: grid;
}
.desk[data-state='logged'] .popover-confirm .pill-strong {
  background: var(--pine);
  border-color: var(--pine);
}
.desk[data-state='confirm'] .worklog .is-new {
  display: none;
}
.desk[data-state='logged'] .worklog .is-new {
  animation: drop-in 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes drop-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@container (max-width: 520px) {
  .desk {
    font-size: 12px;
  }
  .popover {
    right: 10px;
    top: 40px;
    width: 64%;
    padding: 12px;
  }
  .ring {
    width: 112px;
    height: 112px;
    margin-block: 10px 8px;
  }
  .ring-sub {
    font-size: 10.5px;
  }
  .ring-time {
    font-size: 22px;
  }
  .issue-card {
    left: 10px;
    bottom: 10px;
    width: 72%;
    padding: 10px 12px;
  }
  .worklog .what {
    display: none;
  }
  .menubar .menubar-clock {
    display: none;
  }
}

@media (max-width: 600px) {
  .desk {
    aspect-ratio: 4 / 5;
  }
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  border-top: 1px solid var(--line);
}
.section-head {
  display: grid;
  gap: 0.9rem;
  max-width: var(--measure);
}
.section-head p {
  color: var(--ink-soft);
  font-size: var(--step-1);
  line-height: 1.5;
}

/* How it works: a real sequence, so it is numbered. */
.steps {
  list-style: none;
  margin: 2.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 2rem;
  counter-reset: step;
}
@media (min-width: 820px) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
  }
}
.steps li {
  counter-increment: step;
  display: grid;
  gap: 0.5rem;
  align-content: start;
  padding-top: 1rem;
  border-top: 3px solid var(--mist);
}
.steps li:last-child {
  border-top-color: var(--apricot);
}
.steps li::before {
  content: counter(step);
  font-weight: 800;
  font-size: var(--step-2);
  color: var(--lake);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.steps p {
  color: var(--ink-soft);
}

/* What it does */
.features {
  margin: 2.75rem 0 0;
  display: grid;
  gap: 2rem 3rem;
}
@media (min-width: 820px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.features div {
  display: grid;
  gap: 0.4rem;
  align-content: start;
  max-width: 48ch;
}
.features dt {
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: -0.01em;
}
.features dd {
  margin: 0;
  color: var(--ink-soft);
}
.tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--mist);
  color: var(--pine);
  font-size: var(--step--1);
  font-weight: 650;
  letter-spacing: 0;
  vertical-align: 0.15em;
}

/* Pricing table */
.pricing-lead {
  margin-top: 0.25rem;
}
.table-scroll {
  margin-top: 2.5rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.price-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: var(--step--1);
}
.price-table th,
.price-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.price-table tbody tr:last-child th,
.price-table tbody tr:last-child td {
  border-bottom: 0;
}
.price-table thead th {
  vertical-align: bottom;
  font-size: var(--step-0);
}
.price-table thead th:first-child {
  width: 40%;
}
.plan-name {
  display: block;
  font-weight: 760;
  font-size: var(--step-1);
}
.plan-price {
  display: block;
  margin-top: 0.25rem;
  font-weight: 560;
  color: var(--ink-soft);
}
.price-table .col-pro {
  background: rgb(46 104 135 / 6%);
}
.price-table tbody th {
  font-weight: 560;
}
.yes {
  color: var(--pine);
  font-weight: 700;
}
.no {
  color: var(--ink-soft);
}
@media (max-width: 600px) {
  .price-table {
    min-width: 0;
    font-size: 0.8125rem;
  }
  .price-table th,
  .price-table td {
    padding: 0.65rem 0.5rem;
  }
  .price-table thead th:first-child {
    width: 34%;
  }
  .plan-name {
    font-size: var(--step-0);
  }
  .plan-price {
    font-size: 0.8125rem;
  }
}
.pricing-notes {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.35rem;
  color: var(--ink-soft);
  font-size: var(--step--1);
  max-width: var(--measure);
}

/* FAQ */
.faq {
  margin-top: 2.5rem;
  max-width: 52rem;
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 2.5rem 1.1rem 0;
  position: relative;
  font-weight: 650;
  font-size: var(--step-1);
  letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '';
  position: absolute;
  right: 0.4rem;
  top: 50%;
  width: 0.7rem;
  height: 0.7rem;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}
.faq details p {
  padding: 0 0 1.25rem;
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* Closing band */
.closing {
  background: var(--pine);
  color: var(--snow);
  border-top: 0;
}
.closing h2 {
  max-width: 20ch;
}
.closing p {
  margin-top: 1rem;
  color: rgb(246 248 249 / 82%);
  max-width: 46ch;
  font-size: var(--step-1);
  line-height: 1.5;
}
.closing .hero-actions {
  margin-top: 1.75rem;
}
.closing .button-primary {
  background: var(--snow);
  color: var(--pine);
}
.closing .button-primary:hover {
  background: #fff;
  color: var(--ink);
}
.closing :focus-visible {
  outline-color: var(--apricot);
}

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

.site-footer {
  padding-block: 2.5rem 3rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.site-footer .wrap {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 820px) {
  .site-footer .wrap {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}
.footer-links a {
  color: var(--ink);
}
.site-footer p + p {
  margin-top: 0.4rem;
}

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

.legal {
  padding-block: clamp(2rem, 5vw, 4rem) clamp(3rem, 7vw, 5rem);
}
.legal .wrap {
  max-width: 48rem;
}
.legal h1 {
  font-size: var(--step-3);
}
.legal .updated {
  margin-top: 0.75rem;
  color: var(--ink-soft);
  font-size: var(--step--1);
}
.legal h2 {
  margin-top: 2.5rem;
  font-size: var(--step-1);
  letter-spacing: -0.01em;
}
.legal p,
.legal ul {
  margin-top: 0.85rem;
  max-width: var(--measure);
}
.legal ul {
  padding-left: 1.25rem;
}
.legal li + li {
  margin-top: 0.35rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
