/* ============================================================
   Visian — Website shared styles
   Built on top of colors_and_type.css tokens.
   ============================================================ */

/* Fix font path — colors_and_type.css expects fonts/ next to itself.
   We override @font-face with correct relative paths from site root. */
@font-face { font-family: 'Raleway'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/Raleway-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Raleway'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/Raleway-Italic.ttf') format('truetype'); }
@font-face { font-family: 'Raleway'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/Raleway-Medium.ttf') format('truetype'); }
@font-face { font-family: 'Raleway'; font-style: italic; font-weight: 500; font-display: swap; src: url('../fonts/Raleway-MediumItalic.ttf') format('truetype'); }
@font-face { font-family: 'Raleway'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/Raleway-SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Raleway'; font-style: italic; font-weight: 600; font-display: swap; src: url('../fonts/Raleway-SemiBoldItalic.ttf') format('truetype'); }
@font-face { font-family: 'Raleway'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/Raleway-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/Montserrat-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/Montserrat-Medium.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/Montserrat-SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/Montserrat-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/Montserrat-ExtraBold.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 900; font-display: swap; src: url('../fonts/Montserrat-Black.ttf') format('truetype'); }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--fg-1);
  background: var(--bg-app);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- Body paragraphs: justify by default ---------- */
p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
/* Opt-outs: short headline-adjacent copy, footer, navigation, captions */
.subtitle-italic,
.breadcrumb,
.eyebrow,
.section-label,
.footer-baseline,
.site-footer p,
.menu-overlay p,
.menu-footer p,
.hero p,
.scroll-indicator,
.ticker p,
.italic-sub,
.exp-tag,
.exp-lead,
.phase-verb,
.ai-row p,
.cta-block .sub,
.page-header p,
.page-header .lead-row p,
.references .italic-sub,
.ref-card p,
.ref-mini p,
.pkg-card .pkg-desc { text-align: left; hyphens: manual; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 80px);
}
.container-wide {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 64px);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 24px clamp(24px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--dur-base) var(--ease-standard),
              padding var(--dur-base) var(--ease-standard),
              border-color var(--dur-base) var(--ease-standard);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(140%);
  padding-top: 16px;
  padding-bottom: 16px;
  border-bottom-color: var(--visian-line);
}
.site-header.is-scrolled.on-dark-theme {
  background: rgba(10,10,10,0.92);
  border-bottom-color: var(--visian-line-dark);
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--visian-ink);
}
.site-header.on-dark-theme .brand,
.site-header.on-dark-theme .menu-btn { color: var(--visian-white); }
.site-header .brand img { height: 26px; width: auto; }
.site-header .brand .brand-img--light { display: none; }
.site-header.on-dark-theme .brand .brand-img--dark { display: none; }
.site-header.on-dark-theme .brand .brand-img--light { display: inline-block; }

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--visian-ink);
  transition: color var(--dur-base) var(--ease-standard);
}
.menu-btn .bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}
.menu-btn .bars span {
  width: 26px;
  height: 2px;
  background: currentColor;
  display: block;
  transition: transform var(--dur-base) var(--ease-standard);
}
.menu-btn .bars span:last-child { width: 18px; align-self: flex-end; }
.menu-btn:hover { color: var(--visian-red); }

/* ---------- Menu overlay ---------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--visian-black);
  color: var(--visian-white);
  display: grid;
  grid-template-columns: 1fr 1fr;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-slow) var(--ease-standard);
}
.menu-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.menu-overlay .menu-left {
  padding: 48px clamp(32px, 5vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--visian-line-dark);
  position: relative;
}
.menu-overlay .menu-right {
  position: relative;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.menu-overlay .menu-right::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.25) 0%, rgba(10,10,10,0.55) 100%);
}
.menu-overlay .menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.menu-overlay .brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--visian-white);
  letter-spacing: -0.02em;
}
.menu-overlay .brand img { height: 26px; }
.close-btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--visian-white);
  display: inline-flex; align-items: center; gap: 12px;
  transition: color var(--dur-base) var(--ease-standard);
}
.close-btn:hover { color: var(--visian-red); }
.close-btn .x {
  width: 22px; height: 22px; position: relative;
}
.close-btn .x::before, .close-btn .x::after {
  content: ''; position: absolute; left: 0; top: 50%;
  width: 100%; height: 2px; background: currentColor;
  transform-origin: center;
}
.close-btn .x::before { transform: rotate(45deg); }
.close-btn .x::after { transform: rotate(-45deg); }

.menu-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.menu-nav li { position: relative; }
.menu-nav a {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 12px 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 4.2vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--visian-white);
  transition: color var(--dur-base) var(--ease-standard), transform var(--dur-base) var(--ease-standard);
}
.menu-nav a:hover { color: var(--visian-red); transform: translateX(12px); }
.menu-nav a .num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--visian-red);
  align-self: flex-start;
  padding-top: 12px;
}
.menu-nav a.is-active { color: var(--visian-red); }

.menu-footer {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  color: var(--fg-on-dark-2);
  font-size: 13px;
}
.menu-footer .col .eyebrow {
  color: var(--visian-white);
  font-size: 11px;
  letter-spacing: 0.2em;
  margin-bottom: 8px;
  display: block;
}
.menu-footer .col p { color: var(--fg-on-dark-2); font-size: 14px; margin: 0; line-height: 1.6; }

.menu-right .menu-image-label {
  position: absolute;
  bottom: 48px; left: 48px;
  z-index: 2;
  color: var(--visian-white);
  font-family: var(--font-body);
  font-style: italic;
  font-size: 16px;
}
.menu-right .menu-image-label::before {
  content: ''; display: block;
  width: 40px; height: 2px; background: var(--visian-red);
  margin-bottom: 12px;
}

body.menu-open { overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background var(--dur-base) var(--ease-standard),
              color var(--dur-base) var(--ease-standard),
              transform var(--dur-base) var(--ease-standard);
}
.btn-primary {
  background: var(--visian-red);
  color: var(--visian-white);
}
.btn-primary:hover { background: var(--visian-red-ink); transform: translateY(-2px); }
.btn-ghost {
  color: var(--visian-ink);
  border: 1px solid currentColor;
}
.btn-ghost:hover { background: var(--visian-red); color: var(--visian-white); border-color: var(--visian-red); }
.btn-ghost-light {
  color: var(--visian-white);
  border: 1px solid var(--visian-white);
}
.btn-ghost-light:hover { background: var(--visian-red); border-color: var(--visian-red); }
.btn .arrow {
  display: inline-block;
  transition: transform var(--dur-base) var(--ease-standard);
}
.btn:hover .arrow { transform: translateX(6px); }

/* Text-style CTA link */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--visian-ink);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--visian-ink);
  transition: color var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard);
}
.link-arrow:hover { color: var(--visian-red); border-color: var(--visian-red); }
.link-arrow.light { color: var(--visian-white); border-color: var(--visian-white); }
.link-arrow.light:hover { color: var(--visian-red); border-color: var(--visian-red); }

/* ---------- Section scaffolding ---------- */
section { position: relative; }
.section-pad { padding: clamp(80px, 10vw, 140px) 0; }
.section-pad-sm { padding: clamp(56px, 7vw, 96px) 0; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--visian-red);
  margin-bottom: 24px;
}
.section-label::before {
  content: ''; width: 24px; height: 2px;
  background: var(--visian-red);
  display: inline-block;
}

.title-with-rule {
  position: relative;
  display: inline-block;
  padding-bottom: 18px;
  margin-bottom: 0;
}
.title-with-rule::after {
  content: ''; position: absolute;
  bottom: 0; left: 0;
  width: 40px; height: 2px;
  background: var(--visian-red);
}

/* ---------- Red carré motif (brand L-shape, not a filled square) ---------- */
.red-square-motif {
  display: inline-block;
  width: 14px; height: 14px;
  background-image: url('patterns/carre-1.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.red-square-lg {
  width: 28px; height: 28px;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms var(--ease-standard), transform 800ms var(--ease-standard);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Robustness: users who prefer reduced motion (and any context where the
   reveal observer cannot run) get the content shown immediately. */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- Footer (v2 — editorial) ---------- */
.site-footer {
  background: var(--visian-black);
  color: var(--fg-on-dark-2);
  padding: 96px 0 32px;
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

/* top row: brand + CTA */
.site-footer .footer-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
  padding-bottom: 72px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 56px;
}
.site-footer .footer-brand { display: flex; flex-direction: column; gap: 20px; }
.site-footer .brand-mark {
  display: flex;
  align-items: center;
  gap: 14px;
}
.site-footer .brand-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 6vw, 72px);
  line-height: 0.9;
  color: var(--visian-white);
  letter-spacing: -0.04em;
  text-transform: lowercase;
}
.site-footer .brand-mark .brand-logo {
  height: clamp(40px, 5vw, 58px);
  width: auto;
  display: block;
}
.site-footer .brand-mark .red-square-motif {
  width: 14px;
  height: 14px;
  transform: translateY(-8px);
}
.site-footer .footer-baseline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 18px;
  line-height: 1.4;
  color: rgba(255,255,255,0.7);
  max-width: 420px;
  margin: 0;
}
.site-footer .footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 20px 28px;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--visian-white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background var(--dur-base) var(--ease-standard),
              border-color var(--dur-base) var(--ease-standard),
              color var(--dur-base) var(--ease-standard);
}
.site-footer .footer-cta:hover {
  background: var(--visian-red);
  border-color: var(--visian-red);
  color: var(--visian-white);
}
.site-footer .footer-cta-arrow {
  font-size: 18px;
  line-height: 1;
  transition: transform var(--dur-base) var(--ease-standard);
}
.site-footer .footer-cta:hover .footer-cta-arrow { transform: translateX(6px); }

/* 4-col grid */
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-footer .footer-col h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--visian-red);
  margin: 0 0 22px 0;
}
.site-footer .footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.site-footer .footer-col ul li,
.site-footer .footer-col ul a {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  transition: color var(--dur-base) var(--ease-standard);
}
.site-footer .footer-col ul a:hover { color: var(--visian-white); }

/* bottom bar */
.site-footer .footer-bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}
.site-footer .footer-bottom a {
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: color var(--dur-base) var(--ease-standard);
}
.site-footer .footer-bottom a:hover { color: var(--visian-white); }

/* ---------- Carré decorator positions ---------- */
.carre-decor {
  position: absolute;
  width: clamp(120px, 14vw, 200px);
  height: auto;
  opacity: 0.5;
  pointer-events: none;
}
.carre-tr { top: 48px; right: 48px; }
.carre-br { bottom: 48px; right: 48px; }
.carre-bl { bottom: 48px; left: 48px; }
.carre-tl { top: 48px; left: 48px; }

/* ---------- Breadcrumb / page header ---------- */
.page-header {
  padding: 200px 0 80px;
  background: var(--visian-white);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--visian-line);
}
.page-header .breadcrumb {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--visian-mute);
  margin-bottom: 24px;
}
.page-header .breadcrumb .sep { margin: 0 10px; color: var(--visian-red); }
.page-header h1 {
  font-size: clamp(56px, 8vw, 120px);
  line-height: 0.95;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}
.page-header .subtitle-italic { font-size: clamp(20px, 2vw, 28px); }
.page-header h1 em { font-style: italic; font-weight: 400; color: var(--visian-red); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .menu-overlay { grid-template-columns: 1fr; }
  .menu-overlay .menu-right { display: none; }
  .site-footer .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .site-footer .footer-bottom { flex-direction: column; gap: 10px; }
}
@media (max-width: 640px) {
  .site-footer { padding: 64px 0 24px; }
  .site-footer .footer-grid { grid-template-columns: 1fr; gap: 32px; padding-bottom: 40px; }
  .site-footer .footer-top { padding-bottom: 40px; margin-bottom: 32px; }
  .site-footer .brand-logo { height: 44px; }
  .site-footer .footer-baseline { font-size: 15px; }
  .site-footer .footer-cta { padding: 16px 20px; font-size: 12px; }

  /* Header — tighter padding, smaller menu button on phones */
  .site-header { padding: 16px 20px; }
  .site-header .brand { font-size: 18px; }
  .site-header .brand img { height: 22px; }
  .menu-btn { padding: 8px 12px; font-size: 11px; letter-spacing: 0.14em; gap: 10px; }

  /* Buttons — wrap nicely, hit target ≥ 44px */
  .btn { padding: 14px 20px; font-size: 12px; gap: 8px; }

  /* Menu overlay — better spacing on phones */
  .menu-overlay .menu-left { padding: 32px 24px; }
  .menu-nav a { font-size: clamp(28px, 9vw, 44px); gap: 14px; }
  .menu-footer { flex-direction: column; gap: 20px; }

  /* Page header */
  .page-header { padding: 130px 0 56px; }

  /* Hide decorative carrés on small screens — they shift layout */
  .carre-decor { display: none; }
}
