/* Variant D: Tim's real desk. Archivo only; butter and desk black; one orange keycap. */
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

body[data-v="d"] {
  --desk: #0f1317;
  --butter: #e6d38c;
  --butter-deep: #d9c271;
  --signal: #ec6b2d;
  --cap: #ece4d2;
  --ink: #1b1a17;
  background: var(--desk);
  color: var(--ink);
  font-family: "Archivo", -apple-system, system-ui, sans-serif;
  font-stretch: 100%;
  font-weight: 420;
}
#v-d { font-size: 18.5px; line-height: 1.55; }
#v-d p, #v-d li { text-wrap: pretty; }
#v-d h1, #v-d h2 { font-stretch: 125%; font-weight: 820; letter-spacing: -0.035em; line-height: .98; }
#v-d h3 { font-stretch: 112%; font-weight: 650; font-size: 19px; letter-spacing: -0.01em; }
#v-d a { text-underline-offset: 3px; }
#v-d :focus-visible { outline: 3px solid var(--signal); outline-offset: 4px; border-radius: 6px; }
.d-wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); }

/* Nav sits over the window at the top of the photo */
.d-nav { position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 20px clamp(20px, 5vw, 64px); color: var(--cap); }
.d-brand { display: inline-flex; align-items: center; gap: 10px; font-stretch: 112%; font-weight: 700; text-decoration: none; letter-spacing: -0.01em; }
.d-brand img { width: 28px; height: 28px; }
.d-navlink { font-weight: 600; text-decoration: none; padding-bottom: 2px; border-bottom: 2px solid currentColor; }
.d-nav { background: linear-gradient(rgba(15,19,23,.55), rgba(15,19,23,0)); }

/* Hero: the photo, then the headline on the desk's front edge */
.d-hero { position: relative; color: var(--cap); }
.d-photo { position: relative; overflow: hidden; }
.d-photo img { width: 100%; height: auto; display: block; }
.d-photo::after { content: ""; position: absolute; inset: auto 0 0 0; height: 22%; background: linear-gradient(rgba(15,19,23,0), var(--desk) 92%); pointer-events: none; }
.d-hero-row {
  position: relative; margin-top: clamp(-170px, -11vw, -60px);
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 40px;
  max-width: 1240px; margin-left: auto; margin-right: auto; padding: 0 clamp(20px, 5vw, 64px) 64px;
}
.d-hero h1 { color: var(--cap); }
.h1-big { display: block; font-size: clamp(40px, 5.4vw, 88px); }
.h1-small { display: block; margin-top: .35em; font-size: clamp(22px, 2.3vw, 36px); font-stretch: 112%; font-weight: 640; letter-spacing: -0.02em; line-height: 1.15; color: #d8d0bf; }
.d-hero-text p { margin-top: 18px; font-size: clamp(18px, 1.5vw, 22px); color: #b9b3a5; max-width: 30em; }

/* The live screen: a 1600x900 box mapped onto the left display by app.js */
.d-screen { position: absolute; left: 0; top: 0; width: 1600px; height: 900px; transform-origin: 0 0; font-family: -apple-system, system-ui, sans-serif; visibility: hidden; }
.d-screen.ready { visibility: visible; }
.d-bar {
  position: absolute; top: 56px; left: 50%; display: flex; align-items: center; gap: 18px;
  padding: 18px 30px 18px 20px; border-radius: 22px; background: rgba(30,30,32,.94); color: #f2f2f7;
  box-shadow: 0 16px 40px rgba(0,0,0,.45); transform: translate(-50%, -30px); opacity: 0;
  transition: opacity .35s ease, transform .35s ease;
}
.d-bar-dot { width: 40px; height: 40px; border-radius: 50%; background: #0a84ff center/24px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 12H6m5-6-6 6 6 6' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.d-bar-text { font-size: 22px; color: #aeaeb2; } .d-bar-text b { display: block; font-size: 25px; color: #fff; }
.d-screen.glance .d-bar, .d-screen.filled .d-bar { opacity: 1; transform: translate(-50%, 0); }
.d-screen.filled .d-bar-dot { background: #30d158 center/24px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.d-dialog {
  position: absolute; left: 50%; top: 52%; width: 520px; padding: 34px 34px 26px; border-radius: 26px; text-align: center;
  background: rgba(236,236,240,.97); color: #1d1d1f; box-shadow: 0 40px 90px rgba(0,0,0,.55);
  transform: translate(-50%, -50%) scale(.92); opacity: 0; transition: transform .45s cubic-bezier(.22,1,.36,1), opacity .3s ease;
}
.d-screen.open .d-dialog { transform: translate(-50%, -50%); opacity: 1; }
.d-lock { width: 52px; height: 52px; fill: #8e8e93; stroke: #8e8e93; }
.d-dialog-title { font-size: 23px; font-weight: 700; margin-top: 10px; line-height: 1.3; }
.d-dialog-sub { font-size: 20px; color: #555; margin-top: 6px; }
.d-field { margin: 22px 0; height: 50px; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1.5px #c8c8cc, 0 0 0 5px rgba(10,132,255,.35); display: flex; align-items: center; padding: 0 16px; }
.d-dots { font-size: 26px; letter-spacing: 5px; }
.d-buttons { display: flex; justify-content: flex-end; gap: 12px; font-size: 20px; }
.d-buttons span { padding: 9px 26px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px #c8c8cc; }
.d-buttons .d-ok { background: #0a84ff; color: #fff; box-shadow: none; }

/* The keycap: the one loud thing on the page */
.keycap {
  --w: clamp(150px, 13vw, 196px);
  position: relative; display: block; width: var(--w); aspect-ratio: 1 / 0.94; flex: none;
  border-radius: 22px; text-decoration: none; color: #3a1606;
  background: linear-gradient(180deg, #d9581c 0%, #b8430f 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 -6px 0 rgba(0,0,0,.18) inset, 0 18px 34px -10px rgba(0,0,0,.7), 0 4px 0 #7a2a06;
  transition: transform .07s ease, box-shadow .07s ease;
  -webkit-tap-highlight-color: transparent;
}
.kc-top {
  position: absolute; left: 11%; right: 11%; top: 6%; bottom: 20%;
  border-radius: 15px; display: flex; flex-direction: column; justify-content: space-between; padding: 14% 13% 11%;
  background:
    radial-gradient(120% 90% at 50% 30%, rgba(255,255,255,.22), rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #f58447, #ec6b2d 60%, #e0611f);
  box-shadow: inset 0 2px 1px rgba(255,255,255,.35), inset 0 -3px 6px rgba(120,40,0,.25), 0 6px 10px -4px rgba(80,25,0,.6);
  transition: transform .07s ease;
}
.kc-legend { width: 34%; height: auto; }
.kc-label { font-stretch: 112%; font-weight: 700; font-size: clamp(15px, 1.25vw, 18px); letter-spacing: -0.01em; }
.keycap:hover .kc-top { filter: brightness(1.04); }
.keycap:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 -6px 0 rgba(0,0,0,.18) inset, 0 8px 18px -8px rgba(0,0,0,.7), 0 0 0 #7a2a06; }
.keycap:active .kc-top { transform: translateY(2px); }

/* Sections */
.d-why, .d-safe { background: var(--butter); padding: clamp(72px, 9vw, 128px) 0; }
.d-why h2, .d-safe h2, .d-how h2, .d-foot h2 { font-size: clamp(32px, 4vw, 60px); max-width: 15em; text-wrap: balance; }
.d-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 64px); margin-top: 36px; max-width: 1080px; }
.d-cols p { max-width: 36em; }
.d-why a { color: inherit; }
.d-keys-q { margin-top: 64px; }
.d-keys { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
.mini-key {
  all: unset; cursor: pointer; position: relative; padding: 16px 22px 22px; border-radius: 12px;
  font-family: inherit; font-stretch: 105%; font-weight: 620; font-size: 16px; color: var(--ink);
  background: linear-gradient(180deg, #f4eee0, #e3d9c2);
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.08), inset 0 1px 0 #fff, 0 3px 0 #b9ab86, 0 10px 16px -8px rgba(60,45,10,.5);
  transition: transform .07s ease, box-shadow .07s ease;
}
.mini-key:active { transform: translateY(3px); box-shadow: inset 0 -6px 0 rgba(0,0,0,.08), inset 0 1px 0 #fff, 0 0 0 #b9ab86, 0 4px 8px -6px rgba(60,45,10,.5); }
.mini-key[aria-pressed="true"] { background: linear-gradient(180deg, #2b2f35, #1b1e22); color: var(--cap); box-shadow: inset 0 -6px 0 rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.12), 0 3px 0 #000, 0 10px 16px -8px rgba(0,0,0,.6); }
.d-answer { margin-top: 22px; font-size: clamp(19px, 1.6vw, 23px); font-stretch: 105%; font-weight: 520; max-width: 32em; }

.d-how { background: var(--desk); color: var(--cap); padding: clamp(72px, 9vw, 128px) 0; }
.d-how-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.d-steps { margin: 40px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 26px; }
.d-steps li { counter-increment: s; position: relative; padding-left: 64px; color: #b9b3a5; max-width: 34em; }
.d-steps li::before { content: counter(s); position: absolute; left: 0; top: -4px; font-stretch: 125%; font-weight: 820; font-size: 40px; line-height: 1; color: var(--butter); }
.d-steps b { display: block; color: var(--cap); font-weight: 650; margin-bottom: 2px; }
.d-aside { margin-top: 32px; color: #8f8a7f; max-width: 34em; }
.d-shots { margin: 0; position: relative; }
.d-settings { width: 78%; border-radius: 18px; box-shadow: 0 40px 80px -30px #000, 0 0 0 1px rgba(255,255,255,.06); }
.d-pill { position: relative; display: block; width: 70%; margin: -34px 0 0 auto; border-radius: 16px; box-shadow: 0 20px 40px -12px #000; }
.d-pill + .d-pill { margin-top: 12px; }

.d-safe h3 { margin-bottom: 14px; }
.d-safe ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.d-safe li { padding-left: 22px; position: relative; max-width: 34em; }
.d-safe li::before { content: ""; position: absolute; left: 0; top: .62em; width: 9px; height: 9px; border-radius: 2px; background: var(--ink); }
.d-safe .d-cols > div + div li::before { background: transparent; box-shadow: inset 0 0 0 2px var(--ink); }
.d-reassure { margin-top: 22px; font-stretch: 112%; font-weight: 700; }

.d-foot { background: var(--desk); color: var(--cap); padding: clamp(80px, 10vw, 140px) 0 40px; }
.d-foot-grid { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
.d-foot p { color: #b9b3a5; margin-top: 18px; max-width: 34em; }
.d-sig { font-stretch: 112%; font-weight: 700; color: var(--butter) !important; }
.d-foot .d-legal { max-width: 1240px; margin: 90px auto 0; padding: 0 clamp(20px, 5vw, 64px); font-size: 13px; color: #9a958a; }

@media (max-width: 760px) {
  .d-hero-row { grid-template-columns: 1fr; margin-top: -40px; gap: 28px; padding-bottom: 48px; }
  .d-cols, .d-how-grid, .d-foot-grid { grid-template-columns: 1fr; }
  .d-steps li { padding-left: 48px; }
  .d-steps li::before { font-size: 32px; }
}

/* Screen v2: a System Settings window, a Touch ID or password sheet, and the app's bar */
.d-window {
  position: absolute; left: 50%; top: 9%; width: 60%; height: 80%; transform: translateX(-50%) scale(.97); opacity: 0;
  border-radius: 22px; overflow: hidden; background: #2b2b2e; color: #e8e8ed; box-shadow: 0 40px 90px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08);
  transition: opacity .4s ease, transform .4s ease; font-size: 22px;
}
.d-screen.win .d-window { opacity: 1; transform: translateX(-50%); }
.dw-bar { height: 54px; display: flex; align-items: center; gap: 10px; padding: 0 20px; background: #323236; }
.dw-bar i { width: 15px; height: 15px; border-radius: 50%; background: #ff5f57; } .dw-bar i:nth-child(2) { background: #febc2e; } .dw-bar i:nth-child(3) { background: #28c840; }
.dw-bar b { margin-left: 18px; font-weight: 700; }
.dw-body { display: grid; grid-template-columns: 30% 1fr; height: calc(100% - 54px); }
.dw-side { margin: 0; padding: 16px 12px; list-style: none; background: #262629; font-size: 20px; color: #b6b6bc; }
.dw-side li { padding: 9px 14px; border-radius: 9px; } .dw-side .sel { background: #0a84ff; color: #fff; }
.dw-pane { padding: 26px 32px; display: grid; align-content: start; gap: 16px; }
.dw-row { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 14px; background: #333337; line-height: 1.25; color: #a9a9b0; }
.dw-row b { color: #f2f2f7; }
.dw-avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #e0a03a; color: #2a1a08; font-weight: 800; }
.dw-avatar.g { background: #5a5a60; color: #ddd; }
.dw-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.dw-btn { padding: 10px 20px; border-radius: 10px; background: #3a3a3e; color: #8e8e93; transition: background .3s, color .3s; }
.dw-state::after { content: "Locked"; color: #8e8e93; }
.d-screen.unlocked .dw-btn { background: #0a84ff; color: #fff; }
.d-screen.unlocked .dw-state::after { content: "Unlocked"; color: #30d158; font-weight: 700; }

.d-dialog { z-index: 2; }
.d-touch { display: none; width: 64px; height: 64px; }
.d-screen.touch .d-touch { display: inline-block; }
.d-screen.touch .d-lock { display: none; }
.when-touch { display: none; } .d-screen.touch .when-touch { display: inline; } .d-screen.touch .when-pass { display: none; }
.d-screen.bar .d-bar { opacity: 1; transform: translate(-50%, 0); }
.d-screen.bar .d-bar-dot { background: #30d158 center/24px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* Screen v3: a locked (dimmed) window, and an unmistakable "Unlocked" moment when it opens */
.d-window { transition: opacity .4s ease, transform .4s ease, filter .5s ease; }
.d-screen.locked .d-window { filter: brightness(.5) saturate(.7); }
.d-success {
  position: absolute; z-index: 3; left: 50%; top: 50%; display: grid; justify-items: center; gap: 18px;
  padding: 44px 64px; border-radius: 36px; background: rgba(28,28,30,.92); color: #fff; font-size: 44px;
  box-shadow: 0 40px 100px rgba(0,0,0,.55); transform: translate(-50%, -50%) scale(.8); opacity: 0;
  transition: transform .45s cubic-bezier(.22,1,.36,1), opacity .3s ease;
}
.d-success-check { width: 120px; height: 120px; border-radius: 50%; background: #30d158 center/64px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.5 12.5l4.2 4.2 8.8-9.4' fill='none' stroke='white' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.d-screen.success .d-success { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.d-success { padding: 60px 96px; font-size: 64px; gap: 24px; }
.d-success-check { width: 180px; height: 180px; background-size: 96px; }

/* Links to the app's GitHub home: the header link, and release notes, support and the maker in the footer */
.d-navlinks { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 32px); }
.d-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.d-links a, .d-sig a { color: var(--cap); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: rgba(236,228,210,.35); }
.d-sig a { color: inherit; }
.d-links a:hover, .d-sig a:hover { text-decoration-color: currentColor; }

/* Trust section: what the app does gets the room; the limits follow as a smaller "Good to know" note */
.d-safe .d-does { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px clamp(28px, 3.4vw, 52px); }
.d-does li { padding: 18px 0 0; border-top: 2px solid var(--ink); font-size: 18px; line-height: 1.45; max-width: 24em; }
.d-does li::before { content: none; }
.d-does b { font-stretch: 108%; font-weight: 700; }
.d-know { margin-top: clamp(56px, 6vw, 80px); padding-top: 24px; border-top: 1px solid rgba(27,26,23,.2); max-width: 1080px; }
.d-know h3 { font-size: 16px; margin-bottom: 12px; }
.d-know ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px clamp(28px, 3.4vw, 52px); }
.d-know li { padding-left: 0; font-size: 15px; line-height: 1.5; color: #4a4434; max-width: 38em; }
.d-know li::before { content: none; }
.d-know .d-reassure { margin-top: 16px; font-size: 16px; }
@media (max-width: 1100px) { .d-safe .d-does { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .d-safe .d-does, .d-know ul { grid-template-columns: 1fr; } .d-does li { font-size: 17px; } }
/* Phones: the name and Download fill the header; GitHub stays in the footer */
@media (max-width: 480px) { .d-navlink-gh { display: none; } }
