:root {
  --paper: #f2f0e8;
  --ink: #11120f;
  --muted: #71716a;
  --line: #c5c3ba;
  --acid: #caff38;
  --danger: #b82d24;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Arial, Helvetica, sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body {
  min-height: 100svh;
  margin: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.cut-line {
  position: fixed;
  z-index: 0;
  inset: 0 auto 0 64%;
  width: 1px;
  background: var(--line);
}
.cut-line::before {
  content: '';
  position: absolute;
  inset: 0 -2px auto;
  height: 34%;
  background: var(--acid);
  transform-origin: top;
  animation: draw 1s cubic-bezier(.22,.8,.2,1) both;
}

.masthead, .landing, footer { position: relative; z-index: 1; }
.masthead {
  min-height: 78px;
  padding: 0 clamp(24px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink);
}
.brand {
  color: var(--ink);
  text-decoration: none;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.brand-mark {
  width: 11px;
  height: 11px;
  margin-right: 10px;
  display: inline-block;
  background: var(--acid);
  border: 1px solid var(--ink);
  transform: rotate(45deg);
}
.status {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font: 10px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.status span { width: 7px; height: 7px; border-radius: 50%; background: #3b9d35; animation: pulse 2.3s infinite; }

.landing { display: grid; align-items: center; }
.hero {
  width: min(100%, 1320px);
  margin-inline: auto;
  padding: clamp(58px, 9vh, 112px) clamp(24px, 8vw, 126px) clamp(52px, 8vh, 92px);
}
.eyebrow, .shorten-form label, .result-label {
  margin: 0;
  font: 700 10px var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow { animation: rise .55s .05s both; }
h1 {
  max-width: 920px;
  margin: 24px 0 0;
  font: 400 clamp(68px, 10.5vw, 158px)/.78 var(--serif);
  letter-spacing: -.072em;
  animation: rise .7s .12s cubic-bezier(.22,.8,.2,1) both;
}
h1 em { color: var(--muted); font-weight: 400; }
.lede {
  max-width: 430px;
  margin: 34px 0 0;
  color: #4d4e48;
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.5;
  animation: rise .6s .2s both;
}

.shorten-form {
  width: min(100%, 780px);
  margin-top: clamp(48px, 8vh, 86px);
  animation: rise .65s .28s both;
}
.shorten-form label { display: block; margin-bottom: 13px; }
.input-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border-bottom: 2px solid var(--ink);
}
.input-row::after {
  content: '';
  position: absolute;
  inset: auto 0 -2px;
  height: 2px;
  background: #6b9000;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.input-row:focus-within::after { transform: scaleX(1); }
.input-row input {
  min-width: 0;
  padding: 21px 20px 21px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: clamp(16px, 1.6vw, 21px);
}
.input-row input::placeholder { color: #8c8b83; }
.input-row button {
  min-width: 148px;
  margin-bottom: 7px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--ink);
  background: var(--acid);
  border: 1px solid var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: transform .18s, box-shadow .18s;
}
.input-row button:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--ink); }
.input-row button:active { transform: none; box-shadow: none; }
.input-row button:disabled { opacity: .55; cursor: wait; transform: none; box-shadow: none; }
.input-row button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.form-message { min-height: 17px; margin: 11px 0 0; color: var(--muted); font: 10px var(--mono); }
.form-message.error { color: var(--danger); }

.custom-row {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 120px minmax(0, 260px) 1fr;
  align-items: center;
  gap: 18px;
}
.custom-row > label {
  margin: 0;
  color: var(--ink);
  font: 700 10px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.custom-row > label span { color: var(--muted); font-weight: 400; }
.slug-field {
  min-width: 0;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.22);
  transition: border-color .2s, background .2s;
}
.slug-field:focus-within { border-color: var(--ink); background: rgba(255,255,255,.45); }
.slug-field span { flex: 0 0 auto; color: var(--muted); font: 11px var(--mono); }
.slug-field input {
  width: 100%;
  min-width: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font: 11px var(--mono);
}
.slug-field input::placeholder { color: #999890; }
.custom-row > p { margin: 0; color: var(--muted); font: 9px/1.45 var(--mono); }

.result {
  width: min(100%, 780px);
  margin-top: 34px;
  padding-top: 23px;
  border-top: 1px solid var(--line);
  animation: reveal .4s ease both;
}
.result-label { margin-bottom: 14px; color: var(--muted); }
.result-line { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.result-line > a {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font: clamp(27px, 3.4vw, 46px) var(--serif);
  text-overflow: ellipsis;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  white-space: nowrap;
}
.copy-button {
  padding: 10px 0 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: 10px var(--mono);
  text-transform: uppercase;
}
.copy-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.result-target { margin: 14px 0 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

footer {
  min-height: 64px;
  padding: 0 clamp(24px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--ink);
  color: var(--muted);
  font: 10px var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}
footer p { margin: 0; }

.not-found { min-height: calc(100svh - 78px); padding: clamp(70px, 12vh, 140px) clamp(24px, 8vw, 126px); }
.not-found h1 { max-width: 1000px; }
.home-link { margin-top: 70px; display: inline-block; color: var(--ink); font: 12px var(--mono); text-underline-offset: 5px; }
[hidden] { display: none !important; }

@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes reveal { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0); } }
@keyframes draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(59,157,53,0); } }

@media (max-width: 700px) {
  .cut-line { left: auto; right: 30px; }
  .masthead { min-height: 66px; }
  .status { font-size: 0; }
  .hero { padding-top: 54px; }
  h1 { font-size: clamp(62px, 19vw, 96px); }
  .shorten-form { margin-top: 48px; }
  .input-row { grid-template-columns: 1fr; }
  .input-row input { padding-right: 0; }
  .input-row button { min-height: 55px; margin: 5px 0 10px; }
  .custom-row { grid-template-columns: 1fr; gap: 8px; }
  .slug-field { max-width: none; }
  footer { min-height: 76px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
