/* resolva.gl – the product's public page. One typeface, the app's own blue, and one moving
   thing: the queue in the hero. Everything else stays still. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #10283a;      /* text and headlines: a deep blue-ink, not black */
  --ink-soft: #4a6072; /* secondary text (7.0:1 on paper) */
  --paper: #ffffff;
  --ice: #edf4f7;      /* the hero and the contact band */
  --line: #d7e2e8;
  --brand: #0369a1;    /* the app's own blue (logo, buttons) */
  --brand-deep: #075985;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;   /* 17px body */
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 3.4vw, 2.625rem);
  --step-4: clamp(2.4rem, 4.6vw, 3.5rem);

  --row: 3rem; /* height of a row in the queue */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-kerning: normal;
}
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.022em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--brand); text-underline-offset: 0.18em; }
a:hover { color: var(--brand-deep); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(72rem, 100% - 3rem); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--paper); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

/* --- header --- */
.top { position: absolute; inset: 0 0 auto; z-index: 2; }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 4.5rem; }
/* The wordmark: the name said in a speech bubble with a tick (same as the app) */
.logo { position: relative; display: inline-flex; align-items: center; gap: 0.4em; padding: 0.37em 0.63em 0.42em 0.47em; border-radius: 0.53em; background: var(--brand); color: #fff; font-weight: 700; font-size: 1.3rem; line-height: 1; letter-spacing: -0.025em; text-decoration: none; }
.logo:hover { color: #fff; background: var(--brand-deep); }
.logo svg { width: 1em; height: 1em; flex: none; }
.logo::after { content: ""; position: absolute; bottom: -0.31em; left: 0.53em; width: 0.63em; height: 0.47em; background: inherit; clip-path: polygon(0 0, 100% 0, 0 100%); }
.link-quiet { color: var(--ink); font-weight: 500; text-decoration: none; padding: 0.5rem 0.25rem; }
.link-quiet:hover { color: var(--brand); }

/* --- buttons --- */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }
.btn {
  display: inline-flex; align-items: center; min-height: 2.875rem; padding: 0 1.4rem;
  border-radius: 0.5rem; background: var(--brand); color: #fff; font-weight: 600;
  text-decoration: none; transition: background-color 160ms ease;
}
.btn:hover { background: var(--brand-deep); color: #fff; }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-quiet:hover { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-soft); }

/* --- hero --- */
.hero { background: var(--ice); padding: 8.5rem 0 5rem; overflow: hidden; }
/* The text on top, then the scene in full width: the customer's own mail -> Resolva */
.hero-grid { display: grid; gap: 3.5rem; grid-template-columns: minmax(0, 1fr); }
.hero-text { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 3.5rem; align-items: end; }
.hero-text .actions { grid-column: 2; }
.hero-text .hero-sub { grid-column: 2; grid-row: 1; align-self: end; margin-top: 0; }
.hero-text h1 { grid-row: 1 / span 2; }
.hero h1 { font-size: var(--step-4); font-weight: 700; max-width: 15ch; }
.hero-sub { margin-top: 1.5rem; font-size: var(--step-1); line-height: 1.45; color: var(--ink-soft); max-width: 30ch; }

/* The queue: a quiet copy of the real one (same columns, bold = new and not taken yet) */
.scene { position: relative; margin: 0 -6rem 0 0; padding-bottom: 5rem; }
.queue {
  background: var(--paper); border-radius: 0.875rem; font-size: var(--step--1);
  box-shadow: 0 1px 0 var(--line), 0 24px 48px -24px rgb(16 40 58 / 0.28);
}
.queue-bar {
  position: relative; display: flex; align-items: center; gap: 0.9rem; height: 3rem;
  padding: 0 1.25rem; border-bottom: 1px solid var(--line);
}
.queue-title { font-weight: 700; font-size: 0.95rem; }
.queue-addr { color: var(--ink-soft); }
/* "Answer sent" appears in the queue's bar when the colleague replies */
.reply-chip {
  margin-left: auto; display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.2rem 0.7rem; border-radius: 999px; background: var(--ice); color: var(--ink);
  font-weight: 600; font-size: 0.8rem; opacity: 0; transform: translateY(-0.4rem);
  transition: opacity 220ms ease, transform 320ms var(--ease-out);
}
.reply-chip::before { content: ""; width: 0.8rem; height: 0.45rem; border: solid var(--brand); border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -2px); }
.reply-chip.show { opacity: 1; transform: none; }

/* Two windows side by side: the customer's own mail program, and Resolva */
.scene { position: relative; margin: 0; display: grid; grid-template-columns: minmax(17rem, 21rem) 4.5rem minmax(0, 1fr); align-items: start; }
.pane { min-width: 0; }
.pane-label { margin: 0 0 0.6rem 0.25rem; font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); }
.compose {
  position: relative; width: 100%;
  background: var(--paper); border-radius: 0.75rem; font-size: var(--step--1);
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -20px rgb(16 40 58 / 0.35);
}
.win-dots { display: inline-flex; gap: 0.3rem; margin-right: 0.75rem; vertical-align: 1px; }
.win-dots i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #d5dde3; }
/* The way the mail goes: a dashed line with an arrow head */
.flow { position: relative; height: 1rem; margin-top: 9rem; } /* level with the middle of the mail */
.flow-line { position: absolute; left: 0.5rem; right: 0.6rem; top: 50%; border-top: 2px dashed #b9c8d2; }
.flow-line::after { content: ""; position: absolute; right: -0.45rem; top: -0.4rem; border: 0.35rem solid transparent; border-left: 0.5rem solid #b9c8d2; }
/* The mail on its way (site.js): a small envelope from Send to the top of the queue */
.envelope {
  position: absolute; z-index: 3; width: 1.75rem; height: 1.2rem; border-radius: 0.2rem;
  background: var(--brand); box-shadow: 0 6px 14px -6px rgb(16 40 58 / 0.5);
  transition: transform 700ms cubic-bezier(0.5, 0, 0.3, 1), opacity 200ms ease 600ms;
}
.envelope::before { content: ""; position: absolute; inset: 0.15rem 0.2rem auto; height: 0.55rem; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: skewY(0); clip-path: polygon(0 0, 100% 0, 50% 100%); background: rgb(255 255 255 / 0.25); }
.envelope.gone { opacity: 0; }
.compose-head { padding: 0.6rem 1rem; font-weight: 700; border-bottom: 1px solid var(--line); }
.compose-field { display: flex; gap: 0.75rem; padding: 0.5rem 1rem; border-bottom: 1px solid #edf2f5; min-height: 2.2rem; }
.compose-field .lbl { width: 2.6rem; flex: none; color: var(--ink-soft); }
.compose-body { padding: 0.75rem 1rem 0.5rem; min-height: 4.6rem; color: var(--ink); line-height: 1.45; }
.compose-foot { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0.75rem 0.75rem 1rem; }
.compose-from { color: var(--ink-soft); }
.send {
  padding: 0.35rem 0.9rem; border-radius: 0.4rem; background: var(--brand); color: #fff; font-weight: 600;
  transition: transform 120ms ease, background-color 120ms ease;
}
.send.press { transform: scale(0.92); background: var(--brand-deep); }
.typing::after {
  content: ""; display: inline-block; width: 1.5px; height: 1.05em; margin-left: 1px;
  vertical-align: -0.15em; background: var(--brand); animation: caret 900ms steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.queue-head, .row {
  display: grid; align-items: center; gap: 1rem; padding: 0 1.25rem;
  grid-template-columns: 4.8rem 8.6rem minmax(0, 1fr) 9.4rem 2rem;
}
.queue-head { height: 2.4rem; color: var(--ink-soft); font-size: 0.8rem; border-bottom: 1px solid var(--line); }
.queue-body { height: calc(var(--row) * 5); overflow: hidden; transition: opacity 300ms ease; }
.queue-body.slide { transition: transform 520ms var(--ease-out), opacity 300ms ease; }
.queue-body.swap { opacity: 0; }
.row { height: var(--row); border-bottom: 1px solid #edf2f5; white-space: nowrap; }
.row > span { overflow: hidden; text-overflow: ellipsis; }
.num { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.row.is-new { font-weight: 650; background: #f4f9fc; }
.row.is-new .num { color: var(--ink); }
.row { transition: background-color 600ms ease, font-weight 200ms; }

.st { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--ink-soft); }
.dot { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: #9fb3c1; flex: none; }
.st.new { color: var(--brand); }
.st.new .dot { background: var(--brand); }
.st.solved .dot { background: transparent; box-shadow: inset 0 0 0 1.5px #9fb3c1; }

.agent b {
  display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--ice); color: var(--ink); font-size: 0.68rem; font-weight: 700;
}
.agent b.pop { animation: pop 380ms var(--ease-out); }
.agent .none { color: #9fb3c1; }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
.st.changed { animation: settle 420ms var(--ease-out); }
@keyframes settle { from { opacity: 0; transform: translateY(0.3rem); } to { opacity: 1; transform: none; } }

/* --- the spreadsheet most customers come from, next to what changes --- */
.sheet-vs { padding: 7rem 0 6rem; }
.sheet-vs h2 { font-size: var(--step-3); font-weight: 700; max-width: 22ch; }
.sheet-lead { margin-top: 1rem; color: var(--ink-soft); font-size: var(--step-1); line-height: 1.45; max-width: 46ch; }
.sheet-grid { margin-top: 3.5rem; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 4rem; align-items: start; }

.sheet {
  position: relative; margin: 0; background: #fff; font-size: 0.8125rem;
  border: 1px solid #c8d0d6; box-shadow: 0 18px 40px -26px rgb(16 40 58 / 0.4);
  font-family: Calibri, Carlito, "Segoe UI", system-ui, sans-serif; color: #222;
}
.sheet-file {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem;
  padding: 0.5rem 0.75rem; background: #1f6e43; color: #fff; font-size: 0.78rem;
}
.sheet-lock { opacity: 0.85; }
.sheet-cells { display: grid; grid-template-columns: 1.75rem 3.6rem 4.6rem minmax(0, 1fr) 4.4rem; }
.c { height: 1.9rem; padding: 0 0.4rem; display: flex; align-items: center; white-space: nowrap; overflow: hidden; border-right: 1px solid #e1e5e8; border-bottom: 1px solid #e1e5e8; }
.c.h, .c.n { background: #f1f3f4; color: #666; justify-content: center; font-size: 0.72rem; }
.c.b { font-weight: 700; }
.c.y { background: #fff2a8; }
.c.r { color: #c4262e; font-weight: 700; }
.sheet-note {
  position: absolute; right: -0.9rem; top: 5.6rem; padding: 0.35rem 0.6rem; background: #fff9c4;
  border: 1px solid #e4d97a; font-size: 0.75rem; font-weight: 700; color: #5b4d00; transform: rotate(2.5deg);
  box-shadow: 0 6px 14px -8px rgb(0 0 0 / 0.4);
}
.sheet-tabs { display: flex; gap: 2px; padding: 0 0.5rem; background: #f1f3f4; border-top: 1px solid #d5dade; font-size: 0.72rem; color: #555; }
.sheet-tabs span { padding: 0.3rem 0.7rem; }
.sheet-tabs .on { background: #fff; color: #1f6e43; font-weight: 700; border-bottom: 2px solid #1f6e43; }

.compare { width: 100%; border-collapse: collapse; }
.compare th { text-align: left; font-size: var(--step-0); font-weight: 650; padding: 0 1rem 0.75rem 0; }
.compare th:last-child { color: var(--brand); }
.compare td { padding: 0.85rem 1.25rem 0.85rem 0; border-top: 1px solid var(--line); vertical-align: top; width: 50%; }
.compare td:first-child { color: var(--ink-soft); }
.compare td:last-child { font-weight: 500; }

/* --- features: a list, not a wall of cards --- */
.features { padding: 7rem 0; }
.features-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 4rem; align-items: start; }
.features-intro { position: sticky; top: 2rem; }
.features h2, .start h2, .contact h2 { font-size: var(--step-3); font-weight: 700; }
.features-intro p { margin-top: 1rem; color: var(--ink-soft); font-size: var(--step-1); line-height: 1.45; max-width: 26ch; }
.feature-list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; }
.feature-list > div { padding: 1.5rem 0 1.75rem; border-top: 1px solid var(--line); }
.feature-list dt { font-weight: 650; font-size: var(--step-0); }
.feature-list dd { margin: 0.4rem 0 0; color: var(--ink-soft); max-width: 38ch; }
.feature-list dt .tag { margin-left: 0.4rem; padding: 0.1rem 0.45rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.75rem; font-weight: 500; color: var(--ink-soft); vertical-align: middle; }

/* --- getting started: a real sequence, so it is numbered --- */
.start { padding: 6rem 0 7rem; border-top: 1px solid var(--line); }
.start-lead { margin-top: 1rem; color: var(--ink-soft); font-size: var(--step-1); }
.start-lead strong { color: var(--ink); font-weight: 600; }
.steps { list-style: none; margin: 3.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 3.25rem; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0; width: 2.25rem; height: 2.25rem;
  display: grid; place-items: center; border-radius: 50%; background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--brand); color: var(--brand); font-weight: 700; font-size: 0.95rem;
}
.steps li::after { content: ""; position: absolute; top: 1.125rem; left: 2.75rem; right: -1.5rem; height: 1.5px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: var(--step-1); font-weight: 650; letter-spacing: -0.015em; }
.steps p { margin-top: 0.5rem; color: var(--ink-soft); }

/* --- contact: the address is the call to action --- */
.contact { background: var(--ice); padding: 6rem 0; }
.contact-lead { margin-top: 0.75rem; color: var(--ink-soft); font-size: var(--step-1); }
.contact-mail {
  display: inline-block; margin-top: 2rem; font-size: clamp(2rem, 6.4vw, 4.75rem); font-weight: 700;
  letter-spacing: -0.035em; line-height: 1; color: var(--ink); text-decoration: none;
  background: linear-gradient(var(--brand), var(--brand)) 0 100% / 0 0.08em no-repeat;
  transition: background-size 420ms var(--ease-out), color 200ms;
  padding-bottom: 0.08em; overflow-wrap: anywhere;
}
.contact-mail:hover { color: var(--brand); background-size: 100% 0.08em; }
.contact-phone { display: block; width: fit-content; margin-top: 1.25rem; font-size: var(--step-1); color: var(--ink); font-weight: 500; text-decoration: none; }
.contact-phone:hover { color: var(--brand); }

.foot { padding: 1.75rem 0; font-size: var(--step--1); color: var(--ink-soft); }
.foot-row { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.foot-links a { color: var(--ink-soft); }
.foot-links a:hover, .foot-links a[aria-current] { color: var(--ink); }

/* Plain text pages (privacy) */
.top-static { position: static; border-bottom: 1px solid var(--line); }
.page { padding: 3.5rem 0 4.5rem; }
.prose { max-width: 44rem; }
.prose .eyebrow { margin: 0; font-size: var(--step--1); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand); }
.prose h1 { margin: 0.4rem 0 1rem; font-size: var(--step-3); line-height: 1.1; letter-spacing: -0.03em; }
.prose .lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); margin: 0 0 2.5rem; }
.prose h2 { margin: 2.5rem 0 0.75rem; font-size: var(--step-1); letter-spacing: -0.015em; }
.prose p, .prose li { line-height: 1.65; }
.prose ul { padding-left: 1.2rem; margin: 0; }
.prose p + ul { margin-top: 0.9rem; }
.prose li + li { margin-top: 0.6rem; }
.prose .updated { margin-top: 3rem; font-size: var(--step--1); color: var(--ink-soft); }

/* --- smaller screens --- */
@media (max-width: 64rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-text { display: block; }
  .hero-text .hero-sub { margin-top: 1.5rem; }
  .scene { grid-template-columns: minmax(15rem, 18rem) 3rem minmax(0, 1fr); }
  .hero h1 { max-width: 16ch; }
  .scene { margin-right: 0; }
  .features-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .sheet-grid { grid-template-columns: minmax(0, 1fr); gap: 3rem; }
  .sheet { max-width: 34rem; }
  .features-intro { position: static; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.75rem; }
  .steps li:nth-child(2)::after { display: none; }
}
@media (max-width: 40rem) {
  .hero { padding: 6.5rem 0 4rem; }
  .queue-head, .row { grid-template-columns: minmax(0, 1fr) 8.6rem 1.75rem; gap: 0.6rem; padding: 0 0.9rem; }
  .queue-head span:nth-child(1), .queue-head span:nth-child(2),
  .row .num, .row .who { display: none; }
  .queue-addr { display: none; }
  .scene { display: flex; flex-direction: column; align-items: stretch; gap: 0.25rem; }
  .pane { width: 100%; }
  .flow { width: 1rem; height: 3rem; margin: 0 auto; }
  .flow-line { left: 50%; right: auto; top: 0.3rem; bottom: 0.6rem; border-top: 0; border-left: 2px dashed #b9c8d2; }
  .flow-line::after { right: auto; left: -0.45rem; top: auto; bottom: -0.5rem; border: 0.35rem solid transparent; border-top: 0.5rem solid #b9c8d2; }
  .feature-list { grid-template-columns: minmax(0, 1fr); }
  .features, .start, .sheet-vs { padding: 4.5rem 0; }
  .sheet-cells { grid-template-columns: 1.5rem 3.2rem minmax(0, 1fr) 4rem; }
  .sheet-cells .c:nth-child(5n + 3) { display: none; }
  .sheet-note { right: 0.5rem; }
  .compare td { padding-right: 0.75rem; font-size: 0.95rem; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li::after { display: none; }
  .contact { padding: 4.5rem 0; }
}

/* Motion is only for the queue; without it, the queue simply shows a finished state */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
