/* Hallmark · shape: Manifesto · genre: editorial · theme: custom (warm paper, one rust signal, Gambetta over Switzer) · redesign of the first build, content kept
 * hero: Settled, the claim set huge on paper · nav: edge-aligned, the wordmark and three links · footer: mast, the wordmark over the legal row · imagery: none, type and facts carry the page · signature: the studio's one claim, "We make apps people keep", set at display size on the first screen
 * axes: light/roman-serif/warm · posture: restrained · contrast: pass · fold: pass */
/* Hallmark · pre-emit critique: P4 H4 E4 S3 R5 V4 · weakest: S, the studio has no shipped apps or screenshots yet, so the page argues by its three working rules and a plain contact rather than a portfolio */
/* Hallmark · dismissed 58 · words were counted per screen after the cut; the hero is the headline, one twelve-word sentence and two actions */

:root {
  /* colour */
  --paper: #f5f2ec;
  --paper-2: #ece7de;
  --ink: #1a1816;
  --ink-2: #57504a;
  --ink-3: #7d756e;
  --night: #141210;
  --night-ink: #f5f2ec;
  --night-muted: #9a918a;
  --rust: #a94b28;
  --rust-glow: rgba(169, 75, 40, 0.09);
  --rust-glow-strong: rgba(169, 75, 40, 0.18);
  --hair: rgba(26, 24, 22, 0.12);
  --hair-strong: rgba(26, 24, 22, 0.35);
  --hair-night: rgba(245, 242, 236, 0.14);
  --focus: #a94b28;

  /* type */
  --font-display: "Gambetta", ui-serif, serif;
  --font-body: "Switzer", ui-sans-serif, sans-serif;

  --size-hero: clamp(2.5rem, 9.5vw + 0.5rem, 10rem);
  --size-h2: clamp(2.25rem, 4.5vw + 0.5rem, 5rem);
  --size-h3: clamp(1.5rem, 1.6vw + 0.9rem, 2.4rem);
  --size-mega: clamp(3.75rem, 13vw, 13rem);
  --size-lead: clamp(1.0625rem, 0.4vw + 0.95rem, 1.25rem);
  --size-body: 1rem;
  --size-label: 0.875rem;

  /* motion */
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);

  /* space */
  --gutter: max(clamp(1rem, 5vw, 5rem), env(safe-area-inset-left), env(safe-area-inset-right));
  --max: 90rem;
  --col-gap: clamp(2.5rem, 7vw, 8rem);
  --section: clamp(5rem, 11vw, 11rem);
  --nav-h: 4.5rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: 1.55;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--rust);
  color: var(--night-ink);
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  transition: none;
}

h1,
h2,
h3 {
  overflow-wrap: break-word;
  min-width: 0;
  text-wrap: balance;
}

.display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.95;
}

.label {
  font-family: var(--font-body);
  font-size: var(--size-label);
  font-weight: 400;
  color: var(--ink-3);
}

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

.noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- links ---------- */

.link {
  position: relative;
  display: inline-block;
  padding-block: 0.15em;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  text-decoration-color: var(--hair-strong);
  transition: text-decoration-color 0.3s var(--ease-expo), color 0.3s var(--ease-expo);
}

.link--quiet {
  text-decoration-color: transparent;
}

.link[aria-current="page"] {
  text-decoration-color: var(--rust);
}

.link:active {
  color: var(--rust);
}

@media (hover: hover) {
  .link:hover {
    text-decoration-color: var(--rust);
  }
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s var(--ease-expo), border-color 0.4s var(--ease-expo);
}

.nav.is-scrolled {
  background: var(--paper);
  border-bottom-color: var(--hair);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--nav-h);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--size-label);
}

/* ---------- reveal (hero only) ---------- */

.m {
  display: block;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}

.m > * {
  display: block;
}

.js .m > * {
  transform: translateY(110%);
  transition: transform 1.2s var(--ease-expo);
  transition-delay: var(--d, 0s);
}

.js .is-in .m > * {
  transform: none;
}

.js .rise {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 1s var(--ease-expo), transform 1s var(--ease-expo);
  transition-delay: var(--d, 0s);
}

.js .is-in .rise,
.js .rise.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 12% 22%, var(--rust-glow) 0%, transparent 55%);
}

.hero__deco {
  position: absolute;
  right: -2%;
  top: 8%;
  pointer-events: none;
  user-select: none;
  opacity: 0.06;
  color: var(--ink);
  will-change: transform, opacity;
}

.hero__deco span {
  display: block;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(18rem, 46vw, 56rem);
  line-height: 0.8;
  letter-spacing: -0.06em;
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100svh;
  padding-top: calc(var(--nav-h) + 3rem);
  padding-bottom: clamp(3rem, 6vw, 6rem);
  will-change: transform, opacity;
}

.hero__headline {
  font-size: var(--size-hero);
}

.hero__headline .m > * {
  white-space: nowrap;
}

.hero__lead {
  margin: 2rem 0 0;
  max-width: 30rem;
  color: var(--ink-2);
  font-size: var(--size-lead);
  line-height: 1.5;
}

.hero__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem 3rem;
  margin-top: clamp(2.5rem, 6vw, 5rem);
}

.ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.9rem 1.9rem;
  background: var(--ink);
  border: 1px solid var(--ink);
  color: var(--night-ink);
  font-family: var(--font-body);
  font-size: var(--size-label);
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.4s var(--ease-expo), border-color 0.4s var(--ease-expo), transform 0.2s var(--ease-expo);
}

.btn:active {
  transform: translateY(1px);
  background: var(--rust);
  border-color: var(--rust);
}

@media (hover: hover) {
  .btn:hover {
    background: var(--rust);
    border-color: var(--rust);
  }
}

.facts {
  display: flex;
  gap: 2.5rem;
  margin: 0;
}

.facts div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.facts dt {
  font-size: var(--size-label);
  color: var(--ink-3);
}

.facts dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
}

.hero__rule {
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--hair);
}

/* ---------- practice ---------- */

.practice {
  padding-block: var(--section);
}

.practice__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--col-gap);
  align-items: start;
}

.practice__head {
  position: sticky;
  top: calc(var(--nav-h) + 2.5rem);
}

.practice__title {
  font-size: var(--size-h2);
}

.practice__note {
  margin: 1.75rem 0 0;
  max-width: 24rem;
  color: var(--ink-2);
}

.rules {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--hair);
}

.rule {
  padding-block: clamp(1.75rem, 3.5vw, 3rem);
  border-bottom: 1px solid var(--hair);
}

.rule__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--size-h3);
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.rule__body {
  margin: 0.9rem 0 0;
  max-width: 32rem;
  color: var(--ink-2);
}

/* ---------- contact ---------- */

.contact {
  position: relative;
  padding-block: var(--section) clamp(4rem, 8vw, 8rem);
  background: var(--paper-2);
  overflow: hidden;
}

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: var(--col-gap);
  align-items: end;
}

.contact__title {
  font-size: var(--size-mega);
  line-height: 0.88;
  will-change: transform;
}

.contact__mail {
  margin-top: 2.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw + 0.6rem, 2.75rem);
  letter-spacing: -0.015em;
  white-space: normal;
  overflow-wrap: anywhere;
}

.contact__aside {
  color: var(--ink-2);
}

.contact__aside p {
  margin: 0.35rem 0 1.75rem;
}

.contact__aside p:last-child {
  margin-bottom: 0;
}

/* ---------- footer ---------- */

.footer {
  position: relative;
  background: var(--night);
  color: var(--night-ink);
  overflow: hidden;
}

.footer .noise {
  mix-blend-mode: screen;
  opacity: 0.035;
}

.footer__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 70% at 8% 100%, var(--rust-glow-strong) 0%, transparent 60%);
}

.footer__inner {
  position: relative;
  padding-top: clamp(4rem, 8vw, 7rem);
  padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
}

.footer__mark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.5rem, 15vw, 15rem);
  letter-spacing: -0.045em;
  line-height: 0.85;
  overflow-wrap: break-word;
}

.footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem 2rem;
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--hair-night);
  color: var(--night-muted);
  font-size: var(--size-label);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__legal a {
  color: var(--night-ink);
  text-decoration-color: var(--hair-night);
}

/* ---------- legal pages ---------- */

.legal {
  padding-top: calc(var(--nav-h) + clamp(3rem, 7vw, 6rem));
  padding-bottom: var(--section);
}

.legal__header {
  padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
  border-bottom: 1px solid var(--hair);
}

.legal__title {
  font-size: clamp(2.75rem, 8vw, 8rem);
}

.legal__updated {
  margin: 1.5rem 0 0;
}

.legal__grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
  gap: var(--col-gap);
  align-items: start;
}

.toc {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}

.toc summary {
  list-style: none;
  cursor: pointer;
  font-size: var(--size-label);
  color: var(--ink-3);
}

.toc summary::-webkit-details-marker {
  display: none;
}

.toc ol {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
  border-bottom: 1px solid var(--hair);
  font-size: var(--size-label);
  color: var(--ink-2);
}

.toc a {
  display: block;
  padding-block: 0.6rem;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  display: inline-block;
  width: 2rem;
  color: var(--rust);
  font-variant-numeric: tabular-nums;
}

.toc a:active {
  color: var(--rust);
}

@media (hover: hover) {
  .toc a:hover {
    color: var(--ink);
  }
}

.prose {
  max-width: 44rem;
  color: var(--ink-2);
  line-height: 1.7;
}

.prose > p:first-child {
  margin-top: 0;
  color: var(--ink);
  font-size: var(--size-lead);
  line-height: 1.6;
}

.prose h2 {
  margin: 3.5rem 0 1rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 1.6vw + 1rem, 2.2rem);
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.prose h3 {
  margin: 2rem 0 0.5rem;
  color: var(--ink);
  font-size: var(--size-body);
  font-weight: 600;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose ul {
  padding-left: 1.1rem;
}

.prose li {
  margin: 0.4rem 0;
}

.prose li::marker {
  color: var(--rust);
}

.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--hair-strong);
  overflow-wrap: anywhere;
  transition: text-decoration-color 0.3s var(--ease-expo);
}

.prose a:active {
  color: var(--rust);
}

@media (hover: hover) {
  .prose a:hover {
    text-decoration-color: var(--rust);
  }
}

/* ---------- layout breakpoint: 60rem ---------- */

@media (max-width: 60rem) {
  .hero,
  .hero__content {
    min-height: auto;
  }
  .hero__content {
    padding-top: calc(var(--nav-h) + clamp(4rem, 14vw, 8rem));
  }
  .hero__deco {
    top: 4%;
  }
  .practice__grid,
  .contact__grid,
  .legal__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .practice__head,
  .toc {
    position: static;
  }
  .toc {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--hair);
  }
  .toc summary {
    color: var(--ink);
  }
  .toc summary::after {
    content: "  +";
    color: var(--rust);
  }
  .toc[open] summary::after {
    content: "  −";
  }
}

/* ---------- type breakpoint: 40rem ---------- */

@media (max-width: 40rem) {
  :root {
    --nav-h: 4rem;
  }
  .nav__links .hide-sm {
    display: none;
  }
  .hero__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .ctas {
    width: 100%;
  }
  .ctas .btn {
    flex: 1 1 auto;
  }
}

/* short landscape screens: let the hero size to its content */
@media (max-height: 34rem) and (orientation: landscape) {
  .hero,
  .hero__content {
    min-height: auto;
  }
  .hero__content {
    padding-top: calc(var(--nav-h) + 2.5rem);
  }
}

@media (pointer: coarse) {
  .nav__links a,
  .footer__legal a {
    padding-block: 0.75rem;
  }
  .btn {
    min-height: 3rem;
  }
}

/* ---------- motion preference ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .m > *,
  .js .rise {
    transform: none;
    opacity: 1;
    transition: none;
  }
  .hero__deco,
  .hero__content,
  .contact__title {
    transform: none;
  }
}
