/* @font-face {
    font-family: 'Helvetica Neue';
    src: url('fonts/HelveticaNeueCyr-Medium.eot');
    src: local('Helvetica Neue Medium'),
        url('fonts/HelveticaNeueCyr-Medium.eot?#iefix') format('embedded-opentype'),
        url('fonts/HelveticaNeueCyr-Medium.woff2') format('woff2'),
        url('fonts/HelveticaNeueCyr-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Helvetica Neue';
    src: url('fonts/HelveticaNeueCyr-MediumItalic.eot');
    src: local('Helvetica Neue Medium Italic'),
        url('fonts/HelveticaNeueCyr-MediumItalic.eot?#iefix') format('embedded-opentype'),
        url('fonts/HelveticaNeueCyr-MediumItalic.woff2') format('woff2'),
        url('fonts/HelveticaNeueCyr-MediumItalic.woff') format('woff');
    font-weight: 500;
    font-style: italic;
}

@font-face {
    font-family: 'Helvetica Neue';
    src: url('fonts/HelveticaNeueCyr-Black.eot');
    src: local('Helvetica Neue Black'),
        url('fonts/HelveticaNeueCyr-Black.eot?#iefix') format('embedded-opentype'),
        url('fonts/HelveticaNeueCyr-Black.woff2') format('woff2'),
        url('fonts/HelveticaNeueCyr-Black.woff') format('woff');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Helvetica Neue';
    src: url('fonts/HelveticaNeueCyr-BlackItalic.eot');
    src: local('Helvetica Neue Black Italic'),
        url('fonts/HelveticaNeueCyr-BlackItalic.eot?#iefix') format('embedded-opentype'),
        url('fonts/HelveticaNeueCyr-BlackItalic.woff2') format('woff2'),
        url('fonts/HelveticaNeueCyr-BlackItalic.woff') format('woff');
    font-weight: 900;
    font-style: italic;
} */

@import url('https://fonts.cdnfonts.com/css/helvetica-neue-55');

                

:root{
    /* The two shared palette colours. The studio mapping (which one is
       "normal", which is "inverted") lives in site/models/main-page.php and
       arrives as data-theme on .page-container — see the html:has() rule
       below. Non-studio pages (home, error) just use these defaults. */
    --ink: #111184;
    --sky: #678dc6;
    --main: var(--ink);
    --background: var(--sky);
    --font-size: 16px;
    --letter-spacing: 0px;
    --line-height: 1.5;
    --margin: 16px;
    --border-size: 1px;
    --header-height: 100px;
    --footer-height: 48px;
}

/* -^-^-^-^-^-^ */
/* SETUP        */
/* -^-^-^-^-^-^ */

html {
    box-sizing: border-box;
    font-family: "Helvetica Neue", sans-serif;
    font-weight: 300;
    font-optical-sizing: auto;
    font-size: var(--font-size);
    letter-spacing: var(--letter-spacing);
    line-height: var(--line-height);
    -ms-overflow-style: none;
    scrollbar-width: none;
    height: 100%;
    background-color: var(--background);
}
html::-webkit-scrollbar {display: none;}
html:has(.page-container[data-theme="inverted"]) {
    --main: var(--sky);
    --background: var(--ink);
}
body,
body *,
body > * {
    margin: 0;
    scrollbar-width: none;
    cursor: none;
}

*,
*:before,
*:after {
    box-sizing: inherit;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* -^-^-^-^-^-^ */
/* CORE STYLING */
/* -^-^-^-^-^-^ */
a {
    color: inherit;
    text-decoration: none;
}

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

h1{font-size: 4.2rem; font-weight: 300;}
h2{font-size: 2rem; font-weight: 300;}
h3{font-size: 1rem; font-weight: 300;}
p {min-height: var(--margin); }
p b, p strong {font-weight: 500;}
p em, p i{font-style: oblique 25deg;}
p a{position: relative;}
p a::before{
    content: '';
    background-color: var(--main);
    position: absolute;
    width: 100%;
    left: 0;
    bottom: 0;
    height: var(--border-size);
    transition: all 0.2s ease-in-out;
}
p a:hover::before{width: 0;}
hr {
  height: var(--border-size);
  color: var(--main);
  margin: var(--margin) 0;
  border: none;
  background-color: var(--main);
}
blockquote {
  font-size: 1.2rem;
  font-weight: 500;
  font-style: italic;
  text-align: center;
  border-bottom: var(--border-size) solid;
}
blockquote + p { text-align: right;}

figure {width: 100%;}
img{width: 100%;}
figcaption{text-align: right;}

/* -^-^-^-^-^-^ */
/* LAYOUT       */
/* -^-^-^-^-^-^ */

.circle {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 5;
    width: 60px;
    height: 60px;
    border-radius: 30px;
    mix-blend-mode: difference;
    background-color: white;
    pointer-events: none;
}

.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    background-color: var(--background);
    color: var(--main);
}
.main-container {
    flex: 1 0 auto;
}
.main-container p {margin-bottom: var(--margin)}
.header:not(.home),
.main-container:not(.home),
footer:not(.home) { padding: var(--margin);}
.main-container:not(.home, .projects){
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
}
.header {
    display: flex;
    justify-content: space-between;
    position: relative;
}
.header:not(.home)::after,
.footer:not(.home)::before {
    content: "";
    position: absolute;
    height: var(--border-size);
    width: calc(100% - var(--margin) * 2);
    background-color: var(--main);
}
.header:not(.home)::after{bottom: 0;}
.header .title-container {
    display: flex;
    gap: var(--margin);
    line-height: 1;
}
.header .section-selector {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    margin-bottom: 3px;
}
.header .section-selector h2:not(.active) {
    position: absolute;
    bottom: 0;
    left: 0;
    opacity: 0;
    transform: translateY(0);
    transition: opacity 0.4s, transform 0.4s;
    pointer-events: none;
}
.header .section-selector:hover h2:not(.active),
.header .section-selector:focus-within h2:not(.active) {
    opacity: 1;
    transform: translateY(-100%);
    pointer-events: auto;
}
.header .main-menu {
    display: flex;
    gap: var(--margin);
    align-items: end;
    position: relative;
}
.header .main-menu li{
    padding: 5px;
    border: var(--border-size) solid transparent;
}
.slide-indicator {
    position: absolute;
    top: 0;
    left: 0;
    box-sizing: border-box;
    border: var(--border-size) solid var(--main);
    opacity: 0;
    pointer-events: none;
}

.footer{
    position: relative;
    display: flex;
    justify-content: space-between;
    /* text-align: left; */
}
.footer:not(.home)::before{top: 0;}

.button {
    border: var(--main) solid 1px;
    padding: 5px 8px;
}

/* -^-^-^-^-^-^ */
/* HOME         */
/* -^-^-^-^-^-^ */

/* overscroll bands split 50/50 to match the two tiles (sky = carrelage,
   ink = menuiserie — follows the studio order in site.yml / the model).
   Rotated to `to right` on mobile, where the tiles become columns. */
html:has(.main-container.home) {
    background: linear-gradient(to bottom, var(--sky) 50%, var(--ink) 50%);
}

.tile {
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.tile h1 {
  font-size: 16.5vw;
  
  line-height: 1;
}

/* -^-^-^-^-^-^ */
/* MAIN-PAGE    */
/* -^-^-^-^-^-^ */
.grid{
    display: grid;
    grid-template-columns: repeat(3, calc((100% - (var(--margin) * 2)) / 3) );
    gap: var(--margin);
}
.grid:not(:last-of-type) { margin-bottom: var(--margin); }
.col {
    display: flex;
    flex-direction: column;
}
.blocks.type-text.align-top { margin-top: 0; margin-bottom: auto; }
.blocks.type-text.align-center { margin-top: auto; margin-bottom: auto; }
.blocks.type-text.align-bottom { margin-top: auto; margin-bottom: 0; }
.blocks ul {
    list-style: disc;
    padding: var(--margin);
}

/* -^-^-^-^-^-^-^-^ */
/* PROJECT-LIST     */
/* -^-^-^-^-^-^-^-^ */

.project-item {
    height: 80px;
    display: flex;
    position: relative;
    align-items: center;
    border-bottom: 1px solid;
}
.project-item:first-of-type {
    height: calc(80px - var(--margin));
    align-items: flex-start;
}   

.project-item a{
    display: block;
    width: fit-content;
    position: relative;
}
.project-cover {
    position: absolute;
    z-index: 2;
    max-width: 30vw;
    right: 0;
    top: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.project-item a:hover ~ .project-cover {
    opacity: 1;
}
.project-item:first-of-type .project-cover{
    top: calc(var(--margin) * -1);
}

/* -^-^-^-^-^-^-^-^ */
/* PROJECT-ITEM     */
/* -^-^-^-^-^-^-^-^ */

.main-container.project-single {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--margin);
    position: relative;
}
.project-info {
    display: flex;
    flex-direction: column;
    gap: calc(var(--margin) * 3);
    height: fit-content;
    max-height: calc(100vh - 100px - (var(--margin) * 2));
    position: sticky;
    top: 0;
}
.project-info .project-nav {
    display: flex;
    gap: var(--margin);
    position: relative;
    justify-content: flex-start;
}
/* Buttons read as plain padded text; the sliding indicator draws the outline */
.project-nav .button {
    border-color: transparent;
}
.project-description{
    margin-bottom: var(--margin);
}
.project-content .gallery{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--margin);
    position: relative;
}
.project-content .gallery .image-item{
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}
.project-content .gallery .image-item img{
    flex: 1;
    min-height: 0;
    width: 100%;
    object-fit: contain;
    object-position: center;
}

/* -^-^-^-^-^-^ */
/* CONTACT      */
/* -^-^-^-^-^-^ */

.main-container.contact{
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 2fr;
    gap: var(--margin);
    position: relative;
}

.honeypot {
    position: absolute;
    left: -9999px;
}
.contact-header{line-height: 1;}
.contact-form form {
    display: flex;
    flex-direction: column;
    gap: var(--margin);
    margin-top: var(--margin);
}
.contact-form .field {
    display: flex;
    flex-direction: column;
    gap: calc(var(--margin) / 2);
}
.contact-form abbr { text-decoration: none; }

.contact-form input,
.contact-form textarea {
    font: inherit;
    letter-spacing: inherit;
    color: var(--main);
    background: transparent;
    border: var(--border-size) solid var(--main);
    padding: calc(var(--margin) / 2);
}
/* text inputs are just an underline; textarea keeps the full box */
.contact-form input:not([type="submit"]) {
    border-width: 0 0 var(--border-size);
    padding-inline: 0;
}
.contact-form textarea {
    min-height: 30vh;
    margin-top: var(--margin);
    resize: vertical;
}
/* focus doubles the line/border instead of an outline — no layout shift */
.contact-form input:not([type="submit"]):focus {
    outline: none;
    box-shadow: 0 var(--border-size) 0 var(--main);
}
.contact-form textarea:focus {
    outline: none;
    box-shadow: inset 0 0 0 var(--border-size) var(--main);
}

.contact-form input[type="submit"] {
    align-self: flex-end;
    width: fit-content;
    background: var(--main);
    color: var(--background);
    padding: 5px 8px;
    transition: background 0.3s;
}
.contact-form input[type="submit"]:hover {
    background: transparent;
    color: var(--main);
}
.contact-form input[type="submit"]:focus-visible {
    outline: var(--border-size) solid var(--main);
    outline-offset: 2px;
}

.contact-form .alert.error { font-style: oblique 25deg; }
.contact-form .success { font-size: 1.2rem; }

/* -^-^-^-^-^-^ */
/* ERROR        */
/* -^-^-^-^-^-^ */

.main-container.error{text-align: center;}

/* -^-^-^-^-^-^-^-^-^-^-^-^-^ */
/* MOBILE (PORTRAIT)          */
/* -^-^-^-^-^-^-^-^-^-^-^-^-^ */

@media screen and (max-width: 540px) {

    html:has(.main-container.home) {
        background: var(--sky);
    }


    /* HOME  */
    .home ul {
        display: flex;
        min-height: 100dvh;
    }
    .tile {
        flex: 1;
        height: auto;
        position: relative;
        overflow: hidden;
    }
    .tile a {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .tile h1 {
        font-size: 23vw;
        white-space: nowrap;
        transform: rotate(90deg);
    }

    /* MAIN PAGE */
    .col {
        grid-column: span 3 !important;
    }
    /* PROJECT SINGLE */
    .main-container.project-single, .main-container.contact { grid-template-columns: 1fr;}
    .project-info{
        position: relative;
        flex-direction: row;
        justify-content: space-between;
    }
    .project-info .project-nav {height: fit-content;}
    /* ERROR */
    .main-container.error {line-height: 1.2;}
    
    /* LAYOUT */
    .header{flex-direction: column; gap: var(--margin);}
    .footer{
        flex-direction: column;
        gap: var(--margin);
    }
}

/* -^-^-^-^-^-^-^-^-^-^ */
/* TOUCHSCREENS         */
/* -^-^-^-^-^-^-^-^-^-^ */
@media (hover: none) {
    .circle{display: none;}
    .slide-indicator{display: none;}

    .header .section-selector h2:not(.active) {
        position: relative;
        pointer-events: all;
        opacity: 0.3;
    }
    /* no hover on touch: tapping the link focuses it, which would otherwise
       fire the slide-up from the :focus-within rule above */
    .header .section-selector:hover h2:not(.active),
    .header .section-selector:focus-within h2:not(.active) {
        opacity: 0.3;
        transform: translateY(0);
    }
    .header .main-menu li {
        border-color: var(--main);
        padding: 5px 7px;
    }
    .project-nav .button {border-color: var(--main);}
    .project-cover{display: none;}
}