@font-face {
  font-family: 'Cossette Texte';
  src: url('/assets/cossette-texte.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --font-size: 14px;
  --line-height: 17px;
  --pad: 24px;
  --header-height: 48px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
html {
  color: #000;
  background: #fff;
  font: var(--font-size)/var(--line-height) 'Cossette Texte', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-size-adjust: none;
  -webkit-text-size-adjust: none;
}
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; border-radius: 0; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 1px solid currentColor; outline-offset: 5px; }
[hidden] { display: none !important; }
.header { position: fixed; inset: 0 0 auto; padding: var(--pad); display: flex; align-items: center; justify-content: space-between; z-index: 100; }
.logo { display: inline-flex; white-space: pre; flex-shrink: 0; }
.header nav { display: flex; align-items: center; gap: 6px; }
.header nav > span, .sep { user-select: none; }
.header a:hover, .text-link:hover, .filter:hover { text-decoration: underline dotted; text-underline-offset: 3px; }
.header a[aria-current="page"], .filter[aria-pressed="true"] { text-decoration: underline solid; text-underline-offset: 3px; }
.footer { height: var(--header-height); padding: 0 var(--pad); display: flex; align-items: center; flex-shrink: 0; }
#app { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 768px; margin: 0 auto; }
.clip { overflow: hidden; }
.reveal { animation: reveal-up .7s var(--ease) var(--delay, 0ms) both; }
.leaving .reveal { animation: hide-down .35s cubic-bezier(.7, 0, 1, .8) both; }
@keyframes reveal-up { from { transform: translateY(110%); } to { transform: translateY(0); } }
@keyframes hide-down { from { transform: translateY(0); } to { transform: translateY(110%); } }
@keyframes draw-line { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
.scramble-dot { letter-spacing: 1px; }
.sep { margin: 0 6px; }

/* The original gallery is a stack of square cards, not a horizontal strip. */
.gallery { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding-top: var(--header-height); overflow: hidden; width: 100vw; margin-left: calc(50% - 50vw); touch-action: pan-y; }
.gallery-track { position: relative; width: var(--item-size, 400px); height: var(--item-size, 400px); isolation: isolate; }
.gallery-wrap { position: absolute; inset: 0; animation: card-in 1.2s var(--ease) var(--delay, 0ms) both; }
.gallery-card { display: block; position: absolute; inset: 0; transform: translateX(var(--tx, 0px)) scale(var(--scale, 1)); transform-origin: center; transition: transform .35s ease; }
.gallery-card.dragging { transition: none; }
.gallery-card:focus-visible { outline-offset: 6px; }
.gallery-caption { text-align: center; min-height: var(--line-height); max-width: calc(100vw - 24px); }
.leaving .gallery-wrap { animation: card-out .5s cubic-bezier(.7, 0, 1, .8) calc(var(--distance, 0) * 50ms) both; }
.leaving .gallery-caption { opacity: 0; transform: translateY(12px); transition: .3s ease; }
@keyframes card-in { from { transform: translateY(80vh); } to { transform: translateY(0); } }
@keyframes card-out { from { transform: translateY(0); } to { transform: translateY(80vh); } }
.loader { position: fixed; inset: 0; z-index: 200; background: #fff; display: grid; place-items: center; pointer-events: none; transition: opacity .2s ease .4s; }
.loader.exiting { opacity: 0; }
.loader.exiting > span { transform: translateY(100vh); transition: transform .4s cubic-bezier(.7, 0, 1, .8); }

.project-cover { display: block; width: 100%; height: 100%; object-fit: cover; background: transparent; }

.projects-main { padding-top: calc(var(--pad) * 6); padding-bottom: 48px; }
.filters { display: flex; gap: 24px; margin-bottom: 20px; overflow: hidden; }
.filter { padding: 0 0 4px; border: 0; background: none; white-space: nowrap; }
.project-list { list-style: none; }
.project-row { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 12px 0; }
.project-row::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; border-bottom: 1.5px dotted #000; animation: draw-line .6s ease calc(var(--delay, 0ms) + .25s) both; }
.project-row:hover::after { animation: none; border-bottom: 1px solid #000; }
.project-name { flex: 1; }
.project-year { margin-left: 24px; display: flex; align-items: center; white-space: nowrap; }
.new-label { margin-right: 16px; }

.contact-main { flex: 1; padding: calc(var(--pad) * 10) 0 var(--pad); }
.contact-text-box { margin-bottom: calc(var(--line-height) * 4); }
.contact-text { max-width: 360px; line-height: 1.6; }
.contact-links { display: flex; flex-direction: column; gap: 4px; padding-bottom: 4px; }
.contact-form { display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.contact-field { width: 100%; padding: 10px 12px; border: 1px solid #000; background: none; outline: none; }
.contact-status { margin-top: -4px; }
.send-contact { width: 100%; padding: 10px 12px; border: 0; background: #000; color: #fff; }
.send-contact:disabled { opacity: .4; }
.contact-form { margin-bottom: 24px; }
.contact-message { display: block; min-height: 90px; resize: vertical; }

.project-main { flex: 1; padding: calc(var(--pad) * 5.4) 0 calc(var(--pad) * 2.7); display: flex; flex-direction: column; align-items: center; }
.demo-section { width: 100%; display: flex; justify-content: center; }
.project-content { width: 100%; margin-bottom: calc(var(--pad) * 2.7); }
.project-title { font-size: var(--font-size); font-weight: 400; line-height: var(--line-height); }
.project-description { max-width: 600px; line-height: 1.6; }
.project-description p + p { margin-top: calc(var(--line-height) * .9); }
.phone-device { position: relative; width: min(340.8px, 100%); aspect-ratio: 355 / 700; --phone-scale: .8738461538; }
.phone-frame { --phone-top-inset: 18px; --phone-bottom-inset: 12px; position: absolute; top: 0; left: 0; width: 390px; height: calc(700px * 390 / 355); padding: var(--phone-top-inset) 0 var(--phone-bottom-inset); border: 9px solid #242424; border-radius: 44px; background: #fcfaf7; overflow: hidden; transform: scale(var(--phone-scale)); transform-origin: top left; }
.phone-viewport { width: 100%; height: 100%; border-radius: 28px; overflow: hidden; clip-path: inset(0 round 28px); background: #fcfaf7; isolation: isolate; }
.phone-screen { display: block; width: 100%; height: 100%; border: 0; background: #fcfaf7; }
.phone-frame::before, .phone-frame::after { content: ''; position: absolute; left: 0; right: 0; z-index: 1; background: #fcfaf7; pointer-events: none; }
.phone-frame::before { top: 0; height: calc(var(--phone-top-inset) + 2px); }
.phone-frame::after { bottom: 0; height: calc(var(--phone-bottom-inset) + 2px); }

@media (min-width: 769px) {
  .phone-device { width: 272.64px; --phone-scale: .6990769231; }
}

@media (max-width: 768px) {
  #app { padding: 0 var(--pad); }
  .project-main { padding-top: calc(var(--pad) * 4.5); }
}
@media (max-width: 640px) {
  :root { --header-height: 80px; }
  .header { flex-wrap: wrap; gap: 12px; background: #fff; }
  .header nav { width: 100%; }
}
@media (max-width: 400px) { .filters { gap: clamp(3px, calc(25vw - 77px), 16px); } }
@media (max-width: 350px) {
  .header { gap: 12px; padding-left: 16px; padding-right: 16px; }
  .header nav { gap: 4px; }
  .project-year { margin-left: 12px; }
  .new-label { margin-right: 8px; }
}
@media (max-height: 600px) {
  .contact-main { padding-top: calc(var(--pad) * 4); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}
