/* ═══════════════════════════════════════════════════════════════
   hd.css — ULTRA HD

   The same workshop, seen on a monitor bought two decades later.
   Rounded corners, acrylic panels, a bloom wallpaper, and not a
   single scanline. Everything hangs off html.hd-mode so unplugging
   the cable puts the CRT straight back.
   ═══════════════════════════════════════════════════════════════ */

html.hd-mode{
  --panel:      #f7f7fa;
  --panel-hi:   #ffffff;
  --ink:        #1a1a1f;
  --blue:       #0067c0;
  --teal:       #0f7b6c;
  --black:      #14141a;
  --red:        #c42b1c;
  --green:      #6ccb5f;
  --amber:      #f7a24b;
  --amber-text: #ffc17a;
  --cream:      #f6f8fc;

  --bevel-hi:   #ffffff;
  --bevel-lo:   #dcdce3;
  --bevel-sh:   #c2c2cc;

  --titlebar:     linear-gradient(180deg, #fdfdff, #f4f4f8);
  --titlebar-off: linear-gradient(180deg, #f6f6f9, #ededf2);

  --f-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-ui:      "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-term:    "Cascadia Mono", ui-monospace, Consolas, monospace;
  --radius: 8px;
}

/* ── no CRT: this panel is perfectly flat and perfectly boring ── */
html.hd-mode .crt__scan,
html.hd-mode .crt__static,
html.hd-mode .crt__glow,
html.hd-mode .crt__vignette{ display:none; }
html.hd-mode .crt__curve{ box-shadow:none; }
html.hd-mode .crt__curve::before,
html.hd-mode .crt__curve::after{ display:none; }

/* ── the same workshop, twenty years later ──
   Same bench, same viewpoint: a glass-sided tower instead of the beige one,
   a laptop, a widescreen panel on the desk (still with its back to us) and
   LED strips under the shelves. */
html.hd-mode .workshop{
  background-image:url("../img/verkstaedi-nutima.svg");
  background-size:cover;
  background-position:50% 100%;
  background-color:#20242e;
  filter:none;
}
html.hd-mode .workshop::before{ display:none; }
html.hd-mode .workshop::after{
  content:""; position:absolute; inset:0;
  background:
    linear-gradient(90deg, rgba(12,16,24,.14) 0%, rgba(12,16,24,.58) 20%,
                           rgba(12,16,24,.60) 80%, rgba(12,16,24,.14) 100%),
    linear-gradient(180deg, rgba(12,16,24,.42) 0%, rgba(12,16,24,.3) 30%, rgba(8,11,18,.6) 100%);
}
/* text off at the top of the page: let the new room show, same as the old one */
html.hd-mode[data-herotext="off"].at-top .workshop::after{
  background:
    linear-gradient(90deg, rgba(12,16,24,.04) 0%, rgba(12,16,24,.2) 22%,
                           rgba(12,16,24,.22) 78%, rgba(12,16,24,.04) 100%),
    linear-gradient(180deg, rgba(12,16,24,.16) 0%, rgba(12,16,24,.08) 30%, rgba(8,11,18,.3) 100%);
}
html.hd-mode body{ background:transparent; }

/* ── chrome: acrylic, centred, rounded ── */
html.hd-mode .menubar{
  background:rgba(243,243,247,.97);
  -webkit-backdrop-filter:blur(30px) saturate(1.5);
  backdrop-filter:blur(30px) saturate(1.5);
  border-bottom:1px solid rgba(0,0,0,.06);
  box-shadow:0 1px 12px rgba(0,0,0,.16);
}
html.hd-mode .taskbar{
  background:rgba(243,243,247,.97);
  -webkit-backdrop-filter:blur(30px) saturate(1.5);
  backdrop-filter:blur(30px) saturate(1.5);
  border-top:1px solid rgba(0,0,0,.06);
  box-shadow:0 -1px 12px rgba(0,0,0,.16);
  justify-content:center; gap:.35rem;
}
html.hd-mode .taskbar__tasks{ flex:0 1 auto; }
html.hd-mode .taskbar__tray{
  position:absolute; right:.5rem; box-shadow:none;
}
html.hd-mode .startbtn,
html.hd-mode .taskbtn,
html.hd-mode .tray__btn,
html.hd-mode .tray__clock{
  background:transparent; border:0; box-shadow:none; border-radius:6px;
}
html.hd-mode .startbtn:hover,
html.hd-mode .taskbtn:hover,
html.hd-mode .tray__btn:hover,
html.hd-mode .tray__clock:hover{ background:rgba(0,0,0,.06); }
html.hd-mode .startbtn__logo{ transform:none; border-radius:2px; }
html.hd-mode .mainnav a{ border-radius:6px; border:0; }
html.hd-mode .mainnav a:hover{ background:rgba(0,0,0,.06); color:var(--ink); box-shadow:none; }
html.hd-mode .mainnav a.is-current{
  background:rgba(0,103,192,.12); color:#0b4a8f; box-shadow:none;
}
html.hd-mode .statusstrip{
  background:rgba(255,255,255,.6); border:1px solid rgba(0,0,0,.06);
  border-radius:6px; box-shadow:none; color:#33333b;
}
html.hd-mode .brand__mark{ border-radius:6px; border-width:1px; }

/* ── panels: acrylic cards instead of beveled boxes ── */
html.hd-mode .win,
html.hd-mode .fwin,
html.hd-mode .panelbox,
html.hd-mode .probcard,
html.hd-mode .module,
html.hd-mode .review,
html.hd-mode .startmenu,
html.hd-mode .toast{
  background:rgba(249,249,252,.9);
  -webkit-backdrop-filter:blur(28px) saturate(1.4);
  backdrop-filter:blur(28px) saturate(1.4);
  border:1px solid rgba(255,255,255,.7);
  border-radius:10px;
  box-shadow:0 10px 34px rgba(0,0,0,.28), 0 1px 0 rgba(255,255,255,.7) inset;
}
html.hd-mode .win::after,
html.hd-mode .note::after,
html.hd-mode .photo::after{ display:none; }
html.hd-mode .win__bar,
html.hd-mode .fwin__bar{
  background:transparent; color:var(--ink);
  border-bottom:1px solid rgba(0,0,0,.07);
  border-radius:10px 10px 0 0;
}
html.hd-mode .win__ctrl,
html.hd-mode .fwin__bar .win__ctrl{
  background:transparent; border:0; box-shadow:none; color:#4a4a52;
  border-radius:4px; width:30px; height:24px;
}
html.hd-mode .win__ctrl:hover{ background:rgba(0,0,0,.07); }
html.hd-mode .win__ctrl[data-win-action="close"]:hover,
html.hd-mode .win__ctrl[data-fwin="close"]:hover{ background:#c42b1c; color:#fff; }
html.hd-mode .win__menu{ border-bottom:1px solid rgba(0,0,0,.06); box-shadow:none; }
html.hd-mode .win__status{ border-top:1px solid rgba(0,0,0,.06); }
html.hd-mode .win__status span{ box-shadow:none; border:0; }

/* ── controls ── */
html.hd-mode .btn{
  background:rgba(255,255,255,.72);
  border:1px solid rgba(0,0,0,.1);
  border-radius:6px;
  box-shadow:0 1px 2px rgba(0,0,0,.06);
  text-transform:none; letter-spacing:0; font-weight:600;
}
html.hd-mode .btn:hover{ background:rgba(255,255,255,.92); }
html.hd-mode .btn:active{ translate:0 0; background:rgba(240,240,244,.9); box-shadow:none; }
html.hd-mode .btn--primary{
  background:#0067c0; color:#fff; border-color:#005ba1;
  box-shadow:0 1px 2px rgba(0,60,120,.35);
}
html.hd-mode .btn--primary:hover{ background:#1a76c8; }
html.hd-mode input[type=text],
html.hd-mode input[type=tel],
html.hd-mode input[type=email],
html.hd-mode input[type=number],
html.hd-mode select,
html.hd-mode textarea{
  background:rgba(255,255,255,.85);
  border:1px solid rgba(0,0,0,.12);
  border-bottom:2px solid rgba(0,0,0,.4);
  border-radius:5px; box-shadow:none;
}
html.hd-mode input:focus,
html.hd-mode select:focus,
html.hd-mode textarea:focus{ outline:none; border-bottom-color:#0067c0; }
html.hd-mode .ctl__box{ border-radius:50%; box-shadow:0 0 0 1px rgba(0,0,0,.35); background:#fff; }
html.hd-mode .ctl__box--check{ border-radius:4px; }
html.hd-mode .progress{ border-radius:99px; border:0; background:rgba(0,0,0,.1); padding:0; }
html.hd-mode .progress__fill{ border-radius:99px; background:#0067c0; }

/* ── type ── */
html.hd-mode h1, html.hd-mode h2, html.hd-mode h3,
html.hd-mode .brand__name, html.hd-mode .shead__title{
  letter-spacing:-.02em; font-weight:600;
}
html.hd-mode .hero__title{
  color:#fff; text-shadow:0 2px 30px rgba(0,0,0,.5);
  line-height:1.02;
}
html.hd-mode .shead__title{
  color:#fff; border-bottom:0;
  text-shadow:0 2px 22px rgba(0,0,0,.55);
}
html.hd-mode .eyebrow{
  border-radius:99px; border-color:rgba(255,255,255,.35);
  background:rgba(255,255,255,.12); color:#eaf2ff;
}
html.hd-mode .hero__en{ color:#9fd6ff; }
html.hd-mode .hero__status{ color:#8fe08a; }
html.hd-mode .hero__facts b{ color:#ffd9a8; }
html.hd-mode .mono{ letter-spacing:0; }

/* ── the dark cards keep their contrast, just softer ── */
html.hd-mode .diagpanel,
html.hd-mode .inventory,
html.hd-mode .fwin__term,
html.hd-mode .finalcta{
  background:rgba(20,22,34,.88);
  -webkit-backdrop-filter:blur(24px);
  backdrop-filter:blur(24px);
  border:1px solid rgba(255,255,255,.14);
  border-radius:10px;
}
html.hd-mode .footer{
  background:rgba(14,16,28,.9);
  -webkit-backdrop-filter:blur(24px);
  backdrop-filter:blur(24px);
  border-top:1px solid rgba(255,255,255,.12);
}
html.hd-mode .serialplate{ background:rgba(8,10,20,.9); }
html.hd-mode .ticker{ background:rgba(8,10,20,.72); border-block-color:rgba(255,255,255,.1); }
html.hd-mode .pixmap{ background:#081226; border-radius:8px; }
html.hd-mode .textswitch{ border-radius:99px; background:rgba(10,14,28,.6); }

/* Light text over a bright wallpaper needs its own shade, exactly as it
   does over the workshop and over the 2099 sun. */
html.hd-mode .hero__copy::before{
  background:radial-gradient(ellipse 84% 64% at 30% 50%,
    rgba(4,8,22,.86) 0%, rgba(4,8,22,.74) 36%, rgba(4,8,22,.34) 66%, rgba(4,8,22,0) 100%);
}
html.hd-mode .shead,
html.hd-mode .probnote,
html.hd-mode .hero__facts{ position:relative; }
html.hd-mode .shead::before,
html.hd-mode .probnote::before,
html.hd-mode .hero__facts::before{
  content:""; position:absolute; z-index:-1; pointer-events:none;
  inset:-1.2rem clamp(-2.2rem, -2vw, -1rem);
  background:radial-gradient(ellipse 80% 76% at 32% 50%,
    rgba(4,8,22,.9) 0%, rgba(4,8,22,.8) 42%, rgba(4,8,22,.36) 74%, rgba(4,8,22,0) 100%);
}

/* ── odds and ends ── */
html.hd-mode .osd{ border-left:0; border-radius:6px; background:rgba(10,14,28,.72); }
html.hd-mode .sticker{ border-radius:6px; }
html.hd-mode .photo{ border-radius:10px; box-shadow:0 10px 30px rgba(0,0,0,.4); }
html.hd-mode .photo img{ border-radius:6px; filter:none; }
html.hd-mode .scenespot{ display:none; }   /* the 2003 bench is not on screen */
/* the green-on-black readout and its taped sticker are CRT-era things */
html.hd-mode .hero__bench{ display:none; }
html.hd-mode .hero__grid{ grid-template-columns:1fr 1.04fr; }
html.hd-mode .hdbadge{
  border-color:rgba(255,255,255,.35);
  background:rgba(12,16,30,.82);
  border-radius:99px;
}
html.hd-mode .hdbadge button{
  background:#0067c0; color:#fff; border-color:#005ba1; border-radius:99px;
}
html.hd-mode{ --icon-mid:#9aa0ad; }
html.hd-mode .footer,
html.hd-mode .diagpanel,
html.hd-mode .inventory{ --icon-ink:#e8eefc; --icon-fill:#2a3350; --icon-mid:#8f97a8; }

/* the modern font is wider than the pixel one */
html.hd-mode .hero__facts li{ max-width:20ch; }
html.hd-mode .hwbtn{
  background:rgba(255,255,255,.7); border:1px solid rgba(0,0,0,.12);
  border-radius:6px; box-shadow:0 1px 2px rgba(0,0,0,.08);
  letter-spacing:.02em; text-transform:none;
}
html.hd-mode .hwbtn:active{ transform:none; background:rgba(240,240,244,.9); }
html.hd-mode .hwbtn__grill{ background:repeating-linear-gradient(180deg,#5a5a66 0 2px,transparent 2px 4px); }

@media (max-width:640px){
  /* a centred taskbar and an absolutely placed tray collide on a phone */
  html.hd-mode .taskbar{ justify-content:flex-start; }
  html.hd-mode .taskbar__tray{ position:static; margin-left:auto; }
}

/* the badge exists before the theme does, so it needs a base look too */
.hdbadge{ border-color:rgba(255,255,255,.4); }
