/* =========================================================
   carpenter.ltd : un CV sur noir, en FK Grotesk Medium, une seule taille.
   Le vide structure la page : le nom en haut, tout le reste posé sur une même ligne, rien entre les deux.
   La seule couleur vit dans les cards, un signe par outil.
   ========================================================= */

/* Fichier d'essai FK : à remplacer par la licence web avant de mettre en ligne (voir README) */
@font-face { font-family: "FK Grotesk"; src: url("assets/fonts/grotesk-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
/* Les polices des produits, sous licence OFL : Archivo pour Number go up, Plus Jakarta Sans pour This is Fine */
@font-face { font-family: "Archivo"; src: url("assets/fonts/archivo.woff2") format("woff2-variations"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("assets/fonts/plus-jakarta-sans.woff2") format("woff2-variations"); font-weight: 200 800; font-display: swap; }

:root {
    --bg: #000;
    --ink: #ededea;
    --mute: #8f8f89;
    --m: clamp(24px, 3.4vw, 56px);        /* la marge de page */
    --col: clamp(32px, 4.4vw, 72px);      /* le vide entre les colonnes */
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--ink);
    font: 500 clamp(16px, 1.4vw, 24px)/1.3 "FK Grotesk", "Helvetica Neue", Arial, sans-serif;
    letter-spacing: -.012em;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; font: inherit; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- la page : le nom, le vide, puis le CV et les apps qui partent et finissent sur les mêmes lignes ---------- */
.page {
    min-height: 100svh; padding: var(--m);
    display: grid; column-gap: var(--col);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: 1fr auto auto;
    grid-template-areas: "who . ." "cv apps apps" "foot foot foot";
}

.who { grid-area: who; }

/* ---------- le CV ---------- */
.cv { grid-area: cv; display: flex; flex-direction: column; justify-content: space-between; gap: 2em; }
.sub { color: var(--mute); }
.nb { white-space: nowrap; }
.block h2 { color: var(--mute); font-size: 13px; line-height: 1; letter-spacing: 0; margin-bottom: 18px; text-box: trim-start cap alphabetic; }
.row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; white-space: nowrap; }
.block > a.row + a.row { margin-top: .25em; }

/* ---------- les apps : le petit titre et les deux cards, à la hauteur du CV ---------- */
.apps {
    grid-area: apps; height: clamp(420px, min(65svh, 100svh - 270px), 720px);
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto minmax(0, 1fr);
    column-gap: var(--col);
}
.intro { grid-column: 1 / -1; }

/* le ? et sa fenêtre : un popover natif, sans JavaScript ; Échap ou un clic à côté la ferment */
.help {
    display: inline-grid; place-items: center; width: 17px; height: 17px; margin: -4px 0 -4px 7px; padding: 0;
    border: 1px solid currentColor; border-radius: 50%; background: none; color: var(--mute);
    font: inherit; font-size: 11px; line-height: 1; cursor: pointer;
}
.what {
    width: min(460px, calc(100vw - 32px)); padding: clamp(20px, 2vw, 28px); border: 0; border-radius: 16px;
    background: #141414; color: var(--ink); font-size: clamp(15px, 1.15vw, 19px); line-height: 1.3; letter-spacing: -.012em;
}
.what::backdrop { background: rgba(0, 0, 0, .6); }
.what-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 1.1em; }
.close, .legal { padding: 0; border: 0; background: none; color: var(--mute); font: inherit; cursor: pointer; }
.what p + p { margin-top: .8em; }
.what a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; }
@media (hover: hover) {
    .help:hover, .close:hover, .legal:hover { color: var(--ink); }
    .links a:hover { color: var(--mute); }
    a.row:hover .sub { color: var(--ink); }
}

/* ---------- les cards : un signe de l'outil au milieu du vide, et ce qu'il faut pour l'acheter ---------- */
.card {
    position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 16px;
    padding: clamp(18px, 1.7vw, 28px);
    font-size: clamp(15px, 1.15vw, 19px); line-height: 1.3; letter-spacing: -.012em;
}
.mark { flex: 1 1 0; min-height: 0; display: flex; align-items: center; justify-content: center; }
.info { flex: none; }
.line { display: flex; justify-content: space-between; gap: 16px; }
.price, .act { white-space: nowrap; }

/* Number go up : noir, ivoire, Archivo, la flèche fluo dans ses crochets */
.ngu { background: #0c0c0c; color: #ededea; font-family: "Archivo", -apple-system, Helvetica, Arial, sans-serif; font-weight: 500; }
.crochet { width: 36%; height: auto; overflow: hidden; }
.crochet .arr { color: #d9ff3a; }
.ngu .for { color: #77776f; }
.ngu .act { color: #d9ff3a; }

/* This is Fine : noir chaud, Plus Jakarta Sans, le chien dans sa flamme */
.tif { background: #0f0e0d; color: #f6f3ec; font-family: "Plus Jakarta Sans", -apple-system, Helvetica, Arial, sans-serif; font-weight: 600; }
.dog { width: 32%; height: auto; border-radius: 20%; transform: rotate(-4deg); transform-origin: 50% 90%; }
.tif .for { color: #7e786e; }
.tif .act { color: #ffbf2e; }

/* au survol, chaque signe fait le geste de sa page */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .ngu:hover .arr { animation: monte 2.4s cubic-bezier(.65, 0, .35, 1) infinite; }
    .tif:hover .dog { animation: sip 2.4s ease-in-out infinite; }
}
@keyframes monte { 0%, 45%, 100% { transform: translate(0, 0); opacity: 1; } 70% { transform: translate(180px, -180px); opacity: 0; } 71% { transform: translate(-180px, 180px); opacity: 0; } }
@keyframes sip { 0%, 70%, 100% { transform: rotate(-4deg); } 78% { transform: translateY(-3%) rotate(3deg); } 86% { transform: rotate(-2deg); } }

/* ---------- le pied ---------- */
.foot { grid-area: foot; margin-top: var(--col); }
.links { display: flex; gap: 1.4em; }
.legal { margin-left: auto; }
.links a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; }

/* ---------- tablette en portrait : le CV, puis les apps ; à l'horizontale, elle garde la page en un écran ---------- */
@media (max-width: 900px), (max-width: 1100px) and (orientation: portrait) {
    .page {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: 1fr auto auto auto; row-gap: calc(var(--m) * 1.5);   /* seul le vide sous le nom absorbe la hauteur restante */
        grid-template-areas: "who who" "cv cv" "apps apps" "foot foot";
    }
    .apps { height: auto; grid-template-rows: auto auto; }
    .card { aspect-ratio: 4 / 5; }
    .cv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(var(--m) * 2) var(--col); }
    .foot { margin-top: 0; }
}

/* ---------- téléphone : tout à la suite, avec de l'air ---------- */
@media (max-width: 720px) {
    .page { display: flex; flex-direction: column; gap: 64px; padding-top: 32px; padding-bottom: 32px; }
    .cv { display: flex; flex-direction: column; gap: 48px; }
    .apps { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .intro h2 { margin-bottom: 2px; }
    .card { aspect-ratio: 1 / 1; font-size: 14px; }
}
