/* AT1B.com — fluid, one system */

:root {
  --bg: #070707;
  --fg: #f3f3ee;
  --muted: #8c8c84;
  --line: #242424;
  --accent: #c6ff00;
  --accent-ink: #111400;
  --focus: #c6ff00;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --page-pad: clamp(0.7rem, 2.2vmin, 3.25rem);
  --frame-pad: clamp(1rem, 2.8vmin, 4.5rem);
  --stage: min(100%, 70rem);
  --gap: clamp(1.1rem, 2.8svh, 2.5rem);
}

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  overflow-x: clip;
}

body {
  min-height: 100dvh;
  min-height: 100svh;
  line-height: 1.45;
  font-size: clamp(1rem, 0.35vw + 0.92rem, 1.2rem);
  font-weight: 400;
}

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

a {
  color: var(--fg);
}

:focus {
  outline: none;
}

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

.page {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  min-height: 100svh;
  padding:
    max(var(--page-pad), env(safe-area-inset-top))
    max(var(--page-pad), env(safe-area-inset-right))
    max(var(--page-pad), env(safe-area-inset-bottom))
    max(var(--page-pad), env(safe-area-inset-left));
}

.frame {
  display: grid;
  grid-template-rows: 1fr auto auto;
  justify-items: center;
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--line);
  padding: var(--frame-pad);
}

.stage,
.status,
footer {
  width: var(--stage);
}

.stage {
  container-type: inline-size;
  container-name: stage;
  display: grid;
  align-items: safe center;
  min-width: 0;
  min-height: 0;
}

.content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  width: 100%;
  min-width: 0;
}

.hero {
  container-type: inline-size;
  container-name: hero;
  min-width: 0;
}

.wordmark {
  margin: 0;
  font-size: clamp(3.15rem, min(18vw, 22svh), 18rem);
  font-size: clamp(3.15rem, min(38cqw, 22svh), 18rem);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 0.82;
  white-space: nowrap;
  max-width: 100%;
}

.wordmark span {
  color: var(--accent);
}

.subline {
  margin: 0.55em 0 0;
  font-size: clamp(1rem, 2.2cqi, 1.35rem);
  letter-spacing: 0.02em;
  color: var(--muted);
}

.lede {
  margin: 0.9em 0 0;
  max-width: 34ch;
  font-size: clamp(1rem, 1.8cqi + 0.55rem, 1.28rem);
  color: var(--fg);
  text-wrap: pretty;
  overflow-wrap: break-word;
}

main {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
}

.buy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}

.bin-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.price {
  margin: 0 0 0.7rem;
  font-size: clamp(1.85rem, 7svh, 6.5rem);
  font-size: clamp(1.85rem, min(18cqw, 7svh), 6.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  max-width: 100%;
}

.price abbr {
  font-size: 0.38em;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-decoration: none;
  color: var(--muted);
  vertical-align: 0.45em;
  margin-left: 0.15em;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  max-width: 24rem;
}

.btn,
.btn-ghost {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.15rem;
  padding: 0.85rem 1.15rem;
  border-radius: 0;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}

.btn {
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
}

.btn:active {
  filter: brightness(0.95);
}

.contact {
  margin: 0;
}

.contact a {
  color: var(--fg);
  text-underline-offset: 0.22em;
  overflow-wrap: anywhere;
}

.status {
  width: var(--stage);
  margin: 0.85rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.95rem;
}

.status[hidden] {
  display: none;
}

footer {
  padding-top: clamp(0.85rem, 2svh, 1.5rem);
}

footer p {
  margin: 0;
  max-width: 44rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--muted);
  overflow-wrap: break-word;
}

dialog {
  width: min(calc(100vw - 1.5rem), 26.5rem);
  max-width: calc(100% - 1.5rem);
  max-height: calc(100dvh - 1.5rem);
  overflow: auto;
  margin: auto;
  padding: 1.15rem 1.1rem 1.25rem;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  color-scheme: dark;
}

dialog::backdrop {
  background: rgb(0 0 0 / 0.82);
}

dialog h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.dialog-lede {
  margin: 0 0 1.15rem;
  font-size: 0.88rem;
  color: var(--muted);
}

dialog label {
  display: block;
  margin: 0.85rem 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.optional {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

dialog input,
dialog textarea {
  width: 100%;
  margin: 0;
  padding: 0.85rem 0.75rem;
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #0c0c0c;
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
}

#offer-amount {
  appearance: textfield;
  -moz-appearance: textfield;
}

#offer-amount::-webkit-outer-spin-button,
#offer-amount::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

dialog textarea {
  resize: vertical;
  min-height: 5.5rem;
}

dialog input:focus-visible,
dialog textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 0;
  border-color: var(--focus);
}

dialog input:invalid:user-invalid,
dialog textarea:invalid:user-invalid {
  border-color: #ff5a3d;
}

.dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.noscript {
  position: sticky;
  bottom: 0;
  margin: 0;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.9rem;
}

@container stage (min-width: 50rem) {
  .content {
    grid-template-columns: minmax(0, 1fr) minmax(16.5rem, 22rem);
    align-items: end;
    column-gap: clamp(1.75rem, 4cqi, 3.75rem);
    row-gap: var(--gap);
  }

  .lede {
    max-width: 28ch;
  }

  .actions {
    max-width: none;
  }
}

@media (orientation: landscape) and (max-height: 540px) {
  .content {
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 20rem);
    align-items: end;
    column-gap: clamp(1.25rem, 4vw, 2.5rem);
  }

  .wordmark {
    font-size: clamp(2.6rem, min(28cqw, 28svh), 5.5rem);
  }

  .lede {
    margin-top: 0.5em;
  }

  .price {
    font-size: clamp(1.6rem, 8svh, 2.6rem);
    margin-bottom: 0.45rem;
  }

  .btn,
  .btn-ghost {
    min-height: 2.75rem;
  }
}

@media (min-width: 720px) {
  dialog {
    padding: 1.35rem 1.35rem 1.5rem;
  }

  .dialog-actions {
    flex-direction: row;
    align-items: stretch;
  }

  .dialog-actions .btn,
  .dialog-actions .btn-ghost {
    min-width: 0;
    flex: 1;
  }
}

@media (hover: hover) {
  a:hover {
    color: var(--accent);
  }

  .btn:hover {
    color: var(--accent-ink);
    filter: brightness(1.08);
  }

  .btn-ghost:hover {
    color: var(--accent);
    border-color: var(--accent);
  }

  .contact a:hover {
    color: var(--accent);
  }
}

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