/* ===== Printy waitlist landing — design tokens ===== */
:root {
  --berry: #6f0135;
  --berry-dark: #4a0124;
  --slate: #64748b;
  --muted: #94a3b8;
  --ink: #1e1b2e;
  --field-bg: #ffffff;
  --card: #ffffff;
  --radius-field: 14px;
  --radius-card: 36px;
  --shadow-pill: 0 6px 16px rgba(15, 23, 42, 0.06);
  --shadow-card: 0 30px 80px rgba(66, 82, 152, 0.16);
  --font-ui: 'Assistant', system-ui, 'Segoe UI', sans-serif;
  --font-display: 'Montserrat', 'Assistant', sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background:
    radial-gradient(120% 90% at 18% 12%, #eef1fc 0%, rgba(238, 241, 252, 0) 55%),
    linear-gradient(135deg, #f4f1fb 0%, #eef2fc 45%, #f7f5fd 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ===== Page always fits the viewport — never scrolls on desktop ===== */
.page {
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vh, 24px);
  overflow: hidden;
}

.card {
  width: 100%;
  max-width: 920px;
  max-height: 100%;
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: clamp(18px, 3.2vh, 30px) clamp(24px, 4vw, 44px);
}

.layout {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  align-items: center;
  gap: clamp(24px, 4vw, 40px);
  /* Flow LTR so phone (first) sits left, form (second) right; text stays RTL */
  direction: ltr;
}

/* ===== iPhone mockup (CSS frame, upright, clean dark bezel) ===== */
.phone {
  position: relative;
  height: min(520px, 76vh);
  aspect-ratio: 250 / 520;
  width: auto;
  margin: 0 auto;
  background: #18181d;
  border-radius: 50px;
  padding: 11px;
  box-shadow:
    0 0 0 2px #2c2c34 inset,
    0 1px 2px rgba(255, 255, 255, 0.18) inset,
    0 30px 60px rgba(30, 27, 46, 0.3),
    0 10px 22px rgba(74, 1, 36, 0.14);
}

.phone__screen {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  background: #ffffff;
  border-radius: 40px;
  display: block;
}

/* ===== Content panel ===== */
.panel {
  display: flex;
  flex-direction: column;
  position: relative;
  direction: rtl;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 5vh, 48px);
  color: var(--berry);
  letter-spacing: -0.02em;
  margin-bottom: 2px;
  direction: ltr;
  text-align: center;
  unicode-bidi: isolate;
}

.wordmark__dot {
  color: var(--berry);
}

.tagline {
  font-weight: 700;
  font-size: clamp(16px, 2.2vh, 20px);
  color: var(--berry);
  text-align: center;
  margin: 0 0 4px;
}

.headline {
  font-weight: 600;
  font-size: clamp(13px, 1.7vh, 14px);
  line-height: 1.4;
  color: var(--slate);
  text-align: center;
  margin: 0 0 clamp(10px, 2vh, 18px);
  transition: opacity 0.3s ease;
}

/* On success: hide the headline text but keep its space (no layout jump) */
.headline.is-hidden {
  visibility: hidden;
  opacity: 0;
}

/* ===== Form (narrower, centered) ===== */
.form {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2vh, 9px);
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.field__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--berry);
}

.field__input {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--ink);
  background: var(--field-bg);
  border: 1px solid #eceaf3;
  border-radius: var(--radius-field);
  padding: clamp(8px, 1.3vh, 11px) 14px;
  outline: none;
  box-shadow: var(--shadow-pill);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field__input::placeholder {
  color: var(--muted);
}

/* LTR fields (email / phone) keep readable LTR characters but anchor right */
.field__input--ltr {
  text-align: right;
}

.field__input:focus {
  border-color: var(--berry);
  box-shadow: 0 0 0 4px rgba(111, 1, 53, 0.08), var(--shadow-pill);
}

.form__error {
  margin: 2px 0 0;
  color: #c0143c;
  font-size: 13px;
  font-weight: 600;
}

/* ===== Submit button (berry bar, arrow on the left of the text) ===== */
.submit {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  background: var(--berry);
  border-radius: var(--radius-field);
  padding: clamp(10px, 1.5vh, 13px) 24px;
  box-shadow: 0 14px 30px rgba(74, 1, 36, 0.24);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.submit:hover {
  background: var(--berry-dark);
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(74, 1, 36, 0.3);
}

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

.submit:disabled {
  cursor: default;
  opacity: 0.7;
  transform: none;
}

.submit__arrow {
  font-size: 18px;
  line-height: 1;
}

/* ===== Cross-fade form <-> success ===== */
.form,
.success {
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.form.is-hidden {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  position: absolute;
  inset: 0;
}

.success {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  text-align: center;
  margin: auto 0;
}

.success.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.success__title {
  font-weight: 700;
  font-size: 24px;
  color: var(--berry);
  margin: 0 0 8px;
}

.success__text {
  color: var(--slate);
  font-size: 16px;
  margin: 0 0 14px;
}

.success__note {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

/* ===== Mobile: allow natural scrolling, stack columns ===== */
@media (max-width: 820px) {
  .page {
    height: auto;
    min-height: 100vh;
    padding: 20px 16px;
    overflow: visible;
  }

  .card {
    padding: 26px 20px;
    max-height: none;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 22px;
    max-width: 400px;
  }

  .phone {
    height: 420px;
  }

  .wordmark {
    font-size: 42px;
  }
}
