/* =====================================================================
   Mathieu Ibanez — Site styles (mid-fi wireframe)
   Postevand-style minimalism, no top manifesto strip.
   ===================================================================== */

@import url('./colors_and_type.css');

/* Container */
.mi-container { max-width: 1440px; margin: 0 auto; padding: 0 32px; }

/* Generic links */
a { color: inherit; text-decoration: none; }
.mi-link-underlined { font-size: 13px; padding-bottom: 2px; border-bottom: 1px solid var(--text); display: inline-block; }
.mi-link-underlined:hover { color: var(--text-soft); border-color: var(--text-soft); text-decoration: none; }

/* Mono label */
.mi-label { font-size: 11px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-soft); display: inline-block; }

/* ---------------- MEDIA + GRAIN ---------------- */
.mi-media { position: relative; overflow: hidden; background: #1A1A1A; background-size: 200% 200%; }
.mi-media::after {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay; opacity: 0.33; pointer-events: none; z-index: 2;
}
.mi-media-anim { animation: mi-shift 14s ease-in-out infinite alternate; }
@keyframes mi-shift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
.mi-corner-tag { position: absolute; top: 12px; left: 12px; padding: 4px 8px; background: var(--bg); color: var(--text); font-size: 10px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; z-index: 3; }
.mi-corner-tag-tr { left: auto; right: 12px; }

/* Placeholder hint inside media */
.mi-media-hint {
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(250, 248, 245, 0.55); pointer-events: none;
}

/* ---------------- HEADER ---------------- */
.mi-header { position: sticky; top: 0; background: var(--bg); z-index: 50; border-bottom: 1px solid var(--line); }
.mi-nav { display: grid; grid-template-columns: 2fr 2fr 1fr; align-items: stretch; min-height: 44px; }
.mi-nav-zone { display: flex; align-items: center; padding: 0 28px; }
.mi-nav-brand { align-items: center; }
.mi-nav-brand .mi-logo { font-size: 14px; font-weight: 400; letter-spacing: -0.005em; color: var(--text); white-space: nowrap; }
.mi-nav-center { justify-content: flex-start; gap: 48px; padding: 0 24px; border-left: 1px solid var(--line); }
.mi-nav-right { justify-content: flex-end; gap: 36px; padding: 0 28px 0 0; }
.mi-nav-right > a:first-child { border-left: 1px solid var(--line); padding-left: 28px; height: 100%; display: flex; align-items: center; }
.mi-nav a { font-size: 11px; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.mi-nav-brand a { text-transform: none; letter-spacing: -0.005em; font-size: 14px; }
.mi-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.mi-nav a.is-active { border-bottom: 1px solid var(--text); padding-bottom: 2px; }

/* ---------------- HERO (full-bleed video) ---------------- */
.mi-hero { position: relative; height: calc(100vh - 44px); overflow: hidden; }
.mi-hero-bg { position: absolute; inset: 0; background-size: 200% 200%; animation: mi-shift 10s ease-in-out infinite alternate; z-index: 1; }
.mi-hero-bg::after { content: ''; position: absolute; inset: 0; background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='nh'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23nh)'/></svg>"); mix-blend-mode: overlay; opacity: 0.28; pointer-events: none; z-index: 2; }
.mi-hero-bg::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.45) 100%); z-index: 3; pointer-events: none; }
.mi-hero-content { position: absolute; inset: 0; padding: 30px; display: flex; flex-direction: column; justify-content: end; align-items: flex-start; z-index: 4; color: var(--bg); }
.mi-hero-title { color: var(--bg); font-weight: 300; font-size: clamp(72px, 11vw, 180px); letter-spacing: -0.045em; line-height: 0.9; max-width: none; margin: 0; }
.mi-hero-title sup { font-size: 0.4em; font-weight: 400; vertical-align: super; opacity: 0.9; margin-left: 6px; letter-spacing: 0; line-height: 1; }
.mi-hero-title em { font-style: normal; font-weight: 300; opacity: 0.85; }
.mi-hero-corner { position: absolute; padding: 6px 10px; background: var(--bg); color: var(--text); font-size: 11px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; z-index: 5; }
.mi-hero-tl { top: 28px; left: 28px; }
.mi-hero-meta-line { position: absolute; top: 32px; right: 32px; font-size: 11px; letter-spacing: 0.06em; color: var(--bg); opacity: 0.85; z-index: 5; text-transform: uppercase; }
.mi-hero-meta-bottom { position: absolute; bottom: 32px; right: 32px; font-size: 11px; letter-spacing: 0.06em; color: var(--bg); opacity: 0.7; z-index: 5; }

/* Hero — split variant (text left, video right) */
.mi-hero-split { display: grid; grid-template-columns: 1fr 1fr; min-height: 720px; }
.mi-hero-split-text { padding: 96px 64px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; border-right: 1px solid var(--line); }
.hero-title { font-weight: 300; font-size: clamp(72px, 10vw, 160px); letter-spacing: -0.045em; line-height: 0.9; }
.hero-title sup { font-size: 0.4em; font-weight: 400; vertical-align: super; opacity: 0.9; margin-left: 6px; letter-spacing: 0; line-height: 1; }
.mi-hero-split-meta { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-soft); }
.mi-hero-split-media { position: relative; }

/* Hero — typographic variant (no video, big type) */
.mi-hero-typo { padding: 128px 0 96px; border-bottom: 1px solid var(--line); }
.mi-hero-typo .hero-title { font-size: clamp(64px, 9vw, 160px); }

/* ---------------- INTRO ---------------- */
.mi-intro-wrap { min-height: calc(100vh - 44px); display: flex; flex-direction: column; justify-content: space-between; padding: 64px 0 0; }
.mi-intro { padding: 0 0 64px; }
.mi-intro-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 64px; align-items: end; }
.mi-intro-h2 { font-size: clamp(32px, 4vw, 56px); font-weight: 400; letter-spacing: -0.03em; line-height: 1.05; max-width: 22ch; }

/* ---------------- DETAILS ---------------- */
.mi-details { padding: 0 0 64px; }
.mi-details-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.mi-detail-card { display: flex; flex-direction: column; gap: 16px; }
.mi-detail-info { padding: 0 4px; }
.mi-num { font-size: 44px; font-weight: 500; letter-spacing: -0.025em; line-height: 1; margin-bottom: 8px; }
.mi-num small { font-size: 0.45em; font-weight: 400; }
.mi-detail-desc { font-size: 13px; line-height: 1.45; max-width: 28ch; color: var(--text-soft); }

/* ---------------- ABOUT (qui je suis) ---------------- */
.mi-about { padding: 120px 0; border-top: 1px solid var(--line); }
.mi-about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 96px; align-items: start; }
.mi-about-media-wrap { position: relative; }
.mi-about-media-wrap .mi-media { aspect-ratio: 1/1; }
.mi-about-divider { display: none; }
.mi-about-text { display: flex; flex-direction: column; padding-top: 8px; }
.mi-about-text p { font-size: 15px; line-height: 1.65; max-width: 56ch; margin-bottom: 18px; color: var(--text); }
.mi-about-text p:first-of-type { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }

/* ---------------- PRODUCTS ---------------- */
.mi-products { padding: 96px 0; border-top: 1px solid var(--line); }
.mi-products-head { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 48px; flex-wrap: wrap; }
.mi-products-head-left { display: flex; flex-direction: column; gap: 8px; }
.mi-products-head-left p { font-size: 14px; color: var(--text-soft); max-width: 48ch; line-height: 1.5; margin-top: 8px; }
.mi-products-h2 { font-size: clamp(28px, 3vw, 40px); font-weight: 400; letter-spacing: -0.025em; }
.mi-products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.mi-product { display: flex; flex-direction: column; cursor: pointer; text-decoration: none; color: var(--text); position: relative; background: var(--bg); }
.mi-product-top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: flex-start; align-items: baseline; padding: 16px 24px 14px; gap: 16px; font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; border-top: 1px solid var(--line); }
.mi-product-top-label { color: var(--text); }
.mi-product-media-wrap { position: relative; aspect-ratio: 1/1; padding: 0; display: flex; align-items: stretch; justify-content: stretch; overflow: hidden; }
.mi-product-media-wrap .mi-media { width: 100%; height: 100%; aspect-ratio: auto; }
.mi-product-media-wrap .mi-media-corner { display: none; }
.mi-product-cta { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 24px; background: var(--bg); border-top: 1px solid var(--text); display: flex; justify-content: center; align-items: center; gap: 12px; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0; transform: translateY(100%); transition: opacity 520ms cubic-bezier(0.22, 1, 0.36, 1), transform 520ms cubic-bezier(0.22, 1, 0.36, 1); pointer-events: none; }
.mi-product:hover .mi-product-cta { opacity: 1; transform: translateY(0); }
.mi-product-cta-arrow { font-size: 14px; }
.mi-price { font-size: 13px; font-weight: 500; white-space: nowrap; }
.mi-price small { font-weight: 400; color: var(--text-muted); margin-left: 4px; }
.mi-price-soft { color: var(--text-muted); }

/* List variant */
.mi-products-list { display: flex; flex-direction: column; }
.mi-products-list .mi-product-row { display: grid; grid-template-columns: 80px 1.5fr 1fr auto; align-items: center; gap: 32px; padding: 24px 4px; border-top: 1px solid var(--line-soft); }
.mi-product-row:last-child { border-bottom: 1px solid var(--line-soft); }
.mi-product-row .mi-media { aspect-ratio: 1/1; }
.mi-product-row h3 { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.mi-product-row .mi-product-desc { font-size: 13px; color: var(--text-soft); }

/* Mosaic variant */
.mi-products-mosaic { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 220px; gap: 16px; }
.mi-products-mosaic .mi-product { position: relative; }
.mi-products-mosaic .mi-product .mi-media { height: 100%; aspect-ratio: auto; }
.mi-products-mosaic .mi-product .mi-product-info { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 8px 12px; background: var(--bg); z-index: 4; }
.mi-products-mosaic .pos-feat { grid-column: span 4; grid-row: span 2; }
.mi-products-mosaic .pos-tall { grid-column: span 2; grid-row: span 2; }
.mi-products-mosaic .pos-wide { grid-column: span 3; grid-row: span 1; }
.mi-products-mosaic .pos-sm   { grid-column: span 2; grid-row: span 1; }

/* ---------------- ULTIMA + LABS BLOCKS ---------------- */
.mi-block { padding: 0; border-top: 1px solid var(--line); }
.mi-block-grid { display: grid; grid-template-columns: 1fr 1px 1fr; gap: 0; align-items: stretch; min-height: 80vh; }
.mi-block-grid.reverse .mi-block-media-wrap { order: 3; }
.mi-block-grid.reverse .mi-block-divider { order: 2; }
.mi-block-grid.reverse .mi-block-text { order: 1; }
.mi-block-media-wrap { position: relative; display: flex; }
.mi-block-media-wrap .mi-media { aspect-ratio: auto; width: 100%; height: 100%; }
.mi-block-divider { background: var(--line); width: 1px; }
.mi-block-text { display: flex; flex-direction: column; gap: 24px; max-width: 56ch; justify-content: center; padding: 96px 64px; }
.mi-block-text .mi-label { margin-bottom: 0; }
.mi-block-h2 { font-size: clamp(32px, 3.5vw, 52px); font-weight: 400; letter-spacing: -0.03em; line-height: 1.05; max-width: 18ch; }
.mi-block-text p { font-size: 15px; line-height: 1.6; color: var(--text); }
.mi-block-cta-row { display: flex; align-items: center; gap: 24px; margin-top: 8px; flex-wrap: wrap; }
.mi-block-price { font-size: 22px; font-weight: 500; letter-spacing: -0.015em; }
.mi-block-price small { font-size: 12px; font-weight: 400; color: var(--text-muted); margin-left: 6px; }

/* ---------------- OPTIONS ---------------- */
.mi-options { padding: 0; border-top: 1px solid var(--line); background: var(--bg-pure); }
.mi-options-grid { display: grid; grid-template-columns: 1fr 1px 1fr; gap: 0; align-items: stretch; }
.mi-options-left { display: flex; align-items: center; padding: 96px 64px; }
.mi-options-h2 { font-size: clamp(40px, 5vw, 80px); font-weight: 400; letter-spacing: -0.035em; line-height: 1.05; max-width: 14ch; margin: 0; }
.mi-options-divider { background: var(--line); width: 1px; }
.mi-options-right { display: flex; flex-direction: column; }
.mi-option-row { display: flex !important; flex-direction: column; gap: 12px; padding: 40px 64px; border-bottom: 1px solid var(--line); text-decoration: none; }
.mi-option-row, .mi-option-row:hover, .mi-option-row:focus { text-decoration: none; }
.mi-option-row-label, .mi-option-row-link, .mi-option-row:hover .mi-option-row-label, .mi-option-row:hover .mi-option-row-link { text-decoration: none; }
.mi-option-row:last-child { border-bottom: none; }
.mi-option-row-label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); }
.mi-option-row-link {
  font-size: 13px; color: var(--text); align-self: flex-start;
  position: relative; text-decoration: none;
  padding-bottom: 3px;
}
.mi-option-row-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor;
  transform-origin: left; transform: scaleX(1);
  transition: transform 450ms cubic-bezier(0.65, 0, 0.35, 1);
}
.mi-option-row:hover .mi-option-row-link::after { transform: scaleX(0); }

/* ---------------- BUTTONS ---------------- */
.mi-btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; font-family: inherit; font-size: 13px; font-weight: 500; border: 1px solid var(--text); cursor: pointer; transition: all 150ms ease; background: transparent; color: var(--text); letter-spacing: 0.02em; }
.mi-btn-fill { background: var(--text); color: var(--bg); }
.mi-btn-fill:hover { background: var(--bg); color: var(--text); }
.mi-btn-outline:hover { background: var(--text); color: var(--bg); }

/* ---------------- FOOTER ---------------- */
.mi-footer { background: var(--bg-pure); border-top: 1px solid var(--text); }
.mi-footer-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.mi-footer-top > * { padding: 20px 24px; border-right: 1px solid var(--line); }
.mi-footer-top > *:last-child { border-right: 0; }
.mi-footer-brand .mi-logo { font-size: 22px; font-weight: 400; letter-spacing: -0.02em; line-height: 1; }
.mi-footer-brand .mi-logo sup { font-size: 0.45em; margin-left: 3px; vertical-align: 0.7em; font-weight: 500; line-height: 1; }
.mi-footer-brand p { font-size: 11px; color: var(--text-soft); margin-top: 8px; line-height: 1.5; max-width: 32ch; }
.mi-footer-mid { } /* intentionally empty */
.mi-footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mi-footer-col h4 { font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; color: var(--text); }
.mi-footer-col ul { list-style: none; padding: 0; margin: 0; }
.mi-footer-col li { margin-bottom: 3px; }
.mi-footer-col a { font-size: 11px; color: var(--text); line-height: 1.4; }
.mi-footer-col a:hover { text-decoration: underline; text-underline-offset: 4px; }

.mi-footer-marquee { border-top: 1px solid var(--text); overflow: hidden; padding: 6px 0; white-space: nowrap; }
.mi-footer-marquee-track { display: inline-flex; gap: 56px; padding-left: 100%; animation: mi-marquee 38s linear infinite; }
.mi-footer-marquee-track span { font-size: clamp(18px, 2vw, 26px); font-weight: 400; letter-spacing: -0.02em; color: var(--text); }
@keyframes mi-marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* ---------------- ABOUT-PAGE / MANIFESTO PAGE ---------------- */
.mi-page-head { padding: 96px 0 64px; }
.mi-page-head .mi-label { margin-bottom: 24px; }
.mi-page-h1 { font-size: clamp(48px, 6vw, 96px); font-weight: 400; letter-spacing: -0.04em; line-height: 0.98; max-width: 16ch; }
.mi-page-h1 em { font-style: normal; font-weight: 300; opacity: 0.85; }

.mi-page-body { padding: 64px 0 96px; border-top: 1px solid var(--line); }
.mi-page-body-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; align-items: start; }
.mi-page-body-grid p { font-size: 16px; line-height: 1.65; max-width: 60ch; margin-bottom: 18px; }
.mi-page-body-grid p.lead { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }

/* ---------------- FORMATION-PAGE ---------------- */
.mi-formation-hero { display: grid; grid-template-columns: 1fr 1fr; min-height: 640px; border-bottom: 1px solid var(--line); }
.mi-formation-hero-text { padding: 80px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; border-right: 1px solid var(--line); }
.mi-formation-hero-title { font-size: clamp(36px, 4.5vw, 64px); font-weight: 400; letter-spacing: -0.03em; line-height: 1.02; max-width: 14ch; }
.mi-formation-hero-sub { font-size: 17px; line-height: 1.5; max-width: 42ch; color: var(--text-soft); }
.mi-formation-hero-media { position: relative; }

.mi-formation-body { padding: 96px 0; border-bottom: 1px solid var(--line); }
.mi-formation-body-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; align-items: start; }
.mi-formation-body-grid p { font-size: 16px; line-height: 1.65; margin-bottom: 18px; }
.mi-formation-body-grid p.lead { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }

.mi-formation-cta { padding: 96px 0; border-bottom: 1px solid var(--line); }
.mi-formation-cta-grid { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: end; }
.mi-formation-cta-price { font-size: clamp(36px, 4vw, 56px); font-weight: 500; letter-spacing: -0.02em; line-height: 1; }
.mi-formation-cta-price small { font-size: 0.35em; font-weight: 400; color: var(--text-muted); margin-left: 8px; }
.mi-formation-cta-meta { font-size: 13px; color: var(--text-soft); margin-top: 12px; }

/* ---------------- DENSITY (tweak) ---------------- */
.is-dense .mi-intro,
.is-dense .mi-details,
.is-dense .mi-about,
.is-dense .mi-products,
.is-dense .mi-block,
.is-dense .mi-options,
.is-dense .mi-footer,
.is-dense .mi-page-head,
.is-dense .mi-page-body,
.is-dense .mi-formation-body,
.is-dense .mi-formation-cta { padding-top: 56px; padding-bottom: 56px; }
.is-dense .mi-products-grid { gap: 12px; }
.is-dense .mi-options-grid { gap: 12px; }

/* ---------------- WIREFRAME ANNOTATIONS ---------------- */
.wf-note {
  position: absolute; top: 12px; right: 12px;
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); border: 1px dashed var(--text-muted);
  padding: 4px 8px; background: var(--bg);
  z-index: 10;
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 1100px) {
  .mi-products-grid { grid-template-columns: repeat(2, 1fr); }
  .mi-products-mosaic { grid-template-columns: repeat(2, 1fr); }
  .mi-products-mosaic .pos-feat,
  .mi-products-mosaic .pos-tall,
  .mi-products-mosaic .pos-wide,
  .mi-products-mosaic .pos-sm { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 600px) {
  .mi-products-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .mi-intro-grid, .mi-footer-grid, .mi-page-body-grid, .mi-formation-body-grid,
  .mi-formation-hero, .mi-hero-split { grid-template-columns: 1fr; gap: 32px; }
  .mi-block-grid, .mi-block-grid.reverse { grid-template-columns: 1fr; gap: 32px; }
  .mi-block-divider { display: none; }
  .mi-about-grid { grid-template-columns: 1fr; gap: 32px; }
  .mi-about-divider { display: none; }
  .mi-options-grid { grid-template-columns: 1fr; }
  .mi-options-divider { display: none; }
  .mi-options-left { padding: 64px 32px 32px; }
  .mi-option-row { padding: 32px; }
  .mi-details-grid { grid-template-columns: 1fr 1fr; }
  .mi-nav-center { display: none; }
}
