/* BearDogDev: the frame every product sits in. Warm, quiet and typographic; the products bring their
   own colour. */

:root {
  color-scheme: light dark;
  --paper: #f8f5ef;
  --paper-2: #efeae0;
  --card: #ffffff;
  --ink: #15120e;
  --ink-2: #4a443c;
  --ink-3: #7e766a;
  --rule: rgba(21, 18, 14, 0.11);
  --rule-strong: rgba(21, 18, 14, 0.22);
  --accent: #ff6a1a;
  --accent-ink: #c2410c;
  --accent-soft: rgba(255, 106, 26, 0.12);
  --on-accent: #15120e;
  --focus: var(--accent-ink);
  --shadow: 0 1px 1px rgba(21, 18, 14, 0.04), 0 22px 60px -26px rgba(21, 18, 14, 0.4);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #120f0c;
    --paper-2: #1a1713;
    --card: #1c1915;
    --ink: #f6f1e8;
    --ink-2: #bdb5a8;
    --ink-3: #8a8175;
    --rule: rgba(246, 241, 232, 0.1);
    --rule-strong: rgba(246, 241, 232, 0.22);
    --accent: #ff7a2e;
    --accent-ink: #ff9a5c;
    --accent-soft: rgba(255, 122, 46, 0.14);
    --shadow: 0 1px 1px rgba(0, 0, 0, 0.3), 0 24px 60px -28px rgba(0, 0, 0, 0.85);
  }
}
:root[data-theme="dark"] {
  --paper: #120f0c;
  --paper-2: #1a1713;
  --card: #1c1915;
  --ink: #f6f1e8;
  --ink-2: #bdb5a8;
  --ink-3: #8a8175;
  --rule: rgba(246, 241, 232, 0.1);
  --rule-strong: rgba(246, 241, 232, 0.22);
  --accent: #ff7a2e;
  --accent-ink: #ff9a5c;
  --accent-soft: rgba(255, 122, 46, 0.14);
}

body.co {
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
}

.display {
  font-family: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  font-variation-settings: "opsz" 96;
  font-stretch: 90%;
  letter-spacing: -0.035em;
  line-height: 0.95;
  font-weight: 700;
}

/* ---- Header */

.co-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--settle);
}
.co-header.is-scrolled {
  border-bottom-color: var(--rule);
}
.co-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.1em;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-variation-settings: "opsz" 32;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.03em;
}
.brand__dot {
  width: 0.34em;
  height: 0.34em;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-0.02em);
}
.co-nav {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  font-size: 15px;
  color: var(--ink-2);
}
.co-nav a {
  position: relative;
  padding-block: 6px;
  transition: color 0.2s;
}
.co-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--settle);
}
.co-nav a:hover {
  color: var(--ink);
}
.co-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
@media (max-width: 520px) {
  .co-nav a:not(.keep) {
    display: none;
  }
}

/* ---- Hero: the name, big, and the brand's dot */

.co-hero {
  position: relative;
  padding-top: clamp(40px, 9vh, 110px);
  padding-bottom: clamp(40px, 7vh, 80px);
}
.hero-name {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}
.hero-word {
  display: inline-flex;
  font-size: clamp(4.2rem, 15.4vw, 14.5rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
}
.hero-word .ch {
  display: inline-block;
  font-variation-settings: "opsz" 96, "wght" var(--wg, 720);
  font-weight: normal;
  transition: font-variation-settings 0.5s var(--settle);
}
.js .hero-word .ch {
  transform: translateY(0.9em);
  opacity: 0;
  --wg: 260;
}
.is-ready .hero-word .ch {
  transform: none;
  opacity: 1;
  --wg: 720;
  transition:
    transform var(--bloom-dur) var(--bloom),
    opacity 0.3s ease-out,
    font-variation-settings 0.9s var(--settle);
  transition-delay: calc(80ms + var(--c) * 45ms);
}
.is-ready .hero-word.is-live .ch {
  transition: font-variation-settings 0.35s var(--settle);
  transition-delay: 0s;
}
.hero-sub {
  flex-basis: 100%;
  margin-top: 0.3em;
  font-size: clamp(1.6rem, 3.6vw, 3.3rem);
  letter-spacing: -0.03em;
  color: var(--ink-3);
}
.co-hero__lede {
  position: relative;
  z-index: 1;
  margin-top: clamp(28px, 4.5vh, 48px);
  max-width: 34rem;
  font-size: clamp(1.1rem, 1.6vw, 1.32rem);
  line-height: 1.55;
  color: var(--ink-2);
}
.co-hero__lede--second {
  margin-top: 12px;
}
.co-hero__lede a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
  transition: text-decoration-color 0.2s;
}
.co-hero__lede a:hover {
  text-decoration-color: var(--ink);
}

/* The brand's dot, large: it waits beside the words, then flies into the header's dot as the page
   scrolls. */
.hero-dot {
  position: absolute;
  z-index: 0;
  right: var(--gutter);
  bottom: clamp(24px, 6vh, 72px);
  width: clamp(150px, 30vw, 440px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.28), transparent 42%),
    var(--accent);
  box-shadow: 0 30px 80px -30px color-mix(in srgb, var(--accent) 70%, transparent);
  will-change: transform;
  pointer-events: none;
}
.js .hero-dot {
  transform: scale(0.2);
  opacity: 0;
}
.is-ready .hero-dot:not(.is-flying) {
  transform: scale(1);
  opacity: 1;
  transition:
    transform 1.1s var(--bloom),
    opacity 0.4s;
  transition-delay: 380ms;
}
@media (max-width: 700px) {
  .hero-dot {
    width: 34vw;
    bottom: auto;
    top: 18px;
  }
}

/* ---- Sections */

.co-section {
  padding-block: clamp(64px, 11vh, 128px);
}
.co-section + .co-section:not(.contact) {
  border-top: 1px solid var(--rule);
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(28px, 5vh, 56px);
}
.section-head h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}
.section-head .count {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-variation-settings: "opsz" 32;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-ink);
  font-variant-numeric: tabular-nums;
}

/* ---- The product tile: a window into the product's own world. */

.tile {
  --mx: 50%;
  --my: 30%;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  min-height: clamp(460px, 62vh, 620px);
  border-radius: 30px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow);
  transition:
    transform 0.6s var(--settle),
    box-shadow 0.6s var(--settle);
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(600px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.06), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s;
}
.tile:hover {
  transform: translateY(-4px);
}
.tile:hover::after {
  opacity: 1;
}
.tile__copy {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(28px, 4vw, 52px);
}
.tile__stage {
  position: relative;
  min-height: 320px;
}
.tile__stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
@media (max-width: 860px) {
  .tile {
    grid-template-columns: 1fr;
  }
  .tile__stage {
    order: -1;
    aspect-ratio: 5 / 4;
    min-height: 0;
  }
}

/* PocketCAD's world inside the tile: the app's graphite and blue. */
.tile--pocketcad {
  color: #e8eaee;
  background: linear-gradient(180deg, #22252b, #16171c);
  --focus: #5c8bff;
}
.tile--pocketcad .tile__stage {
  view-transition-name: pocketcad-stage;
}
.app-icon {
  width: 68px;
  height: 68px;
  border-radius: 22.5%;
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.12),
    0 10px 24px -8px rgba(0, 0, 0, 0.7);
}
.tile__wordmark {
  margin-top: 26px;
  height: 20px;
  width: auto;
}
.tile__title {
  margin-top: 16px;
  font-family: "Mona Sans", system-ui, sans-serif;
  font-stretch: 125%;
  font-weight: 700;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.tile__text {
  margin-top: 16px;
  max-width: 30rem;
  color: #a3a9b4;
  font-family: system-ui, -apple-system, "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-family: system-ui, -apple-system, "Inter", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #e8eaee;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
}
.chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2f6bff;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.25);
}
.tile__cta {
  margin-top: auto;
  padding-top: 32px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: system-ui, -apple-system, "Inter", sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #5c8bff;
}
.tile__cta svg {
  width: 18px;
  height: 18px;
  transition: transform 0.5s var(--settle);
}
.tile:hover .tile__cta svg {
  transform: translateX(5px);
}
.tile__label {
  position: absolute;
  left: 22px;
  bottom: 18px;
  z-index: 3;
  font-family: system-ui, -apple-system, "Inter", sans-serif;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: #a3a9b4;
  transition: opacity 0.3s var(--settle);
}
.tile__label b {
  color: #e8eaee;
  font-weight: 600;
  margin-right: 6px;
}
.tile__label.is-hidden {
  opacity: 0;
  transition: opacity var(--leave-dur) var(--leave);
}

/* ---- Company facts */

.company {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}
.company__text p {
  color: var(--ink-2);
  font-size: 1.1rem;
  max-width: 32rem;
}
.company__text p + p {
  margin-top: 16px;
}
.facts {
  border-radius: 22px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--rule);
  padding: 8px 28px;
}
.facts div {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
}
.facts div + div {
  border-top: 1px solid var(--rule);
}
.facts dt {
  color: var(--ink-3);
  font-size: 15px;
}
.facts dd {
  font-weight: 500;
}
.facts a {
  color: var(--accent-ink);
}
@media (max-width: 800px) {
  .company {
    grid-template-columns: 1fr;
  }
  .facts div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* ---- Contact: the page ends on the brand's colour */

.contact-band {
  background: var(--accent);
  color: var(--on-accent);
  --focus: var(--on-accent);
}
.contact {
  padding-block: clamp(72px, 13vh, 150px);
}
.contact h2 {
  font-size: clamp(2.6rem, 7vw, 6rem);
}
.contact__mail {
  display: inline-block;
  margin-top: 26px;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-variation-settings: "opsz" 64;
  font-size: clamp(1.7rem, 5vw, 4.2rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  color: var(--on-accent);
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 3px no-repeat;
  padding-bottom: 6px;
  transition: background-size 0.7s var(--settle);
}
.contact__mail:hover {
  background-size: 0% 3px;
  background-position: right bottom;
}
.contact p {
  margin-top: 18px;
  max-width: 34rem;
  font-size: 1.1rem;
  color: color-mix(in srgb, var(--on-accent) 78%, transparent);
}
.contact-band + .co-footer {
  border-top: 0;
}

/* ---- Footer */

.co-footer {
  border-top: 1px solid var(--rule);
  padding-block: 32px 40px;
  font-size: 14px;
  color: var(--ink-3);
}
.co-footer__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  align-items: center;
}
.co-footer nav {
  display: flex;
  gap: 22px;
}
.co-footer a:hover {
  color: var(--ink);
}

/* ---- Legal pages */

.legal {
  padding-block: clamp(48px, 9vh, 110px) clamp(64px, 10vh, 120px);
}
.legal h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
}
.legal .updated {
  margin-top: 16px;
  color: var(--ink-3);
  font-size: 15px;
}
.legal__body {
  margin-top: clamp(32px, 6vh, 64px);
  max-width: 44rem;
}
.legal__body h2 {
  margin-top: 44px;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-variation-settings: "opsz" 48;
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.legal__body h3 {
  margin-top: 28px;
  font-size: 1.05rem;
  font-weight: 650;
}
.legal__body p,
.legal__body ul {
  margin-top: 14px;
  color: var(--ink-2);
}
.legal__body ul {
  padding-left: 1.2em;
  list-style: disc;
}
.legal__body li + li {
  margin-top: 6px;
}
.legal__body a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal__body strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---- Not found */

.lost {
  min-height: calc(100vh - 68px - 120px);
  display: grid;
  align-content: center;
  padding-block: 80px;
}
.lost h1 {
  font-size: clamp(3rem, 10vw, 8rem);
}
.lost p {
  margin-top: 20px;
  color: var(--ink-2);
  font-size: 1.15rem;
}
.lost a {
  display: inline-block;
  margin-top: 28px;
  font-weight: 600;
  color: var(--accent-ink);
}

/* ---- Phones: the same page, closer together */
@media (max-width: 700px) {
  .co-section {
    padding-block: clamp(40px, 6vh, 56px);
  }
  .section-head {
    margin-bottom: 20px;
  }
  .contact {
    padding-block: 56px;
  }
}
