/* Portfolio V107 | reviewed changes only. Existing brand, media and story geometry
   remain authoritative. New selectors are scoped to AppHalt and the AI section. */

/* AppHalt — native-feeling movement: window travels first, menu follows.
   Pixel coordinates are produced by the scroll controller, not by timers. */
.sober-home #apphalt-produit[data-ah-ready] .ah-product-demo-host .ah-demo .ah-demo-dashboard {
  left:var(--ah-window-left,50%);
  top:var(--ah-window-top,50%);
  width:var(--ah-window-width,min(390px,calc(100% - 24px)));
  height:432px;
  transform:none;
  transition:box-shadow .22s ease, background-color .22s ease;
}
.sober-home #apphalt-produit .ah-demo[data-composition="showcase"] .ah-demo-menu {
  top:58px;
  right:2.5%;
  width:36%;
  max-height:none;
  overflow:visible;
  padding:8px 11px 9px;
  opacity:var(--ah-menu-reveal,1);
  transform:translate3d(0,var(--ah-menu-translate,0px),0) scale(var(--ah-menu-scale,1));
  transform-origin:top right;
  border:1px solid rgba(255,255,255,.82);
  background:rgba(232,233,240,.96);
  box-shadow:0 16px 35px rgba(14,25,49,.24),0 1px 3px rgba(14,25,49,.09),inset 0 1px rgba(255,255,255,.66);
}
.sober-home #apphalt-produit .ah-demo[data-composition="showcase"] .ah-demo-menu-label {
  padding:2px 2px;
  line-height:15px;
  font-size:11.5px;
  color:#686773;
}
.sober-home #apphalt-produit .ah-demo[data-composition="showcase"] :is(.ah-demo-menu-app,.ah-demo-menu-item) {
  height:23px;
  min-height:23px;
  padding:2px 2px;
  font-size:12px!important;
  line-height:1.2;
  white-space:nowrap;
}
.sober-home #apphalt-produit .ah-demo[data-composition="showcase"] .ah-demo-menu-line {
  margin:3px 2px;
}
.sober-home #apphalt-produit .ah-demo[data-composition="showcase"] .ah-demo-menu-name {
  text-overflow:ellipsis;
  white-space:nowrap;
}
.sober-home #apphalt-produit .ah-demo[data-composition="showcase"] .ah-demo-menu-app .ah-demo-icon {
  width:14px;
  height:14px;
}
.sober-home #apphalt-produit .ah-demo[data-composition="showcase"] .ah-demo-menu-item svg {
  width:13px;
  height:13px;
}
@media(max-width:800px){
  /* On a narrow screen the macOS menu remains a popover over the dashboard.
     Moving the dashboard sideways here would make both unreadably narrow. */
  .sober-home #apphalt-produit[data-ah-ready] .ah-product-demo-host .ah-demo .ah-demo-dashboard {
    left:50%;
    top:50%;
    width:min(390px,calc(100% - 24px));
    height:400px;
    transform:translate(-50%,calc(-50% + 16px));
  }
  .sober-home #apphalt-produit .ah-demo[data-composition="showcase"] .ah-demo-menu {
    top:38px;
    right:12px;
    width:min(265px,calc(100% - 24px));
    max-height:calc(100% - 48px);
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-width:thin;
    transform-origin:top right;
  }
  .sober-home #apphalt-produit .ah-demo[data-composition="showcase"] .ah-demo-menu-item:nth-last-child(-n+4) {
    display:flex;
  }
  .sober-home #apphalt-produit .ah-demo[data-composition="showcase"] .ah-demo-menu-line:nth-last-of-type(-n+2) {
    display:block;
  }
}

/* AI practice: three openly presented examples, no carousel or faux quotes.
   The same two responsibilities appear in every card. */
.sober-home .ai-practice-section {
  padding:clamp(68px,7vw,106px) 0 clamp(78px,7vw,108px);
  background:linear-gradient(180deg,#fff 0%,#f7f9fd 100%);
}
.sober-home .ai-practice-intro {
  display:grid;
  grid-template-columns:minmax(0,.85fr) minmax(300px,.75fr);
  align-items:end;
  gap:clamp(20px,5vw,76px);
  margin-bottom:34px;
}
.sober-home .ai-practice-intro .eyebrow {
  grid-column:1/-1;
  margin-bottom:-6px;
}
.sober-home .ai-practice-intro>p:last-child {
  color:#465875;
  line-height:1.65;
  max-width:60ch;
  margin:0;
}
.aif-grid,.aif-grid *,.aif-grid *::before,.aif-grid *::after {box-sizing:border-box}
.aif-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  color:#223650;
}
.aif-card {
  min-width:0;
  display:flex;
  flex-direction:column;
  padding:clamp(23px,2.4vw,32px);
  border:1px solid #dbe3ef;
  border-radius:20px;
  background:#fff;
  box-shadow:0 14px 35px rgba(32,53,88,.055);
}
.aif-card-head {min-height:222px}
.aif-step {
  color:#2857a2;
  display:block;
  font:750 10px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  letter-spacing:.105em;
}
.aif-card h3 {
  margin:18px 0 13px;
  color:#192f50;
  font:400 clamp(27px,2.3vw,35px)/1.07 Georgia,'Times New Roman',serif;
  letter-spacing:-.038em;
  max-width:17ch;
}
.aif-card-head>p {
  margin:0;
  font:400 14px/1.65 -apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  color:#4d5f77;
}
.aif-visual {
  margin-top:10px;
  height:166px;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:9px;
  padding:16px 11px;
  border:1px solid #dfe7f3;
  border-radius:14px;
  background:linear-gradient(145deg,#f9fbff,#eef3fb);
  overflow:hidden;
}
.aif-mini-label {
  display:block;
  font:700 10px/1.2 -apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  color:#536581;
  margin-bottom:9px;
  white-space:normal;
}
.aif-arrow {color:#6f8ebd;flex:none;font-size:20px;line-height:1}
.aif-visual--research>div {min-width:0;flex:1;min-height:102px;background:white;border:1px solid #dbe5f1;border-radius:9px;padding:12px 9px;box-shadow:0 4px 10px #1c365712}
.aif-research-notes i,.aif-research-check i {
  display:block;height:5px;margin-bottom:8px;border-radius:2px;background:#c2cedf;
}
.aif-research-notes i:nth-of-type(2){width:84%}
.aif-research-notes i:nth-of-type(3){width:59%}
.aif-research-themes b{display:block;width:88%;height:10px;border-radius:3px;background:#d7e3fb;border-left:3px solid #4c70bd;margin-bottom:8px}
.aif-research-themes b:last-child{width:66%}
.aif-research-check strong{display:block;color:#317052;font-size:22px;line-height:1.15;margin:-3px 0 5px}
.aif-research-check i{width:72%;background:#c8decf}
.aif-visual--variants {gap:9px;padding:18px 12px}
.aif-variant {flex:1;min-width:0;height:122px;border:1px solid #d8e4f0;border-radius:8px;background:#fff;padding:12px 8px;box-shadow:0 4px 10px #1c36570c}
.aif-variant>span{display:block;font:700 10px/1.2 -apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;color:#647592;margin-bottom:11px}
.aif-shapes{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.aif-shapes i{height:15px;border-radius:3px;background:#dce5f2;display:block}
.aif-variant--1 .aif-shapes i:first-child{grid-column:1/-1;height:34px;background:#aebfdd}
.aif-variant--2 .aif-shapes{grid-template-columns:1fr}
.aif-variant--2 .aif-shapes i{height:15px}
.aif-variant--2 .aif-shapes i:first-child{background:#aec4e8}
.aif-variant--3 .aif-shapes i:nth-child(2){grid-row:span 2;height:auto;background:#afc0dc}
.aif-visual--prototype{padding:12px 9px}
.aif-proto-flow{display:flex;align-items:center;justify-content:space-between;gap:7px;width:100%}
.aif-proto-idea,.aif-proto-check{
  width:25%;min-width:0;padding:11px 7px;min-height:94px;border:1px solid #dbe5f2;border-radius:8px;background:#fff;
  color:#687895;font:700 10px/1.3 -apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
}
.aif-proto-idea span{display:block;height:6px;width:85%;background:#b9cce8;border-radius:3px;margin-top:11px}
.aif-proto-idea span:last-child{width:60%;margin-top:7px}
.aif-proto-device{height:130px;flex:1;max-width:106px;min-width:0;border:3px solid #bacbe4;border-radius:12px;background:#fff;position:relative;padding:10px}
.aif-proto-device>span{display:block;font-size:11px;color:#8798b2;line-height:10px}
.aif-proto-device i{display:block;height:7px;border-radius:2px;background:#d8e2f0;margin-top:9px}
.aif-proto-device i:nth-of-type(2){width:72%}
.aif-proto-device b{display:block;height:19px;margin-top:10px;border-radius:4px;background:#3467c2}
.aif-proto-device small{display:block;text-align:center;margin-top:8px;font:700 9px/1 -apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;color:#677c9c}
.aif-proto-check strong{display:block;font-size:22px;font-weight:600;color:#317052;margin-bottom:8px}
.aif-responsibility {
  margin-top:18px;padding-top:15px;border-top:1px solid #e7ecf4;
  display:grid;grid-template-columns:1fr 1fr;gap:16px;
}
.aif-responsibility>div{min-width:0}
.aif-responsibility span{
  display:block;font:750 9px/1.35 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  color:#6d7f9c;letter-spacing:.09em;margin-bottom:6px;
}
.aif-responsibility>div:last-child span{color:#1f614c}
.aif-responsibility strong{display:block;font:600 12px/1.35 -apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;color:#2f4463}
@media(max-width:1110px){
  .aif-grid{grid-template-columns:1fr;gap:14px}
  .aif-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,.95fr);gap:18px 28px;align-items:center}
  .aif-card-head{min-height:0}
  .aif-card h3{max-width:none}
  .aif-visual{margin-top:0}
  .aif-responsibility{grid-column:1/-1;margin-top:0}
}
@media(max-width:650px){
  .sober-home .ai-practice-intro{display:block;margin-bottom:25px}
  .sober-home .ai-practice-intro .eyebrow{margin-bottom:12px}
  .sober-home .ai-practice-intro h2{margin-bottom:17px}
  .aif-card{display:flex;gap:0;padding:22px 18px;border-radius:17px}
  .aif-card h3{font-size:30px;margin-top:12px}
  .aif-visual{margin-top:18px;width:100%}
  .aif-responsibility{margin-top:16px;gap:10px}
}
@media(prefers-reduced-motion:reduce){
  .sober-home #apphalt-produit .ah-demo[data-composition="showcase"] .ah-demo-menu {transform:none;transition:none!important}
}
html.motion-reduced .sober-home #apphalt-produit .ah-demo[data-composition="showcase"] .ah-demo-menu{transform:none;transition:none!important}
