/* =======================================================================
   ZOL — by Pentaflora
   Design: Botanical modern. Deep forest greens, warm paper off-whites,
           Fraunces for display, Inter for UI.
   ======================================================================= */

:root {
    /* Palette */
    --ink:            #0E1F14;      /* near-black with green bias */
    --forest:         #143823;      /* primary dark green */
    --forest-2:       #1E5234;      /* slightly lighter */
    --moss:           #4A7C59;      /* mid green, secondary */
    --sage:           #9FB5A3;      /* light green tone */
    --paper:          #FBF8EF;      /* warm off-white bg */
    --paper-2:        #F3EEDE;      /* secondary paper */
    --paper-3:        #E4DEC7;      /* darker paper for borders */
    --accent:         #D7823D;      /* warm terracotta accent */
    --accent-soft:    #F4E1CE;
    --error:          #B54A3D;
    --error-bg:       #FBE8E3;
    --success:        #2F6B48;

    /* Typography */
    --font-display: 'Fraunces', 'Georgia', serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 18px;
    --radius-xl: 28px;

    /* Shadows */
    --shadow-soft: 0 2px 8px rgba(14, 31, 20, 0.06), 0 8px 24px rgba(14, 31, 20, 0.04);
    --shadow-lift: 0 4px 16px rgba(14, 31, 20, 0.08), 0 20px 40px rgba(14, 31, 20, 0.08);
    --shadow-pop:  0 6px 24px rgba(20, 56, 35, 0.18), 0 30px 60px rgba(20, 56, 35, 0.12);

    /* Layout */
    --page-max: 1120px;
    --form-max: 720px;
}

/* Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--forest); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea, button { font-size: 16px; font-family: inherit; }

/* Respect the HTML hidden attribute across all elements ---------------- */
[hidden] { display: none !important; }

.container {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* Background decoration ------------------------------------------------ */
.decor-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.decor-leaf {
    position: absolute;
    color: var(--sage);
    opacity: 0.15;
}
.decor-leaf-1 {
    top: -80px;
    right: -60px;
    width: 280px;
    height: 560px;
    transform: rotate(25deg);
}
.decor-leaf-2 {
    bottom: -120px;
    left: -80px;
    width: 340px;
    height: 680px;
    transform: rotate(-15deg);
    color: var(--moss);
    opacity: 0.08;
}
@media (max-width: 700px) {
    .decor-leaf-1 { width: 180px; height: 360px; right: -80px; }
    .decor-leaf-2 { width: 220px; height: 440px; left: -110px; }
}

/* Header --------------------------------------------------------------- */
.site-header {
    position: relative;
    z-index: 10;
    padding: 20px 0;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
}
.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}
.brand-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 22px;
    color: var(--forest);
    letter-spacing: -0.02em;
}
.brand-tag {
    font-size: 11px;
    font-weight: 500;
    color: var(--moss);
    margin-top: 3px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Hero ----------------------------------------------------------------- */
.hero {
    position: relative;
    z-index: 1;
    padding: 64px 0 80px;
}
.hero-eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: var(--moss);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 20px;
    padding: 6px 14px;
    background: rgba(74, 124, 89, 0.1);
    border: 1px solid rgba(74, 124, 89, 0.25);
    border-radius: 999px;
}
.hero-title {
    font-size: clamp(42px, 7vw, 84px);
    line-height: 1.02;
    color: var(--forest);
    max-width: 860px;
    margin-bottom: 24px;
}
.hero-title em {
    font-style: italic;
    font-family: var(--font-display);
    font-variation-settings: "opsz" 144;
    color: var(--accent);
    font-weight: 400;
}
.hero-sub {
    font-size: clamp(17px, 1.6vw, 20px);
    color: rgba(14, 31, 20, 0.72);
    max-width: 640px;
    margin-bottom: 40px;
    line-height: 1.55;
}
.hero-cta {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

/* Buttons -------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 15px;
    letter-spacing: -0.005em;
    cursor: pointer;
    transition: transform 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
    text-decoration: none;
    border: 1px solid transparent;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--forest);
    color: var(--paper);
}
.btn-primary:hover { background: var(--forest-2); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-ghost {
    background: transparent;
    border-color: rgba(14, 31, 20, 0.15);
    color: var(--forest);
}
.btn-ghost:hover { background: rgba(14, 31, 20, 0.04); border-color: rgba(14, 31, 20, 0.3); }

.btn-text {
    background: transparent;
    color: var(--forest);
    padding: 14px 6px;
}
.btn-text:hover { color: var(--accent); }

.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 18px 32px; font-size: 16px; }

.btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn.is-loading .btn-label { opacity: 0.5; }
.btn.is-loading .btn-spinner { display: inline-block; }

/* How section ---------------------------------------------------------- */
.how {
    position: relative;
    z-index: 1;
    padding: 48px 0 80px;
}
.how-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--paper-2);
    border-radius: var(--radius-lg);
    padding: 8px;
}
.how-list li {
    padding: 32px 28px;
    background: var(--paper);
    border-radius: var(--radius-md);
}
.how-num {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.1em;
}
.how-list h3 {
    font-size: 22px;
    margin: 8px 0 6px;
    color: var(--forest);
}
.how-list p {
    color: rgba(14, 31, 20, 0.7);
    font-size: 15px;
}

/* Register section ----------------------------------------------------- */
.register {
    position: relative;
    z-index: 1;
    padding: 64px 0 80px;
    scroll-margin-top: 20px;
}
.register-head {
    text-align: center;
    margin-bottom: 48px;
}
.register-head h2 {
    font-size: clamp(32px, 4.5vw, 48px);
    color: var(--forest);
    margin-bottom: 12px;
}
.register-head p {
    color: rgba(14, 31, 20, 0.65);
    font-size: 17px;
}

.form {
    max-width: var(--form-max);
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid var(--paper-3);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lift);
}

.form-section {
    border: none;
    padding: 0;
    margin: 0 0 28px;
}
.form-section legend {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
    color: var(--forest);
    margin-bottom: 20px;
    padding: 0;
}

.field {
    margin-bottom: 18px;
}
.field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}
.field-optional {
    color: rgba(14, 31, 20, 0.5);
    font-weight: 400;
}
.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--paper-3);
    border-radius: var(--radius-sm);
    background: var(--paper);
    color: var(--ink);
    transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}
.field input:hover,
.field select:hover,
.field textarea:hover {
    border-color: rgba(14, 31, 20, 0.2);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--forest);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(20, 56, 35, 0.1);
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
    border-color: var(--error);
    background: var(--error-bg);
}
.field-hint {
    display: block;
    font-size: 12px;
    color: rgba(14, 31, 20, 0.55);
    margin-top: 6px;
}
.field-error {
    display: block;
    font-size: 12px;
    color: var(--error);
    margin-top: 6px;
    font-weight: 500;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 600px) {
    .field-row { grid-template-columns: 1fr; gap: 0; }
}

.field-inline {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.form-submit {
    margin-top: 32px;
    text-align: center;
}
.form-submit .btn {
    width: 100%;
    max-width: 360px;
}
.form-terms {
    font-size: 12px;
    color: rgba(14, 31, 20, 0.55);
    margin-top: 16px;
}

.alert {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-top: 24px;
}
.alert-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(181, 74, 61, 0.3);
}

/* Footer --------------------------------------------------------------- */
.site-footer {
    position: relative;
    z-index: 1;
    padding: 40px 0;
    margin-top: 48px;
    border-top: 1px solid var(--paper-3);
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: rgba(14, 31, 20, 0.6);
}
.footer-inner nav { display: flex; gap: 24px; }
.footer-inner a { color: rgba(14, 31, 20, 0.7); }

/* Modal ---------------------------------------------------------------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 31, 20, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: fadeIn 200ms ease;
}
.modal-card {
    position: relative;
    background: var(--paper);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-pop);
    animation: popIn 300ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
    from { opacity: 0; transform: scale(0.92) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-check {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    color: var(--success);
}
.modal-card h2 {
    font-size: 32px;
    color: var(--forest);
    margin-bottom: 12px;
}
.modal-card p {
    color: rgba(14, 31, 20, 0.7);
    margin-bottom: 20px;
}
.url-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #ffffff;
    border: 1px solid var(--paper-3);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 16px;
}
.url-box code {
    font-family: 'Menlo', 'Monaco', monospace;
    font-size: 14px;
    color: var(--forest);
    overflow-wrap: anywhere;
    text-align: left;
}
.modal-help {
    font-size: 14px;
    color: rgba(14, 31, 20, 0.6);
    margin: 24px 0;
}
.modal-actions .btn {
    width: 100%;
}

/* Browser blocker ------------------------------------------------------- */
.browser-blocker {
    position: fixed;
    inset: 0;
    background: var(--paper);
    z-index: 200;
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.browser-blocker-card {
    max-width: 480px;
    text-align: center;
}
.browser-blocker h2 {
    font-size: 28px;
    color: var(--forest);
    margin-bottom: 16px;
}
.browser-blocker p {
    color: rgba(14, 31, 20, 0.7);
    margin-bottom: 20px;
}
.browser-blocker .url-box {
    margin-bottom: 20px;
}

/* Responsive ----------------------------------------------------------- */
@media (max-width: 700px) {
    .hero { padding: 40px 0 56px; }
    .form { padding: 28px 20px; }
    .how { padding: 24px 0 56px; }
    .register { padding: 40px 0 56px; }
}
