:root {
  color-scheme: dark;
  --black: #050505;
  --white: #ffffff;
  --paper: #f5f3ee;
  --ink: #111111;
  --muted: #a3a3a3;
  --line: #333333;
  --danger: #ffb4b4;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--black);
}

body {
  min-height: 100dvh;
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.site-header,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  border-color: var(--line);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  width: 42px;
  height: 36px;
  object-fit: contain;
}

.order {
  display: grid;
  width: min(100%, 1160px);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 52px) 16px;
}

.product,
.order-panel {
  min-width: 0;
  padding: clamp(24px, 5vw, 56px);
  border: 1px solid var(--line);
}

.product {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 540px;
  overflow: hidden;
  background: var(--black);
  isolation: isolate;
}

.product h1,
.order-panel h2,
.kicker,
.domain,
.intro {
  margin-top: 0;
}

.kicker {
  margin-bottom: 20px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.product h1 {
  position: relative;
  z-index: 3;
  margin-bottom: 20px;
  font-size: clamp(4.5rem, 25vw, 9rem);
  font-weight: 900;
  line-height: 0.75;
  pointer-events: none;
  text-wrap: balance;
}

.bottle-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: clamp(350px, 94vw, 520px);
  margin: clamp(-64px, -8vw, -32px) 0 0;
  overflow: hidden;
}

.bottle-stage::before {
  position: absolute;
  inset: 12% 2% 4%;
  background: radial-gradient(circle at 50% 55%, #ffffff1f 0, #ffffff09 32%, transparent 68%);
  content: "";
  pointer-events: none;
}

#bottle-canvas,
.bottle-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#bottle-canvas {
  z-index: 2;
  display: block;
  opacity: 0;
  cursor: grab;
  touch-action: pan-y;
  transition: opacity 320ms ease;
}

#bottle-canvas:active {
  cursor: grabbing;
}

#bottle-canvas:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: -5px;
}

.bottle-fallback {
  z-index: 1;
  max-width: 82%;
  max-height: 82%;
  margin: auto;
  object-fit: contain;
  filter: grayscale(1) contrast(1.15);
  opacity: 0.82;
  transition: opacity 240ms ease;
}

.bottle-loading {
  position: absolute;
  z-index: 4;
  right: 12px;
  bottom: 10px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bottle-stage.is-ready #bottle-canvas {
  opacity: 1;
}

.bottle-stage.is-ready .bottle-fallback,
.bottle-stage.is-ready .bottle-loading,
.bottle-stage.is-fallback .bottle-loading {
  opacity: 0;
  pointer-events: none;
}

.interaction-hint {
  position: relative;
  z-index: 3;
  width: fit-content;
  margin: 0 0 18px;
  padding-right: 8px;
  background: var(--black);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.domain {
  position: relative;
  z-index: 3;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.order-panel {
  background: var(--paper);
  color: var(--ink);
}

.order-panel h2 {
  max-width: 10ch;
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 12vw, 5.8rem);
  line-height: 0.92;
  text-wrap: balance;
}

.intro {
  max-width: 32rem;
  margin-bottom: 32px;
  font-size: clamp(1rem, 3vw, 1.25rem);
  text-wrap: pretty;
}

form {
  display: grid;
  gap: 18px;
}

.field,
.field-row {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.82rem;
  font-weight: 800;
}

.field label span {
  color: #666666;
  font-weight: 400;
}

input,
textarea,
button {
  width: 100%;
  border-radius: 0;
  font: inherit;
}

input,
textarea {
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid #737373;
  background: var(--white);
  color: var(--ink);
}

textarea {
  min-height: 112px;
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #b00020;
}

.consent {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 0.82rem;
  text-wrap: pretty;
}

.consent input {
  width: 20px;
  min-height: 20px;
  margin: 1px 0 0;
}

button {
  min-height: 52px;
  padding: 13px 18px;
  border: 1px solid var(--black);
  background: var(--black);
  color: var(--white);
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.status {
  min-height: 1.5em;
  margin: -4px 0 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.status[data-state="error"] {
  color: #8b0000;
}

.status[data-state="success"] {
  color: #14532d;
}

.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
}

footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

@media (min-width: 860px) {
  .order {
    grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
    align-items: stretch;
  }

  .product,
  .order-panel {
    min-height: calc(100dvh - 150px);
  }

  .field-row {
    grid-template-columns: minmax(0, 1fr) minmax(140px, 0.45fr);
    gap: 14px;
  }

  .bottle-stage {
    min-height: 480px;
    margin-top: -82px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #bottle-canvas,
  .bottle-fallback {
    transition: none;
  }
}
