/* The sales pages: the landing, /pour-qui/, /fonctionnalites/, /tarif, /questions/ and their English copies */
:root {
  /* The two inks, purple and orange: change them here and in the two dark blocks */
  --theme-color: #716ad6;
  /* The purple for small text on the page's background (WCAG AA) */
  --theme-text: #5f57c9;
  --highlight-color: #ff8121;
  --bg: #f5f4f0;
  --fg: #121211;
  --brand-tile: #2a1a5e;
  --brand-folio: #ff6b2c;
  --muted: #6d6b65;
  --line: #d8d5cc;
  --card: #ecebe5;
  --error: #a1261b;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --theme-color: #8e88e8;
    --theme-text: #8e88e8;
    --highlight-color: #ff9440;
    --bg: #0f0f0e;
    --fg: #ecebe6;
    --brand-tile: #f5ede4;
    --brand-folio: #ffa36e;
    --muted: #9a978f;
    --line: #2c2b28;
    --card: #191918;
    --error: #f08a7e;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --theme-color: #8e88e8;
  --theme-text: #8e88e8;
  --highlight-color: #ff9440;
  --bg: #0f0f0e;
  --fg: #ecebe6;
  --brand-tile: #f5ede4;
  --brand-folio: #ffa36e;
  --muted: #9a978f;
  --line: #2c2b28;
  --card: #191918;
  --error: #f08a7e;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--highlight-color); color: #121211; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
img { display: block; max-width: 100%; height: auto; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
/* The logo: the mark and the wordmark, "tile" and "folio" in two colors (Inter 800, only these letters, self-hosted) */
@font-face { font-family: "Tilefolio Logo"; src: url("/fonts/inter-800-logo.woff2") format("woff2"); font-weight: 800; font-display: swap; }
.brand { text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand img { width: 28px; height: 32px; }
.brand .wordmark { font: 800 24px/1 "Tilefolio Logo", var(--sans); letter-spacing: -0.03em; color: var(--brand-tile); }
.brand .wordmark span { color: var(--brand-folio); }
.brand { flex: none; }
nav { display: flex; gap: 24px; margin-left: auto; font-size: 15px; }
nav a { text-decoration: none; color: var(--muted); }
#menu a { white-space: nowrap; }
nav a:hover { color: var(--fg); }
/* The menu's current page (aria-current; the examples while they show, sales.js): darker, a thin line growing under it */
#menu a { position: relative; transition: color .25s; }
#menu a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 2px; background: var(--theme-color); transform: scaleX(0); transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
#menu a[aria-current] { color: var(--fg); }
#menu a[aria-current]::after { transform: scaleX(1); }
@media (max-width: 940px) { #menu a[aria-current] { font-weight: 600; color: var(--theme-text); } #menu a::after { display: none; } }
@media (prefers-reduced-motion: reduce) { #menu a, #menu a::after { transition: none; } }
.lang {
  font: inherit; font-size: 14px; color: var(--fg); background: transparent;
  border: 1px solid var(--line); border-radius: 0; padding: 5px 8px; cursor: pointer;
}
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 32px; height: 30px; padding: 0; color: var(--fg); background: transparent;
  border: 1px solid var(--line); border-radius: 0; cursor: pointer;
}
.theme-toggle:hover, .menu-toggle:hover { border-color: var(--fg); }
/* The menu's button, below 940 px (script: menuToggle) */
.menu-toggle {
  display: none; align-items: center; justify-content: center; flex: none;
  width: 32px; height: 30px; padding: 0; color: var(--fg); background: transparent;
  border: 1px solid var(--line); border-radius: 0; cursor: pointer;
}
.button {
  display: inline-block; font: inherit; font-size: 15px; text-decoration: none; cursor: pointer;
  background: var(--fg); color: var(--bg); border: 1px solid var(--fg); padding: 10px 18px; border-radius: 0;
  transition: opacity .15s;
}
.button:hover { opacity: .82; }
/* The second button: filled (not see-through, so that it reads as a button) */
.button.ghost { background: var(--card); color: var(--fg); }
/* Artists' way to their admin (one address for every site), in the header:
   a small second button, so the sign-up buttons stay the main ones */
header .login { flex: none; font-size: 14px; padding: 5px 12px; white-space: nowrap; }
/* Its copies for phones, where the header has no room for it: in the menu
   and under the hero's buttons */
#menu .menu-login, .hero p.hero-login { display: none; }
/* Room for it between the full menu and the menu button */
@media (max-width: 1100px) {
  header .wrap, header nav { gap: 16px; }
}
@media (max-width: 940px) {
  /* The menu: a panel under the header, open with its button (the footer's
     links are a nav too, and stay in the footer) */
  header nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0;
    padding: 4px var(--gutter) 12px; background: var(--bg); border-bottom: 1px solid var(--line); font-size: 17px;
  }
  header.open nav { display: flex; }
  header nav a { padding: 12px 0; color: var(--fg); }
  header nav a + a { border-top: 1px solid var(--line); }
  .menu-toggle { display: inline-flex; }
  header .wrap { gap: 12px; }
  /* Big enough for a finger; 16 px, or iOS zooms the page on the language menu */
  header .login { margin-left: auto; display: inline-flex; align-items: center; height: 44px; font-size: 16px; padding: 0 14px; }
  .lang { height: 44px; font-size: 16px; }
  .theme-toggle, .menu-toggle { width: 44px; height: 44px; }
}
/* Phones: a smaller logo */
@media (max-width: 480px) {
  header .wrap { gap: 8px; }
  .brand { gap: 7px; }
  .brand img { width: 23px; height: 26px; }
  .brand .wordmark { font-size: 20px; }
  header .login { display: none; }
  .lang { margin-left: auto; }
  #menu .menu-login { display: block; font-weight: 600; }
  .hero p.hero-login { display: block; font-size: 15px; color: var(--muted); }
  .hero-login a { color: var(--fg); }
}

/* Sections */
section { padding: clamp(64px, 10vw, 120px) 0; border-bottom: 1px solid var(--line); }
.label {
  display: flex; gap: 14px; align-items: baseline;
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px;
}
.label span:first-child { font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }
h2 { font-size: clamp(32px, 5vw, 52px); line-height: 1.08; letter-spacing: -0.015em; margin-bottom: clamp(36px, 6vw, 64px); max-width: 16em; }
h3 { font-size: 22px; line-height: 1.25; margin-bottom: 8px; }
p { margin: 0; }
.muted { color: var(--muted); }

/* Hero: the baseline and the button, centred, the drawing faint behind them; then the video, big */
.hero { position: relative; overflow: hidden; padding: clamp(36px, 5vw, 72px) 0 clamp(48px, 7vw, 88px); }
.hero > .wrap { position: relative; }
.hero-top { max-width: 860px; margin: 0 auto; text-align: center; }
.hero .label { justify-content: center; color: var(--theme-text); }
.hero h1 { font-size: clamp(36px, 5.2vw, 64px); line-height: 1.04; letter-spacing: -0.025em; text-wrap: balance; }
.hero .actions { justify-content: center; }
.hero .village { position: absolute; left: 50%; top: 8px; width: min(620px, 118vw); max-width: none; height: auto; transform: translateX(-50%); opacity: .13; pointer-events: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button.main { background: #5f57c9; border-color: #5f57c9; color: #fff; }
.actions .button { font-size: 18px; padding: 15px 30px; }
.hero-price { font-size: 15px; color: var(--fg); margin-top: 14px; }
.hero .showcase { margin-top: clamp(20px, 3vw, 36px); }
header .go { flex: none; font-size: 14px; padding: 6px 14px; white-space: nowrap; }
@media (max-width: 940px) {
  header .login { display: none; }
  header .go { display: inline-flex; align-items: center; height: 44px; margin-left: auto; }
  #menu .menu-login { display: block; }
}
/* Phones */
@media (max-width: 699px) {
  header .go { display: none; } /* the pinned button is there */
  .hero h1 { font-size: 34px; }
  .actions { margin-top: 18px; }
  .actions .button { width: 100%; text-align: center; padding: 14px; }
}
.sticky-cta { display: none; }
@media (max-width: 767px) {
  .sticky-cta { display: block; position: fixed; z-index: 20; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); text-align: center; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s; }
  .sticky-cta.show { opacity: 1; transform: none; pointer-events: auto; }
}
@media (prefers-reduced-motion: reduce) { .sticky-cta { transition: none; } }

/* The other pages: their title is the h1 */
.page h1 { font-size: clamp(36px, 5.6vw, 64px); line-height: 1.05; letter-spacing: -0.02em; margin-bottom: clamp(28px, 4.5vw, 52px); max-width: 16em; }
.page section { padding: clamp(40px, 6vw, 80px) 0; }
.page .closing { text-align: center; }
.page .closing .actions { justify-content: center; margin-top: 0; }

/* Examples */
.demos { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 40px); }
.demo { text-decoration: none; display: block; }
.demo figure { margin: 0; overflow: hidden; border: 1px solid var(--line); background: #000; aspect-ratio: 16 / 10; }
.demo img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.demo:hover img { transform: scale(1.025); }
.demo .caption { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; align-items: baseline; }
.demo .name { font: 21px/1.2 var(--serif); }
.demo .kind { color: var(--muted); font-size: 15px; }
.demo .url { color: var(--muted); font-size: 14px; white-space: nowrap; }
.demo:hover .url { color: var(--fg); }
@media (max-width: 640px) { .demos { grid-template-columns: 1fr; } }
/* Below the examples: a site at random (tilefolio.com/random), then the
   line to the village */
.more-sites { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: clamp(32px, 5vw, 48px) 0 0; }
.more-sites p { margin: 0; font: clamp(21px, 2.4vw, 26px)/1.2 var(--serif); }
/* Stances */
/* Who it's for: two lists, + and − */
.fit-intro { color: var(--muted); font-size: clamp(17px, 1.8vw, 19px); max-width: 46em; margin: calc(-1 * clamp(12px, 3vw, 32px)) 0 clamp(32px, 5vw, 48px); }
.fit { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(32px, 5vw, 64px) clamp(24px, 4vw, 56px); }
.fit > div { border-top: 1px solid var(--fg); padding-top: 20px; }
.fit h3 { font-size: clamp(24px, 2.6vw, 30px); margin-bottom: 18px; }
.fit ul { list-style: none; margin: 0; padding: 0; }
.fit li { position: relative; padding-left: 1.6em; font-size: 17px; margin-bottom: 14px; color: var(--muted); }
.fit li::before { position: absolute; left: 0; top: -.08em; font-size: 1.25em; line-height: 1.4; font-weight: 600; }
.fit-yes li::before { content: "+"; color: var(--theme-color); }
.fit-no li::before { content: "−"; color: var(--highlight-color); }
@media (max-width: 760px) { .fit { grid-template-columns: 1fr; } }
.stances { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(32px, 5vw, 64px) clamp(24px, 4vw, 56px); }
.stances > div { border-top: 1px solid var(--fg); padding-top: 20px; }
.stances h3 { font-size: clamp(24px, 2.6vw, 30px); margin-bottom: 12px; }
.stances p { color: var(--muted); font-size: 17px; max-width: 30em; }
/* The fifth stance (security): across both columns, the grid stays even */
.stances > .wide { grid-column: 1 / -1; }
.stances > .wide p { max-width: 46em; }
@media (max-width: 760px) { .stances { grid-template-columns: 1fr; } }
/* Below the stances: the link to the story's page (/histoire/, /story/) */
.story-link { margin-top: clamp(40px, 6vw, 64px); font: clamp(20px, 2.2vw, 24px)/1.4 var(--serif); }
.story-link a { white-space: nowrap; }

/* Features: tiles */
.tiles {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.tile { padding: clamp(22px, 3vw, 36px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tile .n { display: block; margin-bottom: 24px; font: 32px/1 var(--serif); font-variant-numeric: tabular-nums; color: var(--theme-color); }
.tile p { color: var(--muted); font-size: 16px; }
.tile.wide { grid-column: 1 / -1; }
/* Two columns: the first tile, whose text is the longest, so that the
   regular tiles fill every row (3 columns, then 2) */
.tile.double { grid-column: span 2; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } .tile.double { grid-column: auto; } }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 4vw, 56px); counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { border-top: 1px solid var(--fg); padding-top: 20px; }
.steps li::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: block; font: 44px/1 var(--serif); color: var(--theme-color); margin-bottom: 20px; }
.steps p { color: var(--muted); font-size: 16px; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
/* The filmed walk-through, under the steps */
.showcase { margin: 0 auto; max-width: 1100px; }
.showcase-panel { margin: 0; }
.showcase-video { display: block; width: 100%; height: auto; aspect-ratio: 1280 / 799; border: 1px solid var(--line); border-radius: 8px; background: var(--line); box-shadow: 0 18px 50px -24px rgba(0, 0, 0, .35); }
.showcase figcaption { font: clamp(21px, 2.4vw, 28px)/1.25 var(--serif); margin-top: 18px; text-align: center; }
/* On a computer, the walk-through on a computer or on a phone (two tabs);
   on a phone only the phone's (the tabs hidden) */
.showcase-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin: 0 0 24px; }
.showcase-tabs button {
  font: inherit; font-size: 16px; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 0 2px 12px; margin-bottom: -1px; cursor: pointer;
}
.showcase-tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--fg); }
.showcase-tabs button:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.showcase-phone { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.showcase-phone .showcase-video { aspect-ratio: 540 / 1174; width: auto; height: min(78vh, 720px); max-width: 100%; border-radius: 28px; }
.showcase-phone figcaption { margin-top: 0; }
@media (max-width: 699px) {
  .showcase-tabs, .showcase-panel[data-device="computer"] { display: none; }
  .showcase-panel[data-device="phone"] { display: grid !important; }
  .showcase-phone { grid-template-columns: 1fr; justify-items: center; gap: 0; }
  .showcase-phone .showcase-video { height: auto; width: min(100%, 380px); }
  .showcase-phone figcaption { margin-top: 18px; }
}

/* Pricing */
.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 96px); align-items: start; }
.price { font: clamp(80px, 12vw, 140px)/0.9 var(--serif); letter-spacing: -0.04em; }
.per { color: var(--muted); margin-top: 14px; }
.price-row { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 20px; }
.price-row .per { margin-top: 0; }
.lock { font-size: 15px; margin-top: 10px; }
.included { list-style: none; padding: 0; margin: 36px 0 0; }
.included li { padding: 12px 0; border-top: 1px solid var(--line); display: flex; gap: 14px; }
.included li::before { content: "—"; color: var(--muted); }
@media (max-width: 820px) { .pricing { grid-template-columns: minmax(0, 1fr); } }
/* FAQ */
details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer; list-style: none; padding: 22px 40px 22px 0; position: relative;
  font: 21px/1.35 var(--serif);
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 18px; font: 300 26px/1.2 var(--sans); color: var(--muted); }
details[open] summary::after { content: "–"; }
details > div { padding: 0 0 28px; max-width: 46em; color: var(--muted); }
.faq { max-width: 860px; }


footer { padding: 40px 0 56px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; font-size: 14px; }
@media (max-width: 940px) {
  footer nav { gap: 0 24px; }
  footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
}
[hidden] { display: none !important; }
