/* Home: a directory page. Heavy ink rules open each section, dotted leaders join a name to where you reach it. */

/* Hero: the line on the left, a keypad you can dial on the right */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(32px, 6vw, 96px); align-items: center; }
.hero { padding-top: clamp(28px, 6vw, 80px); padding-bottom: clamp(36px, 5vw, 64px); }
.hero h1 { font: 400 clamp(2.15rem, 5.2vw, 4.4rem)/1.04 var(--brand); letter-spacing: -0.04em; max-width: 25ch; margin-bottom: 24px; }
.hero-line { font-size: clamp(1.125rem, 1.6vw, 1.3rem); line-height: 1.5; color: var(--ink-2); margin: 0; max-width: 60ch; }

/* The dialer: twelve keys in the brand face. It dials +1 415 on arrival; dial 55555 and it calls Fivebars. */
.dialer { width: 264px; user-select: none; -webkit-user-select: none; }
.dialer-display { display: flex; align-items: center; height: 52px; margin: 0 0 14px; padding: 0 4px; border-bottom: 2px dotted var(--rule-strong); font: 400 1.5rem/1 var(--brand); letter-spacing: 0.02em; white-space: pre; overflow: hidden; }
/* The louis.io caret: a block that blinks a few times, then stays, waiting for the rest of the number. */
.caret { flex: none; width: 0.42em; height: 0.78em; margin-left: 0.18em; background: var(--ink); }
.caret.blink { animation: caret 1.1s steps(1, end) 5 forwards; }
.caret.reblink { animation-name: caret-again; }
@keyframes caret { 50% { opacity: 0; } 100% { opacity: 1; } }
@keyframes caret-again { 50% { opacity: 0; } 100% { opacity: 1; } }
.dialer-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.key { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 62px; border-radius: 14px; background: var(--paper-2); box-shadow: inset 0 -2px 0 var(--rule); cursor: pointer; transition: background-color 220ms ease-out, color 220ms ease-out, transform 220ms cubic-bezier(0.16, 1, 0.3, 1); touch-action: manipulation; }
.key b { font: 400 1.65rem/1 var(--brand); }
.key i { min-height: 1em; margin-top: 4px; font: 400 0.62rem/1 var(--brand); font-style: normal; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.key:hover { background: var(--rule); }
.key.down { background: var(--ink); color: var(--paper); transform: scale(0.94); transition-duration: 60ms; box-shadow: none; }
.key.down i { color: inherit; opacity: 0.7; }
.dialer-hint { margin: 14px 0 0; font: 400 0.78rem/1.4 var(--brand); color: var(--ink-2); text-align: center; }
.dialer.calling .caret { visibility: hidden; }
.dialer.wrong .dialer-display { color: var(--ink-2); }
.dialer.wrong .caret { visibility: hidden; }

/* Sections */
.book { padding-bottom: clamp(56px, 8vw, 104px); }
.book-title { display: flex; align-items: baseline; gap: 16px; border-top: 3px solid var(--ink); padding-top: 12px; margin-bottom: clamp(28px, 4vw, 44px); font: 400 1.25rem/1 var(--brand); letter-spacing: 0; }
.book-title::after { content: ""; flex: 1; border-top: 1px solid var(--rule); transform: translateY(-0.3em); }

/* A directory listing: name, dotted leader, where */
.listing { display: flex; align-items: baseline; gap: 14px; margin: 0 0 14px; }
.listing-name { display: inline-flex; align-items: baseline; gap: 14px; font: 400 clamp(2.2rem, 4.2vw, 3.2rem)/1 var(--brand); letter-spacing: -0.04em; text-decoration: none; white-space: nowrap; }
a.listing-name:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.12em; }
/* App icon on the name baseline: flex baselines a replaced item on its bottom edge, so drop it by the icon grid's ~10% transparent margin to stand the squircle's foot on the text baseline. */
.listing-name .app-icon { width: 1.1em; height: 1.1em; flex: none; position: relative; top: 0.11em; margin: 0 -0.12em 0 -0.11em; }
.leader { flex: 1; min-width: 24px; border-bottom: 2px dotted var(--rule-strong); transform: translateY(-0.28em); }
.listing-where { font: 400 0.95rem/1 var(--brand); color: var(--ink-2); white-space: nowrap; }

/* App entry */
.app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.app-what { font-size: clamp(1.2rem, 1.8vw, 1.4rem); line-height: 1.45; max-width: 30ch; margin: 22px 0 20px; }
.specs { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; margin: 0 0 30px; padding: 0; font: 400 0.85rem/1.5 var(--brand); color: var(--ink-2); }
.specs li { display: inline-flex; align-items: center; gap: 9px; }
.specs li::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--ink); }
.app-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; font-weight: 500; }

.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; text-decoration: none; background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink); transition: background-color 160ms ease-out, color 160ms ease-out; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1); }
.btn:hover { background: transparent; color: var(--ink); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }

/* The real captures, hanging from a menu bar strip, on a sheet of the darker card */
.app-stage { margin: 0; padding: clamp(16px, 2.4vw, 28px); background: var(--paper-2); border-radius: 18px; display: flex; flex-direction: column; align-items: center; }
/* The menu column is centred and as wide as the menu. Like the real one, the menu drops just below the bar with no arrow, its left edge a hair left of the item (the pill sits 4px in). */
.app-stage { --menu-w: min(100%, 340px); }
.menubar { width: 100%; height: 32px; border-radius: 9px; background: linear-gradient(#5f7394, #5d6e8d); display: grid; grid-template-columns: minmax(0, 1fr) var(--menu-w) minmax(0, 1fr); align-items: center; }
.menubar .pill { grid-column: 2; justify-self: start; margin-left: 4px; }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 6px; border-radius: 7px; background: rgba(255, 255, 255, 0.16); }
.pill img { width: auto; height: 20px; }
.popover { width: var(--menu-w); margin-top: 5px; border-radius: 15px; box-shadow: var(--shadow); }
.popover img { border-radius: 15px; }

/* The header mark echoes the dialer: its 1, 4 and 5 keys press as +1 415 is dialled. */
.keypad rect.press { animation: press 300ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes press { 0% { transform: scale(1); opacity: 1; } 30% { transform: scale(0.62); opacity: 0.45; } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .keypad rect.press { animation: none; } .btn, .btn svg, .key { transition: none; } .caret { animation: none; } }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .dialer { display: none; }
}

@media (max-width: 600px) {
  .listing { flex-wrap: wrap; row-gap: 6px; }
}
