/* Tare interim site.
   Base rules are the desktop reference (1440×900); mobile (< 700px) and
   30-inch (≥ 1920px) are deltas at the bottom. */

:root {
  --ground: #CACAC8;
  --ink: #1A1A18;
  --body: #3A3A37;
  --accent: #FF6A00;
  --lockup-w: 62.5%; /* 900 / 1440 */
}

html {
  background: var(--ground);
  /* No rubber-band bounce past the top or bottom, so the lockup stays on the
     bottom edge. Vertical only: horizontal swipe-to-go-back still works. */
  overscroll-behavior-y: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
}

.screen {
  position: relative;
  box-sizing: border-box;
  min-height: 100vh;
  /* Short viewports: grow the page rather than run the lockup into the form. */
  padding-bottom: calc(var(--lockup-w) * 229 / 1935 + 38px);
  overflow: hidden;
  background: var(--ground);
  color: var(--ink);
  font-family: 'IBM Plex Mono', monospace;
}

/* Construction lines (decorative) */

.lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.line {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px dashed rgba(26, 26, 24, .3);
}

.line-left {
  left: calc(50% - 300px);
  bottom: 140px; /* stops above the lockup */
}

.line-right {
  left: calc(50% + 300px);
}

.circle {
  position: absolute;
  top: -260px;
  right: -200px;
  width: 620px;
  height: 620px;
  border: 1px solid rgba(26, 26, 24, .25);
  border-radius: 50%;
}

/* Status marker */

.status {
  position: absolute;
  top: 44px;
  right: 60px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent);
}

/* Lockup: the bar's tail bleeds off the left edge; -2px absorbs the
   artboard's hairline of padding so the letters sit on the bottom edge. */

.lockup {
  position: absolute;
  left: calc(var(--lockup-w) * -80 / 900);
  bottom: -2px;
  display: block;
  width: var(--lockup-w);
  max-width: none;
  height: auto;
}

/* Copy column */

.content {
  position: relative;
  width: 600px;
  margin: 0 auto;
  padding-top: 120px;
}

h1,
h2 {
  font-family: 'Instrument Sans', sans-serif;
}

h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.025em;
  text-wrap: pretty;
}

h2 {
  margin: 34px 0 8px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.015em;
}

p {
  margin: 0;
  color: var(--body);
  font-size: 14px;
  line-height: 1.6;
  text-wrap: pretty;
}

h1 + p {
  margin-top: 22px;
}

p + p {
  margin-top: 10px;
}

.email {
  display: inline-block;
  margin-top: 10px;
  color: var(--ink);
  font-size: 14px;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.email:hover {
  text-decoration-color: var(--ink);
}

.signup {
  margin: 34px 0 12px;
}

/* Form: input and button butt together in one seamed row. */

.form {
  display: flex;
  margin: 0;
}

.form input,
.form button {
  box-sizing: border-box;
  height: 48px;
  margin: 0;
  border-radius: 0;
  font-family: 'IBM Plex Mono', monospace;
  -webkit-appearance: none;
  appearance: none;
}

.form input {
  flex: 1;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-right: none;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  outline: none;
}

.form input::placeholder {
  color: #6B6B68;
  opacity: 1;
}

.form button {
  padding: 0 24px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.form button:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--ground);
}

.form input:focus-visible,
.form button:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--ink);
}

/* Custom cursor (main.js turns it on unless the pointer is coarse).
   Three stacked 9×9 layers blend with the page pixel by pixel. Per channel
   they compute k × |backdrop − s|, which maps ground #CACAC8 → ink #1A1A18
   and ink #1A1A18 → orange #FF6A00, so only the part of the square over ink
   (lockup, type, borders, the hovered button) turns orange. Keep them as
   separate fixed siblings: a shared parent would isolate them from the page. */

.has-cursor,
.has-cursor a,
.has-cursor button,
.has-cursor input {
  cursor: none;
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  display: none;
  width: 9px;
  height: 9px;
  margin: -4px 0 0 -4px;
  pointer-events: none;
}

.cursor-on .cursor {
  display: block;
}

.cursor-1 {
  background: rgb(222, 167, 24); /* |backdrop − s| */
  mix-blend-mode: difference;
}

.cursor-2 {
  background: rgb(59, 0, 0); /* red × 1.30 */
  mix-blend-mode: color-dodge;
}

.cursor-3 {
  background: rgb(255, 191, 35); /* green × 0.75, blue × 0.14 */
  mix-blend-mode: multiply;
}

/* Entrance: lines fade, status then copy blocks rise in DOM order, lockup last. */

@keyframes tare-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes tare-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .lines {
    animation: tare-fade 1.2s ease both;
  }

  .status,
  .content > * {
    animation: tare-up .7s cubic-bezier(.2, .7, .2, 1) both;
  }

  .content > * {
    animation-delay: calc(.1s + .07s * var(--i));
  }

  .lockup {
    animation: tare-fade 1s ease 1s both;
  }
}

/* Mobile: < 700px. Column goes fluid (36px left so text clears the x=24
   dashed line), form stacks, lockup sits in a 120px band after the form. */

@media (max-width: 699.98px) {
  .screen {
    padding-bottom: 160px; /* 40px gap + 120px lockup band */
  }

  /* Keyed to the column block (max 660px incl. padding), centred. */
  .line-left {
    left: calc((100% - min(100%, 660px)) / 2 + 24px);
    bottom: 100px;
  }

  .line-right {
    left: calc((100% + min(100%, 660px)) / 2 - 24px);
  }

  .circle {
    top: -140px;
    right: -120px;
    width: 300px;
    height: 300px;
  }

  .status {
    top: 22px;
    right: 24px;
    gap: 8px;
    font-size: 11px;
  }

  .status::before {
    width: 7px;
    height: 7px;
  }

  /* Bar tail bleeds left, the E lands flush on the right edge. */
  .lockup {
    left: -30px;
    bottom: -1px;
    width: calc(100% + 30px);
  }

  .content {
    box-sizing: border-box;
    width: auto;
    max-width: 660px;
    padding: 96px 24px 0 36px;
  }

  h1 {
    font-size: 22px;
  }

  h1 + p {
    margin-top: 20px;
  }

  h2 {
    margin-top: 30px;
    font-size: 15px;
  }

  p,
  .email {
    font-size: 13.5px;
  }

  .signup {
    margin-top: 30px;
  }

  /* Input keeps its full border; 10px gap; full-width button. */
  .form {
    flex-direction: column;
    gap: 10px;
  }

  .form input {
    flex: none;
    border-right: 1px solid var(--ink);
  }
}

/* 30-inch: ≥ 1920px. Column centred vertically above the lockup, type up
   one notch, lockup capped at 1600px. */

@media (min-width: 1920px) {
  :root {
    --lockup-w: min(1600px, 62.5%);
  }

  .screen {
    display: flex;
    flex-direction: column;
    padding-bottom: 230px;
  }

  .line-left {
    bottom: 230px;
  }

  .circle {
    top: -380px;
    right: -300px;
    width: 920px;
    height: 920px;
  }

  .status {
    top: 60px;
    right: 80px;
  }

  .lockup {
    left: calc(var(--lockup-w) * -142 / 1600);
  }

  /* Auto margins centre safely: on a short viewport the page grows instead
     of clipping the top. Symmetric padding doesn't move the centre. */
  .content {
    display: flex;
    flex-direction: column;
    margin: auto;
    padding: 60px 0;
  }

  .email {
    align-self: flex-start;
  }

  h1 {
    font-size: 26px;
  }

  h2 {
    font-size: 17px;
  }

  p,
  .email {
    font-size: 15px;
  }
}
