/* Master Styles */

:root {
    --paper: #f8f8f0;
    --white: #fffef9;
    --text: #182b22;
    --muted: #48564c;
    --green: #142b21;
    --lime: #e6f0a7;
    --border: #d9ded2;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Trebuchet MS", system-ui, sans-serif;
    line-height: 1.6;
    background-color: var(--paper);
    color: var(--text);
}

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

a {
    color: inherit;
}

:focus-visible {
    outline: 3px solid #507a43;
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2;
    transform: translateY(-150%);
    padding: 0.65rem 1rem;
    border-radius: 0.5rem;
    background-color: var(--white);
}

.skip-link:focus {
    transform: translateY(0);
}

/* NAV Styles */

.navbar, .footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 0;
}

.logo {
    flex-shrink: 0;
}

.logo img {
    width: clamp(8rem, 22vw, 12rem);
    height: auto;
}

.navigation {
    display: flex;
    gap: clamp(1rem, 3vw, 2.8rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.navigation a {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--muted);
    text-decoration: none;
}

.navigation a:hover {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 0.3em;
}

.navbar .button {
    padding: 0.65rem 1.1rem;
    font-size: 0.95rem;
}

/* Universal Page Styles */

.page-width {
    width: calc(100% - clamp(2rem, 8vw, 9rem));
    max-width: 84rem;
    margin: 0 auto;
}

.page-section {
    padding: clamp(4rem, 8vw, 7.5rem) 0;
    scroll-margin-top: 1.5rem;
}

h1, h2, h3, p {
    margin: 0;
}

h1, h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: normal;
    letter-spacing: -0.055em;
    text-wrap: balance;
}

h2 {
    font-size: clamp(2.3rem, 4.4vw, 4.1rem);
    line-height: 1.05;
}

.subtitle {
    margin-bottom: 0.8rem;
    font-size: 0.875rem;
    font-weight: bold;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: #476546;
}

.button {
    display: inline-block;
    padding: 1rem 1.4rem;
    border-radius: 0.55rem;
    background-color: var(--green);
    color: var(--white);
    font-weight: bold;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
}

.button:hover {
    background-color: #335540;
}

.info-side p:not(.subtitle) {
    margin-top: 1.1rem;
    color: var(--muted);
    font-size: 1.125rem;
}

/* Index Styles - Hero */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: clamp(32rem, 44vw, 39rem);
    overflow: hidden;
    border-radius: 1.15rem;
    background-color: var(--green);
    color: var(--white);
}

.hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 58% center;
}

.hero::before {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    background: linear-gradient(90deg, #0d1c14f5 0%, #0d1c14e0 24%, #0d1c14a6 42%, #0d1c1430 61%, transparent 83%);
}

.hero-text {
    position: relative;
    z-index: 1;
    width: min(100%, 42rem);
    padding: 3rem clamp(1.5rem, 5.6vw, 5.4rem);
}

.hero .subtitle, .demo .subtitle {
    color: var(--lime);
}

.hero .tagline {
    margin-bottom: 1.25rem;
    letter-spacing: normal;
    text-transform: none;
}

.hero h1 {
    font-size: clamp(4.2rem, 7.3vw, 7rem);
    line-height: 0.94;
    letter-spacing: -0.078em;
}

.hero h1 em {
    color: #ebf3b9;
}

.hero h1 + p {
    max-width: 25rem;
    margin-top: 1.45rem;
    font-size: clamp(1.06rem, 1.4vw, 1.3rem);
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem 1.5rem;
    margin-top: 1.85rem;
    font-weight: bold;
    text-underline-offset: 0.35em;
}

.hero .button {
    background-color: var(--lime);
    color: var(--green);
}

.hero .button:hover {
    background-color: #f3f8cb;
}

.hero a:focus-visible {
    outline-color: var(--lime);
}

/* Index Styles - Features */

.features header {
    max-width: 46rem;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.features header p {
    max-width: 35rem;
    margin: 1rem auto 0;
    color: var(--muted);
    font-size: 1.125rem;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.features article {
    padding: clamp(1.4rem, 3vw, 2.6rem);
    border: 1px solid var(--border);
    border-radius: 1rem;
    background-color: var(--white);
}

.features article:first-child {
    background-color: #ecf0e3;
}

.features article:last-child {
    background-color: #f1f1de;
}

.features article img {
    width: 3.2rem;
    height: 3.2rem;
    padding: 0.8rem;
    margin-bottom: 1.25rem;
    border: 1px solid #ccd7c5;
    border-radius: 0.7rem;
    background-color: #fafbf3;
}

.features h3 {
    font: normal clamp(1.6rem, 2.4vw, 2.15rem)/1.1 Georgia, serif;
    letter-spacing: -0.045em;
}

.features article p {
    margin-top: 0.75rem;
    color: var(--muted);
}

/* Index Styles - Demo */

.demo {
    background-color: var(--green);
    color: var(--white);
}

.demo-layout, .about, .faq {
    display: grid;
    gap: clamp(2rem, 6vw, 6rem);
}

.demo-layout {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: center;
}

.demo .info-side p:not(.subtitle) {
    color: #dfe6da;
}

.demo-example {
    overflow: hidden;
    border: 1px solid #abb8a7;
    border-radius: 1rem;
    background-color: var(--white);
    color: var(--text);
}

.demo-example header, .demo-panel {
    padding: 1rem clamp(0.9rem, 2.5vw, 1.65rem);
}

.demo-example header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background-color: #eff2e9;
    line-height: 1.35;
}

.demo-example header img {
    border-radius: 0.5rem;
}

.demo-example small {
    display: block;
    font-size: 0.875rem;
    color: var(--muted);
}

.demo-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    padding: 0.65rem clamp(0.7rem, 2vw, 1.25rem);
    border-block: 1px solid var(--border);
}

.demo-tabs a {
    padding: 0.45rem clamp(0.45rem, 1.5vw, 0.9rem);
    border-radius: 0.45rem;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: bold;
    text-decoration: none;
}

.demo-tabs a:hover, .demo-tabs a[aria-selected="true"] {
    background-color: #e7efdc;
    color: var(--green);
}

.demo-panel {
    min-height: 19.5rem;
}

.demo-panel + .demo-panel:not([role="tabpanel"]) {
    border-top: 1px solid var(--border);
}

.demo-panel:focus-visible {
    outline-offset: -4px;
}

.demo-panel h3 {
    font-size: 1.25rem;
    line-height: 1.25;
}

.demo-panel p {
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.875rem;
}

.demo-panel .demo-note {
    margin-top: 0.85rem;
    font-weight: bold;
}

.tasks, .projects, .records {
    display: grid;
    gap: 0.35rem;
    margin: 0.8rem 0 0;
    padding: 0;
    list-style: none;
}

.tasks label, .projects li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
    min-height: 3.15rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid #dfe4d8;
    border-radius: 0.55rem;
    background-color: #f8f9f3;
}

.tasks label {
    cursor: pointer;
    line-height: 1.35;
}

.tasks label:hover {
    background-color: #edf2e6;
}

.tasks label:has(input:checked) {
    border-color: #c1d0b9;
    background-color: #ebf3e5;
}

.tasks input {
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    accent-color: #335c40;
}

.tasks strong {
    font-size: 0.95rem;
}

.due, .projects strong {
    color: #3d5441;
    font-size: 0.875rem;
    font-weight: bold;
    white-space: nowrap;
}

.records div {
    display: grid;
    grid-template-columns: minmax(5rem, 0.75fr) 1.25fr;
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid var(--border);
}

.records dt {
    font-weight: bold;
}

.records dd {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    color: var(--muted);
}

.swatch, .projects .check {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    border: 1px solid #7f9376;
    border-radius: 50%;
    background-color: #a2ad91;
}

.swatch.trim {
    border-color: #b7b19d;
    background-color: #eee6d4;
}

.projects .check {
    display: grid;
    place-content: center;
    width: 1.15rem;
    height: 1.15rem;
    border-color: #a5b7a0;
    background-color: #e2eddc;
    color: #2b5637;
    font-size: 0.875rem;
}

.projects .check:empty {
    background-color: transparent;
}

/* Index Styles - About and FAQ */

.about {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
}

.about img {
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 4;
    border-radius: 1rem;
    object-fit: cover;
}

.faq {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    border-top: 1px solid var(--border);
}

.questions {
    border-top: 1px solid var(--border);
}

.questions details {
    border-bottom: 1px solid var(--border);
}

.questions summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.1rem 0;
    cursor: pointer;
    font-size: 1.0625rem;
    font-weight: bold;
    list-style: none;
}

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

.questions summary::after {
    content: "";
    width: 0.85rem;
    height: 0.85rem;
    flex-shrink: 0;
    background: linear-gradient(#395a40, #395a40) center / 100% 2px no-repeat,
        linear-gradient(#395a40, #395a40) center / 2px 100% no-repeat;
}

.questions details[open] summary::after {
    background-size: 100% 2px, 0 0;
}

.questions p {
    padding-bottom: 1.2rem;
    color: var(--muted);
}

.closing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem 3rem;
    padding: clamp(1.65rem, 5vw, 4rem);
    border: 1px solid #d4dfbc;
    border-radius: 1rem;
    background-color: #eaf1d6;
}

.closing h2 {
    max-width: 42rem;
    font-size: clamp(2rem, 4vw, 3.5rem);
}

.closing .button {
    flex-shrink: 0;
}

.footer {
    flex-wrap: wrap;
    margin-top: 2.75rem;
    padding: 1.8rem 0 2.5rem;
    border-top: 1px solid var(--border);
}

/* Phone and Tablet Styles */

@media (max-width: 60rem) {
    .hero > img {
        object-position: 65% center;
    }

    .hero::before {
        background: linear-gradient(90deg, #0d1c14f5, #0d1c14b3 45%, #0d1c140d 92%);
    }
}

@media (max-width: 47rem) {
    .feature-list, .demo-layout, .about, .faq {
        grid-template-columns: 1fr;
    }

    .about img {
        aspect-ratio: 3 / 2;
    }
}

@media (max-width: 37rem) {
    .navbar {
        flex-wrap: wrap;
    }

    .navbar .navigation {
        order: 1;
        width: 100%;
    }

    .hero {
        display: block;
        min-height: 0;
    }

    .hero > img {
        position: static;
        height: clamp(12rem, 52vw, 17rem);
        object-position: 80% center;
    }

    .hero::before {
        display: none;
    }

    .hero-text {
        padding: 1.75rem 1.25rem 1.9rem;
    }

    .hero h1 {
        font-size: clamp(2.6rem, 11.7vw, 4.6rem);
    }

    .hero .subtitle {
        margin-bottom: 0.8rem;
    }

    .hero h1 + p, .hero-links {
        margin-top: 1rem;
    }

    .features header {
        text-align: left;
    }

    .features header p {
        margin-left: 0;
    }

    .closing {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 23rem) {
    .navbar .button {
        padding-inline: 0.65rem;
    }

    .tasks label {
        grid-template-columns: auto minmax(0, 1fr);
        row-gap: 0.2rem;
    }

    .tasks .due {
        grid-column: 2;
    }
}

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