/*
 * peterpetrik.com — modernized from HTML5 UP "Big Picture"
 * Original: html5up.net | @n33co | CCA 3.0 license
 */

/* --- Reset & Base --- */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
    font-weight: 300;
    font-size: 18pt;
    line-height: 1.75em;
    color: #39454b;
    letter-spacing: 0.5px;
}

h1, h2, h3 {
    font-weight: 900;
    color: inherit;
}

h2 {
    font-size: 2.25em;
    letter-spacing: -2px;
    line-height: 1.25em;
}

strong, b {
    font-weight: 900;
}

a {
    color: #98c593;
    transition: color 0.2s ease;
}

p {
    margin-bottom: 1em;
}

header {
    margin-bottom: 1em;
}

header p {
    margin: 1em 0 0 0;
    padding: 0 0 0.5em 0;
}

/* --- Sections (shared) --- */

.section {
    position: relative;
    overflow: hidden;
}

.section--full {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.section__overlay {
    position: absolute;
    inset: 0;
    background: url('/images/overlay.png') repeat;
    z-index: 1;
    pointer-events: none;
}

.section__content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 3em 2em;
}

.section__content--center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.section__content--left {
    padding-left: 3em;
}

/* --- Dark sections --- */

.section--dark {
    color: #fff;
}

.section--dark a {
    color: #fff;
}

/* --- Hero section (#intro) --- */

.section--hero {
    background: url('/images/peter-petrik.webp') center top / cover no-repeat fixed;
    align-items: flex-end;
    justify-content: flex-end;
    padding-bottom: 6em;
}

.section--hero h2 {
    font-size: 4.25em;
    line-height: 1em;
}

.section--hero .section__content {
    transition: opacity 1s ease;
    text-align: right;
    align-items: flex-end;
    padding-right: 8%;
}

.section--hero.inactive .section__content {
    opacity: 0;
}

/* --- Info section --- */

.section--info {
    background: url('/images/sailing.webp') center center / cover no-repeat fixed;
}

.section--info .section__content {
    transition: opacity 1s ease;
}

.section--info.inactive .section__content {
    opacity: 0;
}

/* --- Box (white content card in info section) --- */

.box {
    background: #fff;
    color: #39454b;
    padding: 3.5em 2.5em;
    width: 35%;
}

.box a {
    color: darkblue;
    font-weight: 900;
}

.box__link {
    text-align: right;
}

/* --- Contact section --- */

.section--contact {
    background: #f5f6f7;
    padding: 6em 0;
}

.section--contact header {
    margin-bottom: 2em;
}

.section--contact a.return-link {
    color: #8b2252;
    font-weight: 900;
    text-decoration: none;
}

.section--contact a.return-link:hover {
    text-decoration: underline;
}

/* --- Form --- */

.form-container {
    width: 75%;
    max-width: 1080px;
}

.form-row {
    display: flex;
    gap: 1em;
    margin-bottom: 1em;
}

.form-field {
    flex: 1;
    margin-bottom: 1em;
}

.form-container input[type="text"],
.form-container input[type="email"],
.form-container textarea {
    appearance: none;
    display: block;
    width: 100%;
    padding: 0.65em 0.75em;
    background: none;
    border: solid 2px rgba(185, 186, 187, 0.25);
    color: inherit;
    border-radius: 0.5em;
    outline: none;
    font: inherit;
    transition: border-color 0.2s ease;
}

.form-container input[type="text"]:focus,
.form-container input[type="email"]:focus,
.form-container textarea:focus {
    border-color: #9ac8e9;
}

.form-container input[type="text"],
.form-container input[type="email"] {
    line-height: 1.35em;
}

.form-container textarea {
    min-height: 8em;
    resize: vertical;
}

.form-container input::placeholder,
.form-container textarea::placeholder {
    color: rgba(145, 146, 147, 0.85);
}

.form-turnstile {
    text-align: center;
    padding: 1em 0;
}

.form-actions {
    text-align: center;
}

.form-msg {
    display: none;
    text-align: center;
    padding: 1em;
    margin-top: 1em;
    font-size: 0.9em;
}

.form-msg--success {
    color: #038127;
}

.form-msg--error {
    color: #b52b27;
}

/* --- Buttons --- */

.button {
    appearance: none;
    background-color: #038127;
    border: 0;
    border-radius: 3.5em;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    height: 3.5em;
    line-height: 3.5em;
    padding: 0 2em;
    text-align: center;
    text-decoration: none;
    font: inherit;
    font-weight: 900;
    transition: background-color 0.2s ease;
}

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

.button:active {
    background-color: #88b583;
}

.button:disabled {
    background-color: #b9babb;
    cursor: not-allowed;
}

/* Ghost button (transparent with border) */
.button--ghost {
    background-color: transparent;
    border: solid 2px rgba(255, 255, 255, 0.5);
}

.button--ghost:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Down-arrow button */
.button--down {
    width: 5em;
    height: 5em;
    line-height: 4.5em;
    padding: 0;
    background-image: url('/images/dark-arrow.svg');
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
    text-indent: -9999px;
}

/* Anchored button (bottom of section) */
.button--anchored {
    position: absolute;
    left: 50%;
    bottom: 0;
    margin-left: -2.5em;
    border-bottom: 0;
    border-radius: 3em 3em 0 0;
    height: 4.5em;
    z-index: 3;
}

/* --- Footer --- */

#footer {
    height: 5em;
    line-height: 5em;
    background: #39454b;
    color: rgba(185, 186, 187, 0.5);
    text-align: center;
    font-size: 0.9em;
}

/* --- Scroll-reveal animation --- */

.section.inactive .section__content {
    opacity: 0;
}

/* --- Responsive --- */

@media screen and (max-width: 1920px) {
    body { font-size: 17pt; }
    .box { width: 40%; }
}

@media screen and (max-width: 1680px) {
    body { font-size: 15pt; }
}

@media screen and (max-width: 1280px) {
    body { font-size: 13pt; }
    .box { width: 40%; }
}

@media screen and (max-width: 1000px) {
    body { font-size: 13pt; }
    .box { width: 60%; }

    #footer {
        height: auto;
        line-height: inherit;
        padding: 2em 1em;
    }
}

@media screen and (max-width: 736px) {
    body {
        min-width: 320px;
        font-size: 12pt;
        line-height: 1.5em;
    }

    h2 {
        font-size: 1.5em;
        letter-spacing: -1px;
    }

    .section--full {
        min-height: auto;
    }

    .section--hero {
        padding: 12em 15px 4em 15px;
        background-attachment: scroll;
    }

    .section--hero h2 {
        font-size: 3em;
    }

    .section--info {
        padding: 6em 15px;
        background-attachment: scroll;
    }

    .section--info .section__content {
        flex-direction: column;
        align-items: center;
    }

    .box {
        width: 100%;
        padding: 1.5em 1.25em;
        background-color: rgba(255, 255, 255, 0.9);
        text-align: center;
    }

    .box__link {
        text-align: center;
    }

    .button--anchored {
        display: none;
    }

    .section--contact {
        padding: 3em 10px;
    }

    .form-container {
        width: 100%;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Touch devices: disable fixed background (causes jank on mobile) */
@media (hover: none) {
    .section--hero,
    .section--info {
        background-attachment: scroll;
    }
}
