/* Self-hosted so no investor's IP is sent to a font CDN, and so the page keeps
   its strict content-security policy. Variable font: one file covers 400-700. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 750;
  font-display: swap;
  src: url("/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 750;
  font-display: swap;
  src: url("/fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: #172c30;
  background: #f3efe5;
  --paper: #fffdf8;
  --canvas: #f3efe5;
  --ink: #172c30;
  --muted: #506164;
  --line: #b8c5c2;
  --line-strong: #6f8582;
  --accent: #0e5c57;
  --accent-hover: #084b47;
  --accent-dark: #173f3c;
  --focus: #005fcc;
  --error: #982f2f;
  --warm: #a94f35;
  --radius-control: 12px;
  --radius-card: 16px;
  --radius-shell: 20px;
  --shadow-shell: 0 24px 64px rgba(27, 48, 50, 0.12);
  --ease: cubic-bezier(0.2, 0, 0.38, 0.9);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(90deg, var(--accent-dark) 0 8px, transparent 8px),
    var(--canvas);
}

button,
input,
select {
  font: inherit;
}

button,
label,
select,
input[type="checkbox"],
input[type="radio"] {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.page-shell {
  width: min(calc(100% - 40px), 960px);
  margin-inline: auto;
  padding-block: 48px 72px;
}

#app {
  overflow: hidden;
  border: 1px solid #d4d9d2;
  border-radius: var(--radius-shell);
  background: var(--paper);
  box-shadow: var(--shadow-shell);
}

.page-header,
.form-section,
.form-actions,
.success-panel,
.privacy-footer {
  padding-inline: clamp(24px, 6vw, 64px);
}

.page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: start;
  padding-block: clamp(40px, 7vw, 72px) 48px;
  border-bottom: 1px solid var(--line);
}

.header-copy {
  max-width: 680px;
}

.organizer-name,
.step-label {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

h2,
.legend-title {
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.intro {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.7;
}

.currency-panel {
  min-width: 144px;
  padding: 16px 18px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-control);
  background: var(--ink);
  color: #ffffff;
}

.currency-panel span,
.currency-panel strong {
  display: block;
}

.currency-panel span {
  margin-bottom: 6px;
  font-size: 0.75rem;
}

.currency-panel strong {
  font-size: 1.45rem;
  letter-spacing: 0.03em;
}

.status-panel {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  min-height: 180px;
  padding: 32px;
  border: 1px solid #d4d9d2;
  border-radius: var(--radius-shell);
  background: var(--paper);
  box-shadow: var(--shadow-shell);
}

.status-title {
  margin-bottom: 5px;
  font-weight: 700;
}

.status-copy {
  margin-bottom: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.loading-mark {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

form {
  background: var(--paper);
}

.form-section {
  margin: 0;
  padding-block: 48px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.section-header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  width: 100%;
  margin-bottom: 32px;
  padding: 0;
}

.section-header h2,
.section-header p,
.legend-title,
.legend-copy {
  margin: 0;
}

.section-header p,
.legend-copy {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.section-number {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.compact-header {
  margin-bottom: 20px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 20px;
  padding-inline-start: 64px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field label {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 650;
}

.optional {
  margin-inline-start: auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select {
  width: 100%;
  min-height: 52px;
  appearance: none;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: #ffffff;
  color: var(--ink);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), background-color 160ms var(--ease);
}

select {
  padding-inline-end: 52px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1L7 7L13 1' stroke='%23172c30' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
}

:dir(rtl) select {
  background-position: left 18px center;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

input:hover,
select:hover {
  border-color: var(--ink);
}

input:focus-visible,
select:focus-visible,
button:focus-visible,
.startup-selector:has(input:focus-visible),
.mode-option:has(input:focus-visible),
.consent-control:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

input:focus,
select:focus,
button:focus {
  outline: none;
}

input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 1px var(--error);
}

.field-error {
  display: block;
  min-height: 20px;
  margin-top: 6px;
  color: var(--error);
  font-size: 0.82rem;
  line-height: 1.4;
}

.error-summary {
  margin: 32px clamp(24px, 6vw, 64px) 0;
  padding: 18px 20px;
  border: 2px solid var(--error);
  border-radius: var(--radius-control);
  background: #ffffff;
  color: var(--ink);
}

.error-summary strong {
  display: block;
  margin-bottom: 4px;
}

.error-summary p {
  margin: 0;
  color: var(--error);
}

.startup-section {
  min-inline-size: 0;
}

.selection-status {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 20px 64px;
  color: var(--muted);
  font-size: 0.86rem;
}

.selection-status strong {
  color: var(--ink);
}

.startup-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  padding-inline-start: 64px;
}

.startup-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #ffffff;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}

.startup-card:hover {
  border-color: var(--line-strong);
}

.startup-card.is-selected {
  border-color: var(--accent-dark);
  box-shadow: 0 0 0 1px var(--accent-dark);
}

.startup-selector {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  min-height: 88px;
  align-items: center;
  padding: 14px 16px 14px 10px;
  cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}

.startup-card.is-selected .startup-selector {
  background: var(--accent-dark);
  color: #ffffff;
}

.startup-selector input,
.consent-control input {
  width: 22px;
  height: 22px;
  margin: 0 auto;
  accent-color: var(--accent);
}

.startup-card.is-selected .startup-selector input {
  accent-color: #ffffff;
}

.startup-name,
.startup-source {
  display: block;
}

.startup-name {
  font-weight: 700;
  line-height: 1.35;
}

.startup-source {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.8rem;
}

.startup-card.is-selected .startup-source {
  color: #d9e5e2;
}

.interest-details {
  padding: 18px;
  border-top: 1px solid var(--line);
}

.amount-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.amount-modes legend {
  width: 100%;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 650;
}

.mode-option {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.mode-option:has(input:checked) {
  border-color: var(--accent-dark);
  background: var(--ink);
  color: #ffffff;
}

.mode-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.amount-panel {
  display: grid;
  gap: 14px;
}

.amount-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.82rem;
  font-weight: 650;
}

.amount-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: #ffffff;
}

.amount-input:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.amount-input input {
  min-width: 0;
  border: 0;
  box-shadow: none;
}

.amount-input input:focus-visible {
  outline: 0;
}

.amount-input span {
  padding-inline: 8px 14px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.range-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.follow-up-control {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-height: 44px;
  padding-top: 4px;
  cursor: pointer;
  font-size: 0.84rem;
  line-height: 1.45;
}

.follow-up-control input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.range-follow-up {
  margin: 0;
  padding-inline-start: 12px;
  border-inline-start: 3px solid var(--warm);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.card-error {
  min-height: 0;
  margin-bottom: 0;
}

.startup-error {
  margin-inline-start: 64px;
}

.consent-section {
  background: #faf8f1;
}

.consent-control {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-inline-start: 64px;
  cursor: pointer;
  color: var(--ink);
  line-height: 1.6;
}

.consent-control input {
  margin-top: 2px;
}

#consent-error {
  margin-inline-start: 120px;
}

.form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding-block: 32px;
  background: var(--ink);
  color: #ffffff;
}

.form-actions p {
  margin-bottom: 0;
}

.form-actions > div > p:last-child {
  margin-top: 5px;
  color: #d5dfdd;
  font-size: 0.86rem;
}

.action-title {
  font-weight: 700;
}

.primary-button,
.secondary-button {
  min-height: 52px;
  padding: 13px 22px;
  border-radius: var(--radius-control);
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease), opacity 160ms var(--ease);
}

.primary-button {
  border: 1px solid #ffffff;
  background: #ffffff;
  color: var(--ink);
}

.primary-button:hover:not(:disabled) {
  background: #e7eeec;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.secondary-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.secondary-button:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.success-panel {
  padding-block: 64px;
  background: var(--paper);
}

.success-panel h2 {
  max-width: 620px;
  margin-bottom: 16px;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.success-panel > p:not(.step-label) {
  max-width: 650px;
  color: var(--muted);
  line-height: 1.65;
}

.reference-line {
  margin-top: 28px;
  color: var(--ink) !important;
}

.reference-line strong {
  display: inline-block;
  margin-inline-start: 8px;
  padding: 7px 10px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.non-binding-note {
  font-size: 0.88rem;
}

.privacy-footer {
  padding-block: 20px;
  border-top: 1px solid var(--line);
  background: #faf8f1;
}

.privacy-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.bot-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 720px) {
  body {
    background: var(--canvas);
  }

  .page-shell {
    width: min(calc(100% - 24px), 960px);
    padding-block: 20px 40px;
  }

  .page-header {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .currency-panel {
    width: fit-content;
  }

  .field-grid,
  .startup-list {
    grid-template-columns: 1fr;
    padding-inline-start: 0;
  }

  .field-wide {
    grid-column: auto;
  }

  .selection-status,
  .startup-error,
  .consent-control,
  #consent-error {
    margin-inline-start: 0;
  }

  .form-actions {
    grid-template-columns: 1fr;
  }

  .primary-button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .page-shell {
    width: 100%;
    padding: 0;
  }

  #app,
  .status-panel {
    border-inline: 0;
    border-radius: 0;
  }

  .page-header,
  .form-section,
  .form-actions,
  .success-panel,
  .privacy-footer {
    padding-inline: 20px;
  }

  .page-header {
    padding-block-start: 36px;
  }

  .section-header {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
  }

  .section-number {
    width: 36px;
    height: 36px;
  }

  .amount-modes,
  .range-fields {
    grid-template-columns: 1fr;
  }

  .error-summary {
    margin-inline: 20px;
  }
}

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

@media (forced-colors: active) {
  .startup-card.is-selected,
  .mode-option:has(input:checked),
  .form-actions,
  .currency-panel {
    border: 2px solid CanvasText;
  }

  .range-follow-up {
    border-inline-start-color: Highlight;
  }
}

/* Review dashboard. Shares the form's tokens; adds table presentation only. */
.review-page .page-shell {
  width: min(calc(100% - 40px), 1200px);
}

.review-page .form-section {
  padding: 32px clamp(20px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--paper);
  margin-bottom: 20px;
}

.table-wrap {
  overflow-x: auto;
}

.review-page table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.review-page th,
.review-page td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.review-page th {
  position: sticky;
  top: 0;
  background: var(--paper);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.review-page td span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}

.review-page td.num,
.review-page th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.review-page tr.flagged {
  background: #fff6e0;
}

.review-page tr.flagged td:nth-child(6) {
  font-weight: 700;
}

.review-page td.contacts {
  min-width: 260px;
  line-height: 1.6;
}

.review-page em {
  color: var(--warm);
  font-style: normal;
  font-size: 0.82rem;
}

.review-page .secondary-button {
  display: inline-block;
}
