/*
  Humanly Labs: an independent studio that builds mobile apps with AI.

  One typeface, Archivo, carries the identity. Its width axis does the expressive
  work: headlines are set wide and tight, body and interface text at normal width.
  Colour is spent in one place, the orange of the studio mark, which becomes the
  hero. Everything else is paper, ink and hairlines.
*/
:root {
  color-scheme: light dark;
  --paper: #ffffff;
  --ink: #000000;
  --ink-2: rgba(0, 0, 0, 0.62);
  --ink-3: rgba(0, 0, 0, 0.38);
  --surface: #f4f4f6;
  --line: rgba(0, 0, 0, 0.16);
  --orange: #ff7a00;
  --orange-2: #ffb340;
  --on-orange: #000000;
  --font: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1120px;
  --gutter: 24px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #000000;
    --ink: #ffffff;
    --ink-2: rgba(255, 255, 255, 0.64);
    --ink-3: rgba(255, 255, 255, 0.4);
    --surface: #141416;
    --line: rgba(255, 255, 255, 0.18);
  }
}
@media (max-width: 719px) {
  :root { --gutter: 20px; }
}

* { box-sizing: border-box; }

html { background: var(--paper); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  min-height: 100svh;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  border-radius: 2px;
}
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

p { margin: 0; }
p + p { margin-top: 1em; }

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-variation-settings: "wdth" 112; }
h2 { font-variation-settings: "wdth" 108; }
h3 { font-variation-settings: "wdth" 104; }

.display {
  font-size: clamp(42px, 6.6vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.title {
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.04;
}
.lede {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 34em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 22px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; opacity: 0.86; }
.hero .btn { background: #000; color: #fff; }
.text-link {
  font-size: 15px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--ink-3);
}
.text-link:hover { text-decoration-color: currentColor; }

/* ---------- Top bar ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand svg { width: 32px; height: 32px; display: block; }
.top .links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 500;
}
.top .links .btn { height: 38px; padding: 0 18px; border-radius: 19px; }
@media (max-width: 719px) {
  .top .links { gap: 18px; }
  .top .links a:not(.btn):not(.keep) { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--orange-2) 0%, var(--orange) 72%, #f26f00 100%);
  color: var(--on-orange);
}
.hero .brand, .hero .links { color: #000; }
.hero .lede { color: rgba(0, 0, 0, 0.72); }
.hero .text-link { text-decoration-color: rgba(0, 0, 0, 0.4); }
.hero .text-link:hover { text-decoration-color: #000; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px;
  align-items: end;
  padding: 72px 0 88px;
}
.hero-copy .lede { margin-top: 28px; }
.hero .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 36px;
}
.mark {
  display: block;
  width: min(100%, 380px);
  height: auto;
  margin-left: auto;
  filter: drop-shadow(0 24px 48px rgba(120, 50, 0, 0.28));
}
@media (hover: hover) {
  .mark:hover { animation: jiggle 0.28s ease-in-out infinite; }
}
@keyframes jiggle {
  0%   { transform: rotate(-1.4deg); }
  50%  { transform: rotate(1.4deg) translateY(-1px); }
  100% { transform: rotate(-1.4deg); }
}
@media (max-width: 899px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 24px 0 64px;
  }
  .mark { width: 128px; margin-left: 0; order: -1; }
}

/* Page-load reveal: the one orchestrated moment on the site */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.hero-copy > *, .mark {
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.mark { animation-delay: 0.1s; }
@media (prefers-reduced-motion: reduce) {
  .hero-copy > *, .mark { animation: none; }
  .mark:hover { animation: none; }
}

/* ---------- Sections ---------- */
section { padding: 88px 0; }
section + section { border-top: 0.5px solid var(--line); }
@supports not (border-width: 0.5px) {
  section + section { border-top-width: 1px; }
}
@media (max-width: 719px) {
  section { padding: 64px 0; }
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 32px 48px;
  align-items: start;
  margin-bottom: 56px;
}
.section-head .lede { font-size: 19px; }
@media (max-width: 899px) {
  .section-head { grid-template-columns: 1fr; gap: 20px; margin-bottom: 40px; }
}

/* Three capabilities */
.cols {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.cols li {
  border-top: 2px solid var(--ink);
  padding-top: 20px;
}
.cols h3 { font-size: 22px; line-height: 1.2; }
.cols p { margin-top: 12px; color: var(--ink-2); }
@media (max-width: 899px) {
  .cols { grid-template-columns: 1fr; gap: 28px; }
  .cols li { padding-top: 16px; }
}

/* Four steps: numbered because the process is a sequence */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
}
.steps li {
  counter-increment: step;
  border-top: 0.5px solid var(--line);
  padding-top: 20px;
}
.steps li::before {
  content: counter(step);
  display: block;
  font-size: 44px;
  line-height: 1;
  font-weight: 600;
  font-variation-settings: "wdth" 125;
  letter-spacing: -0.03em;
  color: var(--orange);
  margin-bottom: 22px;
}
.steps h3 { font-size: 20px; line-height: 1.25; }
.steps p { margin-top: 10px; color: var(--ink-2); font-size: 16px; }
@media (max-width: 899px) {
  .steps { grid-template-columns: 1fr 1fr; gap: 36px 28px; }
}
@media (max-width: 559px) {
  .steps { grid-template-columns: 1fr; }
  .steps li { display: grid; grid-template-columns: 56px 1fr; column-gap: 12px; }
  .steps li::before { grid-row: 1 / span 2; font-size: 36px; margin: 0; }
}

/* Principles: statement left, explanation right */
.beliefs {
  margin: 0;
  padding: 0;
  list-style: none;
}
.beliefs li {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 16px 48px;
  padding: 32px 0;
  border-top: 0.5px solid var(--line);
}
.beliefs li:first-child { border-top: 0; padding-top: 0; }
.beliefs li:last-child { padding-bottom: 0; }
.beliefs h3 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.1; }
.beliefs p { color: var(--ink-2); max-width: 36em; }
@media (max-width: 899px) {
  .beliefs li { grid-template-columns: 1fr; gap: 10px; padding: 24px 0; }
}

/* Apps */
.apps-note {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 24px 48px;
  align-items: start;
}
.shelf {
  display: flex;
  gap: 18px;
  margin-top: 36px;
}
.shelf span {
  width: 72px;
  height: 72px;
  border-radius: 24%;
  border: 1.5px dashed var(--ink-3);
}
.shelf span:first-child {
  border: 0;
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
}
@media (max-width: 899px) {
  .apps-note { grid-template-columns: 1fr; }
}

/* Contact */
.contact { background: var(--surface); }
.contact .title { margin-bottom: 28px; }
.big-link {
  display: inline-block;
  font-size: clamp(26px, 4.4vw, 56px);
  line-height: 1.1;
  font-weight: 600;
  font-variation-settings: "wdth" 108;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: var(--ink-3);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.big-link:hover { text-decoration-color: var(--orange); }
.contact p.after {
  margin-top: 28px;
  color: var(--ink-2);
  max-width: 40em;
}

/* ---------- Footer ---------- */
footer {
  border-top: 0.5px solid var(--line);
  padding: 36px 0 max(44px, env(safe-area-inset-bottom));
  font-size: 14px;
  color: var(--ink-2);
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
footer .brand { color: var(--ink); font-size: 15px; }
footer .brand svg { width: 24px; height: 24px; }
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
footer nav a:hover { color: var(--ink); }

/* ---------- Long-form pages: support, privacy, terms ---------- */
.page-head {
  padding: 48px 0 56px;
  border-bottom: 0.5px solid var(--line);
}
.page-head h1 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
}
.page-head .lede { margin-top: 14px; }
.doc section {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 20px 48px;
  padding: 44px 0;
}
.doc section + section { border-top: 0.5px solid var(--line); }
.doc section > h2 {
  font-size: 24px;
  line-height: 1.2;
}
.doc .body { color: var(--ink-2); max-width: 40em; }
.doc .body strong { color: var(--ink); font-weight: 600; }
.doc h3 {
  font-size: 18px;
  line-height: 1.3;
  color: var(--ink);
  margin-top: 28px;
}
.doc h3:first-child { margin-top: 0; }
.doc h3 + p { margin-top: 8px; }
.doc .body ul {
  margin: 12px 0 0;
  padding-left: 22px;
}
.doc .body li + li { margin-top: 8px; }
.doc .body ul + p { margin-top: 16px; }
.doc .body a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink-3); }
.doc .body a:hover { text-decoration-color: currentColor; }
.doc .note {
  margin-top: 16px;
  font-size: 15px;
  color: var(--ink-3);
}
@media (max-width: 899px) {
  .doc section { grid-template-columns: 1fr; gap: 14px; padding: 36px 0; }
}

/* Label and value rows */
.rows { margin: 0; padding: 0; list-style: none; }
.row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
  border-top: 0.5px solid var(--line);
  color: var(--ink);
}
.row:first-child { border-top: 0; padding-top: 0; }
.row .k { flex: none; color: var(--ink-2); }
.row .v { text-align: right; overflow-wrap: anywhere; }
.row .v a { text-decoration: underline; text-decoration-color: var(--ink-3); }
.row .v a:hover { text-decoration-color: currentColor; }

/* Text that still has to be replaced before a push */
.fill {
  padding: 0 6px;
  border: 1.5px dashed var(--orange);
  border-radius: 6px;
  color: var(--orange);
}
