/* =============================================================
   Fince — visual identity stylesheet
   Mobile-first. No external assets, no JS dependencies.
   ============================================================= */

:root {
    --c-primary:        #534AB7;
    --c-primary-dark:   #3B3585;
    --c-primary-soft:   #EDEBF7;
    --c-accent-green:   #6BCB77;
    --c-text:           #1A1A1A;
    --c-text-secondary: #5A5A5A;
    --c-text-tertiary:  #888;
    --c-bg:             #FCFCFD;
    --c-border:         #EBEBED;
    --c-card:           #FFFFFF;

    --shadow-card:    0 2px 24px rgba(20, 20, 40, 0.06);
    --shadow-button:  0 6px 24px rgba(83, 74, 183, 0.30);
    --shadow-focus:   0 0 0 4px rgba(83, 74, 183, 0.10);

    --radius-card:    16px;
    --radius-input:   10px;
    --radius-button:  12px;

    --header-blur: rgba(252, 252, 253, 0.85);
}

/* ---------- Reset / base ---------- */

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

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

body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    font-weight: 400;
    font-feature-settings: "ss01", "cv11";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    animation: pageFadeIn 300ms ease-out both;
}

@keyframes pageFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

img, svg { display: block; max-width: 100%; }

/* ---------- Skip link (a11y) ---------- */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--c-primary);
    color: #fff;
    padding: 8px 16px;
    border-radius: 0 0 8px 0;
    z-index: 1000;
    text-decoration: none;
    font-weight: 600;
}
.skip-link:focus { top: 0; }

/* ---------- Sticky header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-blur);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--c-border);
}

.site-header__inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 22px;
    font-weight: 800;
    color: var(--c-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    line-height: 1;
}
.logo svg {
    width: 18px;
    height: 18px;
    color: var(--c-primary);
}

.site-header nav {
    display: flex;
    overflow-x: auto;
    gap: 18px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.site-header nav::-webkit-scrollbar { display: none; }

.site-header nav a {
    color: var(--c-text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    transition: color 200ms ease-out;
}
.site-header nav a:hover { color: var(--c-primary); }

@media (min-width: 768px) {
    .site-header__inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 16px 32px;
        gap: 24px;
    }
    .site-header nav { gap: 24px; overflow: visible; }
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
    color: #fff;
    padding: 80px 24px;
    text-align: center;
}
.hero--small { padding: 60px 24px; }

.hero h1 {
    color: #fff;
    margin: 0 0 12px;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}
.hero p.subtitle {
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    font-size: 17px;
    font-weight: 400;
}

@media (min-width: 768px) {
    .hero { padding: 96px 32px; }
    .hero h1 { font-size: 44px; }
    .hero p.subtitle { font-size: 19px; }
}

.hero__sparkle {
    position: absolute;
    width: 80px;
    height: 80px;
    color: #fff;
    opacity: 0.15;
    pointer-events: none;
}
.hero__sparkle--top-right    { top: 32px;    right: 32px; }
.hero__sparkle--bottom-left  { bottom: 32px; left:  32px; }

/* ---------- Main / layout ---------- */

main {
    /* Subtle dot pattern for texture (1% opacity) */
    background-image: radial-gradient(circle, rgba(83, 74, 183, 0.06) 1px, transparent 1px);
    background-size: 28px 28px;
}

.container {
    max-width: 760px;
    margin: -32px auto 0;
    padding: 0 16px 64px;
    position: relative;
    z-index: 1;
}
.container--narrow { max-width: 520px; }

@media (min-width: 768px) {
    .container { padding: 0 24px 96px; margin-top: -48px; }
}

/* ---------- Card ---------- */

.card {
    background: var(--c-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 24px;
}

@media (min-width: 768px) {
    .card { padding: 48px; }
}

/* ---------- Typography ---------- */

h1, h2, h3 {
    font-family: -apple-system, "SF Pro Display", BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--c-text);
    line-height: 1.25;
    margin: 0 0 12px;
}

h1 {
    color: var(--c-primary);
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
h2 {
    color: var(--c-primary-dark);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 32px;
}
h3 {
    color: var(--c-primary-dark);
    font-size: 18px;
    font-weight: 700;
    margin-top: 24px;
}

@media (min-width: 768px) {
    h1 { font-size: 40px; }
    h2 { font-size: 28px; }
    h3 { font-size: 20px; }
}

p { margin: 0 0 16px; color: var(--c-text); }

strong { color: var(--c-text); font-weight: 600; }

a {
    color: var(--c-primary);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: color 200ms ease-out;
}
a:hover { color: var(--c-primary-dark); }

code {
    background: var(--c-primary-soft);
    color: var(--c-primary-dark);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: Menlo, "SF Mono", monospace;
    font-size: 0.875em;
}

hr {
    border: none;
    border-top: 1px solid var(--c-border);
    margin: 32px 0;
}

/* ---------- Lists with custom bullets ---------- */

ul, ol { padding-left: 0; margin: 0 0 16px; }
ul { list-style: none; }

ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
}
ul li::before {
    content: "—";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--c-primary);
    font-weight: 700;
}

ol { padding-left: 24px; }
ol li { margin-bottom: 8px; }

/* ---------- Article sections ---------- */

article section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--c-border);
}
article section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

@media (min-width: 1024px) {
    article section { margin-top: 64px; }
}

/* ---------- Form ---------- */

form { margin: 0; }

.form-row { margin-bottom: 20px; }

form label {
    display: block;
    font-weight: 600;
    color: var(--c-text);
    margin-bottom: 8px;
    font-size: 14px;
}

form input,
form select,
form textarea {
    width: 100%;
    padding: 13px 14px;
    font-size: 16px;
    font-family: inherit;
    color: var(--c-text);
    background: #fff;
    border: 1.5px solid var(--c-border);
    border-radius: var(--radius-input);
    transition: border-color 200ms ease-out, box-shadow 200ms ease-out;
    appearance: none;
    -webkit-appearance: none;
}

form input:focus,
form select:focus,
form textarea:focus {
    border-color: var(--c-primary);
    box-shadow: var(--shadow-focus);
    outline: none;
}

form textarea {
    min-height: 160px;
    resize: vertical;
    line-height: 1.6;
}

/* Custom select arrow */
form select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%235A5A5A'%3E%3Cpath d='M5 8l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    padding-right: 40px;
}

.btn-primary {
    background: var(--c-primary);
    color: #fff;
    border: none;
    padding: 16px 24px;
    border-radius: var(--radius-button);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    transition: background 200ms ease-out, transform 200ms ease-out, box-shadow 200ms ease-out;
}
.btn-primary:hover {
    background: var(--c-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-button);
}
.btn-primary:active { transform: translateY(0); }

.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-error {
    color: #9B1C1C;
    background: #FED7D7;
    border: 1px solid #FBB8B8;
    padding: 14px 16px;
    border-radius: var(--radius-input);
    margin-bottom: 20px;
    font-size: 15px;
}

.form-aside {
    text-align: center;
    margin-top: 24px;
    color: var(--c-text-secondary);
    font-size: 14px;
}
.form-aside a { color: var(--c-primary); }

/* ---------- Thank-you page ---------- */

.thanks {
    text-align: center;
    padding: 24px 16px 48px;
    max-width: 520px;
    margin: 0 auto;
}
.thanks svg.sparkle-large {
    width: 64px;
    height: 64px;
    color: var(--c-primary);
    margin: 0 auto 24px;
}
.thanks h1 { color: var(--c-primary); margin-bottom: 12px; }
.thanks p  { color: var(--c-text-secondary); font-size: 17px; }

/* ---------- Footer ---------- */

.site-footer {
    margin-top: 64px;
    background: var(--c-primary-soft);
    padding: 48px 24px;
    text-align: center;
    color: var(--c-text-secondary);
    font-size: 14px;
}
.site-footer p { margin: 0 0 8px; }
.site-footer p:last-child {
    color: var(--c-text-tertiary);
    font-style: italic;
    font-size: 13px;
}
.site-footer a {
    color: var(--c-text-secondary);
    text-decoration: none;
    font-weight: 500;
}
.site-footer a:hover { color: var(--c-primary); }

/* ---------- Focus-visible (a11y) ---------- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.logo:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}
