/* ============================================================
   CONNECT OCEAN — Formulário de diagnóstico (multi-step)
   Estilo herdado do modelo Millena, repintado com a
   identidade Connect Ocean: dark #0A0A0F + âmbar #38BDF8.
   ============================================================ */

:root{
    --bg:#0A0A0F;
    --bg-2:#12121A;
    --panel-border:rgba(255,255,255,.08);
    --text:#FAFAFA;
    --muted:rgba(250,250,250,.74);
    --accent:#38BDF8;
    --accent-2:#7DD3FC;
    --accent-fg:#0A0A0F;
    --input:rgba(255,255,255,.04);
    --input-border:rgba(255,255,255,.12);
    --invalid:#e07a7a;
    --shadow:0 24px 80px rgba(0,0,0,.5);
    --radius:.75rem;
}

*{box-sizing:border-box}
html,body{height:100%}
html{-webkit-text-size-adjust:100%}
body{
    margin:0;
    color:var(--text);
    font-family:"Inter", system-ui, sans-serif;
    background:
        repeating-linear-gradient(90deg, rgba(255,255,255,.022) 0 1px, transparent 1px 120px),
        linear-gradient(180deg, #12121A 0%, #0A0A0F 100%);
    overflow:hidden;
}

/* textura/brilho ambiente */
body::before{
    content:"";
    position:fixed;
    inset:0;
    background:
        radial-gradient(120% 80% at 50% -10%, rgba(56,189,248,.07), transparent 55%),
        linear-gradient(90deg, transparent 0%, rgba(255,255,255,.018) 52%, transparent 100%);
    pointer-events:none;
}

/* honeypot anti-spam */
.hp-field{
    position:absolute !important;
    left:-9999px !important;
    width:1px;height:1px;
    opacity:0;
    pointer-events:none;
}

/* progresso flutuante */
.progress-floating{
    position:fixed;
    top:24px;
    right:28px;
    z-index:4;
    width:138px;
    display:flex;
    flex-direction:column;
    gap:8px;
}
.progress-meta{
    display:flex;
    justify-content:flex-end;
    gap:2px;
    font-size:11px;
    color:rgba(250,250,250,.66);
    letter-spacing:.08em;
    font-family:"Space Grotesk", sans-serif;
}
.progress-track{
    height:4px;
    width:100%;
    border-radius:999px;
    background:rgba(255,255,255,.12);
    overflow:hidden;
}
.progress-fill{
    height:100%;
    width:11%;
    border-radius:999px;
    background:linear-gradient(90deg,var(--accent),var(--accent-2));
    box-shadow:0 0 16px rgba(56,189,248,.45);
    transition:width .45s ease;
}

.stage{
    min-height:100vh;
    display:grid;
    place-items:center;
    padding:28px;
    position:relative;
}

/* formas decorativas (cantos) */
.ambient{
    position:absolute;
    pointer-events:none;
    opacity:.16;
}
.ambient-left{
    width:300px;height:300px;
    left:-40px;top:-20px;
    border-top:2px solid rgba(56,189,248,.7);
    border-left:2px solid rgba(56,189,248,.7);
    border-radius:64px 0 0 0;
    -webkit-mask: radial-gradient(circle at top left, black 64%, transparent 65%);
    mask: radial-gradient(circle at top left, black 64%, transparent 65%);
}
.ambient-right{
    width:430px;height:430px;
    right:-90px;bottom:-40px;
    border-right:16px solid rgba(56,189,248,.7);
    border-left:16px solid transparent;
    border-top:16px solid transparent;
    transform:skew(-18deg);
    opacity:.10;
}

.form-shell{
    width:100%;
    display:flex;
    justify-content:center;
    align-items:center;
}

.form-panel{
    width:min(100%, 760px);
    min-height:560px;
    border:1px solid var(--panel-border);
    border-radius:var(--radius);
    background:linear-gradient(180deg, rgba(26,26,36,.62), rgba(10,10,15,.40));
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
    box-shadow:var(--shadow);
    position:relative;
    overflow:hidden;
}
.form-panel::before{
    content:"";
    position:absolute;
    inset:0;
    background:
        radial-gradient(circle at 20% 12%, rgba(56,189,248,.06), transparent 26%),
        linear-gradient(90deg, rgba(255,255,255,.012) 0%, transparent 30%, rgba(255,255,255,.012) 62%, transparent 100%);
    pointer-events:none;
}

/* etapas */
.step{
    position:absolute;
    inset:0;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    padding:56px 56px 46px;
    opacity:0;
    visibility:hidden;
    transform:translateY(18px);
    transition:opacity .35s ease, transform .35s ease, visibility .35s ease;
}
.step.active{
    opacity:1;
    visibility:visible;
    transform:translateY(0);
}

.logo-center-full{
    display:flex;
    justify-content:center;
    align-items:center;
    margin-bottom:26px;
}
.logo-main{ width:280px; max-width:80%; object-fit:contain; }
.logo-inline{ display:flex; justify-content:center; margin-bottom:24px; }
.logo-small{ width:170px; max-width:66%; object-fit:contain; opacity:.96; }

.hero-title,
.question-title{
    margin:0;
    color:var(--text);
    font-family:"Space Grotesk", system-ui, sans-serif;
    font-weight:600;
    letter-spacing:-.01em;
    text-wrap:balance;
}
.hero-title{ font-size:30px; line-height:1.3; max-width:520px; }
.question-title{ font-size:28px; line-height:1.3; max-width:560px; }
.question-title-submit{ font-size:33px; }

.hero-description{
    margin:15px auto 0;
    max-width:440px;
    font-size:15px;
    line-height:1.75;
    color:var(--muted);
    text-wrap:pretty;
}
.hero-description-submit{ max-width:480px; }

.mini-note,
.field-hint{
    margin-top:12px;
    font-size:13px;
    color:rgba(56,189,248,.92);
    font-family:"Space Grotesk", sans-serif;
    letter-spacing:.01em;
}
.field-hint{ color:rgba(250,250,250,.5); font-family:"Inter", sans-serif; }

.question-wrap{
    width:100%;
    max-width:580px;
    display:flex;
    flex-direction:column;
    align-items:center;
}

/* campos */
.field{
    width:min(100%, 520px);
    margin-top:22px;
    border:1px solid var(--input-border);
    background:var(--input);
    color:var(--text);
    border-radius:var(--radius);
    padding:18px 20px;
    font-size:16px;
    outline:none;
    transition:border-color .25s ease, box-shadow .25s ease, background .25s ease;
    font-family:"Inter", system-ui, sans-serif;
    -webkit-appearance:none;
    appearance:none;
}
.field::placeholder{ color:rgba(250,250,250,.38); }
.field:focus{
    border-color:rgba(56,189,248,.72);
    background:rgba(255,255,255,.055);
    box-shadow:0 0 0 4px rgba(56,189,248,.1);
}
.field-textarea{ min-height:150px; resize:vertical; line-height:1.6; }

/* subtítulo da etapa */
.step-sub{ margin:10px auto 0; max-width:440px; font-size:14.5px; line-height:1.6; color:var(--muted); }

/* múltiplos campos por etapa */
.form-fields{ width:min(100%,520px); margin-top:26px; display:flex; flex-direction:column; gap:16px; text-align:left; }
.form-fields .field{ margin-top:0; }
.field-group{ display:flex; flex-direction:column; }
.field-label{ font-size:13px; font-weight:500; color:rgba(250,250,250,.8); margin-bottom:7px; font-family:"Space Grotesk",sans-serif; letter-spacing:.01em; }
.field-label .opt{ color:rgba(56,189,248,.85); font-weight:400; }

/* anexo de fotos */
.attach{ display:flex; flex-direction:column; gap:10px; }
.attach-btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; cursor:pointer;
  border:1px dashed rgba(56,189,248,.5); background:rgba(56,189,248,.06); color:var(--accent);
  border-radius:var(--radius); padding:14px 18px; font:600 14px "Space Grotesk",sans-serif; transition:background .2s,border-color .2s; }
.attach-btn:hover{ background:rgba(56,189,248,.1); border-color:rgba(56,189,248,.75); }
.attach-list{ display:flex; flex-direction:column; gap:8px; }
.attach-item{ display:flex; align-items:center; justify-content:space-between; gap:10px;
  background:rgba(255,255,255,.04); border:1px solid var(--input-border); border-radius:8px; padding:9px 12px; font-size:13px; color:var(--text); }
.attach-item span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.attach-item button{ background:none; border:none; color:rgba(250,250,250,.5); cursor:pointer; font-size:18px; line-height:1; padding:0 4px; }
.attach-item button:hover{ color:var(--invalid); }
.attach-hint{ font-size:12px; color:rgba(250,250,250,.45); }

/* opções (radio) */
.options-grid{
    width:min(100%, 560px);
    margin-top:24px;
    display:grid;
    gap:12px;
}
.choice-card{ position:relative; display:flex; cursor:pointer; width:100%; }
.choice-card input{ position:absolute; opacity:0; pointer-events:none; }
.choice-card span{
    width:100%;
    border:1px solid var(--input-border);
    background:rgba(255,255,255,.035);
    border-radius:var(--radius);
    padding:17px 18px;
    font-size:15px;
    line-height:1.5;
    color:var(--text);
    text-align:left;
    transition:transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
}
.choice-card:hover span{
    transform:translateY(-1px);
    border-color:rgba(56,189,248,.5);
    background:rgba(255,255,255,.05);
}
.choice-card input:checked + span{
    border-color:rgba(56,189,248,.9);
    background:rgba(56,189,248,.13);
    box-shadow:0 0 0 4px rgba(56,189,248,.1);
}

/* ações / botões */
.actions{
    width:min(100%, 520px);
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin-top:26px;
}
.actions.center{ justify-content:center; }

.btn{
    appearance:none;
    border:none;
    cursor:pointer;
    padding:13px 24px;
    border-radius:var(--radius);
    font-family:"Space Grotesk", system-ui, sans-serif;
    font-size:14px;
    font-weight:600;
    letter-spacing:.01em;
    transition:transform .2s ease, opacity .2s ease, background .2s ease, border-color .2s ease;
    min-height:50px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    text-decoration:none;
}
.btn:hover{ transform:translateY(-1px); }
.btn:active{ transform:translateY(0); }
.btn-primary{
    background:linear-gradient(180deg, var(--accent-2), var(--accent));
    color:var(--accent-fg);
    min-width:170px;
    box-shadow:0 14px 34px rgba(56,189,248,.22);
}
.btn-secondary{
    background:transparent;
    color:var(--muted);
    border:1px solid rgba(255,255,255,.13);
}
.btn.is-loading{ opacity:.7; pointer-events:none; }
.btn.is-loading::after{
    content:"";
    width:16px;height:16px;
    border:2px solid rgba(10,10,15,.35);
    border-top-color:var(--accent-fg);
    border-radius:50%;
    animation:co-spin .7s linear infinite;
}
@keyframes co-spin{ to{ transform:rotate(360deg); } }

.is-invalid{
    border-color:var(--invalid) !important;
    box-shadow:0 0 0 4px rgba(224,122,122,.1) !important;
}

/* tela de sucesso */
.success-screen{
    position:absolute;
    inset:0;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    padding:56px;
    animation:co-fade .5s ease;
}
.success-screen[hidden]{ display:none; }
.success-check{
    width:72px;height:72px;
    display:grid;place-items:center;
    margin-bottom:8px;
    border-radius:50%;
    font-size:34px;
    color:var(--accent-fg);
    background:linear-gradient(180deg, var(--accent-2), var(--accent));
    box-shadow:0 0 0 8px rgba(56,189,248,.12), 0 14px 34px rgba(56,189,248,.25);
}
@keyframes co-fade{ from{ opacity:0; transform:translateY(12px); } to{ opacity:1; transform:translateY(0); } }

/* responsivo */
@media (max-width:1024px){ .form-panel{ min-height:540px; } }

@media (max-width:767px){
    body{ overflow:auto; }
    .progress-floating{ top:16px; right:16px; width:96px; gap:6px; }
    .progress-meta{ font-size:10px; }
    .stage{ padding:16px; align-items:stretch; }
    .form-shell{ align-items:stretch; }
    .form-panel{ min-height:calc(100dvh - 32px); width:100%; }
    .step,.success-screen{ padding:40px 20px 32px; justify-content:center; }
    .logo-main{ width:180px; max-width:74%; }
    .logo-small{ width:128px; }
    .hero-title{ font-size:24px; max-width:340px; }
    .question-title{ font-size:23px; line-height:1.3; max-width:340px; }
    .question-title-submit{ font-size:27px; }
    .hero-description{ font-size:14px; max-width:330px; line-height:1.7; }
    .field{ padding:16px; margin-top:22px; }
    .choice-card span{ font-size:14px; padding:15px 14px; }
    .field-hint,.mini-note{ font-size:12px; margin-top:12px; }
    .actions{ flex-direction:column-reverse; margin-top:28px; }
    .btn{ width:100%; }
    .ambient-left,.ambient-right{ display:none; }
}

@media (min-width:768px) and (max-width:1024px){
    .stage{ padding:24px; }
    .hero-title{ font-size:28px; }
    .question-title{ font-size:26px; }
    .logo-main{ width:240px; }
}

@media (prefers-reduced-motion: reduce){
    *{ animation:none !important; transition:none !important; }
}
