/* Flori Tech Brand Check. Tokens from the Flori Tech visual identity manual. */
:root {
  --navy: #1C1F3A;
  --deep-teal: #264C5A;
  --green: #4BD398;       /* Verde primário Flori Tech */
  --pink: #FB7082;        /* Rosa-Flori */
  --yellow: #F8F695;      /* Amarelo */
  --pool: #20C8C8;        /* Azul piscina */
  --space: #434343;       /* Cinza espacial: texto principal */
  --graphite: #5F5F5F;    /* Cinza grafite: texto secundário */
  --white: #FFFFFF;

  --bg: #F1F1EE;
  --card: #FFFFFF;
  --line: #E3E3DE;
  --soft: #F7F7F4;
  --green-ink: #1E7A55;   /* green dark enough for text on white */
  --pink-ink: #C23A4E;
  --pool-ink: #117A7A;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(28, 31, 58, .04), 0 8px 24px rgba(28, 31, 58, .06);
  --font: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--space);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}
h1, h2, h3 { margin: 0; font-weight: 500; color: var(--space); }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--graphite); }
.small { font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--pool); outline-offset: 2px; }

/* ------------------------------------------------ hero */
.hero {
  background: linear-gradient(180deg, var(--navy) 0%, var(--deep-teal) 100%);
  color: var(--white);
  padding: 28px 0 96px;
  overflow: hidden;
}
.hero-inner { position: relative; }
.brandbar { display: flex; align-items: center; gap: 16px; }
.brandbar { position: relative; z-index: 2; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 8px;
  font-size: 14px; font-weight: 600; letter-spacing: .04em;
  color: var(--navy); background: var(--white); border: 0; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18); transition: transform .1s, background .15s;
}
.lang-btn:hover { background: var(--yellow); }
.lang-btn .flag { height: 14px; width: auto; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); display: block; }
.lang-btn:active { transform: translateY(1px); }
.logo { height: 44px; width: auto; display: block; }
.product-tag {
  font-size: 13px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35);
}
.hero-copy { max-width: 600px; margin-top: 48px; position: relative; z-index: 1; }
.hero h1 { color: var(--white); font-size: clamp(30px, 5vw, 46px); font-weight: 400; line-height: 1.12; letter-spacing: -.01em; }
.hero p { margin-top: 14px; font-size: 18px; font-weight: 300; color: rgba(255,255,255,.85); }
.hero-inner { min-height: 330px; }
.machines { position: absolute; right: 16px; top: 24px; width: 400px; height: 320px; }
.machine {
  position: absolute; bottom: 0; height: auto;
  filter: drop-shadow(0 24px 22px rgba(0, 0, 0, .35));
  animation: float 6s ease-in-out infinite;
}
.m-wide { width: 180px; right: 36px; }
.m-slim { width: 116px; right: 226px; bottom: 16px; animation-delay: -3s; animation-duration: 5s; }
.dot { position: absolute; width: var(--s); height: var(--s); border-radius: 50%; background: var(--c); opacity: .9; animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-14px); } }
@media (max-width: 1000px) { .machines { transform: scale(.78); transform-origin: top right; } .hero-copy { max-width: 440px; } }
@media (max-width: 760px) { .machines { display: none; } .hero-inner { min-height: 0; } .hero-copy { margin-top: 32px; max-width: none; } }

/* ------------------------------------------------ cards and layout */
main { margin-top: -64px; position: relative; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px; min-width: 0;
}
.inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .inputs { grid-template-columns: 1fr; } }
.card-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.card-head h2 { font-size: 20px; }
.card-head p { font-size: 14px; }
.step {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 600; color: var(--navy);
}
.step-green { background: var(--green); }
.step-pink { background: var(--pink); }

.banner {
  background: var(--yellow); color: var(--navy); border-radius: var(--radius-sm);
  padding: 12px 16px; margin-bottom: 16px; font-size: 15px;
}
.banner.info { background: #E4F7F7; color: var(--space); border: 1px solid #BDE9E9; }

/* segmented control */
.seg { display: inline-flex; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-bottom: 14px; }
.seg-btn { border: 0; background: transparent; color: var(--graphite); padding: 6px 16px; border-radius: 999px; font-size: 14px; }
.seg-btn.is-on { background: var(--white); color: var(--space); font-weight: 500; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* fields */
.field { display: block; }
.field-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
input[type="url"], input[type="text"] {
  width: 100%; font: inherit; font-size: 15px; color: var(--space);
  background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 14px; transition: border-color .15s, background .15s;
}
input[type="url"]:focus, input[type="text"]:focus { outline: none; border-color: var(--pool); background: var(--white); }
input::placeholder { color: #9A9A96; }
.chip-row { min-height: 30px; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.chip.warn::before { background: var(--pink); }

/* dropzone */
.drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  text-align: center; min-height: 150px; padding: 20px;
  border: 2px dashed var(--line); border-radius: var(--radius-sm); background: var(--soft);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.is-over { border-color: var(--green); background: #EFFAF4; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-icon { color: var(--graphite); margin-bottom: 4px; }
.drop-text { font-size: 15px; }
.drop-hint { font-size: 13px; color: var(--graphite); }
.drop.has-file { border-style: solid; border-color: var(--green); background: #EFFAF4; }
.drop-thumb { max-height: 90px; max-width: 100%; border-radius: 8px; margin-bottom: 6px; box-shadow: var(--shadow); }

.notes-card { margin-top: 20px; display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.notes-card .field { flex: 1 1 360px; }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--green); color: var(--navy); border: 0; border-radius: 999px;
  padding: 14px 26px; font-weight: 500; font-size: 16px; transition: transform .1s, box-shadow .15s, background .15s;
}
.btn-primary:hover { background: #3EC48A; box-shadow: 0 6px 16px rgba(75, 211, 152, .35); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.btn-ghost {
  background: transparent; color: var(--space); border: 1px solid var(--line); border-radius: 999px;
  padding: 13px 22px; font-weight: 500;
}
.btn-ghost:hover { background: var(--white); }
@media (max-width: 520px) { .btn-primary, .notes-card .btn-primary { width: 100%; } }

.tip { margin-top: 14px; font-size: 14px; color: var(--graphite); }
.error {
  margin-top: 14px; background: #FFF0F2; color: var(--pink-ink); border: 1px solid #FBC7CF;
  border-radius: var(--radius-sm); padding: 12px 16px; font-size: 15px;
}

/* ------------------------------------------------ loading */
.loading { text-align: center; padding: 56px 24px; }
.spinner { width: 120px; height: 120px; animation: spin 1.6s linear infinite; }
.sp { fill: none; stroke-width: 14; stroke-dasharray: 60 229; stroke-linecap: round; }
.sp1 { stroke: var(--green); }
.sp2 { stroke: var(--pink); stroke-dashoffset: -72; }
.sp3 { stroke: var(--yellow); stroke-dashoffset: -144; }
.sp4 { stroke: var(--pool); stroke-dashoffset: -216; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-msg { font-size: 20px; margin: 18px 0 4px; min-height: 30px; transition: opacity .25s; }

/* ------------------------------------------------ result */
.score-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center;
}
.score-card .previews { max-width: 300px; }
@media (max-width: 980px) { .score-card { grid-template-columns: auto 1fr; } .score-card .previews { grid-column: 1 / -1; max-width: none; } }
@media (max-width: 760px) { .score-card { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.donut-wrap { position: relative; width: 220px; height: 220px; }
.donut { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-track { fill: none; stroke: var(--soft); stroke-width: 24; }
.donut-value {
  fill: none; stroke: var(--green); stroke-width: 24; stroke-linecap: round;
  stroke-dasharray: 0 503; transition: stroke-dasharray 1.4s cubic-bezier(.2,.8,.2,1), stroke .3s;
}
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-num { font-size: 56px; font-weight: 500; line-height: 1; color: var(--space); font-variant-numeric: tabular-nums; }
.donut-num small { font-size: 26px; font-weight: 400; margin-left: 2px; }
.donut-sub { font-size: 14px; color: var(--graphite); margin-top: 4px; }
.verdict {
  display: inline-block; font-weight: 600; font-size: 14px; letter-spacing: .02em;
  padding: 5px 14px; border-radius: 999px; background: var(--green); color: var(--navy);
}
.score-title { font-size: 26px; margin-top: 12px; line-height: 1.25; overflow-wrap: anywhere; }
.summary { margin-top: 8px; font-size: 17px; color: var(--graphite); }
.meta-row { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 760px) { .meta-row { justify-content: center; } }
.meta { font-size: 13px; padding: 4px 12px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); }

.previews { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 8px; }
.preview { flex: none; position: relative; }
.preview img { display: block; height: 150px; width: auto; max-width: 280px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); }
.preview span { position: absolute; left: 8px; top: 8px; font-size: 12px; font-weight: 500; background: var(--navy); color: var(--white); padding: 2px 8px; border-radius: 999px; }

.section-title { font-size: 20px; margin: 36px 0 14px; display: flex; align-items: center; gap: 10px; }
.count { font-size: 14px; font-weight: 500; background: var(--space); color: var(--white); border-radius: 999px; padding: 1px 10px; }
.card-title { font-size: 18px; margin-bottom: 4px; }

.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .cats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cats { grid-template-columns: 1fr; } }
.cat { display: flex; gap: 16px; align-items: flex-start; padding: 20px; }
.cat.na { opacity: .6; }
.ring { position: relative; flex: none; width: 64px; height: 64px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .t { fill: none; stroke: var(--soft); stroke-width: 7; }
.ring .v { fill: none; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 0 176; transition: stroke-dasharray 1.2s cubic-bezier(.2,.8,.2,1); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 16px; font-weight: 500; }
.cat h4 { margin: 2px 0 4px; font-size: 16px; font-weight: 500; }
.cat p { font-size: 14px; color: var(--graphite); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

.pal-label { font-size: 13px; font-weight: 500; margin: 16px 0 8px; display: flex; justify-content: space-between; gap: 8px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.sw { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 64px; text-align: center; }
.sw i { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(0,0,0,.08); display: block; }
.sw small { font-size: 11px; line-height: 1.2; color: var(--graphite); overflow-wrap: anywhere; }
.art-colors { display: flex; flex-direction: column; gap: 6px; }
.ac { display: grid; grid-template-columns: 28px 76px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.ac i { width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(0,0,0,.08); }
.ac .bar { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.ac .bar span { display: block; height: 100%; border-radius: 99px; }
.ac .tag { font-size: 12px; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.tag.ok { background: #E3F8EE; color: var(--green-ink); }
.tag.off { background: #FFF0F2; color: var(--pink-ink); }

.strengths { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 10px; }
.strengths li { display: flex; gap: 10px; font-size: 15px; }
.strengths li.none { color: var(--graphite); }
.strengths li.none::before { display: none; }
.strengths li::before {
  content: ""; flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C1F3A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.findings { display: flex; flex-direction: column; gap: 12px; }
.finding { padding: 20px; border-left: 6px solid var(--pool); }
.finding.critico { border-left-color: var(--pink); }
.finding.importante { border-left-color: #E9E55A; }
.finding-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.finding h4 { margin: 0; font-size: 17px; font-weight: 500; flex: 1 1 240px; overflow-wrap: anywhere; }
.sev { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.sev.critico { background: var(--pink); color: var(--navy); }
.sev.importante { background: var(--yellow); color: var(--navy); }
.sev.ajuste { background: #D6F4F4; color: var(--pool-ink); }
.pill { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); color: var(--graphite); }
.fgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .fgrid { grid-template-columns: 1fr; } }
.fgrid div { background: var(--soft); border-radius: 10px; padding: 12px; font-size: 14px; overflow-wrap: anywhere; }
.fgrid b { display: block; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--graphite); margin-bottom: 4px; }
.fgrid .fix { background: #EFFAF4; }
.empty { padding: 28px; text-align: center; font-size: 16px; }

.review { margin-top: 16px; }
.review summary { cursor: pointer; font-weight: 500; padding: 8px 0; }
.review .findings { margin-top: 8px; opacity: .85; }

.actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

.footer { display: flex; align-items: center; gap: 12px; padding-top: 48px; padding-bottom: 40px; font-size: 13px; color: var(--graphite); }
.footer-logo { height: 26px; width: auto; opacity: .8; }

#confetti { position: fixed; inset: 0; pointer-events: none; width: 100%; height: 100%; z-index: 10; }

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