/*
 * Plan-Sell-Go static landing page.
 *
 * SOURCE OF TRUTH: the --psg-* custom properties below are copied verbatim from
 * client/src/styles/_themes.scss. This page is a standalone static site and cannot
 * @use the Angular application's SCSS, so the tokens are duplicated deliberately.
 *
 * Do not retune a value here. Change it in _themes.scss and re-copy, or the two
 * surfaces drift. iac/tests/test_landing_site.py fails the build when they differ.
 *
 * Colors are NOT taken from Mockups/plan-sell-go-landing.html; that file is an older
 * palette generation whose muted text fails AA.
 */

/*
 * A Latin subset of the variable Inter, as WOFF2. The full TTF the application ships is
 * nine times the size and was the largest thing on the page; the subset command is in
 * landing/README.md.
 */
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --psg-color-primary: #175f43;
  --psg-color-primary-hover: #103d2d;
  --psg-color-primary-soft: #dfece1;
  --psg-color-secondary: #175f43;
  --psg-color-secondary-hover: #103d2d;
  --psg-color-secondary-soft: #dfece1;
  --psg-color-accent: #d9654d;
  --psg-color-accent-strong: #a8462f;
  --psg-color-accent-soft: #fae1d8;
  --psg-color-accent-warm: #c99017;
  --psg-color-accent-warm-soft: #f7ebc7;
  --psg-color-background: #f4f1e8;
  --psg-color-surface: #fffdf8;
  --psg-color-surface-strong: #ffffff;
  --psg-color-surface-muted: #dfece1;
  --psg-color-nav: #123e2e;
  --psg-color-text: #17221c;
  --psg-color-text-muted: #636b64;
  --psg-color-text-on-primary: #ffffff;
  --psg-color-border: #ded9cc;
  --psg-color-focus: #175f43;
  --psg-color-success: #175f43;
  --psg-color-warning: #7a5a08;
  --psg-color-danger: #a94332;
  --psg-color-danger-soft: #fbeeeb;
  --psg-color-danger-border: #eec8c0;
  --psg-color-info: #103d2d;
  --psg-font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --psg-font-family-display: Georgia, 'Times New Roman', serif;
  --psg-radius-sm: 0.5rem;
  --psg-radius-md: 0.75rem;
  --psg-radius-lg: 1rem;
  --psg-radius-xl: 1.375rem;
  --psg-radius-pill: 999px;
  --psg-shadow-sm: 0 1px 2px rgb(45 52 43 / 8%);
  --psg-shadow-md: 0 12px 32px rgb(45 52 43 / 12%);
  --psg-shadow-lg: 0 24px 60px rgb(45 52 43 / 15%);
  --psg-content-width: 72rem;
  --psg-control-height: 3rem;
  --psg-space-page: clamp(1rem, 4vw, 3rem);
  --psg-transition: 160ms ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --psg-color-primary: #82d5a8;
    --psg-color-primary-hover: #a4e3c0;
    --psg-color-primary-soft: #25392b;
    --psg-color-secondary: #82d5a8;
    --psg-color-secondary-hover: #a4e3c0;
    --psg-color-secondary-soft: #25392b;
    --psg-color-accent: #ff9d88;
    --psg-color-accent-strong: #ff9d88;
    --psg-color-accent-soft: #482e29;
    --psg-color-accent-warm: #efc45d;
    --psg-color-accent-warm-soft: #3d3522;
    --psg-color-background: #101713;
    --psg-color-surface: #19221b;
    --psg-color-surface-strong: #202b22;
    --psg-color-surface-muted: #25392b;
    --psg-color-nav: #0b281d;
    --psg-color-text: #eef5ef;
    --psg-color-text-muted: #b5beb7;
    --psg-color-text-on-primary: #102117;
    --psg-color-border: #38443a;
    --psg-color-focus: #82d5a8;
    --psg-color-success: #82d5a8;
    --psg-color-warning: #efc45d;
    --psg-color-danger: #ffab9d;
    --psg-color-danger-soft: #2e1d1a;
    --psg-color-danger-border: #5c352e;
    --psg-color-info: #a4e3c0;
    --psg-shadow-sm: 0 1px 2px rgb(0 0 0 / 30%);
    --psg-shadow-md: 0 12px 32px rgb(0 0 0 / 40%);
    --psg-shadow-lg: 0 24px 60px rgb(0 0 0 / 45%);
  }
}

/* ---------------------------------------------------------------------------
 * Base
 * ------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--psg-color-background);
  color: var(--psg-color-text);
  font-family: var(--psg-font-family);
  font-size: 1rem;
  line-height: 1.6;
  /* Keeps the hero's decorative sun and orbit from widening the page. */
  overflow-x: clip;
}

h1,
h2,
h3 {
  font-family: var(--psg-font-family-display);
  font-weight: 400;
  color: var(--psg-color-text);
  text-wrap: pretty;
}

h1,
h2 {
  margin: 0;
}

h1 {
  max-width: 50rem;
  font-size: clamp(2.75rem, 6vw, 4.875rem);
  letter-spacing: -0.05em;
  line-height: 0.98;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
}

h3 {
  margin: 1.125rem 0 0.5rem;
  font-size: 1.0625rem;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--psg-color-primary);
}

a:hover {
  color: var(--psg-color-primary-hover);
}

img {
  max-width: 100%;
  height: auto;
}

:focus-visible {
  outline: 3px solid var(--psg-color-focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--psg-color-surface-strong);
  border-radius: var(--psg-radius-sm);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.hero,
.steps,
.lead,
.site-footer__inner {
  width: min(var(--psg-content-width), 100%);
  margin-inline: auto;
}

/* ---------------------------------------------------------------------------
 * Controls -- the Angular app gets these from Bootstrap rebound to tokens.
 * This page has no Bootstrap, so the same contract is written out directly.
 * ------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--psg-control-height);
  padding: 0.7rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--psg-radius-pill);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--psg-transition),
    border-color var(--psg-transition),
    color var(--psg-transition),
    box-shadow var(--psg-transition),
    transform var(--psg-transition);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--psg-color-primary);
  border-color: var(--psg-color-primary);
  color: var(--psg-color-text-on-primary);
}

.btn-primary:hover {
  background: var(--psg-color-primary-hover);
  border-color: var(--psg-color-primary-hover);
  color: var(--psg-color-text-on-primary);
}

.btn[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

.form-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.form-hint {
  margin: 0 0 0.375rem;
  font-size: 0.8125rem;
  color: var(--psg-color-text-muted);
}

.required-indicator {
  color: var(--psg-color-danger);
}

.form-control {
  display: block;
  width: 100%;
  min-height: var(--psg-control-height);
  padding: 0.6rem 0.85rem;
  background: var(--psg-color-surface);
  color: var(--psg-color-text);
  border: 1px solid var(--psg-color-border);
  border-radius: var(--psg-radius-sm);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
}

textarea.form-control {
  min-height: 6rem;
  resize: vertical;
}

.form-control::placeholder {
  color: color-mix(in srgb, var(--psg-color-text-muted) 72%, transparent);
}

.form-control:focus {
  outline: none;
  border-color: var(--psg-color-focus);
  box-shadow: 0 0 0 0.2rem var(--bs-focus-ring-color, rgb(23 95 67 / 30%));
}

.form-control.is-invalid {
  border-color: var(--psg-color-danger);
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}

.form-check__input {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  /* Nudged to sit on the first line of the label rather than its centre. */
  margin: 0.2rem 0 0;
  accent-color: var(--psg-color-primary);
}

.form-check__label {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--psg-color-text-muted);
}

.invalid-feedback {
  margin: 0.375rem 0 0;
  font-size: 0.875rem;
  color: var(--psg-color-danger);
}

.alert {
  padding: 0.85rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--psg-radius-sm);
}

.alert-danger {
  background: var(--psg-color-danger-soft);
  border-color: var(--psg-color-danger-border);
  color: var(--psg-color-danger);
}

.psg-card {
  background: var(--psg-color-surface-strong);
  border: 1px solid var(--psg-color-border);
  border-radius: var(--psg-radius-xl);
  box-shadow: var(--psg-shadow-md);
}

.psg-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--psg-color-text-muted);
}

.psg-status::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--psg-color-success);
}

.psg-progress {
  height: 0.5rem;
  background: var(--psg-color-surface-muted);
  border-radius: var(--psg-radius-pill);
  overflow: hidden;
}

.psg-progress > span {
  display: block;
  width: 68%;
  height: 100%;
  background: var(--psg-color-primary);
}

/* ---------------------------------------------------------------------------
 * Header
 * ------------------------------------------------------------------------- */

.site-header {
  width: min(var(--psg-content-width), 100%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4.5rem;
  padding-inline: var(--psg-space-page);
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--psg-color-text);
  font-weight: 500;
  text-decoration: none;
}

.site-header__mark {
  height: 1.5rem;
  width: auto;
}

/* ---------------------------------------------------------------------------
 * Hero
 * ------------------------------------------------------------------------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(21rem, 0.84fr);
  gap: clamp(2rem, 6vw, 4.375rem);
  align-items: center;
  min-height: min(48rem, calc(100dvh - 4.5rem));
  padding: clamp(3.5rem, 8vw, 6.5rem) var(--psg-space-page);
}

.hero__tagline,
.hero__trust,
.steps article p,
.seller-callout p,
.lead__intro {
  color: var(--psg-color-text-muted);
  line-height: 1.6;
}

.hero__tagline {
  max-width: 38rem;
  margin: 1.625rem 0 0;
  font-size: clamp(1.05rem, 2.5vw, 1.125rem);
}

.hero__trust {
  margin: 1.125rem 0 0;
  font-size: 0.8125rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero__preview {
  position: relative;
  padding: 1.625rem 1rem 1rem 1.625rem;
}

.hero__orbit {
  position: absolute;
  inset: -1rem -3.5rem -2.125rem -1.875rem;
  border: 1px dashed color-mix(in srgb, var(--psg-color-primary) 32%, transparent);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.hero__sun {
  position: absolute;
  top: -0.375rem;
  right: -1.125rem;
  width: 5.75rem;
  height: 5.75rem;
  background: var(--psg-color-accent-warm);
  border-radius: 50%;
  opacity: 0.74;
}

.drop-card {
  position: relative;
  padding: 1.375rem;
  box-shadow: var(--psg-shadow-lg);
  transform: rotate(1.2deg);
}

.drop-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.125rem;
  border-bottom: 1px solid var(--psg-color-border);
}

.drop-card__header p {
  margin: 0;
  font-weight: 500;
}

.drop-card__progress-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.125rem 0 0.5rem;
  font-size: 0.875rem;
}

.drop-card__progress-label span {
  color: var(--psg-color-text-muted);
}

.drop-card__path {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.drop-card__path li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
}

.drop-card__path li > span:last-child {
  margin-left: auto;
  color: var(--psg-color-text-muted);
}

.drop-card__check {
  color: var(--psg-color-success);
}

/* ---------------------------------------------------------------------------
 * How it works -- each step carries a product screenshot
 * ------------------------------------------------------------------------- */

.steps {
  padding: clamp(3rem, 7vw, 5rem) var(--psg-space-page);
}

.steps__grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}

.steps article {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--psg-color-border);
}

.steps article:first-child {
  padding-top: 0;
  border-top: 0;
}

.steps article p {
  margin: 0;
}

.step__shot {
  margin: 0;
  border: 1px solid var(--psg-color-border);
  border-radius: var(--psg-radius-lg);
  box-shadow: var(--psg-shadow-md);
  overflow: hidden;
  background: var(--psg-color-surface-strong);
}

.step__shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------------------------------------------------------------------------
 * Seller callout
 * ------------------------------------------------------------------------- */

.seller-callout {
  padding: clamp(3rem, 6vw, 4.5rem) var(--psg-space-page);
  background: color-mix(in srgb, var(--psg-color-surface) 70%, transparent);
  border-block: 1px solid var(--psg-color-border);
}

.seller-callout__inner {
  width: min(var(--psg-content-width), 100%);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.seller-callout p {
  margin: 0;
}

/* ---------------------------------------------------------------------------
 * Lead form
 * ------------------------------------------------------------------------- */

.lead {
  padding: clamp(3rem, 7vw, 5rem) var(--psg-space-page);
}

.lead__intro {
  max-width: 42rem;
  margin: 1rem 0 0;
}

.lead__card {
  margin-top: clamp(2rem, 4vw, 2.5rem);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.lead__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.lead__field--wide {
  grid-column: 1 / -1;
}

.lead__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.75rem;
}

.lead__privacy {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--psg-color-text-muted);
}

/* The honeypot must be reachable by nothing: not sighted users, not screen
   readers, not the keyboard. visually-hidden would still be announced. */
.lead__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.lead__error {
  margin-bottom: 1.25rem;
}

.lead__success {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
}

.lead__success h3 {
  margin-top: 0;
  font-size: 1.5rem;
}

.lead__success p {
  margin-bottom: 0;
  color: var(--psg-color-text-muted);
}

[hidden] {
  display: none !important;
}

/* ---------------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------------- */

.site-footer {
  padding: clamp(2.5rem, 5vw, 3.5rem) var(--psg-space-page);
  border-top: 1px solid var(--psg-color-border);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-footer__brand {
  color: var(--psg-color-text);
  font-weight: 500;
  text-decoration: none;
}

.site-footer p {
  margin: 0.375rem 0 0;
  color: var(--psg-color-text-muted);
  font-size: 0.875rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.site-footer__links a {
  font-size: 0.875rem;
}

.site-footer__copyright {
  width: min(var(--psg-content-width), 100%);
  margin: 2rem auto 0;
  font-size: 0.8125rem;
}

/* ---------------------------------------------------------------------------
 * Responsive -- breakpoints match the Angular landing page
 * ------------------------------------------------------------------------- */

@media (max-width: 48rem) {
  .hero,
  .steps article,
  .seller-callout__inner,
  .lead__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    min-height: 0;
  }

  /* The screenshot leads on narrow screens: the words are already above it. */
  .step__shot {
    order: 2;
  }
}

@media (max-width: 35rem) {
  .hero__actions {
    display: grid;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .hero__orbit {
    display: none;
  }

  .drop-card {
    transform: none;
  }

  .lead__actions {
    display: grid;
  }

  .lead__actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------------------
 * Prose pages (privacy)
 * ------------------------------------------------------------------------- */

.prose {
  width: min(46rem, 100%);
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4rem) var(--psg-space-page);
}

.prose h1 {
  font-size: clamp(2.25rem, 5vw, 3rem);
}

.prose h2 {
  margin-top: 2.5rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.prose p,
.prose li {
  color: var(--psg-color-text-muted);
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.375rem;
}

.prose__meta {
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

.prose code {
  padding: 0.1rem 0.35rem;
  background: var(--psg-color-surface-muted);
  border-radius: var(--psg-radius-sm);
  font-size: 0.9em;
}
