/* ATM Projekt - Main Styles */

/* Import existing fonts */
@font-face {
    font-family: main;
    src: url('../fonts/OpenSansCondensed-Bold.ttf') format("truetype");
}

@font-face {
    font-family: post;
    src: url('../fonts/OpenSansCondensed-Light.ttf') format("truetype");
}

/* CSS Variables for ATM branding */
:root {
    --atm-green: #354d34; /* matches the logo artwork */
    --atm-light-green: #4a7c5a;
    --atm-accent: #6b9b7a;
    /* Green used for text; separate from --atm-green, which is also a background behind white text */
    --atm-green-text: var(--atm-green);
    --atm-green-text-hover: var(--atm-light-green);
    /* Text on green backgrounds; stays white in dark mode, unlike --white which becomes the dark surface */
    --on-green: #ffffff;
    --white: #ffffff;
    --light-gray: #f8f8f8;
    --medium-gray: #e0e0e0;
    --dark-gray: #333333;
    --text-color: #2c2c2c;
    --max-width: 1200px;
    --section-padding: 80px 0;
    --container-padding: 0 20px;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: post, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--container-padding);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: main;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    font-weight: bold;
}

h2 {
    font-size: 2.5rem;
    font-weight: bold;
}

h3 {
    font-size: 1.8rem;
    font-weight: bold;
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

a {
    color: var(--atm-green-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--atm-green-text-hover);
    opacity: 0.8;
}

/* HERO SECTION */
.hero-section {
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
    padding: 60px 0 0;
    position: relative;
}

.hero-content {
    text-align: center;
    padding: 40px 0 60px;
}

.logo {
    /* width/height attributes only reserve the aspect ratio; the size comes from max-height */
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 120px;
    margin-bottom: 20px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--atm-green-text);
    font-weight: 300;
}

/* NAVIGATION */
.main-nav {
    background-color: var(--atm-green);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-list {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-list li {
    margin: 0 2rem;
}

.nav-list a {
    display: block;
    padding: 1rem 0;
    color: var(--on-green);
    font-family: main;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.nav-list a:hover {
    color: var(--atm-accent);
    transform: translateY(-2px);
}

.cloud-link {
    background-color: var(--atm-light-green);
    padding: 0.8rem 1.5rem !important;
    border-radius: 25px;
    margin: 0.2rem 0;
}

.cloud-link:hover {
    background-color: var(--atm-accent);
    color: var(--on-green) !important;
}

/* SECTION STYLES */
section {
    padding: var(--section-padding);
    scroll-margin-top: 3.5rem; /* keep anchored sections clear of the sticky nav */
}

.section-title {
    text-align: center;
    color: var(--atm-green-text);
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--atm-accent);
    margin: 1rem auto;
}

/* PORTFOLIO SECTION */
.portfolio-section {
    background-color: var(--light-gray);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
}

.project-item {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.project-header {
    padding: 1.25rem 1.5rem 0.9rem;
    border-bottom: 1px solid var(--medium-gray);
}

.project-header h3 {
    color: var(--atm-green-text);
    margin-bottom: 0.5rem;
}

.project-meta {
    display: flex;
    flex-wrap: wrap; /* four fields do not fit one line in the two-column grid */
    gap: 0.25rem 2rem;
    font-size: 0.9rem;
    color: #666;
}

.project-meta span::before {
    content: '•';
    margin-right: 0.5rem;
    color: var(--atm-accent);
}

.project-meta span:first-child::before {
    display: none;
}

.project-gallery {
    position: relative;
    overflow: hidden;
    margin: 0;
}

/* CSS-only gallery: radio inputs select the visible image. */
.gallery-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gallery-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: var(--medium-gray);
}

.gallery-item {
    position: absolute;
    inset: 0;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.gallery-radio:nth-child(1):checked ~ .gallery-container .gallery-item:nth-child(1),
.gallery-radio:nth-child(2):checked ~ .gallery-container .gallery-item:nth-child(2),
.gallery-radio:nth-child(3):checked ~ .gallery-container .gallery-item:nth-child(3),
.gallery-radio:nth-child(4):checked ~ .gallery-container .gallery-item:nth-child(4),
.gallery-radio:nth-child(5):checked ~ .gallery-container .gallery-item:nth-child(5),
.gallery-radio:nth-child(6):checked ~ .gallery-container .gallery-item:nth-child(6),
.gallery-radio:nth-child(7):checked ~ .gallery-container .gallery-item:nth-child(7),
.gallery-radio:nth-child(8):checked ~ .gallery-container .gallery-item:nth-child(8) {
    display: block;
    opacity: 1;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Gallery navigation: compact strip below the image. */
.gallery-nav {
    position: static;
    transform: none;
    width: 100%;
    min-height: 30px;
    margin: 0;
    padding: 8px 0 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: auto;
}

.gallery-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.95);
    background: rgba(0,0,0,0.18);
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    display: block;
    box-shadow: 0 1px 3px rgba(0,0,0,0.35);
}

.gallery-dot:hover {
    transform: scale(1.12);
    background-color: rgba(255,255,255,0.55);
}

.gallery-radio:nth-child(1):checked ~ .gallery-nav .gallery-dot:nth-child(1),
.gallery-radio:nth-child(2):checked ~ .gallery-nav .gallery-dot:nth-child(2),
.gallery-radio:nth-child(3):checked ~ .gallery-nav .gallery-dot:nth-child(3),
.gallery-radio:nth-child(4):checked ~ .gallery-nav .gallery-dot:nth-child(4),
.gallery-radio:nth-child(5):checked ~ .gallery-nav .gallery-dot:nth-child(5),
.gallery-radio:nth-child(6):checked ~ .gallery-nav .gallery-dot:nth-child(6),
.gallery-radio:nth-child(7):checked ~ .gallery-nav .gallery-dot:nth-child(7),
.gallery-radio:nth-child(8):checked ~ .gallery-nav .gallery-dot:nth-child(8) {
    background-color: rgba(255,255,255,0.95);
}

.project-description {
    padding: 1rem 1.5rem 1.25rem;
}

.project-description p {
    line-height: 1.7;
    margin-bottom: 0;
}

/* ABOUT SECTION */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* filees:space logo in the about text; dark mode colours live inside the SVG */
.filees-logo {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

.team-section {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--medium-gray);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.team-member {
    padding: 1.5rem;
    background-color: var(--light-gray);
    border-radius: 8px;
}

.team-member h4 {
    color: var(--atm-green-text);
    margin-bottom: 0.5rem;
}

.role {
    color: #666;
    font-style: italic;
}

/* SERVICES SECTION */
.services-section {
    background-color: var(--light-gray);
}

.services-content {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.services-content > .services-list {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.service-item {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-3px);
}

.service-item h3 {
    color: var(--atm-green-text);
    margin-bottom: 1rem;
}

.process-section {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
}

.process-section h3 {
    color: var(--atm-green-text);
    margin-bottom: 1.5rem;
}

.process-list {
    list-style: none;
    counter-reset: step-counter;
}

.process-list li {
    counter-increment: step-counter;
    margin-bottom: 1rem;
    padding-left: 3rem;
    position: relative;
    line-height: 1.6;
}

.process-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background-color: var(--atm-green);
    color: var(--on-green);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: main;
    font-weight: bold;
}

/* CONTACT TOAST (CSS-only) */
/* Opened by :target (#contact in the menu or the toggle) or by .is-open after form submit. */
/* The section itself is fixed too, so jumping to #contact does not scroll the page to its old spot. */
.contact-toast {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 0;
    height: 0;
    padding: 0;
    z-index: 200;
}

.contact-toast-toggle {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    background-color: var(--atm-green);
    color: #ffffff;
    font-family: main;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, opacity 0.3s ease, visibility 0s;
}

.contact-toast-toggle::before {
    content: '';
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background-color: var(--atm-accent);
}

.contact-toast-toggle:hover {
    background-color: var(--atm-light-green);
    color: #ffffff;
    opacity: 1;
}

.contact-toast-panel {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 210;
    width: min(900px, calc(100vw - 3rem));
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 2rem;
    background-color: var(--white);
    border-top: 4px solid var(--atm-green);
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(1.5rem);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}

.contact-toast:target .contact-toast-panel,
.contact-toast.is-open .contact-toast-panel {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s;
}

.contact-toast:target .contact-toast-toggle,
.contact-toast.is-open .contact-toast-toggle {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.contact-toast-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--atm-green-text);
}

.contact-toast-close:hover {
    background-color: var(--light-gray);
    opacity: 1;
}

.contact-toast .section-title {
    text-align: left;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-right: 3rem;
}

.contact-toast .section-title::after {
    margin: 0.75rem 0 0;
}

.contact-toast .contact-content {
    gap: 2rem;
    max-width: none;
}

.contact-toast .contact-info {
    gap: 1rem;
    align-content: start;
}

.contact-toast .contact-item {
    padding: 1rem 1.25rem;
}

.contact-toast .contact-form {
    padding: 0;
    background: none;
    box-shadow: none;
}

/* CONTACT SECTION */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    gap: 2rem;
}

.contact-item {
    padding: 1.5rem;
    background-color: var(--light-gray);
    border-radius: 8px;
}

.contact-item h3 {
    color: var(--atm-green-text);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.contact-item a {
    font-weight: 500;
}

.contact-form {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.contact-form h3 {
    color: var(--atm-green-text);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: main;
    color: var(--atm-green-text);
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--medium-gray);
    border-radius: 4px;
    font-family: post;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--atm-green);
}

.submit-btn {
    background-color: var(--atm-green);
    color: var(--on-green);
    padding: 1rem 2rem;
    border: none;
    border-radius: 4px;
    font-family: main;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    background-color: var(--atm-light-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.form-message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* GO UP BUTTON */
.go-up {
    position: fixed;
    right: 1.5rem;
    bottom: 5.5rem; /* stacked above the contact toggle */
    z-index: 150;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    border: 2px solid var(--atm-green);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: background-color 0.3s ease, translate 0.3s ease;
}

.go-up::before {
    content: '';
    width: 0.7rem;
    height: 0.7rem;
    border-top: 3px solid var(--atm-green);
    border-left: 3px solid var(--atm-green);
    transform: translateY(20%) rotate(45deg);
}

.go-up:hover {
    background-color: var(--atm-green);
    translate: 0 -2px;
    opacity: 1;
}

.go-up:hover::before {
    border-color: #ffffff;
}

/* Where supported, fade the button in only after the page is scrolled; elsewhere it is always visible. */
@supports (animation-timeline: scroll()) {
    .go-up {
        animation: go-up-reveal linear both;
        animation-timeline: scroll(root);
        animation-range: 0 300px;
    }
}

@keyframes go-up-reveal {
    from {
        opacity: 0;
        visibility: hidden;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        visibility: visible;
        transform: none;
    }
}

/* FOOTER */
.main-footer {
    background-color: var(--atm-green);
    color: var(--on-green);
    text-align: center;
    padding: 2rem 0;
}

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
