/* Tokens from the "Edouard de Becker Remy" design system:
   deBR navy, parchment, gold hairlines, Playfair Display and Inter. */
:root {
  --paper: #ffffff;
  --parchment: #f7f3ea;
  --line: #d6d9de;
  --ink: #121a26;
  --ink-muted: #56606e;
  --navy: #002551;
  --navy-hover: #0b305e;
  --on-navy: #ffffff;
  --burgundy: #751313;
  --gold: #b8913a;
  --gold-ink: #7a5c12;
  --chrome: #efece5;
  --chrome-line: #dcd7cc;

  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --text: Inter, Arial, "Helvetica Neue", Helvetica, sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-6: 24px;
  --space-10: 40px;
  --space-16: 64px;
  --radius-pill: 999px;
  --radius-window: 12px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: clamp(16px, 4vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--navy);
  color: var(--ink);
  font: 400 15px/24px var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: var(--navy); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* Backdrop: the photograph, with a navy scrim (the only gradient in the system). */
.backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  animation: veil 1.6s var(--ease) both;
}
.backdrop:not([src]), .backdrop[src=""] { display: none; }
.scrim {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 37, 81, .55) 0%, rgba(0, 37, 81, .35) 45%, rgba(0, 37, 81, .8) 100%);
}

/* Stage and window */
/* The whole page fits the viewport: the window runs from below the top
   margin to the bottom edge, and its content is sized to the height. */
.stage {
  height: 100%;
  padding: clamp(24px, 9vh, 120px) var(--gutter) 0;
  display: flex;
  justify-content: center;
}
.window {
  width: min(1180px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-radius: var(--radius-window) var(--radius-window) 0 0;
  box-shadow: 0 30px 80px -20px rgba(0, 18, 40, .55), 0 0 0 1px rgba(255, 255, 255, .08);
  overflow: hidden;
  animation: lift 1.1s var(--ease) both .15s;
}

.chrome {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 18px;
  height: 52px;
  padding: 0 18px;
  background: var(--chrome);
  border-bottom: 1px solid var(--chrome-line);
  color: #7d7a73;
}
.chrome svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}
.lights { display: flex; gap: 8px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .12); }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.chrome-nav { display: flex; gap: 14px; }
.lang {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-muted);
  cursor: pointer;
}
.lang svg { width: 17px; height: 17px; flex: none; }
.lang select {
  appearance: none;
  -webkit-appearance: none;
  width: auto;
  max-width: 11em;
  min-height: 32px;
  padding: 0 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: 500 13px/1 var(--text);
  cursor: pointer;
  text-overflow: ellipsis;
}
.lang select:hover { background: rgba(0, 0, 0, .05); }
.lang select:focus { box-shadow: none; }
.lang select:focus-visible { outline: 2px solid var(--navy); outline-offset: 1px; }
.chrome-nav .dim { opacity: .4; }

.address {
  justify-self: center;
  width: min(560px, 100%);
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--paper);
  border: 1px solid var(--chrome-line);
  border-radius: 8px;
  color: var(--ink-muted);
  font: 500 13.5px/1 var(--text);
}
.address .lock { width: 14px; height: 14px; flex: none; }
.address .reload { width: 15px; height: 15px; margin-inline-start: auto; flex: none; }
.address .url { margin-inline-start: auto; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.caret {
  display: inline-block;
  width: 1px;
  height: 1.05em;
  margin-inline-start: 1px;
  vertical-align: -2px;
  background: var(--navy);
  animation: blink 1.1s steps(1) infinite;
}
.typed-done .caret { animation: blink 1.1s steps(1) 3, fade .3s 3.3s forwards; }

/* Page inside the window */
.viewport {
  container-type: size;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.hero {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px clamp(20px, 6cqi, 72px) clamp(32px, 8cqh, 72px);
}
.eyebrow {
  margin: 0 0 var(--space-3);
  font: 500 12px/16px var(--text);
  letter-spacing: .07em;
  color: var(--gold-ink);
}
/* "This domain is for sale": the brand's italic lead voice, in heraldic gold. */
.kicker {
  margin: 0 0 clamp(4px, 1.5cqh, 16px);
  font: italic 400 clamp(20px, min(3.4cqi, 5.5cqh), calc(34px * var(--scale)))/1.25 var(--display);
  color: var(--gold-ink);
  text-wrap: balance;
}
h1 {
  margin: 0;
  font: 400 clamp(36px, min(11cqi, 22cqh), calc(136px * var(--scale)))/1.02 var(--display);
  letter-spacing: -.015em;
  color: var(--navy);
  overflow-wrap: anywhere;
}
h1[data-length="short"] { font-size: clamp(48px, min(16cqi, 24cqh), calc(152px * var(--scale))); }
h1[data-length="long"] { font-size: clamp(30px, min(7.5cqi, 18cqh), calc(104px * var(--scale))); }

.offer-bar {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: clamp(24px, 7cqh, 56px);
  padding-block: 8px;
  padding-inline: 28px 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 30px -18px rgba(0, 37, 81, .45);
  max-width: 100%;
}
.offer-label { font: 500 12px/1 var(--text); letter-spacing: .07em; color: var(--ink-muted); white-space: nowrap; }
.offer-value { font: 500 22px/1 var(--display); color: var(--navy); white-space: nowrap; padding-inline: 18px 10px; border-inline-start: 1px solid var(--line); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--navy);
  color: var(--on-navy);
  font: 500 15px/1 var(--text);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.button:hover { background: var(--navy-hover); box-shadow: 0 6px 18px -8px rgba(0, 37, 81, .6); }
.button[disabled] { opacity: .6; cursor: progress; }
.button-small { min-height: 36px; padding: 0 18px; font-size: 14px; }

/* Enquiry: a sheet that rises from the bottom, full width, over a navy veil. */
.sheet {
  position: fixed;
  inset: auto 0 0 0;
  width: 100%;
  max-width: 100%;
  max-height: min(92dvh, 100%);
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--gold);
  background: var(--parchment);
  color: var(--ink);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 -24px 60px -24px rgba(0, 18, 40, .6);
  transform: translateY(100%);
  transition: transform .5s var(--ease), overlay .5s allow-discrete, display .5s allow-discrete;
}
.sheet[open] { transform: none; }
@starting-style { .sheet[open] { transform: translateY(100%); } }
.sheet::backdrop {
  background: rgba(0, 18, 40, 0);
  transition: background-color .5s var(--ease), overlay .5s allow-discrete, display .5s allow-discrete;
}
.sheet[open]::backdrop { background: rgba(0, 18, 40, .62); }
@starting-style { .sheet[open]::backdrop { background: rgba(0, 18, 40, 0); } }

/* Scale for very large screens (ultrawide, 4K): chrome, sheet and offer bar
   grow together; the hero already scales with its container. */
:root { --scale: 1; }
@media (min-width: 2200px) and (min-height: 1250px) { :root { --scale: 1.25; } }
@media (min-width: 3000px) and (min-height: 1650px) { :root { --scale: 1.6; } }
.chrome, .offer-bar, .sheet-inner, .thanks-inner { zoom: var(--scale); }
.window { width: min(calc(1180px * var(--scale)), 100%); }

.sheet-inner {
  position: relative;
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 4.5vh, 48px) var(--gutter) clamp(20px, 4vh, 40px);
}
.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(20px, 4vh, 36px);
}
.sheet-close {
  flex: none;
  width: 44px;
  height: 44px;
  margin: -6px -10px 0 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.sheet-close:hover { background: rgba(0, 37, 81, .07); color: var(--navy); }
.sheet-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

.title { margin: 0; font: 400 clamp(26px, 2.6vw, 34px)/1.2 var(--display); color: var(--navy); overflow-wrap: anywhere; }
.title-domain { font-style: italic; color: var(--gold-ink); }
.small { font-size: 13px; line-height: 20px; }
.muted { color: var(--ink-muted); }

/* Three groups: the offer, how to pay, who you are. Side by side on wide
   screens, two columns on tablets, stacked on phones. */
.form {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.1fr) minmax(0, 1.1fr);
  grid-template-areas: "offer payment you" "foot foot foot";
  gap: clamp(20px, 3vh, 32px) clamp(28px, 3.5vw, 56px);
  align-items: start;
}
.group-offer { grid-area: offer; }
.group-payment { grid-area: payment; }
.group-you { grid-area: you; display: grid; gap: 18px; }
/* Beside the headed groups, the details start level with their first field. */
@media (min-width: 681px) { .group-you { padding-top: calc(19px * 1.3 + 25px); } }
.form-foot { grid-area: foot; }

.group-label {
  display: block;
  padding: 0 0 10px;
  margin: 0 0 14px;
  border-bottom: 1px solid var(--gold);
  font: 400 19px/1.3 var(--display);
  color: var(--navy);
  width: 100%;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
label { font: 500 13px/18px var(--text); letter-spacing: .02em; color: var(--ink); }

input, select, textarea {
  width: 100%;
  font: 400 16px/24px var(--text);
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid #a9b0ba;
  border-radius: 0;
  padding: 8px 0;
  transition: border-color .2s var(--ease);
}
input::placeholder, textarea::placeholder { color: #8a929d; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 1px 0 0 var(--navy); }
textarea {
  resize: vertical;
  min-height: 88px;
  padding: 10px 12px;
  border: 1px solid #a9b0ba;
  background: var(--paper);
}
textarea:focus { box-shadow: inset 0 0 0 1px var(--navy); }
[aria-invalid="true"] { border-color: var(--burgundy); }
.error { margin: 6px 0 0; font-size: 13px; line-height: 18px; color: var(--burgundy); }
.field .error { margin: 0; }

/* The offer: large, in the display face. */
.offer-input { display: flex; align-items: baseline; gap: 12px; }
.offer-input select { width: auto; flex: none; padding-inline-end: 4px; font: 500 15px/1 var(--text); cursor: pointer; }
.offer-input input { font: 400 clamp(28px, 2.6vw, 36px)/1.2 var(--display); color: var(--navy); padding: 2px 0 6px; }

/* Payment options: cards; the chosen one is outlined in navy and shows its details. */
fieldset.payment { border: 0; margin: 0; padding: 0; min-width: 0; }
.options { display: grid; gap: 10px; }
.option {
  border: 1px solid var(--line);
  background: var(--paper);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.option:hover { border-color: #a9b0ba; }
.option:has(input:checked) { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.option-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 16px;
  font: 500 15px/1.35 var(--text);
  letter-spacing: 0;
  cursor: pointer;
}
.option-head input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  accent-color: var(--navy);
  cursor: pointer;
}
.option-head input:focus { box-shadow: none; }
.option-head input:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.option-head input[aria-invalid="true"] { outline: 1px solid var(--burgundy); outline-offset: 2px; }
.option-body { display: grid; gap: 8px; padding: 0 16px 16px 46px; }
.option-body p { margin: 0; }
.sub-label { margin-top: 4px; }
.provider-row { display: flex; gap: 14px; flex-wrap: wrap; }
.provider-row select { width: auto; min-width: 10em; flex: 1 1 10em; cursor: pointer; }
.provider-row input { flex: 1 1 10em; width: auto; }

/* Foot: the privacy notice on one side, sending on the other. */
.form-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 32px;
  flex-wrap: wrap;
  padding-top: clamp(14px, 2.5vh, 24px);
  border-top: 1px solid var(--line);
}
.privacy { flex: 1 1 320px; max-width: 72ch; color: var(--ink-muted); }
.privacy summary { cursor: pointer; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; width: fit-content; min-height: 24px; }
.privacy p { margin: var(--space-2) 0 0; }
.privacy strong { font-weight: 600; color: var(--ink); }
.send { display: flex; align-items: center; justify-content: flex-end; gap: 16px; flex-wrap: wrap; margin-inline-start: auto; }
.button-send { min-width: 160px; min-height: 48px; font-size: 16px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Invisible unless Cloudflare needs a click, so it takes no room by default. */
.cf-turnstile { min-height: 0; }
.form-status { margin: 0; font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.form-status.is-error { color: var(--burgundy); }
.form-status:empty { display: none; }

/* Thank-you: covers the sheet from the bottom, then its text rises. */
.sheet.is-sent { overflow: hidden; }
.thanks {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  background: var(--parchment);
  outline: none;
  animation: cover .7s var(--ease) both;
}
.thanks-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 5vh, 48px) var(--gutter);
  animation: rise .8s var(--ease) both .25s;
}
.thanks-inner p:not(.eyebrow) { max-width: 52ch; margin: 0 0 var(--space-6); }
.thanks-inner .title { font-size: clamp(32px, 4vw, 44px); }
@keyframes cover { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }

/* Footer: a single quiet line, only when there is something to say. */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  flex-wrap: wrap;
  padding: 14px clamp(20px, 5cqi, 56px);
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 20px;
  color: var(--ink-muted);
}
.portfolio { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.portfolio a { font: 400 16px/1.4 var(--display); text-decoration: none; }
.portfolio a:hover { text-decoration: underline; }
.legal { margin: 0; display: flex; gap: 18px; flex-wrap: wrap; }
.legal a { color: inherit; }

/* Motion */
.rise { animation: rise .9s var(--ease) both; }
.hero .rise:nth-child(2) { animation-delay: .1s; }
.hero .rise:nth-child(3) { animation-delay: .22s; }
.hero .rise:nth-child(4) { animation-delay: .34s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes lift { from { opacity: 0; transform: translateY(48px); } }
@keyframes veil { from { transform: scale(1.06); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes fade { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Narrow or short windows */
@container (max-width: 560px) {
  .offer-bar { flex-wrap: wrap; justify-content: center; border-radius: 20px; padding: 18px; gap: 12px; }
  .offer-value { border-inline-start: 0; padding: 0; }
  .offer-bar .button { width: 100%; }
}
@media (max-width: 1080px) {
  .form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "offer you" "payment you" "foot foot";
  }
}
@media (max-width: 680px) {
  .form { grid-template-columns: minmax(0, 1fr); grid-template-areas: "offer" "payment" "you" "foot"; gap: 26px; }
  .sheet { max-height: 100%; border-top: 0; }
  .send { width: 100%; }
  .button-send { flex: 1; }
}
/* Short laptop screens: tighten the sheet so it fits without scrolling. */
@media (min-width: 1081px) and (max-height: 820px) {
  .sheet-head { margin-bottom: 16px; }
  .group-label { margin-bottom: 10px; padding-bottom: 8px; }
  .group-you { gap: 12px; }
  textarea { min-height: 72px; }
}
@media (max-width: 720px) {
  .chrome { grid-template-columns: auto 1fr auto; gap: 10px; padding: 0 10px; height: 46px; }
  .chrome-nav { display: none; }
  .lang select { max-width: 6.5em; }
  .lights i { width: 10px; height: 10px; }
  .stage { padding-top: 32px; }
}
