/* Fonts (best at the very top) */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&family=Work+Sans:ital,wght@0,100..900;1,100..900&display=swap");

/* --- Root layout: header | main | footer (FLEX ONLY) --- */
html {
    height: -webkit-fill-available;
    /* iOS Safari */
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    /* Mobile-safe viewport height (newer browsers) */
    min-height: 100dvh;
    /* Fallbacks */
    min-height: 100vh;
    min-height: -webkit-fill-available;
    -webkit-font-smoothing: antialiased;
    font-family: "Work Sans", system-ui, sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
}

/* The main content expands to push footer down */
main {
    flex: 1 0 auto;
    overflow: visible;
    /* ensure page (not main) scrolls */
    min-height: 0;
    /* safe default to avoid overflow bugs */
}

/* Footer should be in normal flow, never fixed */
footer {
    position: static !important;
    margin-top: 0 !important;
    background: #333;
    color: white;
    text-align: center;
    padding: 1em;
    font-size: 0.9em;
}

/* (Avoid forcing section to fill heights; it can create inner scroll areas)
.section-full { min-height: 100%; }
*/

/* ---------------------------------------------- */
/* Existing visual styles                         */
/* ---------------------------------------------- */

header {
    background: #4CAF50;
    color: white;
    padding: 1em 2em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h1 {
    margin: 0;
    font-size: 1.8em;
}

nav a {
    color: white;
    margin-left: 1.2em;
    text-decoration: none;
    font-weight: bold;
}

nav a:hover {
    text-decoration: underline;
}

section {
    padding: 3em 0;
}

.section-content {
    max-width: 1000px;
    margin: auto;
    padding: 0 2em;
    text-align: center;
}

h2 {
    font-size: 2.5em;
    margin-bottom: 0.5em;
}

p,
ul {
    font-size: 1.25em;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

ul {
    list-style: none;
    padding: 0;
}

ul li {
    margin: 0.5em 0;
}

a.button {
    display: inline-block;
    margin-top: 2em;
    padding: 0.75em 1.5em;
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s;
}

a.button:hover {
    background-color: #388e3c;
}

.logo {
    max-width: 180px;
    margin-bottom: 1.5em;
}

/* mobile nav */
@media (max-width: 768px) {
    nav#nav-links {
        display: none;
        flex-direction: column;
        background-color: #4CAF50;
        position: absolute;
        top: 70px;
        right: 20px;
        padding: 1em;
        border-radius: 8px;
    }

    nav#nav-links a {
        display: block;
        margin: 0.5em 0;
    }

    nav#nav-links.show {
        display: flex;
    }

    #menu-toggle {
        display: block;
    }
}

/* Design tokens */
:root {
    --color-background: #cbd5e1;
    --color-background-alt: #3a9092;
    --color-border-active: #23494c;
    --color-border-default: #94a3b8;
    --color-highlight: #7ecac7;
    --color-primary: #23494c;
    --color-primary-active: #122d30;
    --color-text-default: #0f172a;
    --color-text-muted: #475569;
    --font-family-body: "Work Sans", system-ui, sans-serif;
    --font-family-display: "IBM Plex Serif", system-ui, sans-serif;
}

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

* {
    border: 0;
    margin: 0;
    padding: 0;
}

button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    font-size: 100%;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    margin: 0;
    padding: 0;
}

[type="checkbox"],
[type="radio"],
[type="range"] {
    appearance: none;
    flex-shrink: 0;
    padding: 0;
    user-select: none;
}

[type="checkbox"]:focus,
[type="radio"]:focus,
[type="range"]:focus {
    outline: none;
}

/* Form styles */
.fs-form {
    display: grid;
    row-gap: 1.5rem;
}

.fs-form.fs-layout__2-column {
    column-gap: 1.5rem;
    grid-template-columns: 1fr 1fr;
}

fieldset {
    display: grid;
    margin: 1.5rem 0;
    row-gap: 1.5rem;
}

.fs-form.fs-layout__2-column fieldset {
    column-gap: 1.5rem;
    grid-template-columns: 1fr 1fr;
    grid-column: 1 / -1;
}

.fs-fieldset-title {
    color: var(--color-text-default);
    font-family: var(--font-family-display);
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.75rem;
    margin-bottom: 1.5rem;
    grid-column: 1 / -1;
}

.fs-field {
    display: flex;
    flex-direction: column;
    row-gap: 0.375rem;
}

.fs-label {
    color: var(--color-text-default);
    display: block;
    font-family: var(--font-family-display);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25rem;
}

.fs-description {
    color: var(--color-text-muted);
    display: block;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.fs-button-group {
    display: flex;
    flex-direction: row-reverse;
    column-gap: 1.5rem;
}

.fs-form.fs-layout__2-column .fs-button-group {
    grid-column: 1 / -1;
}

.fs-button {
    background-color: var(--color-primary);
    border-radius: 0.375rem;
    color: white;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1rem;
    padding: 1rem 2rem;
}

.fs-button:hover,
.fs-button:focus-visible {
    background-color: var(--color-primary-active);
}

.fs-button:focus-visible {
    outline: 3px solid var(--color-highlight);
}

.fs-input,
.fs-select {
    appearance: none;
    border-radius: 0.375rem;
    box-shadow: var(--color-border-default) 0 0 0 1px inset;
    color: var(--color-text-default);
    font-size: 1rem;
    height: 2.5rem;
    line-height: 1.5rem;
    outline: none;
    padding: 0 0.75rem;
}

.fs-input:focus-visible,
.fs-select:focus-visible {
    box-shadow: var(--color-border-active) 0 0 0 1.5px inset;
    outline: 3px solid var(--color-highlight);
}

.fs-input::placeholder {
    color: var(--color-text-muted);
}

.fs-checkbox-group,
.fs-radio-group {
    display: flex;
    flex-direction: column;
    row-gap: 0.5rem;
}

.fs-checkbox-field,
.fs-radio-field {
    column-gap: 0.5rem;
    display: flex;
}

.fs-checkbox-wrapper,
.fs-radio-wrapper {
    align-items: center;
    display: flex;
    height: 1.25rem;
}

fs-checkbox,
.fs-radio {
    background-color: #fff;
    border: 1px solid var(--color-text-default);
    height: 1rem;
    width: 1rem;
}

.fs-checkbox {
    border-radius: 0.25rem;
}

.fs-radio {
    border-radius: 100%;
}

.fs-checkbox:checked,
.fs-radio:checked {
    background-color: var(--color-primary);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    border-color: transparent;
}

.fs-checkbox:checked {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
}

.fs-radio:checked {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
}

.fs-checkbox:focus-visible,
.fs-radio:focus-visible {
    outline: 3px solid var(--color-highlight);
}

.fs-select {
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.fs-slider {
    background: transparent;
    cursor: pointer;
    height: 1.25rem;
    width: 100%;
}

.fs-slider::-moz-range-track,
.fs-slider::-webkit-slider-runnable-track {
    background-color: var(--color-background);
    border-radius: 0.5rem;
    height: 0.5rem;
}

.fs-slider::-moz-range-thumb,
.fs-slider::-webkit-slider-thumb {
    background-color: var(--color-primary);
    border: none;
    border-radius: 50%;
    height: 1.25rem;
    width: 1.25rem;
}

.fs-slider::-webkit-slider-thumb {
    appearance: none;
    margin-top: -0.375rem;
}

.fs-slider:focus-visible::-moz-range-thumb,
.fs-slider:focus-visible::-webkit-slider-thumb {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.fs-switch {
    background-color: var(--color-background-alt);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='white'/%3e%3c/svg%3e");
    background-position: left center;
    background-repeat: no-repeat;
    border-radius: 1.5rem;
    cursor: pointer;
    height: 1.5rem;
    transition: 200ms;
    width: 2.75rem;
}

.fs-switch:checked {
    background-color: var(--color-primary);
    background-position: right center;
}

.fs-switch:focus-visible {
    outline: 3px solid var(--color-highlight);
}

.fs-textarea {
    appearance: none;
    border-radius: 0.375rem;
    box-shadow: var(--color-border-default) 0 0 0 1px inset;
    color: var(--color-primary);
    font-size: 1rem;
    line-height: 1.5rem;
    outline: none;
    padding: 0.5rem 0.75rem;
    resize: vertical;
}

.fs-textarea:focus-visible {
    box-shadow: var(--color-border-active) 0 0 0 1.5px inset;
    outline: 3px solid var(--color-highlight);
}

.fs-textarea::placeholder {
    color: var(--color-text-muted);
}

/* helpers */
.col-span-full {
    grid-column: 1 / -1;
}

.slider-label-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 0.25rem;
}

.slider-label-text {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: center;
    white-space: nowrap;
}

/* === Mobile-first layout fixes (append to end of style.css) === */

/* Prevent horizontal scroll anywhere */
html,
body {
    overflow-x: hidden;
}

/* Keep big containers within viewport */
header,
main,
footer,
.section-full,
.section-content,
form,
fieldset {
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: clip;
}

/* Make the hamburger actually visible on mobile
   (overrides inline display:none that’s in HTML) */
@media (max-width: 768px) {
    #menu-toggle {
        display: block !important;
    }
}

/* Header as anchor for dropdown menu */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Desktop: show links inline, hide burger, keep nav static */
@media (min-width: 769px) {
    #nav-links {
        display: flex !important;
        gap: 1.2em;
        position: static;
    }

    #menu-toggle {
        display: none !important;
    }
}

/* Mobile: dropdown menu */
@media (max-width: 768px) {

    /* nav hidden by default */
    #nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 8px);
        /* just below header */
        right: 16px;
        left: 16px;
        background: #4CAF50;
        padding: 12px;
        border-radius: 10px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
        z-index: 2000;
        max-width: calc(100vw - 32px);
    }

    /* show when toggled */
    #nav-links.show {
        display: flex;
    }

    #nav-links a {
        display: block;
        color: #fff;
        text-decoration: none;
        font-weight: 600;
        padding: 8px 10px;
        border-radius: 8px;
    }

    #nav-links a:hover {
        background: rgba(255, 255, 255, .12);
    }

    /* Make the button pleasant */
    #menu-toggle {
        background: none;
        border: none;
        color: #fff;
        font-size: 1.8em;
        cursor: pointer;
    }
}

/* Form: stack to one column on small screens (your forms use .fs-form.fs-layout__2-column) */
@media (max-width: 768px) {
    .fs-form.fs-layout__2-column {
        grid-template-columns: 1fr !important;
    }

    .fs-form.fs-layout__2-column fieldset {
        grid-template-columns: 1fr !important;
    }

    .fs-form.fs-layout__2-column .col-span-full,
    .fs-form.fs-layout__2-column .fs-button-group,
    .fs-form.fs-layout__2-column fieldset>* {
        grid-column: 1 / -1 !important;
    }
}

/* Ensure inputs never exceed container width */
img,
video,
canvas,
iframe,
input,
select,
textarea,
button {
    max-width: 100%;
}

/* Break long words/URLs that could blow layout wider than screen */
.section-content,
p,
ul,
li,
label {
    overflow-wrap: break-word;
    word-break: break-word;
}

@media (min-width: 992px) {
    .hero {
        /* <-- use the class on the section that has the bg */
        min-height: 100vh;
        /* or 100svh for mobile-safe units */

    }
}

/* Professional, low-distraction gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.gallery-polaroids {
    max-width: 900px;
    /* slightly narrower than text block */
    margin-inline: auto;
    /* center it */
    opacity: 0.95;
    /* lower visual weight vs. hero text */
}

.gallery-card {
    --r: 0deg;
    /* per-card rotation set below */
    background: #fff;
    padding: 8px;
    /* “polaroid” frame */
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(2, 8, 23, 0.08);
    transform: rotate(var(--r));
    transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease, opacity 220ms ease;
}

.gallery-card img {
    width: 100%;
    height: 300px;
    /* consistent card height */
    object-fit: cover;
    /* neat crop */
    display: block;
    border-radius: 8px;
    filter: saturate(0.9) contrast(0.98);
    /* slightly muted so text stays the star */
}

/* Subtle, alternating tilt */
.gallery-polaroids .gallery-card:nth-child(1) {
    --r: -2.2deg;
}

.gallery-polaroids .gallery-card:nth-child(2) {
    --r: 1.6deg;
}

.gallery-polaroids .gallery-card:nth-child(3) {
    --r: -1.0deg;
}

/* On hover: gently straighten & brighten (desktop only) */
.gallery-card:hover {
    transform: rotate(0deg) translateY(-2px);
    box-shadow: 0 12px 30px rgba(2, 8, 23, 0.15);
}

.gallery-card:hover img {
    filter: saturate(1) contrast(1);
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {

    .gallery-card,
    .gallery-card:hover {
        transition: none;
    }
}

/* Hide entire gallery on mobile/tablet (keeps your original intent) */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}

/* Keep header above any hero artwork */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

@media (max-width: 768px) {

    /* Show burger on mobile */
    #menu-toggle {
        display: block !important;
        touch-action: manipulation;
        /* improves iOS tap */
    }

    /* Hide menu by default; show as dropdown when toggled */
    #nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 8px);
        /* just below header */
        right: 16px;
        left: 16px;
        background: #4CAF50;
        padding: 12px;
        border-radius: 10px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
        z-index: 2000;
    }

    #nav-links.show {
        display: flex !important;
    }
}

/* Desktop: inline links, hide burger */
@media (min-width: 769px) {
    #nav-links {
        display: flex !important;
        gap: 1.2em;
        position: static;
    }

    #menu-toggle {
        display: none !important;
    }
}