/* ==========================================================================
   Domain-for-sale landing page — mobile-first.

   Mobile / tablet : one edge-to-edge column, no device frame.
   Desktop (>=1024): the whole page lives inside a black rounded "tablet"
                     bezel that is locked to the viewport height — the frame
                     is a 3-row grid (header / hero 1fr / bottom band) with
                     overflow hidden, so nothing ever scrolls.
   ========================================================================== */

/* --- Reset ---------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body,
h1,
p,
figure,
ul {
  margin: 0;
}
ul {
  padding: 0;
  list-style: none;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
[hidden] {
  display: none !important;
}

/* --- Tokens --------------------------------------------------------------- */
:root {
  --page: #f5f5f3; /* inner page — warm light grey, tone-matched to the photo */
  --scene: #e9e9e7; /* outer desk surface the device sits on */
  --white: #ffffff; /* button label only */
  --ink: #0a0a0a;
  --muted: #6f6f6f; /* 4.55:1 on --page — body copy and >=0.72rem bold caps */
  --subtle: #9a9a9a; /* on the black panel only */
  --line: #d9d9d6;
  --dark: #0a0a0a;
  --on-dark: #f5f5f3;
  --accent: #e31b23;
  --accent-hover: #c8161d;

  --pad: clamp(20px, 5.5vw, 28px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t: 160ms var(--ease);

  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Inter Tight', 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

/* Reduced motion: every transition on the page is driven by --t, so zeroing it
   removes them all. The hero entrance fade is gated separately, further down. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --t: 0ms;
  }
}

/* --- Base ----------------------------------------------------------------- */
body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

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

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

/* Shared line-icon defaults */
svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.arrow {
  width: 18px;
  height: 18px;
  flex: none;
  transition: transform var(--t);
}

/* --- Header --------------------------------------------------------------- */
.site-header {
  height: 60px;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.brand-dot {
  width: 8px;
  height: 8px;
  flex: none;
  background: var(--accent);
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding-left: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color var(--t);
}
.header-link .arrow {
  width: 16px;
  height: 16px;
}
.header-link:hover {
  color: var(--accent);
}
.header-link:hover .arrow {
  transform: translateX(4px);
}

/* --- Hero copy ------------------------------------------------------------ */
.hero-copy {
  /* Bottom padding stays small so the photo follows the CTA immediately. */
  padding: clamp(10px, 3vw, 20px) var(--pad) 16px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.status-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
}

.eyebrow {
  margin-top: clamp(16px, 4vw, 24px);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-wrap: balance;
}

.headline {
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.3rem, 11vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.description {
  margin-top: clamp(12px, 3.5vw, 18px);
  max-width: 34ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

/* Asking price — opt-in via DOMAIN_CONFIG.showPrice */
.price {
  margin-top: clamp(16px, 4vw, 24px);
}
.price-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.price-value {
  margin-top: 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

/* --- Calls to action ------------------------------------------------------ */
.cta-row {
  margin-top: clamp(20px, 5vw, 28px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.btn,
.link-cta {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.btn span,
.link-cta span {
  white-space: nowrap;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  height: 54px;
  padding: 0 22px;
  border-radius: 3px;
  background: var(--accent);
  color: var(--white);
  transition: background-color var(--t);
}
.btn:hover {
  background: var(--accent-hover);
}
.btn:hover .arrow {
  transform: translateX(4px);
}

.link-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  transition: color var(--t);
}
.link-cta:hover {
  color: var(--accent);
}
.link-cta:hover .arrow {
  transform: translateX(4px);
}

/* --- Hero image ----------------------------------------------------------- */
/* The photo is never a card: no border, no radius, no shadow. It is blended
   into the page with masks — vertically on the <figure>, horizontally on the
   <img> (desktop only) — plus a soft white edge-vignette that lifts the grey
   floor towards the page tone without touching the red chairs. */
.hero-media {
  /* The figure IS the photo box: masks, vignette and image all share exactly
     the same rectangle, so no un-faded edge can ever appear. */
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: transparent;
  /* Top edge dissolves into the page grey; the bottom edge is hard because the
     black panel starts there — a deliberate cut, not a floating rectangle. */
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 1) 11%,
    rgba(0, 0, 0, 1) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 1) 11%,
    rgba(0, 0, 0, 1) 100%
  );
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Keeps both chairs, both people and the handshake inside the crop while
     trimming the empty floor at the bottom of the source photo. */
  object-position: 50% 42%;
}

/* Light vignette: transparent over the subjects, 20% white at the edges — it
   lifts the cool floor grey towards the warm page grey without tinting the
   chairs or the suits. */
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 64% 60% at 55% 46%,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 48%,
    rgba(255, 255, 255, 0.2) 100%
  );
}

@media (prefers-reduced-motion: no-preference) {
  /* Entrance fade, opt-in via script.js. The image is fully visible by
     default; the classes are only added while the photo is still loading and
     the tab is visible, and the script always reveals it within 1.2s. */
  .hero-media img.is-entering {
    opacity: 0;
    transform: scale(1.01);
  }
  .hero-media img.is-loaded {
    opacity: 1;
    transform: none;
    transition:
      opacity 600ms var(--ease),
      transform 600ms var(--ease);
  }
}

/* --- Footer band ---------------------------------------------------------- */
.frame-footer {
  background: var(--dark);
  color: var(--on-dark);
}

.panel {
  padding: clamp(22px, 6vw, 32px) var(--pad);
}

.panel-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel-subtitle {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--subtle);
}

.panel-contact {
  margin-top: clamp(14px, 4vw, 22px);
  display: flex;
  align-items: center;
  gap: 4px;
}

.panel-email {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  font-weight: 500;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
  transition: color var(--t);
}
.panel-email:hover {
  color: var(--white);
}
.panel-email:hover .arrow {
  transform: translateX(4px);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  color: var(--subtle);
  transition: color var(--t);
}
.copy-btn svg {
  width: 16px;
  height: 16px;
}
.copy-btn:hover {
  color: var(--on-dark);
}

.copy-status {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subtle);
}

/* --- Trust indicators ----------------------------------------------------- */
.trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: clamp(20px, 5.5vw, 26px) var(--pad);
  border-top: 1px solid rgba(245, 245, 243, 0.14);
}

.trust li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 0 6px;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.3;
  text-wrap: balance;
}

.trust li + li {
  border-left: 1px solid rgba(245, 245, 243, 0.14);
}

.trust-icon {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--accent);
}

/* Very narrow phones: stack the trust items into left-aligned rows. */
@media (max-width: 359px) {
  .trust {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .trust li {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 14px;
    padding: 0;
  }
  .trust li + li {
    border-left: 0;
  }
}

/* ==========================================================================
   Tablet (768–1023) — still stacked, but the copy sits in a centred column
   ========================================================================== */
@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --pad: clamp(28px, 4vw, 48px);
  }

  .site-header,
  .hero-copy,
  .panel,
  .trust {
    max-width: 720px;
    margin-inline: auto;
  }

  .hero-copy {
    padding-bottom: 20px;
  }

  .headline {
    font-size: clamp(3rem, 6vw, 3.6rem);
  }

  .description {
    font-size: 1.0625rem;
  }

  .cta-row {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 28px;
    row-gap: 12px;
  }

  .btn {
    width: auto;
    min-width: 210px;
    justify-content: center;
    gap: 18px;
    padding: 0 28px;
  }

  /* Constrain the photo so it never eats the fold on a portrait tablet. */
  .hero-media {
    max-height: min(58vw, 460px);
  }
  .hero-media img {
    object-position: 50% 40%;
  }

  .panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding-block: 26px;
  }
  .panel-contact {
    margin-top: 0;
  }
}

/* ==========================================================================
   Desktop (>=1024) — device frame, one screen, no scrolling
   ========================================================================== */
@media (min-width: 1024px) {
  :root {
    --pad: clamp(24px, 3.2vw, 56px);
    --gap: clamp(20px, 3vh, 44px); /* scene margin around the device */
    --bezel: clamp(8px, 0.9vw, 12px);
    --radius: clamp(18px, 1.6vw, 26px);
    --header-h: clamp(56px, 8vh, 68px);
    --band-h: clamp(96px, 14vh, 120px);
  }

  html {
    height: 100%;
  }

  /* Scene: the device is centred on the outer grey, one viewport tall. */
  body {
    height: 100vh; /* fallback */
    height: 100dvh;
    padding: var(--gap);
    overflow: hidden;
    background: var(--scene);
    display: grid;
    place-items: center;
  }

  /* Black bezel. Thin and elegant — the panel at the bottom-left is the same
     black, so it reads as one continuous piece with the frame. */
  .device {
    width: 100%;
    max-width: 1440px;
    height: 100%;
    min-height: 0;
    padding: var(--bezel);
    background: var(--dark);
    border-radius: var(--radius);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.25);
    overflow: hidden;
  }

  /* The page. Explicit rows + min-height:0 everywhere is what guarantees the
     1fr hero shrinks instead of pushing the bottom band off-screen. */
  .frame {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: 47fr 53fr;
    grid-template-rows: var(--header-h) 1fr var(--band-h);
    background: var(--page);
    border-radius: calc(var(--radius) - var(--bezel));
    overflow: hidden;
  }

  .frame > * {
    min-height: 0;
    min-width: 0;
  }

  .site-header {
    grid-column: 1 / -1;
    height: auto;
  }

  /* --- Row 2: copy + photo ------------------------------------------------ */
  .hero {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 47fr 53fr;
    min-height: 0;
  }
  .hero > * {
    min-height: 0;
    min-width: 0;
  }

  .hero-copy {
    align-self: center;
    padding: 0 clamp(24px, 2.4vw, 40px) 0 var(--pad);
  }

  .status {
    font-size: clamp(0.66rem, 0.78vw, 0.72rem);
  }

  .eyebrow {
    margin-top: clamp(8px, 1.6vh, 20px);
    font-size: clamp(0.68rem, 0.8vw, 0.74rem);
  }

  .headline {
    margin-top: clamp(6px, 1vh, 12px);
    font-size: min(clamp(2.4rem, 4.4vw, 4.4rem), 8.5vh);
    line-height: 0.98;
  }

  .description {
    margin-top: clamp(10px, 1.7vh, 20px);
    font-size: min(clamp(0.95rem, 1.05vw, 1.125rem), 2.4vh);
  }

  .price {
    margin-top: clamp(10px, 1.8vh, 22px);
  }

  .cta-row {
    margin-top: clamp(16px, 2.9vh, 34px);
    flex-direction: row;
    align-items: center;
    gap: 28px;
  }

  .btn {
    width: clamp(190px, 15vw, 210px);
    height: clamp(46px, 5.6vh, 54px);
    justify-content: center;
    gap: 18px;
    padding: 0 24px;
  }

  .link-cta {
    min-height: clamp(40px, 5vh, 48px);
  }

  /* Photo: a landscape box (never taller than the hero row) so `cover` only
     ever crops vertically — the full width of the source, i.e. both chairs,
     therefore always survives. Centred in the row; the fades do the rest. */
  .hero-media {
    align-self: center;
    aspect-ratio: 1.42;
    max-height: 100%;
    /* Top fades under the header, bottom dissolves into the light strip the
       trust indicators sit on. */
    -webkit-mask-image: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 1) 8%,
      rgba(0, 0, 0, 1) 86%,
      rgba(0, 0, 0, 0) 100%
    );
    mask-image: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 1) 8%,
      rgba(0, 0, 0, 1) 86%,
      rgba(0, 0, 0, 0) 100%
    );
  }

  .hero-media img,
  .hero-media::after {
    /* Left edge fades out completely into the copy column. */
    -webkit-mask-image: linear-gradient(
      to right,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.55) 9%,
      rgba(0, 0, 0, 0.92) 18%,
      rgba(0, 0, 0, 1) 27%
    );
    mask-image: linear-gradient(
      to right,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.55) 9%,
      rgba(0, 0, 0, 0.92) 18%,
      rgba(0, 0, 0, 1) 27%
    );
  }

  .hero-media img {
    object-position: 50% 40%;
  }

  /* --- Row 3: black panel + trust strip ----------------------------------- */
  .frame-footer {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 47fr 53fr;
    min-height: 0;
    background: var(--page);
    color: var(--ink);
  }

  .panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(16px, 2vw, 40px);
    height: 100%;
    padding: 0 var(--pad);
    background: var(--dark);
    color: var(--on-dark);
  }

  .panel-title,
  .panel-subtitle,
  .panel-email {
    white-space: nowrap;
  }

  .panel-subtitle {
    font-size: clamp(0.82rem, 0.95vw, 0.9rem);
  }

  .panel-contact {
    margin-top: 0;
  }

  .panel-email {
    font-size: clamp(0.82rem, 1vw, 0.95rem);
    overflow-wrap: normal;
  }

  .trust {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    padding: 0 var(--pad);
    background: transparent;
    border-top: 0;
  }

  .trust li {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: clamp(7px, 0.7vw, 11px);
    padding: 0;
    font-size: clamp(0.66rem, 0.82vw, 0.78rem);
    font-weight: 500;
    color: #111111;
  }

  .trust li + li {
    margin-left: clamp(10px, 1.8vw, 28px);
    padding-left: clamp(10px, 1.8vw, 28px);
    border-left: 1px solid var(--line);
  }

  .trust-icon {
    width: clamp(16px, 1.3vw, 20px);
    height: clamp(16px, 1.3vw, 20px);
  }
}

/* Narrow desktops: the 47% column is too tight for a side-by-side CTA row or
   a side-by-side panel, so both stack. */
@media (min-width: 1024px) and (max-width: 1199px) {
  .cta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(4px, 1vh, 10px);
  }

  .panel {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: clamp(8px, 1.4vh, 14px);
  }
}

/* Below 1024x560 the single-screen layout would be unreadable: release the
   height lock and let the page scroll. */
@media (min-width: 1024px) and (max-height: 559px) {
  body {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    display: block;
  }
  .device {
    height: auto;
    margin: 0 auto;
  }
  .frame {
    height: auto;
    grid-template-rows: var(--header-h) auto var(--band-h);
  }
  .hero-copy {
    padding-block: 28px;
  }
  .hero-media {
    max-height: none;
  }
}
