/* ==========================================================================
   Domain resale sheet.
   The name being sold is set as a specimen on a white card: large, bracketed,
   and annotated with facts computed from the string itself. Bright ground,
   deep saturated accent, real depth — the page has to read as a live asset,
   not as parked inventory.
   ========================================================================== */

:root {
  --ground:     #f5f7fb;
  --panel:      #ffffff;
  --panel-edge: #e8ecf4;
  --ink:        #0f172a;
  --ink-soft:   #55637a;
  --rule:       #e8ecf4;
  --rule-firm:  #c9d2e2;

  /* Overwritten per domain by app.js. Every option in that set is a deep,
     saturated hue — no domain is allowed to land on a color that reads as a
     warning rather than as a brand. */
  --accent:     #1d4ed8;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gut: clamp(1.25rem, 5vw, 4rem);
  --sheet: 1120px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--display);
  font-variation-settings: "wdth" 100, "wght" 400;
  font-size: clamp(1rem, .96rem + .2vw, 1.125rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

/* --- top bar ------------------------------------------------------------ */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem var(--gut);
  background: var(--ground);
  background: color-mix(in srgb, var(--ground) 85%, transparent);
  backdrop-filter: blur(10px);
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--rule);
}

.bar-label,
.bar-meta {
  font-family: var(--mono);
  font-size: .69rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.bar-meta {
  margin-left: auto;
  color: var(--ink-soft);
}

/* --- sheet -------------------------------------------------------------- */

.sheet {
  max-width: var(--sheet);
  margin: 0 auto;
  padding: 0 var(--gut);
}

/* --- the mounted specimen ----------------------------------------------- */

.mount {
  padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(1.75rem, 4vw, 3rem);
}

/* The card behaves like a heavy slab. --px/--py carry the pointer position
   as -1..1, set by bindPressure() in app.js; at rest both are 0 and the
   shadow below resolves to a plain centred drop. Wherever the pointer rests,
   that edge sinks and the shadow spills out from under it. */
.panel {
  --px: 0;
  --py: 0;

  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 3px;
  padding: clamp(1.75rem, 4.5vw, 3.5rem) clamp(1.5rem, 4.5vw, 3.5rem)
           clamp(1.5rem, 3.5vw, 2.75rem);

  box-shadow:
    calc(var(--px) * 9px)   calc(2px + var(--py) * 7px)   10px -4px rgba(15, 23, 42, .16),
    0 10px 24px -12px rgba(15, 23, 42, .10),
    calc(var(--px) * 30px)  calc(34px + var(--py) * 22px) 62px -26px rgba(15, 23, 42, .20);

  /* Progressive: without color-mix the neutral spill above still applies. */
  box-shadow:
    calc(var(--px) * 9px)   calc(2px + var(--py) * 7px)   10px -4px rgba(15, 23, 42, .16),
    0 10px 24px -12px rgba(15, 23, 42, .10),
    calc(var(--px) * 30px)  calc(34px + var(--py) * 22px) 62px -26px
      color-mix(in srgb, var(--accent) 30%, transparent);
}

/* Added by JS, so a device without a pointer keeps the card static. The lag
   in the easing is the point — it reads as mass rather than as a hover state. */
.panel.is-live {
  transform: perspective(1600px)
             rotateX(calc(var(--py) * -0.9deg))
             rotateY(calc(var(--px) * 0.9deg));
  transition: transform .42s cubic-bezier(.22, .68, .35, 1),
              box-shadow .42s cubic-bezier(.22, .68, .35, 1);
  will-change: transform, box-shadow;
}

.panel-eyebrow {
  margin: 0 0 clamp(1.5rem, 4vw, 2.75rem);
  font-family: var(--mono);
  font-size: .69rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.specimen {
  display: flex;
  align-items: flex-start;
  padding-bottom: 2.1rem;
  /* Sized by fitSpecimen() in app.js: the string is measured at its natural
     width and scaled to the panel, so any domain length fills the mount. */
  font-size: var(--spec-size, 4rem);
}

.seg { position: relative; }

.seg-text {
  display: block;
  font-family: var(--display);
  font-variation-settings: "wdth" 118, "wght" 800;
  font-size: 1em;
  line-height: .92;
  letter-spacing: -.025em;
  white-space: nowrap;
}

.seg-dot .seg-text { color: var(--accent); }

.seg-bracket {
  display: block;
  height: .07em;
  margin-top: .13em;
  border: 1px solid var(--accent);
  border-top: 0;
  transform-origin: left center;
}

.seg-label {
  position: absolute;
  top: calc(100% + .6rem);
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .06em;
  line-height: 1.4;
  color: var(--ink-soft);
  white-space: nowrap;
}

.seg-sld .seg-label { left: 0; }
.seg-tld .seg-label { right: 0; text-align: right; }

/* Stacked spec list — the fallback whenever the callout labels would
   collide, either on a narrow screen or on a very short name. */
.specs {
  display: none;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.spec {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .02em;
}

.spec-k { color: var(--ink-soft); }

.is-stacked .seg-label { display: none; }
.is-stacked .specs { display: block; }
.is-stacked .specimen { padding-bottom: 0; }

/* --- offer -------------------------------------------------------------- */

.offer {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 5vw, 4.5rem);
  align-items: start;
  padding: clamp(1.5rem, 4vw, 2.75rem) 0 clamp(2rem, 5vw, 3.25rem);
}

/* Both columns are fields of the same record, so they share one rule. */
.offer-copy,
.offer-act {
  border-top: 1px solid var(--rule-firm);
  padding-top: 1.1rem;
}

.field-label {
  margin: 0 0 .8rem;
  font-family: var(--mono);
  font-size: .69rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.offer-head {
  margin: 0 0 .85rem;
  font-variation-settings: "wdth" 108, "wght" 700;
  font-size: clamp(1.4rem, 1.1rem + 1.5vw, 2.15rem);
  line-height: 1.14;
  letter-spacing: -.018em;
  text-wrap: balance;
}

.offer-sub {
  margin: 0;
  max-width: 46ch;
  color: var(--ink-soft);
}

.price-label {
  margin: 0 0 .45rem;
  font-family: var(--mono);
  font-size: .69rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.price {
  margin: 0 0 1.4rem;
  font-variation-settings: "wdth" 112, "wght" 700;
  font-size: clamp(1.8rem, 1.3rem + 2vw, 2.9rem);
  line-height: 1;
  letter-spacing: -.02em;
}

/* --- contact ------------------------------------------------------------ */

.btn {
  display: inline-block;
  padding: .85rem 1.5rem;
  border: 0;
  border-radius: 2px;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .06em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .10),
              0 8px 18px -8px rgba(15, 23, 42, .35);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .10),
              0 8px 18px -8px color-mix(in srgb, var(--accent) 70%, transparent);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.btn:hover,
.btn:focus-visible {
  filter: brightness(1.09);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(15, 23, 42, .12),
              0 14px 26px -10px rgba(15, 23, 42, .40);
  box-shadow: 0 2px 4px rgba(15, 23, 42, .12),
              0 14px 26px -10px color-mix(in srgb, var(--accent) 80%, transparent);
}

.btn:active { transform: translateY(0); }

/* Secondary action. Same footprint as .btn so the pair sits level, but it
   recedes — copying is the fallback, writing now is the ask. */
.btn-ghost {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--rule-firm);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  filter: none;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.acts {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.contact-hint {
  margin: .7rem 0 0;
  font-family: var(--mono);
  font-size: .68rem;
  line-height: 1.5;
  letter-spacing: .02em;
  color: var(--ink-soft);
  max-width: 34ch;
}

.contact-alt {
  margin: .55rem 0 0;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .03em;
}

.contact-alt a { color: var(--ink); text-underline-offset: 3px; }

/* Three facts a buyer weighs before writing to a stranger. Each one is
   already promised in the transfer steps below — this just surfaces them
   next to the button, where the hesitation actually happens. */
.trust {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .5rem;
}

.trust-i {
  position: relative;
  padding-left: 1.15rem;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .02em;
  color: var(--ink-soft);
}

.trust-i::before {
  content: "";
  position: absolute;
  left: 0;
  top: .34em;
  width: .42rem;
  height: .42rem;
  border-radius: 50%;
  background: var(--accent);
}

/* --- generic blocks ----------------------------------------------------- */

.block {
  border-top: 1px solid var(--rule);
  padding: clamp(1.75rem, 4vw, 2.75rem) 0;
}

.block-head {
  margin: 0 0 1.25rem;
  font-family: var(--mono);
  font-size: .69rem;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag {
  padding: .38rem .7rem;
  border: 1px solid var(--rule-firm);
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .02em;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: clamp(1.1rem, 3vw, 2.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.step { display: block; }

.step-n {
  display: block;
  margin-bottom: .55rem;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .1em;
  color: var(--accent);
}

.step-t {
  margin: 0;
  max-width: 34ch;
  font-size: .95rem;
  color: var(--ink-soft);
}

/* --- footer ------------------------------------------------------------- */

.foot {
  max-width: var(--sheet);
  margin: 0 auto;
  padding: 1.5rem var(--gut) 3rem;
  border-top: 1px solid var(--rule);
}

.foot-t {
  margin: 0;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .04em;
  color: var(--ink-soft);
}

.foot-dim { margin-top: .35rem; opacity: .7; }

/* --- narrow ------------------------------------------------------------- */

@media (max-width: 860px) {
  .offer { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .specimen { padding-bottom: 0; }
  .seg-label { display: none; }
  .specs { display: block; }

  .spec {
    flex-direction: column;
    gap: .15rem;
  }
}

/* --- load sequence ------------------------------------------------------ */

.ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(.16em);
  animation: set-char .5s cubic-bezier(.2, .7, .3, 1) forwards;
  animation-delay: calc(var(--i, 0) * 22ms + 60ms);
}

.seg-bracket {
  transform: scaleX(0);
  animation: draw-rule .45s cubic-bezier(.2, .7, .3, 1) forwards;
  animation-delay: var(--rule-delay, .5s);
}

.seg-label {
  opacity: 0;
  animation: fade-in .4s ease forwards;
  animation-delay: calc(var(--rule-delay, .5s) + .22s);
}

@keyframes set-char {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes draw-rule {
  to { transform: scaleX(1); }
}

@keyframes fade-in {
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ch,
  .seg-bracket,
  .seg-label {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .btn { transition: none; }
  .btn:hover,
  .btn:focus-visible { transform: none; }

  .panel.is-live {
    transform: none;
    transition: none;
  }
}
