:root {
  --forest: #0A1A10;
  --sage: #9AC168;
  --sage-dark: #58773A;
  --cream: #EEF2E8;
  --ink: #13271A;
  --muted: #617064;
  --line: rgba(19,39,26,.24);
  --ease-out: cubic-bezier(.22,1,.36,1);
  --sans: 'Barlow', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--forest); }
body { margin: 0; min-width: 320px; min-height: 100vh; overflow-x: hidden; color: var(--ink); background: var(--cream); font-family: var(--sans); line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; }

.skip-link { position: fixed; top: 14px; left: 50%; z-index: 20; padding: 10px 16px; border-radius: 999px; color: var(--forest); background: var(--sage); font-weight: 600; text-decoration: none; transform: translate(-50%,-180%); transition: transform 180ms var(--ease-out); }
.skip-link:focus { transform: translate(-50%,0); }

.register-layout { min-height: 100svh; display: grid; grid-template-columns: minmax(420px,49%) minmax(0,51%); background: var(--cream); }
.register-visual { position: sticky; top: 0; min-height: 100svh; overflow: hidden; isolation: isolate; background: var(--forest) url('../images/register/register-bg.webp') center / cover no-repeat; }
.register-visual::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,rgba(8,24,15,.48),rgba(8,24,15,.22)),linear-gradient(180deg,rgba(8,24,15,.3),rgba(8,24,15,.68)); }
.register-visual::after { content: ''; position: absolute; inset: 0; z-index: -1; box-shadow: inset -1px 0 rgba(10,26,16,.22); pointer-events: none; }

.brand-link { position: absolute; top: clamp(24px,3.5vw,52px); left: clamp(24px,5vw,76px); display: inline-flex; width: clamp(112px,8.5vw,146px); min-height: 48px; align-items: center; border-radius: 8px; transition: opacity 180ms ease,transform 240ms var(--ease-out); }
.brand-link:hover { opacity: .82; transform: translateY(-2px); }
.brand-link:active { transform: scale(.98); }
.brand-link:focus-visible { outline: 3px solid var(--sage); outline-offset: 6px; }
.brand-link img { display: block; width: 100%; height: auto; }

.visual-copy { position: absolute; top: 49%; left: clamp(72px,7.4vw,142px); width: min(650px,calc(100% - clamp(130px,15vw,220px))); color: #fff; transform: translateY(-50%); animation: reveal-copy 900ms var(--ease-out) both; }
.visual-copy h2 { max-width: 15.5ch; margin: 0; font-size: clamp(48px,3.2vw,62px); font-weight: 700; line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; }
.visual-copy p { max-width: 42ch; margin: 0; color: rgba(255,255,255,.7); font-size: clamp(15px,1vw,17px); line-height: 1.5; text-wrap: pretty; }
@keyframes reveal-copy { from { opacity: 0; transform: translateY(-46%); } to { opacity: 1; transform: translateY(-50%); } }

.register-panel { min-width: 0; min-height: 100svh; display: grid; align-items: center; padding: clamp(46px,5vw,76px) clamp(34px,5.5vw,88px); background: var(--cream); }
.form-shell { width: min(100%,820px); margin: auto; }
.form-intro { margin-bottom: 22px; }
h1 { margin: 0; color: var(--ink); font-size: clamp(32px,2.4vw,42px); font-weight: 700; line-height: 1; letter-spacing: -.03em; text-wrap: balance; }

.form-status { min-height: 180px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 15px; }
.form-status[hidden] { display: none; }
.status-mark { width: 18px; height: 18px; border: 2px solid rgba(88,119,58,.24); border-top-color: var(--sage-dark); border-radius: 50%; animation: form-spin 800ms linear infinite; }
@keyframes form-spin { to { transform: rotate(360deg); } }

.hubspot-form { min-height: 560px; opacity: 0; transform: translateY(10px); }
.hubspot-form.is-ready { opacity: 1; transform: none; transition: opacity 450ms var(--ease-out),transform 600ms var(--ease-out); }
.hubspot-form > iframe { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; opacity: 0 !important; pointer-events: none !important; }
.form-fallback { padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }
.form-fallback a,.form-status a { color: var(--sage-dark); font-weight: 600; }

/* HubSpot raw form: css/cssRequired in the embed keeps the fields styleable here. */
.hubspot-form .hs-form { width: 100%; margin: 0; color: var(--ink); font-family: var(--sans) !important; }
.hubspot-form fieldset { max-width: none !important; margin: 0 0 14px !important; padding: 0 !important; border: 0; }
.hubspot-form fieldset:first-child:has(input[type='hidden']) { display: none; }
.hubspot-form .form-columns-2 { display: flex; gap: 12px; }
.hubspot-form .form-columns-2 .hs-form-field { width: 50% !important; float: none !important; }
.hubspot-form .form-columns-1 .hs-form-field { width: 100% !important; }
.hubspot-form .hs-form-field { min-width: 0; margin: 0 !important; padding: 0 !important; }
.hubspot-form .hs-form-field .input { margin: 0 !important; }
.hubspot-form .hs-form-field > label { display: block; margin: 0 0 7px; color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1.3; }
.hubspot-form .hs-form-required { color: #B84935; }
.hubspot-form .hs-input:not([type='checkbox']):not([type='radio']):not([type='hidden']) { display: block; width: 100% !important; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: rgba(255,255,255,.14); font: 400 16px/1.4 var(--sans); box-shadow: none; transition: border-color 180ms ease,box-shadow 180ms ease,background-color 180ms ease; }
.hubspot-form select.hs-input { appearance: auto; }
.hubspot-form textarea.hs-input { min-height: 100px !important; resize: vertical; }
.hubspot-form .hs-input:not([type='checkbox']):not([type='radio']):focus { border-color: var(--sage-dark); outline: 0; background: rgba(255,255,255,.42); box-shadow: 0 0 0 3px rgba(154,193,104,.2); }
.hubspot-form .inputs-list { margin: 5px 0 0 !important; padding: 0 !important; list-style: none; }
.hubspot-form .hs_servicio_o_programa_de_interes .inputs-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 20px; }
.hubspot-form .hs_sos_productor_a_agropecuario_a_ .inputs-list { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.hubspot-form .inputs-list li { margin: 0 !important; }
.hubspot-form .inputs-list label { display: flex; align-items: flex-start; gap: 8px; min-height: 22px; margin: 0; color: var(--ink); font-size: 14px; line-height: 1.4; cursor: pointer; }
.hubspot-form input[type='checkbox'],.hubspot-form input[type='radio'] { flex: 0 0 auto; width: 18px !important; height: 18px; margin: 0 !important; accent-color: var(--sage-dark); }
.hubspot-form .hs-error-msgs { margin: 5px 0 0 !important; padding: 0 !important; list-style: none; color: #9A3D2E; font-size: 13px; }
.hubspot-form .hs-error-msgs label { color: inherit; }
.hubspot-form .hs-submit { margin-top: 14px; }
.hubspot-form .actions { margin: 0 !important; padding: 0 !important; }
.hubspot-form .hs-button { min-height: 44px; padding: 11px 22px; border: 1px solid var(--sage); border-radius: 999px; color: var(--forest); background: var(--sage); font: 600 14px/1 var(--sans); letter-spacing: .02em; cursor: pointer; box-shadow: 0 10px 26px rgba(88,119,58,.16); transition: color 180ms ease,background-color 180ms ease,box-shadow 180ms ease,transform 180ms var(--ease-out); }
.hubspot-form .hs-button:hover { color: #fff; background: var(--forest); box-shadow: 0 14px 32px rgba(10,26,16,.22); transform: translateY(-2px); }
.hubspot-form .hs-button:active { transform: scale(.98); }
.hubspot-form .hs-button:focus-visible { outline: 3px solid rgba(88,119,58,.42); outline-offset: 4px; }
.hubspot-form .legal-consent-container { color: var(--muted); font-size: 12px; }

@media (max-width: 1180px) {
  .register-layout { grid-template-columns: minmax(360px,42%) minmax(0,58%); }
  .visual-copy { top: 50%; left: clamp(40px,8vw,92px); width: min(390px,calc(100% - 80px)); transform: translateY(-46%); animation-name: reveal-copy-tablet; }
  @keyframes reveal-copy-tablet { from { opacity: 0; transform: translateY(-42%); } to { opacity: 1; transform: translateY(-46%); } }
  .visual-copy h2 { font-size: clamp(36px,4vw,48px); }
  .register-panel { padding-inline: clamp(30px,4vw,58px); }
}

@media (max-width: 760px) {
  .register-layout { display: block; }
  .register-visual { position: relative; min-height: clamp(360px,55svh,500px); background-position: center 42%; }
  .register-visual::after { box-shadow: inset 0 -1px rgba(10,26,16,.18); }
  .brand-link { top: 20px; left: 22px; width: 112px; }
  .visual-copy { top: auto; right: 24px; bottom: 34px; left: 24px; width: auto; transform: none; animation-name: reveal-copy-mobile; }
  .visual-copy h2 { max-width: 16ch; font-size: clamp(36px,10vw,48px); }
  @keyframes reveal-copy-mobile { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  .register-panel { min-height: 0; padding: 48px 24px max(68px,env(safe-area-inset-bottom)); }
  .form-shell { margin: 0 auto; }
  .form-intro { margin-bottom: 28px; }
  h1 { font-size: 36px; }
}

@media (max-width: 560px) {
  .hubspot-form .form-columns-2 { display: block; }
  .hubspot-form .form-columns-2 .hs-form-field { width: 100% !important; margin-bottom: 14px !important; }
  .hubspot-form .form-columns-2 .hs-form-field:last-child { margin-bottom: 0 !important; }
  .hubspot-form .hs_servicio_o_programa_de_interes .inputs-list { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .register-visual { min-height: 340px; }
  .visual-copy h2 { font-size: 34px; }
  .register-panel { padding-inline: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hubspot-form,.visual-copy { transform: none; }
}