/* OBI, obipin.com
   Forge's workshop grammar (ink canvas, 1px hairlines, 4px corners, one
   accent that means "act here") in OBI's own colors: the cobalt and the
   cobalt-tinted neutrals of OBI Desktop (desktop/renderer/css/tokens.css,
   hue 264). Type is OBI's: Milker for headings, Momcake for labels and
   buttons (both caps-only, as on the pin), Inter for sentences. */

@font-face {
  font-family: "Milker";
  src: url("fonts/Milker.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Momcake";
  src: url("fonts/Momcake-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  /* OBI cobalt, oklch(0.60 0.215 264) and its steps */
  --accent: #3a74fe;
  --accent-hi: #5f94ff;
  --accent-lo: #2456d7;
  --accent-halo: rgba(58, 116, 254, 0.28);

  /* neutrals, biased toward the cobalt */
  --bg: #090a0d;
  --surface: #101114;
  --surface-2: #16181c;
  --surface-3: #1f2126;
  --line: #24272c;
  --line-strong: #2c2f35;
  --text: #eceef0;
  --text-2: #a6a9af;
  --text-3: #73767d;

  --display: "Milker", "Arial Black", system-ui, sans-serif;
  --label: "Momcake", "Segoe UI", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --edge: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  --focus: 0 0 0 2px var(--accent-halo);

  --container: 1280px;
  --gutter: 24px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 4px;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
}

p {
  margin: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 4px;
  background: var(--accent-lo);
  color: #fff;
  font-family: var(--label);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-decoration: none;
}
.skip:focus {
  top: 16px;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------------------------------------------------------
   Buttons: 4px corners, cobalt for the one action, hairline for the other
   --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding-inline: 20px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-family: var(--label);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.1em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease), color 0.16s var(--ease);
}
.btn .icon {
  width: 18px;
  height: 18px;
}
.btn--primary {
  background: var(--accent-lo);
  border-color: var(--accent-lo);
  color: #fff;
}
.btn--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--text);
}

/* ---------------------------------------------------------------
   Nav
   --------------------------------------------------------------- */
.nav {
  border-bottom: 1px solid var(--line);
}
.nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
}
.nav__brand img {
  height: 34px;
  width: auto;
}
.nav__links {
  display: flex;
  align-items: stretch;
  gap: 28px;
  height: 100%;
}
.nav__links a {
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--text-3);
  font-family: var(--label);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-decoration: none;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.nav__links a:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ---------------------------------------------------------------
   Hero: the headline on the left, the pin in the air on the right
   --------------------------------------------------------------- */
.hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  min-height: min(calc(100vh - 72px), 820px);
  padding-block: 56px 64px;
}
.hero__title {
  font-family: var(--display);
  font-size: clamp(44px, 6.6vw, 104px);
  line-height: 0.96;
  letter-spacing: 0.005em;
  color: var(--text);
}
.hero__title span {
  display: block;
  color: var(--accent);
}
.hero__sub {
  margin-top: 28px;
  max-width: 30em;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.6;
  color: var(--text-2);
}
.hero__sub strong {
  color: var(--text);
  font-weight: 500;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.stage {
  --s: clamp(210px, 24vw, 350px);
  position: relative;
  display: grid;
  place-items: center;
  height: calc(var(--s) * 1.5);
  perspective: 1700px;
  perspective-origin: 50% 40%;
}
.stage::before {
  /* the pin's own light on the dark */
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--s) * 1.9);
  height: calc(var(--s) * 1.9);
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(58, 116, 254, 0.2), rgba(58, 116, 254, 0.07) 55%, rgba(58, 116, 254, 0));
  pointer-events: none;
}
.float {
  transform-style: preserve-3d;
  animation: bob 7s var(--ease) infinite alternate;
  will-change: transform;
}
@keyframes bob {
  from {
    transform: translate3d(0, 12px, 0) rotateZ(0.6deg);
  }
  to {
    transform: translate3d(0, -14px, 0) rotateZ(-0.8deg);
  }
}

/* ---------------------------------------------------------------
   The pin in 3D, to Waveshare's drawing: 46 x 46 x 22.5 mm, corners
   R5.8. The front face is here; pin.js builds the back, the sides, the
   faceted corners and the three round buttons around it, all sized from
   --s (the edge) and --t (the depth).
   --------------------------------------------------------------- */
.pin3d {
  --t: calc(var(--s) * 0.4891);
  --rx: -24deg;
  --ry: -34deg;
  --rz: 11deg;
  --px: 0;
  --py: 0;
  position: relative;
  width: var(--s);
  height: var(--s);
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--rx) + var(--py) * -7deg)) rotateY(calc(var(--ry) + var(--px) * 9deg))
    rotateZ(var(--rz));
}
.pin3d__front,
.pin3d__back {
  position: absolute;
  inset: 0;
  border-radius: 12.6%;
  backface-visibility: hidden;
}
.pin3d__front {
  transform: translateZ(calc(var(--t) / 2));
  background: linear-gradient(158deg, #ffffff 0%, #f5f6f8 48%, #e8eaee 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), inset 0 -2px 6px rgba(14, 17, 22, 0.05);
}
.pin3d__back {
  transform: translateZ(calc(var(--t) / -2)) rotateY(180deg);
}
.pin3d__side {
  position: absolute;
  width: var(--t);
  backface-visibility: hidden;
}
.pin3d__btn {
  position: absolute;
  border-radius: 50%;
}

/* the cover glass is 43.3 mm across, the lit area 38.99 */
.pin3d__glass,
.pinflat__glass {
  position: absolute;
  inset: 2.93%;
  border-radius: 10.5%;
  background: #040507;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.7);
}
.pin3d__glass img,
.pinflat__glass img {
  position: absolute;
  inset: 4.98%;
  width: 90.04%;
  height: 90.04%;
}
.pin3d__glass::after,
.pinflat__glass::after {
  /* the cover glass catches the light */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(148deg, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0.035) 24%,
      rgba(255, 255, 255, 0) 44%);
  pointer-events: none;
}

/* the pin seen straight on */
.pinflat {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  aspect-ratio: 1;
  border-radius: 12.6%;
  background: linear-gradient(158deg, #ffffff 0%, #f1f2f5 55%, #dfe2e7 100%);
}
.pinflat::before {
  /* the three round buttons on the top edge, 5.3 mm across, 10 mm apart,
     seen side on: 1.3 mm of each stands above the case */
  content: "";
  position: absolute;
  z-index: -1;
  top: -2.83%;
  left: 22.5%;
  width: 11.52%;
  height: 5.66%;
  border-radius: 38% 38% 0 0 / 70% 70% 0 0;
  background: #d9dce1;
  box-shadow: 21.74cqw 0 0 #d9dce1, 43.48cqw 0 0 #d9dce1;
}

/* ---------------------------------------------------------------
   Sections
   --------------------------------------------------------------- */
.section {
  padding-block: clamp(64px, 8vw, 104px);
  border-bottom: 1px solid var(--line);
}
.head {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.head h2,
.split h2 {
  font-family: var(--display);
  font-size: clamp(30px, 4.4vw, 60px);
  line-height: 1;
  letter-spacing: 0.005em;
  color: var(--text);
}
.head p,
.split .lede {
  margin-top: 18px;
  max-width: 38em;
  font-size: clamp(16px, 1.25vw, 18px);
  color: var(--text-2);
}

/* the screens, in a hairline grid */
.cells {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.cells li {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: clamp(24px, 3vw, 40px);
  background: var(--surface);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--edge);
}
.cells .pinflat {
  width: min(100%, 260px);
}
.cells h3 {
  font-family: var(--label);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.12em;
  line-height: 1.2;
  color: var(--text);
}
.cells p {
  margin-top: 8px;
  max-width: 24em;
  font-size: 15px;
  color: var(--text-2);
}
.also {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 24px;
  align-items: baseline;
  padding: 20px clamp(24px, 3vw, 40px);
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--surface);
}
.also h3 {
  font-family: var(--label);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--text-3);
}
.also p {
  font-size: 15px;
  color: var(--text-2);
}

/* text beside a pin */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 7vw, 112px);
}
.split--flip > .split__visual {
  order: -1;
}
.split__visual {
  display: grid;
  place-items: center;
  padding: clamp(32px, 5vw, 72px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--edge);
}
.split__visual .pinflat {
  width: min(100%, 400px);
}
.split .body {
  margin-top: 16px;
  max-width: 34em;
  color: var(--text-3);
  font-size: 15px;
}

.rows {
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.rows li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  align-items: start;
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
}
.rows .tile {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--text-2);
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.rows li:hover .tile {
  color: var(--accent-hi);
  border-color: var(--accent);
}
.rows strong {
  display: block;
  padding-top: 1px;
  font-family: var(--label);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.12em;
  line-height: 1.5;
  color: var(--text);
}
.rows span {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  color: var(--text-2);
}

/* pricing: two plans in the hairline grid */
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.plan {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(28px, 3.5vw, 48px);
  background: var(--surface);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--edge);
}
.plan__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  min-height: 24px;
}
.plan h3 {
  font-family: var(--label);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.12em;
  color: var(--text);
}
.plan__price {
  margin-top: 8px;
  font-family: var(--display);
  font-size: clamp(56px, 6.5vw, 92px);
  line-height: 1;
  color: var(--text);
}
.plan__line {
  max-width: 28em;
  font-size: 16px;
  color: var(--text-2);
}
.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  color: var(--accent-hi);
  font-family: var(--label);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

/* footer */
.foot {
  padding-block: 48px 56px;
}
.foot__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.foot__brand img {
  height: 34px;
  width: auto;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}
.foot nav a {
  color: var(--text-3);
  font-family: var(--label);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-decoration: none;
}
.foot nav a:hover {
  color: var(--text);
}
.foot small {
  display: block;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 13px;
}

/* ---------------------------------------------------------------
   Smaller screens
   --------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero__grid {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-block: 48px 24px;
    gap: 8px;
  }
  .stage {
    --s: min(52vw, 290px);
  }
  .split {
    grid-template-columns: 1fr;
  }
  .split--flip > .split__visual {
    order: 0;
  }
  .cells {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  :root {
    --gutter: 16px;
  }
  .nav__links {
    display: none;
  }
  .nav__row {
    height: 64px;
  }
  .nav__brand img {
    height: 30px;
  }
  .also {
    grid-template-columns: 1fr;
  }
  .plans {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .cells li {
    padding: 18px;
    gap: 16px;
  }
  .cells h3 {
    font-size: 13px;
  }
  .cells p {
    font-size: 14px;
  }
  .hero__cta .btn {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .float {
    animation: none;
  }
}
