/* ============================================================
   TrueLedger Bookkeeping — Landing Page
   Brand palette: Forest Green #1B352B | Warm Charcoal #2B2A27
                  Oatmeal Sand #D7CCB9 | Sage Green #899C85
                  Off-White #F5F4EF
   ============================================================ */

:root {
    --forest-green: #1B352B;
    --forest-green-hover: #24473A;
    --warm-charcoal: #2B2A27;
    --oatmeal-sand: #D7CCB9;
    --sage-green: #899C85;
    --off-white: #F5F4EF;
    --surface: #FFFFFF;

    --text-muted: rgba(43, 42, 39, 0.72);
    --text-faint: rgba(43, 42, 39, 0.52);
    --hairline: rgba(43, 42, 39, 0.16);

    --radius: 14px;
    --radius-sm: 9px;

    /* Georgia first for cross-platform consistency, then nicer
       platform serifs for anyone who has them. */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype",
                  Palatino, "Times New Roman", serif;

    /* How far the form card crosses onto the photograph.
       Grid gap is 0, so this is the literal overlap in px. */
    --overlap: 56px;
}

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    background-color: var(--off-white);
    color: var(--warm-charcoal);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 0;
}

.logo {
    display: block;
    height: 60px;
    width: auto;
}

/* ---------- Buttons ---------- */

.btn {
    font-family: inherit;
    border: 0;
    cursor: pointer;
    border-radius: var(--radius-sm);
    line-height: 1.2;
    transition: background-color 0.18s ease,
                color 0.18s ease,
                border-color 0.18s ease,
                transform 0.18s ease;
}

.btn-ghost {
    background-color: transparent;
    color: var(--forest-green);
    border: 1px solid rgba(27, 53, 43, 0.35);
    padding: 15px 30px;
    font-size: 15px;
    font-weight: 500;
}

.btn-ghost:hover {
    background-color: var(--forest-green);
    border-color: var(--forest-green);
    color: var(--off-white);
}

.btn-primary {
    display: block;
    width: 100%;
    background-color: var(--forest-green);
    color: var(--off-white);
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--forest-green-hover);
}

.btn-primary:active {
    transform: translateY(1px);
}

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

.hero {
    display: grid;
    /* gap is intentionally 0 — the card creates the overlap itself */
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
    column-gap: 0;
    align-items: center;
    padding: 48px 0 64px;
}

.hero-copy {
    /* lifts the copy and the card above the photograph */
    position: relative;
    z-index: 2;
}

.eyebrow {
    margin: 0 0 18px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--sage-green);
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-family: var(--font-serif);
    /* Georgia runs ~6% wider than the previous sans, so the upper bound
       is set to 33px: the widest line measures 389px inside a 418px
       column, leaving 29px of headroom. Anything above 35px wraps to
       three lines on a wide viewport. */
    font-size: clamp(27px, 2.6vw, 33px);
    line-height: 1.16;
    letter-spacing: -0.01em;
    font-weight: 700;
    color: var(--forest-green);
}

.hero-copy > p:not(.eyebrow) {
    margin: 0 0 32px;
    max-width: 38ch;
    font-size: 16px;
    line-height: 1.62;
    color: var(--text-muted);
}

/* ---------- Form card (crosses onto the photo) ---------- */

.form-card {
    position: relative;
    z-index: 2;
    /* deliberately wider than its own column so it lands on the photo */
    width: calc(100% + var(--overlap));
    background-color: var(--surface);
    border: 1px solid rgba(27, 53, 43, 0.055);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow:
        0 1px 1px rgba(27, 53, 43, 0.04),
        0 10px 20px -8px rgba(27, 53, 43, 0.12),
        0 32px 56px -22px rgba(27, 53, 43, 0.22);
}

.form-card h3 {
    margin: 0 0 16px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.012em;
    color: var(--forest-green);
}

.form-card form {
    display: grid;
    gap: 12px;
    margin: 0;
}

.field {
    width: 100%;
    padding: 13px 14px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    color: var(--warm-charcoal);
    background-color: var(--surface);
    border: 1px solid rgba(43, 42, 39, 0.2);
    border-radius: var(--radius-sm);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field::placeholder {
    color: var(--text-faint);
}

.field:focus {
    outline: none;
    border-color: var(--sage-green);
    box-shadow: 0 0 0 3px rgba(137, 156, 133, 0.28);
}

.disclaimer {
    margin: 14px 0 0;
    font-size: 12.5px;
    line-height: 1.5;
    text-align: center;
    color: var(--text-faint);
}

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

.hero-media {
    position: relative;
    /* lets the photo run to the container's right edge */
    margin-right: -24px;
    /* 4:3 matches the source photo (1.339) almost exactly,
       so the maker is framed without a hard crop */
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    overflow: hidden;
}

.hero-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* keeps the maker centred as the crop tightens */
    object-position: 52% 45%;
}

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

.site-footer {
    border-top: 1px solid var(--hairline);
    padding: 52px 0 32px;
}

.site-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 48px;
    flex-wrap: wrap;
}

.site-footer__brand {
    max-width: 340px;
}

.site-footer .logo {
    height: 34px;
    margin-bottom: 16px;
}

.site-footer__tagline {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text-muted);
}

.site-footer__contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.site-footer__label {
    margin: 0 0 2px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--sage-green);
}

.site-footer__contact a {
    color: var(--forest-green);
    text-decoration: none;
    font-size: 15.5px;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.18s ease;
}

.site-footer__contact a:hover {
    border-bottom-color: currentColor;
}

.site-footer__legal {
    margin-top: 44px;
}

.site-footer__legal p {
    margin: 0;
    font-size: 13px;
    color: var(--text-faint);
}

/* ---------- Consultation modal ---------- */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
}

.modal.is-open {
    display: grid;
    place-items: center;
    padding: 24px;
    animation: modal-fade 0.18s ease-out;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(27, 53, 43, 0.5);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.modal__dialog {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background-color: var(--surface);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow:
        0 2px 4px rgba(27, 53, 43, 0.06),
        0 32px 72px -16px rgba(27, 53, 43, 0.45);
    animation: modal-rise 0.24s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background-color: transparent;
    border: 0;
    border-radius: 50%;
    color: var(--text-faint);
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.modal__close:hover {
    background-color: rgba(43, 42, 39, 0.07);
    color: var(--warm-charcoal);
}

.modal__title {
    margin: 0 0 8px;
    font-family: var(--font-serif);
    font-size: 24px;
    line-height: 1.22;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--forest-green);
}

.modal__lede {
    margin: 0 0 22px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-muted);
}

.modal__form {
    display: grid;
    gap: 12px;
    margin: 0;
}

.modal .disclaimer {
    margin-top: 14px;
}

/* hold the page still behind the dialog */
html.modal-open,
html.modal-open body {
    overflow: hidden;
}

@keyframes modal-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes modal-rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .modal.is-open,
    .modal__dialog {
        animation: none;
    }
}

/* ---------- Utilities ---------- */

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

/* ---------- Responsive ---------- */

@media (max-width: 940px) {
    .hero {
        grid-template-columns: 1fr;
        row-gap: 44px;
        padding: 32px 0 56px;
    }

    .hero-media {
        margin-right: 0;
        aspect-ratio: 16 / 11;
    }

    .form-card {
        width: 100%;
    }

    .site-footer__inner {
        flex-direction: column;
        gap: 36px;
    }

    .site-footer {
        padding: 44px 0 28px;
    }
}
