/* Public form, from design/form230.figcraft (pages Public and Components). */
@font-face {
  font-family: "Inter";
  src: url("Inter.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: block;
}

:root {
  --primary: #0F766E;
  --accent: #F59E0B;
  --background: #F4F6F5;
  --text: #14201E;
  --surface: #FFFFFF;
  --border: #C9D1CF;
  --muted: #5B6B68;
  --primary-soft: color-mix(in srgb, var(--primary) 12%, white);
  --error: #B42318;
  --error-soft: #FDECEA;
  --success: #157F3D;
  --success-soft: #E7F6EC;
  --warning: #B45309;
  --warning-soft: #FEF4E2;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 400 16px/24px "Inter", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
p { margin: 0; }
h1 { margin: 0; }

.title { font-size: 28px; line-height: 36px; font-weight: 700; }
.heading { font-size: 19px; line-height: 26px; font-weight: 600; padding: 0; }
.label { display: block; font-size: 15px; line-height: 20px; font-weight: 600; }
.small { font-size: 14px; line-height: 20px; }
.muted { color: var(--muted); }

.site-header { background: var(--surface); }
.site-header__inner { display: flex; align-items: center; gap: 12px; padding: 14px 20px; max-width: 1280px; margin: 0 auto; }
.logo {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: var(--logo, var(--primary)); color: #fff; font-size: 15px; font-weight: 600;
}
.site-header__name { font-size: 15px; line-height: 20px; font-weight: 600; }

.page { flex: 1; width: 100%; padding: 24px 16px 8px; display: flex; flex-direction: column; gap: 16px; }
.intro { display: flex; flex-direction: column; gap: 8px; padding: 0 4px 8px; }
.steps { display: none; }

.banner {
  background: var(--primary-soft);
  border: 1px solid var(--primary);
  border-radius: 12px;
  padding: 12px 14px;
}
.banner__kicker { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--primary); }
.banner__name { font-size: 19px; line-height: 26px; font-weight: 600; }
.banner__purpose { font-size: 14px; line-height: 20px; }

.cards { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.card {
  background: var(--surface);
  border: 0; border-radius: 16px;
  padding: 20px;
  margin: 0; min-width: 0;
  display: flex; flex-direction: column; gap: 16px;
}
legend.heading { float: left; width: 100%; margin-bottom: 0; }
legend.heading + * { clear: both; }

.row { display: flex; flex-direction: column; gap: 16px; }
/* Mobile order from the design: CNP, Email, Telefon. */
.row--contact { display: contents; }
.field--cnp { order: 1; }
.field--email { order: 2; }
.field--telefon { order: 3; }
.address { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 12px; }
.field--strada { grid-column: span 12; }
.field--numar, .field--bloc { grid-column: span 6; }
.field--scara, .field--etaj, .field--ap { grid-column: span 4; }
.wide-only { display: none; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 15px; line-height: 20px; font-weight: 600; }
.field input, .field select {
  height: 48px; width: 100%;
  padding: 12px 14px;
  font: inherit; color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235B6B68' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}
.field input::placeholder { color: var(--muted); opacity: 1; }
.field input:focus, .field select:focus {
  outline: none;
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent);
}
.field [aria-invalid="true"] { border: 2px solid var(--error); }
.hint { font-size: 14px; line-height: 20px; color: var(--muted); }
.hint:empty, .error:empty { display: none; }
.error { font-size: 14px; line-height: 20px; color: var(--error); }

.radio-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px; border-radius: 12px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--border);
}
.radio-card > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.radio-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio-card__dot { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1.5px solid var(--border); background: var(--surface); }
.radio-card:has(input:checked) { border: 2px solid var(--primary); background: var(--primary-soft); }
.radio-card:has(input:checked) .radio-card__dot { border: 7px solid var(--primary); }
.radio-card:has(input:focus-visible) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }

.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input {
  appearance: none; flex: none; margin: 0;
  width: 24px; height: 24px; border-radius: 6px;
  border: 1.5px solid var(--border); background: var(--surface);
  display: grid; place-items: center;
}
.check input:checked { background: var(--primary); border-color: var(--primary); }
.check input:checked::after {
  content: ""; width: 12px; height: 9px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 9'%3E%3Cpath d='M1 4.5l3.5 3.5L11 1' fill='none' stroke='white' stroke-width='2.5'/%3E%3C/svg%3E") no-repeat center/contain;
}
.check input:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); outline: none; }
.check input[aria-invalid="true"] { border: 2px solid var(--error); }

.pad {
  position: relative; height: 140px;
  border: 1.5px dashed var(--border); border-radius: 12px; background: var(--surface);
  touch-action: none;
}
.pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.pad__line { position: absolute; left: 24px; right: 24px; bottom: 34px; border-top: 1px solid var(--border); pointer-events: none; }
.pad__placeholder { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; pointer-events: none; }
.pad.signed .pad__placeholder { display: none; }
.pad[aria-invalid="true"] { border-color: var(--error); }
.pad__row { display: flex; gap: 12px; align-items: center; justify-content: space-between; }

.link {
  background: none; border: 0; padding: 10px 0; min-height: 44px;
  font: inherit; font-weight: 600; font-size: 15px; color: var(--primary);
  text-decoration: underline; cursor: pointer;
}

.button {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 52px; padding: 14px 20px;
  border: 0; border-radius: 10px; cursor: pointer;
  background: var(--primary); color: #fff;
  font: inherit; font-weight: 600; text-decoration: none;
}
.button:disabled { opacity: .6; cursor: progress; }
.button:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 35%, transparent); outline-offset: 2px; }
.button--secondary { background: var(--surface); color: var(--primary); border: 1.5px solid var(--primary); }

.notice { border-radius: 12px; padding: 16px; background: var(--primary-soft); display: flex; flex-direction: column; gap: 6px; }
.notice__title { font-size: 15px; line-height: 20px; font-weight: 600; }
.notice__text { font-size: 14px; line-height: 20px; }
.notice--error { background: var(--error-soft); }
.notice--success { background: var(--success-soft); }
.notice__action { align-self: flex-start; text-align: left; padding: 4px 0; }
/* Mobile: right after the CNP, before Email (see .row--contact). */
.notice--returning { order: 1; }
.notice--error .notice__title { color: var(--error); }
.notice:focus { outline: none; }

.page--message { padding-top: 32px; }
.page--bare { padding-top: 64px; }
.message { gap: 12px; }
.icon {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; font-size: 28px; font-weight: 700;
}
.icon--success { background: var(--success-soft); color: var(--success); }
.icon--warning { background: var(--warning-soft); color: var(--warning); }
.icon--info { background: var(--primary-soft); color: var(--primary); }

.site-footer { padding: 24px 24px 32px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 20px; color: var(--muted); }

@media (min-width: 640px) {
  .row { flex-direction: row; }
  .row > .field { flex: 1; }
  .row--contact { display: flex; }
  .field--cnp, .field--email, .field--telefon, .notice--returning { order: 0; }
  .field--initiala { flex: 0 0 120px !important; }
  .narrow-only { display: none; }
  .wide-only { display: block; }
  .field--strada { grid-column: span 9; }
  .field--numar { grid-column: span 3; }
  .field--bloc, .field--scara, .field--etaj, .field--ap { grid-column: span 3; }
  .row--postal > .field { flex: 0 0 220px; }
  .row--radio > .radio-card { flex: 1; }
}

@media (min-width: 1024px) {
  .site-header__inner { padding: 14px 120px; }
  .page--form {
    display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 64px; align-items: start;
    padding: 48px 120px; max-width: 1280px; margin: 0 auto;
  }
  .intro { padding: 0; gap: 16px; }
  .steps { display: flex; flex-direction: column; gap: 10px; background: var(--primary-soft); border-radius: 16px; padding: 20px; }
  .steps ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
  .card { padding: 28px; }
  .page--message { align-items: center; padding: 80px 120px 16px; }
  .page--message .card { width: 560px; padding: 32px; }
  .site-footer { padding: 24px 120px 32px; max-width: 1280px; margin: 0 auto; width: 100%; }
}
