/* SuisseIntl-Medium.woff2
SuisseIntl-Regular.woff2
SuisseIntl-SemiBold.woff */
@font-face {
    font-family: "suisse";
    src: url("../fonts/SuisseIntl-Medium.woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

:root {
    --the-width: clamp(
                       calc(100% - var(--space-xxl)), 
                       calc(100% - var(--space-xl)), 
                       calc(100% - var(--space-base))
                       );

    /* easing */
    --out: cubic-bezier(0.19, 1, 0.22, 1); /* nice ease out 2**10 */
    --in: cubic-bezier(0.5, 0, 0.75, 0) ; /* nice ease in 2**10 */

    /* negative space */
    --space-base: 1rem;
    --space-xxs: calc(var(--space-base) * 0.25);
    --space-xs:  calc(var(--space-base) * 0.5);
    --image-radius: var(--space-xs);
    --space-sm:  calc(var(--space-base) * 0.75);
    --space-md:  calc(var(--space-base) * 2);
    --space-lg:  calc(var(--space-base) * 3);
    --space-xl:  calc(var(--space-base) * 5);
    --space-xxl: calc(var(--space-base) * 20);

    /* typography */
    font-size: clamp(12px, 0.25vw, 15px);
    --swiss: "suisse", system-ui, -apple-system, 'Helvetica Neue', sans-serif;
    --fs-base: clamp(0.95rem, 1rem + 0.4vw, 1.05rem);
    --fs-xs: clamp(0.75rem, 0.75rem + 0.3vw, 0.85rem);
    --fs-sm: clamp(0.9rem, 0.9rem + 0.4vw, 1rem);
    --fs-md: clamp(1.25rem, 1.25rem + 0.6vw, 1.35rem);
    --fs-lg: clamp(1.5rem, 1.5rem + 1vw, 2rem);
    /* if multiline text:
            line-height: 1.15;
			letter-spacing: -0.05em; 
    */
    --fs-xl: clamp(2rem, 2rem + 1.5vw, 3rem);
    --fs-xxl: clamp(4rem, 4vw, 72px);
    --fs-display: clamp(var(--fs-xl), 15vw, 128px);

    /* debug grid settings */
    --grid-columns: 12;
    --grid-gap: 1rem;
    --grid-padding: 0;
    --grid-color: rgba(0, 0, 200, 0.05);

    /* grid helpers */
    --grid-col: calc((var(--the-width) - (var(--grid-gap) * (var(--grid-columns) - 1))) / var(--grid-columns));
    --grid-col-gap: calc(var(--grid-col) + var(--grid-gap));

    --shadow-s: 0px 0px 4px #00000012, 4px 0px 16px 2px #00000006;
    --shadow-m: 0px 0px 8px #00000012, 4px 0px 24px 8px #00000012;
    --shadow-l: 0 0 3px rgba(0, 0, 0, 1), 4px 0px 16px 2px rgba(0, 0, 0, 0.06);

    /* colors */
    --super-white: rgb(255,255,255);
    --the-white: oklch(96.7% 0.003 264.542);
    --opaque-white: oklab(100% 0 -0.00011 / 0.3);
    --silver: oklch(92% 0.004 286.32); /* touch of red tones to match photos */
    --soft-grey: oklch(92.8% 0.006 264.531);
    --grey: oklch(70.5% 0.015 286.067);
    --text-muted: oklch(48% 0.015 286.067);
    --jet-black: rgb(0, 0, 0);
    --yellow: oklch(79.5% 0.184 86.047);
    --brighter-yellow: oklch(85.2% 0.199 91.936);

    /* accessibility */
    --tap-target-size: 16px;
}

/* ultra wide */
@media (min-width: 1680px) {
    :root {
        font-size: clamp(16px, 0.5vw, 36px);
        --space-base: 1.5rem;
        --grid-columns: 12;
        --space-lg: calc(var(--space-base) * 4);
        --space-xl: calc(var(--space-base) * 8);
        --space-xxl: calc(var(--space-base) * 10);
    }
}

/* ipads */
@media (max-width: 64rem) {
    :root {
        font-size: clamp(14px, 0.25vw, 16px);
        --space-base: 2rem;
        --grid-columns: 8;
        --grid-gap: 0.875rem;
        --space-xl: calc(var(--space-base) * 4);
        --space-xxl: calc(var(--space-base) * 10);
        --tap-target-size: 30px;
    }
}

/* mobile */
@media (max-width: 48rem) {
    :root {
        --image-radius: 0;
        font-size: clamp(16px, 0.5vw, 20px);
        --grid-columns: 4;
        --grid-gap: 0.75rem;
        --space-lg: calc(var(--space-base) * 2.5);
        --space-xl: calc(var(--space-base) * 3);
        --space-xxl: calc(var(--space-base) * 6);
        --the-width: clamp(
                    calc(100% - var(--space-base)), 
                    calc(100% - var(--space-md)), 
                    calc(100% - var(--space-lg))
                    );
        --tap-target-size: 44px;
        --fs-xxl: clamp(3rem, 2rem + 1vw, 48px);
    }
}



html:not(.is-debug-grid) #debug-grid {
    display: none;
}

::selection {
  background-color: var(--jet-black);
  color: var(--super-white);
}

#debug-grid {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: var(--the-width);
    height: 100vh;
    display: grid;
    grid-template-columns: repeat(var(--grid-columns), 1fr);
    grid-template-rows: 1fr;
    gap: var(--grid-gap);
    padding: 0 var(--grid-padding);
    box-sizing: border-box;
    pointer-events: none;
    z-index: 10000;
    overflow: hidden;

    div {
        background: var(--grid-color);
        border-left: 1px solid rgba(0, 0, 255, 0.1);
        border-right: 1px solid rgba(0, 0, 255, 0.1);
    }
}

body {
    color: var(--jet-black, #000);
    background-color: var(--the-white, #fff);
    overflow-x: clip;
}

img {
    border-radius: var(--image-radius);
}

* {
    font-family: var(--swiss);

    font-weight: 500;
    
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-smooth: antialiased;

    scrollbar-width: thin;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    padding: 0;
    text-wrap: balance;
}

p {
    margin: 0;
    padding: 0;
}

address {
    font-style: normal;
}

a {
    color: inherit;
    width: fit-content;
    text-decoration: none;
    transition: color 300ms var(--out), background-color 300ms var(--out), background-size 300ms var(--out), opacity 300ms var(--out), transform 300ms var(--out);
}

.hover-underline {
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 calc(100% - 0.06em);
    background-size: 0% 0.01em;
    transition: color 300ms var(--out), background-color 300ms var(--out), background-size 300ms var(--out), opacity 300ms var(--out), transform 300ms var(--out);
}

a:hover,
a:focus-visible,
.hover-underline:hover,
.hover-underline:focus-visible {
    background-size: 100% 0.075em;
}

.external-link::after {
    content: " ↗";
}
.internal-link::after {
    content: " →";
    padding-left: var(--space-xs);
}

.external-link__hidden {
    &::after {
        content: " ↗";
        display: inline-block;
        margin-left: var(--space-xs);
        color: currentColor;
        opacity: 0;
        transform: translateX(-0.2em);
        transition: opacity 300ms var(--out), transform 300ms var(--out);
    }

    &:hover::after,
    &:focus-visible::after {
        opacity: 1;
        transform: translateX(0);
    }
}

.internal-link__hidden {
    &::after {
        content: " →";
        display: inline-block;
        margin-left: var(--space-xs);
        color: currentColor;
        opacity: 0;
        transform: translateX(-0.2em);
        transition: opacity 300ms var(--out), transform 300ms var(--out);
    }

    &:hover::after,
    &:focus-visible::after {
        opacity: 1;
        transform: translateX(0);
    }
}

.hover-bg {
    width: auto;
    transition: color 300ms var(--out), background-color 300ms var(--out), background-size 300ms var(--out), opacity 300ms var(--out), transform 300ms var(--out);
    color: inherit;
    text-decoration: none;

    &:hover,
    &:focus-visible {
        padding-inline: var(--space-sm);
        background-color: var(--jet-black);
        color: var(--super-white);
    }
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xxl);
    min-height: 100vh;
}

section {
    width: var(--the-width);
    min-height: 15vh;

    & div.section-wrapper .section-sticky {
        border-radius: var(--space-sm); /* to accomodate for button */
        position: sticky;
        top: 50vh;
        z-index: 5;
        display: flex;
        flex-direction: column;
        gap: var(--space-sm);
        padding: var(--space-base);
        background: var(--jet-black);
        color: var(--the-white);
        grid-column: span 4;
    }

    & div.section-wrapper .section-sticky h2 {
        font-size: var(--fs-lg);
        margin: 0;
        padding: 0;
    }
    
    & div.section-wrapper > h2 {
        font-size: var(--fs-lg);
        margin: 0;
        padding: 0;
        /* position: sticky; */
        /* top: 20vh; */
    }

    &.section-full {
        width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        margin-top: 0;
        margin-bottom: 0;
        border: 0;
    }

    @media (max-width: 48rem) {
        width: 100%;

        div.section-wrapper .section-sticky {
            margin-inline: var(--space-xs);
            position: static;
            top: auto;
            grid-column: 1 / -1;
        }

        &.section-full {
            padding-inline: 0;
        }
    }
}

.main-grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
    gap: var(--grid-gap);
}

.main-grid > .main-grid-item {
    --col-start: auto;
    --col-span: 1;
    grid-column: var(--col-start) / span var(--col-span);
    min-width: 0;
    border-radius: var(--space-xs);

    @media (max-width: 48rem) {
        grid-column: var(--col-start-mobile, 1) / span var(--col-span-mobile, var(--grid-columns));
    }
}


ul { list-style-type: square; }


button {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    text-align: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    border-radius: var(--space-xs);
    box-shadow: none;
    cursor: pointer;
    min-height: var(--tap-target-size);
    min-width: var(--tap-target-size);
}

.badge--new {
    background-color: var(--yellow);
    color: var(--jet-black);
    padding: var(--space-xxs) var(--space-xs);
    border-radius: var(--space-xxs);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    line-height: 1.2;
    /* pulsating animation  */
}

input,
select,
textarea {
    font: inherit;

    @media (max-width: 48rem) {
        font-size: max(16px, 1rem);
    }
}

input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    accent-color: var(--jet-black);
    width: 1.1rem;
    height: 1.1rem;
    border: 1px solid var(--jet-black);
    border-radius: 0;
    background: transparent;
    box-sizing: border-box;
    display: inline-grid;
    place-content: center;
    vertical-align: middle;
    cursor: pointer;

    &::after {
        content: "";
        width: 0.375rem;
        height: 0.375rem;
        background: var(--jet-black);
        transform: scale(0);
        transition: transform 120ms var(--out);
    }

    &:checked::after {
        transform: scale(1);
    }

    &:focus-visible {
        outline: 2px solid var(--jet-black);
        outline-offset: 2px;
    }
}

@supports not (appearance: none) {
    input[type="checkbox"] {
        appearance: auto;
        -webkit-appearance: checkbox;
        -moz-appearance: checkbox;
        width: auto;
        height: auto;
        border: 0;
        display: inline-block;
    }

    input[type="checkbox"]::after {
        content: none;
    }
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: var(--space-xs);
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid currentColor;
    transition: color 300ms var(--out), background-color 300ms var(--out), background-size 300ms var(--out), opacity 300ms var(--out), transform 300ms var(--out);
    font-size: var(--fs-base);
    min-height: var(--tap-target-size);
    
    &:hover {
        background-color: var(--super-white);
        color: var(--jet-black);
        border-color: var(--the-white);
    }

    &:active {
        color: var(--the-white);
        background-color: var(--grey);
        border-color: var(--grey);
    }

    &:focus-visible {
        outline: 2px solid currentColor;
        outline-offset: 3px;
    }

    @media (max-width: 48rem) {
        font-size: var(--fs-sm);
        padding: var(--space-xs) var(--space-sm);
    }

}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* 
    page transitions 
*/
@media (prefers-reduced-motion: no-preference) {
    @view-transition {
        navigation: auto;
    }

    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: 600ms;
        animation-timing-function: var(--out);
    }

    ::view-transition-old(root) {
        animation-name: page-out;
    }

    ::view-transition-new(root) {
        animation-name: page-in;
    }

    html {
        animation: page-in 600ms var(--out);
    }

}

@keyframes page-in {
    from {
        opacity: 0;
        /* filter: blur(3px); */
    }

    to {
        opacity: 1;
        /* filter: blur(0); */
    }
}

@keyframes page-out {
    from {
        opacity: 1;
        /* filter: blur(0); */
    }

    to {
        opacity: 0;
        /* filter: blur(2px); */
    }
}

/* Shared accessibility and motion preferences. */
[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
    box-shadow: 0 0 0 2px var(--super-white);
}

:where(a, button, input, select, textarea, [tabindex]) {
    scroll-margin-block: 7rem 2rem;
}

:where(h1, h2, h3, [id]) {
    scroll-margin-top: 7rem;
}

:where(button, a, input, select, textarea) {
    touch-action: manipulation;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 3000;
    padding: 1rem;
    background: var(--jet-black);
    color: var(--super-white);
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: translateY(0);
}

html.is-motion-paused *,
html.is-motion-paused *::before,
html.is-motion-paused *::after {
    animation-play-state: paused !important;
    transition-duration: 0ms !important;
    scroll-behavior: auto !important;
}

html.is-nav-panel-open,
html.is-gallery-overlay-open {
    overflow: hidden;
}

/* Editorial formatting stays scoped to CMS prose, including short descriptions. */
:is(.studio-rich-text, .studio-rich-text-inline) {
    overflow-wrap: anywhere;
    text-wrap: balance;
}

:is(.studio-rich-text, .studio-rich-text-inline) :is(strong, b) {
    font-weight: 700;
}

:is(.studio-rich-text, .studio-rich-text-inline) :is(em, i) {
    font-style: italic;
}

:is(.studio-rich-text, .studio-rich-text-inline) a {
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.studio-rich-text > :first-child {
    margin-top: 0;
}

.studio-rich-text > :last-child {
    margin-bottom: 0;
}

.studio-rich-text > * + * {
    margin-top: 0.85em;
}

.studio-rich-text :is(ul, ol) {
    padding-inline-start: 1.35em;
    list-style-position: outside;
}

.studio-rich-text ul {
    list-style-type: disc;
}

.studio-rich-text ol {
    list-style-type: decimal;
}

.studio-rich-text li {
    display: list-item;
    margin-block: 0.3em;
}

.studio-rich-text blockquote {
    padding-inline-start: 1em;
    border-inline-start: 2px solid currentColor;
}

.contacts-intro {
    max-width: 60ch;
    margin-top: var(--space-md);
}
