/*--------------------------------------------------------------
Domain Scanner
--------------------------------------------------------------*/

:root {
    --bg: #F5F6FA;
    --surface: #FFFFFF;
    --surface-soft: #F7F8FC;
    --ink: #1B1A2B;
    --text: #2B2C3B;
    --muted: #6B7080;
    --line: #E4E7EF;
    --line-strong: #CDD2DF;

    --accent: #7087FF;
    --accent-strong: #4F63F5;
    --accent-soft: #EEF0FF;

    --good: #14967F;
    --good-fill: #2FBFA5;
    --good-soft: #E5F7F3;
    --bad: #D92B4E;
    --bad-fill: #F53158;
    --bad-soft: #FDECEF;
    --warn: #A86400;
    --warn-fill: #F5A524;
    --warn-soft: #FFF4DE;
    --info: #4F63F5;
    --info-fill: #8C9DFF;
    --info-soft: #EEF0FF;

    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 1px 2px rgba(22, 24, 48, 0.04), 0 8px 24px rgba(22, 24, 48, 0.06);
    --shadow-lift: 0 2px 4px rgba(22, 24, 48, 0.05), 0 16px 40px rgba(40, 54, 140, 0.12);

    --font: proxima-nova, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/*--------------------------------------------------------------
Base
--------------------------------------------------------------*/

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg) linear-gradient(180deg, #ECEEFF 0, var(--bg) 460px) no-repeat;
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    color: var(--ink);
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
}

p {
    margin: 0;
}

a {
    color: var(--accent-strong);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover {
    color: var(--ink);
}

button,
input {
    font: inherit;
    color: inherit;
    margin: 0;
}

button {
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0 0 0 0);
    overflow: hidden;
    white-space: nowrap;
}

:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: 2px;
    border-radius: 4px;
}

.icon {
    flex: none;
    display: block;
}

.container {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    padding: 0 20px;
}

/*--------------------------------------------------------------
Header and footer
--------------------------------------------------------------*/

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 20px 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, #7C8FFF, #4353E6); /* matches images/icon.svg */
    color: #fff;
}

.by-thrive {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
}

.by-thrive svg {
    height: 20px;
    width: auto;
    overflow: visible;
    color: var(--ink);
}

.by-thrive #dot {
    animation: kickflip 5s ease infinite;
    transform-box: fill-box;
}

.site-main {
    flex: 1;
    padding: 56px 0 80px;
}

body.scanned .site-main {
    padding-top: 12px;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 24px 20px 32px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.site-footer a {
    color: var(--muted);
}

.site-footer a:hover {
    color: var(--ink);
}

/*--------------------------------------------------------------
Hero and scan form
--------------------------------------------------------------*/

.hero {
    text-align: center;
    max-width: 620px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(36px, 7vw, 52px);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.lede {
    margin: 14px auto 0;
    max-width: 520px;
    color: var(--muted);
    font-size: 18px;
    text-wrap: balance; /* even line lengths, so a single word is never left on the last line */
}

.scan-form {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 520px;
    margin: 32px auto 0;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow-lift);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.scan-form:focus-within {
    border-color: var(--accent);
    box-shadow: var(--shadow-lift), 0 0 0 4px rgba(112, 135, 255, 0.18);
}

.scan-form input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    padding: 12px 8px 12px 20px;
    font-size: 17px;
    color: var(--ink);
}

.scan-form input::placeholder {
    color: #A9AEBD;
}

.scan-form button {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 999px;
    background: var(--accent-strong);
    color: #fff;
    font-weight: 600;
    padding: 12px 22px;
    transition: background 0.2s ease, transform 0.1s ease;
}

.scan-form button:hover {
    background: #3F52E0;
}

.scan-form button:active {
    transform: scale(0.97);
}

.scan-form button:disabled {
    cursor: progress;
    opacity: 0.65;
}

.hint {
    margin-top: 16px;
    color: var(--muted);
    font-size: 14px;
}

/* Results page: the form stays, the pitch goes */

body.scanned .hero h1,
body.scanned .lede,
body.scanned .hint,
body.scanned .intro {
    display: none;
}

body.scanned .scan-form {
    margin-top: 0;
    box-shadow: var(--shadow);
}

/*--------------------------------------------------------------
Homepage: what it checks
--------------------------------------------------------------*/

.intro {
    margin-top: 72px;
}

.intro h2 {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.features {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.feature {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: var(--shadow);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.feature h3 {
    margin-top: 14px;
    font-size: 17px;
}

.feature p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 15px;
    text-wrap: pretty; /* avoid a lone word on the last line */
}

.points {
    list-style: none;
    margin: 40px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 28px;
}

.points li {
    padding-top: 14px;
    border-top: 2px solid var(--line-strong);
}

.points h3 {
    font-size: 16px;
}

.points p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 15px;
    text-wrap: pretty;
}

@media (max-width: 700px) {
    .points {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .features {
        grid-template-columns: 1fr;
    }
}

/*--------------------------------------------------------------
Buttons, chips, alerts
--------------------------------------------------------------*/

.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
    background: var(--accent-strong);
    color: #fff;
}

.btn-primary:hover {
    background: #3F52E0;
    color: #fff;
}

.btn-ghost {
    background: var(--surface);
    border-color: var(--line-strong);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}

.btn-light {
    background: #fff;
    color: var(--ink);
}

.btn-light:hover {
    background: var(--accent-soft);
    color: var(--ink);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.chip::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.chip--problem {
    background: var(--bad-soft);
    color: var(--bad);
}

.chip--warning {
    background: var(--warn-soft);
    color: var(--warn);
}

.chip--ok {
    background: var(--good-soft);
    color: var(--good);
}

.chip--info,
.chip--neutral {
    background: var(--info-soft);
    color: var(--info);
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 24px;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    font-weight: 500;
}

.alert--error {
    border-color: #F6C6D0;
    background: var(--bad-soft);
    color: #8F1730;
}

/*--------------------------------------------------------------
Scanning state
--------------------------------------------------------------*/

.scan-results {
    margin-top: 24px;
}

.scan-results:empty {
    display: none;
}

.progress {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 28px 30px;
    text-align: center;
}

.progress-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    word-break: break-word;
}

.progress-step {
    margin-top: 4px;
    color: var(--muted);
    font-size: 15px;
    min-height: 1.6em;
}

.progress-bar {
    position: relative;
    height: 4px;
    margin: 20px auto 0;
    max-width: 320px;
    border-radius: 4px;
    background: var(--accent-soft);
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 40%;
    border-radius: 4px;
    background: var(--accent-strong);
    animation: progress-slide 1.1s ease-in-out infinite;
}

@keyframes progress-slide {
    0% {
        transform: translateX(-110%);
    }
    100% {
        transform: translateX(260%);
    }
}

/*--------------------------------------------------------------
Results: summary card
--------------------------------------------------------------*/

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card + .card,
.card + .cta-card {
    margin-top: 16px;
}

.summary {
    padding: 26px 28px 28px;
}

.summary-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.summary-domain {
    font-size: clamp(24px, 5vw, 30px);
    font-weight: 700;
    letter-spacing: -0.02em;
    word-break: break-word;
}

.summary-meta {
    margin-top: 2px;
    color: var(--muted);
    font-size: 14px;
}

.summary-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.summary .chips {
    margin-top: 16px;
}

/* Summary tree: registration > DNS > mail / web */

.tree-wrap {
    margin-top: 24px;
    padding: 22px 12px 12px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow-x: auto;
}

.tree,
.tree ul {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    display: flex;
    justify-content: center;
}

.tree {
    text-align: center;
}

/* Siblings stretch to the same height, and each box fills its cell. */
.tree li {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    padding: 12px 0 0;
}

.tree li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    border-top: 2px solid var(--line-strong);
}

.tree li:first-child::before {
    left: 50%;
}

.tree li:last-child::before {
    right: 50%;
}

.tree .node {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    min-width: 170px;
    max-width: 260px;
    margin: 0 8px 12px;
    padding: 12px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 2px rgba(22, 24, 48, 0.05);
    color: inherit;
    text-decoration: none;
    word-break: break-word;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

/* Boxes that jump to their section */
.tree a.node:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 14px rgba(79, 99, 245, 0.16);
    transform: translateY(-1px);
}

.tree a.node:hover .node-label {
    color: var(--accent-strong);
}

.tree .node-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.2s ease;
}

.tree .node-value {
    display: block;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.35;
}

.tree .node-detail {
    display: block;
    font-size: 13px;
    color: var(--muted);
}

/* Vertical connectors */

.tree ul::before,
.tree .node::before {
    content: '';
    position: absolute;
    left: 50%;
    height: 12px;
    margin-left: -1px;
    border-left: 2px solid var(--line-strong);
}

.tree ul::before {
    top: -12px;
}

.tree .node::before {
    top: -13px;
}

.tree > li {
    padding-top: 0;
}

.tree > li::before,
.tree > li > .node::before {
    display: none;
}

@media (max-width: 520px) {
    .tree-wrap {
        padding: 18px 6px 6px;
    }

    .tree .node {
        min-width: 0;
        padding: 10px 8px;
        margin: 0 3px 12px;
    }

    .tree .node-value {
        font-size: 14px;
    }

    .tree .node-detail {
        font-size: 12px;
    }
}

/* Staff-only strip */

.staff-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.staff-tag {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.staff-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.staff-item::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
}

.staff-item.is-yes::before {
    background: var(--good-fill);
}

/* Needs attention */

.attention {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.attention h3 {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.attention ul {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
}

.attention li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
}

.attention a {
    color: var(--ink);
    font-weight: 500;
    text-decoration: none;
}

.attention a:hover {
    color: var(--accent-strong);
    text-decoration: underline;
}

/*--------------------------------------------------------------
Results: groups and findings
--------------------------------------------------------------*/

.group-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
}

.group-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.group-head h2 {
    font-size: 18px;
}

.group-head .chips {
    margin-left: auto;
    justify-content: flex-end;
}

.sev {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #fff;
}

.sev--problem {
    background: var(--bad-fill);
}

.sev--warning {
    background: var(--warn-fill);
}

.sev--info {
    background: var(--info-fill);
}

.sev--ok {
    background: var(--good-fill);
}

.group {
    scroll-margin-top: 16px;
}

.finding {
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 16px;
}

.finding:last-child {
    border-bottom: none;
}

.finding > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 22px;
    cursor: pointer;
    list-style: none;
    transition: background 0.15s ease;
}

.finding > summary::-webkit-details-marker {
    display: none;
}

.finding > summary::after {
    content: '';
    flex: none;
    width: 8px;
    height: 8px;
    margin: -3px 4px 0 auto;
    border-right: 2px solid #B4B9C8;
    border-bottom: 2px solid #B4B9C8;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.finding[open] > summary::after {
    margin-top: 4px;
    transform: rotate(-135deg);
}

.finding > summary:hover {
    background: var(--surface-soft);
}

.finding--problem > summary {
    background: #FFF7F8;
}

.finding--warning > summary {
    background: #FFFBF3;
}

.finding-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.4;
    word-break: break-word;
}

.finding--problem .finding-title,
.finding--warning .finding-title {
    font-weight: 600;
}

.finding-body {
    padding: 4px 22px 20px 56px;
}

.finding-body p {
    text-wrap: pretty; /* avoid a lone word on the last line */
}

.finding-body > * + * {
    margin-top: 12px;
}

.finding-details {
    margin: 12px 0 0;
    padding: 12px 14px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.finding-details dt {
    margin-top: 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.finding-details dt:first-child {
    margin-top: 0;
}

.finding-details dd {
    margin: 0;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--ink);
    word-break: break-word;
}

.finding-fix {
    padding: 12px 14px;
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--accent-soft);
}

.finding-fix strong {
    font-weight: 600;
    color: var(--ink);
}

.finding-cta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-weight: 500;
    color: var(--ink);
}

@media (max-width: 520px) {
    .summary {
        padding: 20px 18px 22px;
    }

    .group-head,
    .finding > summary {
        padding-left: 16px;
        padding-right: 16px;
    }

    .finding-body {
        padding: 4px 16px 18px 16px;
    }
}

/*--------------------------------------------------------------
Closing call to action
--------------------------------------------------------------*/

.cta-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    flex-wrap: wrap;
    padding: 26px 28px;
    border-radius: var(--radius);
    background: var(--ink);
    color: #C9CBDA;
    box-shadow: var(--shadow);
}

.cta-card h2 {
    color: #fff;
    font-size: 20px;
}

.cta-card p {
    margin-top: 4px;
    max-width: 460px;
    font-size: 15px;
    text-wrap: balance; /* never a lone word on the last line */
}

/*--------------------------------------------------------------
Motion
--------------------------------------------------------------*/

@keyframes kickflip {
    0% {
        transform: translateY(-4px) scale(1);
        transform-origin: center center;
        animation-timing-function: cubic-bezier(0.585, 0.24, 0.865, 0.445);
    }
    10% {
        transform: translateY(3px) scale(0.9) rotateZ(90deg);
        transform-origin: center center;
        animation-timing-function: cubic-bezier(0.07, 0.405, 0.4, 0.82);
    }
    20% {
        transform: translateY(-4px) scale(1) rotateZ(180deg);
        transform-origin: center center;
        animation-timing-function: cubic-bezier(0.585, 0.5, 0.865, 0.445);
    }
    30% {
        transform: translateY(3px) scale(0.9) rotateZ(270deg);
        transform-origin: center center;
        animation-timing-function: cubic-bezier(0.07, 0.405, 0.4, 0.82);
    }
    40% {
        transform: translateY(-4px) scale(1) rotateZ(360deg);
        transform-origin: center center;
        animation-timing-function: cubic-bezier(0.585, 0.5, 0.865, 0.445);
    }
    100% {
        transform: translateY(-4px) scale(1) rotateZ(360deg);
        transform-origin: center center;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .by-thrive #dot,
    .progress-bar::after {
        animation: none;
    }
}
