/* =========================================================================
   tablo.immo — coming soon splash
   Self-contained. No framework, no build step.
   Tokens come from public-website/app/style-variables.css and
   public-website/constants/design-tokens.ts. Do not invent new colors.
   ========================================================================= */

:root {
  /* Brand & accent */
  --color-primary-accent: #F4C555;        /* style-variables.css */
  --color-primary-accent-hover: #EBB33A;  /* style-variables.css */

  /* Typography */
  --color-text-primary: #233241;          /* style-variables.css */
  --color-text-secondary: #5A6878;        /* --color-tablo-text-secondary, AA on bg-main */

  /* Surfaces */
  --color-bg-main: #F0F6FD;               /* style-variables.css */
  --color-bg-surface: #EFF6FC;            /* style-variables.css */
  --color-bg-white: #FFFFFF;

  /* Borders */
  --color-border-dark: #30577d;           /* --color-tablo-border-dark */
  --color-border-light: #CFD9E0;          /* --color-tablo-border-light */
  --color-accent-blue-dark: #3E5062;

  /* Shape & elevation */
  --radius-btn-capsule: 50px;
  --radius-card: 16px;
  --shadow-tablo-btn: 2px 3px 0 var(--color-border-dark);
  --shadow-tablo-btn-hover: 1px 1px 0 var(--color-border-dark);

  --max-container-width: 1240px;

  --pad-x: clamp(16px, 4.5vw, 56px);
  --pad-y: clamp(14px, 2.4vh, 30px);
}

/* ---------------------------------------------------------------- reset -- */

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

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  /* One screen, no scroll. */
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text-primary);
  background-color: var(--color-bg-main);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

p { margin: 0; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--color-text-primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ----------------------------------------------------------- background -- */

/*
  Reproduces public-website/components/BackgroundLayers.tsx:
  white blurred cloud blobs (very high blur radius, low opacity)
  plus a paper grain (feTurbulence, saturate 0, opacity 0.21, multiply).
*/
.page {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: var(--pad-y) var(--pad-x);
  overflow: hidden;
  isolation: isolate;
}

.bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-cloud {
  position: absolute;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
}

.bg-cloud--1 { width: 90vw; height: 88vh; left: -22vw; top: -30vh; }
.bg-cloud--2 { width: 70vw; height: 76vh; right: -18vw; top: -8vh; opacity: 0.9; }
.bg-cloud--3 { width: 80vw; height: 60vh; left: 12vw; bottom: -34vh; opacity: 0.85; }
.bg-cloud--4 { width: 46vw; height: 52vh; right: 14vw; bottom: -22vh; opacity: 0.7; }

/* Signature vector (root BACKGROUND-VECTOR-from-recraft.svg), held back as texture. */
.bg-vector {
  position: absolute;
  inset: 0;
  background: url("background-vector.svg") center / cover no-repeat;
  opacity: 0.08;
  mix-blend-mode: multiply;
}

/* Paper grain — same filter parameters as BackgroundLayers.tsx. */
.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.21;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.49' numOctaves='7' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
}

/* ---------------------------------------------------------------- topbar -- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max-container-width);
  width: 100%;
  margin: 0 auto;
}

/* Logo mark: exact reproduction of .logo-icon-placeholder (app/style.css). */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  text-decoration: none;
}

.logo-mark {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-border-dark);
  flex: none;
}

.logo-mark span { border: 1px solid var(--color-border-dark); }

/* Bespoke underline: exact reproduction of .brand-signature in app/style.css. */
.brand-signature {
  position: relative;
  display: inline-block;
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  padding: 0 6px;
  z-index: 1;
}

.brand-signature::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 45%;
  background-color: var(--color-primary-accent);
  opacity: 0.7;
  z-index: -1;
  transform: skewX(-12deg) rotate(-1deg);
  border-radius: 4px 8px 3px 6px;
  transition: all 0.2s ease-out;
}

.brand-signature:hover::after {
  height: 65%;
  opacity: 0.9;
  transform: skewX(-15deg) rotate(-1.5deg) scale(1.05);
}

.brand-signature--inline { font-weight: 600; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1.5px solid var(--color-border-dark);
  border-radius: var(--radius-btn-capsule);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary-accent);
  box-shadow: 0 0 0 1.5px var(--color-border-dark);
}

/* ----------------------------------------------------------------- stage -- */

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 0.78fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  max-width: var(--max-container-width);
  width: 100%;
  margin: 0 auto;
  min-height: 0;
  padding-block: clamp(8px, 1.6vh, 20px);
}

.copy {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.7vh, 20px);
  min-width: 0;
}

.eyebrow {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--color-border-dark);
}

h1 {
  margin: 0;
  font-size: clamp(1.75rem, min(4.6vw, 6.2vh), 3.5rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  text-wrap: balance;
  max-width: 17ch;
}

.lede {
  font-size: clamp(0.95rem, min(1.1vw, 1.85vh), 1.12rem);
  line-height: 1.5;
  color: var(--color-text-secondary);
  max-width: 54ch;
  text-wrap: pretty;
}

/* ---------------------------------------------------------------- chips -- */

.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1.2vh, 12px);
}

.chip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: clamp(8px, 1.3vh, 13px) clamp(10px, 0.9vw, 14px);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--color-border-light);
  border-radius: 14px;
}

.chip-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--color-primary-accent);
  color: var(--color-text-primary);
  margin-top: 1px;
}

.chip-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.chip-title {
  font-size: clamp(0.79rem, 0.95vw, 0.875rem);
  font-weight: 650;
  color: var(--color-text-primary);
  line-height: 1.25;
}

.chip-desc {
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--color-text-secondary);
}

/* ---------------------------------------------------------------- capture -- */

.capture {
  display: flex;
  gap: 10px;
  max-width: 560px;
  width: 100%;
  margin-top: clamp(2px, 0.6vh, 8px);
}

.capture input {
  flex: 1 1 auto;
  min-width: 0;
  height: clamp(42px, 6.2vh, 54px);
  padding: 0 18px;
  font: inherit;
  font-size: 0.92rem;
  color: var(--color-text-primary);
  background: var(--color-bg-white);
  border: 1.5px solid var(--color-border-light);
  border-radius: var(--radius-btn-capsule);
}

.capture input::placeholder { color: #64727E; }

.capture input:focus,
.capture input:focus-visible {
  outline: 3px solid var(--color-primary-accent);
  outline-offset: 2px;
  border-color: var(--color-border-dark);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  height: clamp(42px, 6.2vh, 54px);
  padding: 0 clamp(16px, 1.6vw, 26px);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--color-text-primary);
  background: var(--color-primary-accent);
  border: 2px solid var(--color-border-dark);
  border-radius: var(--radius-btn-capsule);
  box-shadow: var(--shadow-tablo-btn);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.btn-primary:hover {
  background: var(--color-primary-accent-hover);
  box-shadow: var(--shadow-tablo-btn-hover);
  transform: translate(1px, 2px);
}

.btn-primary:active { transform: translate(2px, 3px); box-shadow: none; }

.note {
  font-size: 0.76rem;
  color: var(--color-text-secondary);
}

.note-link {
  color: var(--color-text-primary);
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  font-weight: 600;
}

.note-link:hover { text-decoration-thickness: 2.5px; }

/* ------------------------------------------------- consent, legal, status -- */

/* Honeypot: present in the DOM, out of the viewport, out of the tab order. */
.hp-field {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 560px;
  margin-top: -4px;
  font-size: 0.74rem;
  line-height: 1.4;
  color: var(--color-text-secondary);
  cursor: pointer;
}

.consent input[type="checkbox"] {
  flex: none;
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  accent-color: var(--color-primary-accent);
  cursor: pointer;
}

.consent .brand-signature { padding: 0 3px; }

.legal {
  max-width: 62ch;
  margin-top: -6px;
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--color-text-secondary);
}

.legal a {
  color: var(--color-text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal a:hover { color: var(--color-text-primary); }

.form-status {
  max-width: 560px;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border-light);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--color-text-secondary);
}

.form-status--ok {
  border-color: var(--color-border-dark);
  background: rgba(244, 197, 85, 0.22);
}

.form-status--error {
  border-color: var(--color-border-dark);
  background: rgba(48, 87, 125, 0.08);
  color: var(--color-text-primary);
}

.form-status-title {
  margin-bottom: 2px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.form-status-text { color: var(--color-text-secondary); }

/* --------------------------------------------------------------- preview -- */

.preview {
  display: flex;
  justify-content: flex-end;
}

.preview-card {
  width: 100%;
  max-width: 360px;
  padding: clamp(14px, 2vh, 20px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.86));
  border: 2px solid rgba(48, 87, 125, 0.42);
  border-radius: 20px;
  box-shadow: 6px 8px 0 rgba(48, 87, 125, 0.16);
  transform: rotate(-1deg);
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.2vh, 12px);
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.preview-title { font-size: 0.8rem; font-weight: 700; }

.preview-tag {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-btn-capsule);
  background: rgba(244, 197, 85, 0.55);
  color: var(--color-text-primary);
}

.preview-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 9px 10px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-light);
  border-radius: 10px;
}

.kpi-label { font-size: 0.63rem; color: var(--color-text-secondary); line-height: 1.2; }
.kpi-value { font-size: clamp(0.95rem, 1.3vw, 1.1rem); font-weight: 700; letter-spacing: -0.01em; }
.kpi-delta { font-size: 0.63rem; color: var(--color-accent-blue-dark); }

.preview-chart {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 6px;
  height: clamp(48px, 8vh, 72px);
  padding: 6px 4px 0;
  border-bottom: 1.5px solid var(--color-border-light);
}

.bar {
  height: var(--h, 50%);
  border-radius: 4px 4px 0 0;
  background: rgba(62, 80, 98, 0.35);
}

.bar--accent { background: var(--color-primary-accent); }

.preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(207, 217, 224, 0.9);
  font-size: 0.72rem;
}

.preview-row:last-child { border-bottom: 0; padding-bottom: 0; }
.preview-row-label { color: var(--color-text-secondary); }
.preview-row-value { font-weight: 700; }

/* ------------------------------------------------------------------ foot -- */

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  max-width: var(--max-container-width);
  width: 100%;
  margin: 0 auto;
  padding-top: 4px;
  font-size: 0.71rem;
  color: var(--color-text-secondary);
}

.foot a {
  color: var(--color-text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.foot a:hover { color: var(--color-text-primary); }

/* ------------------------------------------------------------- responsive -- */

@media (max-width: 1024px) {
  .preview-card { max-width: 300px; }
}

@media (max-width: 900px) {
  .stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    align-content: center;
  }

  .preview { display: none; }

  h1 { max-width: 22ch; }

  .foot { justify-content: center; text-align: center; }
}

@media (max-width: 560px) {
  .chips { grid-template-columns: minmax(0, 1fr); }
  .chip-desc { display: none; }
  .capture { flex-direction: column; gap: 8px; }
  .btn-primary { width: 100%; }
  .status-pill { font-size: 0.66rem; padding: 5px 10px; }
  h1 { max-width: none; }
}

/* Compact height: drop secondary lines before the page can scroll. */
@media (max-height: 720px) {
  .chip-desc { display: none; }
  h1 { line-height: 1.05; }
  .preview-chart { height: 46px; }
  .legal { font-size: 0.64rem; line-height: 1.35; }
  .consent { font-size: 0.7rem; }
}

@media (max-height: 620px) {
  .eyebrow { display: none; }
  .lede {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .foot { display: none; }
}

/* ----------------------------------------------------------------- motion -- */

@media (prefers-reduced-motion: no-preference) {
  .copy > * {
    animation: rise 0.55s ease-out both;
  }
  .copy > :nth-child(2) { animation-delay: 0.05s; }
  .copy > :nth-child(3) { animation-delay: 0.1s; }
  .copy > :nth-child(4) { animation-delay: 0.16s; }
  .copy > :nth-child(5) { animation-delay: 0.22s; }
  .copy > :nth-child(6) { animation-delay: 0.26s; }

  .preview-card {
    animation: rise 0.65s ease-out 0.12s both;
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Dark-mode safety: this page is designed light-only; keep native form
   controls and scrollbars from inverting the palette. */
@media (prefers-color-scheme: dark) {
  :root { color-scheme: light; }
}
