/* TODO
   - Define global design tokens (colors first, then spacing/radius as needed)
   - Standardize border styles (move shared borders to opacity-based values)
   - Clean up and group selectors (base → layout → components → utilities)
   - Add sticky nav (desktop-first; revisit mobile behavior later)
   - Refactor to BEM-style component architecture.
      Goals:
        - Introduce Block–Element–Modifier naming convention.
        - Reduce structural selectors.
        - Standardize component prefixes.
        - Keep specificity flat and predictable.

   Notes:
   - Page width (60rem) vs reading measure (70ch) is intentional — document this
   - Nav spacing is “good enough” for v1; don’t over-tune until layout is locked
   - Contact form UX + behavior is higher priority than further layout polish
*/


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

:root {
    --bgcolor: #f9efe3;
    --textcolor: #553300;
    --muted: rgba(85, 51, 0, 0.72);
}

html {
    font-size: 112.5%;
}

@media (max-width: 520px) {
    .nav-container {
        justify-content: center;
    }

    .brand,
    .nav-links {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .nav-links {
        flex-wrap: wrap;
    }
    .brand {
        font-size: clamp(1.1rem, 5vw, 1.5rem);
        white-space: normal;
        text-align: center;
    }
}

body {
    margin: 0;
    font-family:"Nunito Sans", system-ui, sans-serif;
    line-height: 1.65;
    font-weight: 400;
    padding: 0.6rem 1.25rem;
    color: var(--textcolor);
    background: var(--bgcolor);
}

.site-wrapper {
    max-width: 60rem;
    min-height: 100vh;
    margin-inline: auto;
    padding: 0;
    background: var(--bgcolor);
    /*box-shadow: 
        -1px 0 3px rgba(0, 0, 0, 0.07),
        1px 0 3px rgba(0, 0, 0, 0.07);*/ /*removed for modernizing design*/
}

h1, h2 {
    font-weight: 600;
    margin-top: 0;
}

main {
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

button, 
input, 
select, 
textarea {
    font: inherit;
}

button {
    appearance: none;
    -webkit-appearance: none;
}

main a:not(.button, .button--primary) {
    color: var(--textcolor);
    font-weight: 550;
    text-decoration: none;
}

main a:not(.button, .button--primary):hover {
    opacity: 0.85;
    text-decoration: underline;
}

a:focus-visible {
    outline: 2px solid var(--textcolor);
    outline-offset: 4px;
    border-radius: 6px;
}

nav {
    background: var(--bgcolor);
    font-size: 1.0625rem;
    /*border-bottom: 1px solid #e5e5e5;*/ /*removed for modernizing design*/
}

.nav-container {
    margin: 0 auto;
    padding: 0 clamp(1.75rem, 4vw, 2.5rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}  

.nav-links {
    display: flex;
    gap: 0.875rem;
    justify-content: flex-end;
}

.nav-links a {
    text-decoration: none;
    color: var(--textcolor);
    font-weight: 600;
    padding: 0.5rem 0.625rem;
    border-radius: 8px;
    transition: background-color 150ms ease; 
}

.nav-links a:hover {
   background-color: var(--textcolor);
   color: var(--bgcolor);
}

.site-footer {
    padding: 0 1rem;
    margin-top: clamp(4.5rem, 8vw + 3rem, 10rem);
    background: var(--bgcolor);
}

.site-footer-container {
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-footer-copyright {
    color: var(--muted);
    font-size: 0.95rem;
}

.site-footer-social-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.5rem;
}

.site-footer-icon {
    width: 22px;
    height: 22px;
    display: block;
}

.site-footer-social-link {
    color: var(--textcolor);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
    border-radius: 10px;
    transition: background-color 150ms ease;
}

.site-footer-social-link:hover {
    background-color: var(--textcolor);
    color: var(--bgcolor);
}

.brand {
    font-size: 1.5rem;
    white-space: nowrap;
}

.brand-link {
    display: inline-flex; /* in case we want to add an icon later */
    align-items: center;
    padding: 0.625rem 0;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: inherit;
    text-decoration: none;
    transition: opacity 150ms ease;
}

.brand-link:hover {
    opacity: 0.75;
}   

h1 {
    font-size: clamp(2rem, 3.2vw, 2.5rem);
    line-height: 1.1;
}

h2 {
    font-size: clamp(1.35rem, 2vw, 1.6rem);
    line-height: 1.2;
}

.section :not(h2) + h2 {
    margin-top: 2.25rem;
    margin-bottom: 0.75rem;
}

.section {
    padding-block: 4rem 2rem;
    max-width: 70ch; /* set container width for section content, allows margins to center container */
    margin-inline: auto;
}

.section ul {
    margin: 1rem 0 0;
    padding-left: 1.25rem;
}

.section li {
    margin: 0.375rem 0;
}

.hero {
    margin-inline: auto;
    margin-block: clamp(4.5rem, 8vw + 3rem, 10rem);
    /*margin-bottom: clamp(2.5rem, 5vw, 4rem);*/
    text-align: left;
    max-width: 70ch;
    /* Overrides defailt section top and bottom padding only*/
    padding-block: 3rem 2rem;
    padding-inline: clamp(0.75rem, 3vw, 4rem);
    background-color: var(--bgcolor);
    /*border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);*/ /*removed for modernizing design*/
}

.hero h1 {
    line-height: 1.1;
    font-size: clamp(1.6rem, 3vw, 1.85rem);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    line-height: 1.45;
    color: var(--textcolor);
    margin-bottom: 1.5rem
}

.cta-group { /* container for CTA button and helper link */
    align-items: left;
    /*margin-top: clamp(2rem, 4vw, 3.5rem);*/
}

.button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.7rem 1.25rem;
    border-radius: 10px;
    border: 2px solid var(--textcolor);
    background: var(--bgcolor);
    color: var(--textcolor);
    text-decoration: none;
    font-size: 1.0625rem;
    font-weight: 600;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.button:hover {
    background-color: var(--textcolor);
    color: var(--bgcolor);
    cursor: pointer;
}

.button--primary { /* CTA button style */
    display: inline-block;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--textcolor);
    background-color: var(--bgcolor);
    color: var(--textcolor);
    text-decoration: none;
    font-size: 1.0625rem;
    border-radius: 8px;
    /*box-shadow: 0px 1px 7px rgba(0, 0, 0, 0.18);*/ /*removed for modernizing design*/
    font-weight: 600;
}

.button--primary:hover {
    background-color: var(--textcolor);
    color: var(--bgcolor);
}
.button--primary:focus-visible {
    outline: 2px solid var(--textcolor);
}

.cta-helper {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--textcolor);
    text-decoration: none;
    cursor: pointer;
}

.cta-helper:hover {
    text-decoration: underline;
}

.contact-form {
/*    max-width: 30rem; Add if h2 should align with form width */
    margin-inline: auto;
}

.contact-form h2 {
    font-size: 1.7rem;
}

.contact-form .form-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: clamp(0.65rem, 2.5vw, 1rem);
    font-weight: 400;
    resize: vertical;
}

.contact-form-card {
    background: var(--bgcolor);
    padding-inline: clamp(0rem, 3vw, 2rem);
    padding-bottom: 2rem;
    margin-inline: auto;
    /*border-radius: 8px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);*/ /*removed for modernizing design*/
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    background-color: var(--bgcolor);
    padding: 0.6rem 0.75rem;
    border: 2px solid var(--textcolor);
    color: var(--textcolor);
    border-radius: 8px;
    width: 100%;
    font-family: inherit;
    font-weight: 550;
    resize: vertical;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible,
.contact-form select:focus {
    filter: brightness(1.04);
    outline: 2px solid var(--textcolor);
    box-shadow: none;
}

.contact-form textarea {
    min-height: 10rem;
    resize: vertical;
}

.contact-form form button.button {
    align-self: flex-start;
}

.cf-turnstile {
    display: flex;
    justify-content: flex-start;
}

.form-status {
    margin-top: 1rem;
    margin-bottom: 0;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    border: 1px solid transparent;
    font-size: 0.95rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.form-status[data-type="success"] {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #0f5132;
}

.form-status[data-type="error"] {
    color: #842029;
    background-color: #f8d7da;
    border-color: #842029;
}

.form-status[data-type="info"] {
    color: #084298;
    background-color: #cfe2ff;
    border-color: #084298;
}