/* Product introductions, v2: the homepage's surfaces, glow and actions applied to each product. */

/* Product pages run wider than the rest of the site so the screens can be large. */
.product-detail { --page-max: 1440px; }
/* Decorative glows may extend past the content width; never past the page. */
#main { overflow-x: clip; }

/* Hero */
.detail-hero { position: relative; padding-block: 40px 72px; isolation: isolate; }
.detail-hero::before { content: ''; position: absolute; inset: -120px -50vw auto; height: 720px; z-index: -1; background: radial-gradient(40% 55% at 50% 0%, var(--glow-strong), transparent 70%); pointer-events: none; }
.detail-hero::after { content: ''; position: absolute; inset: -72px -50vw auto; height: 640px; z-index: -1; background-image: linear-gradient(var(--hairline) 1px, transparent 1px), linear-gradient(90deg, var(--hairline) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(45% 70% at 50% 0%, #000 25%, transparent 75%); pointer-events: none; }
.detail-back { display: inline-flex; align-items: center; height: 30px; margin: 0 0 40px; padding: 0 12px; border: 1px solid var(--hairline-strong); border-radius: 999px; color: var(--text-soft); font-size: 13px; }
.detail-back::before { content: '←'; margin-right: 6px; }
.detail-hero-heading { display: grid; justify-items: center; margin-inline: auto; text-align: center; }
.detail-hero .product-wordmark { margin-bottom: 24px; }
.text-slot.detail-display { font-size: clamp(32px, 5.2vw, 64px); font-weight: 700; line-height: 1.1; letter-spacing: -.045em; background: linear-gradient(180deg, var(--ink) 35%, color-mix(in srgb, var(--ink) 62%, transparent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.text-slot.detail-display .title-line, .text-slot.detail-display .title-line > span { background: inherit; -webkit-background-clip: text; background-clip: text; color: transparent; }
.detail-hero-heading > div + div { margin-top: 24px; }
.detail-copy { max-width: 660px; color: var(--text-soft); font-size: 16px; line-height: 1.8; text-wrap: pretty; }
/* Links under the definition: the first is the page's one primary action. */
.detail-links, .detail-closing-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; }
.detail-links { margin-top: 28px; }
:is(.detail-links, .detail-closing-actions) .action-slot { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 20px; border: 1px solid var(--hairline-strong); border-radius: 999px; background: var(--surface-1); color: var(--ink); font-size: 15px; font-weight: 600; }
:is(.detail-links, .detail-closing-actions) .action-slot:first-child { border-color: transparent; background: var(--ink); color: var(--paper); box-shadow: 0 1px 0 #ffffff33 inset, 0 8px 24px -8px var(--glow-strong); }
@media (hover: hover) {
  :is(.detail-links, .detail-closing-actions) .action-slot:hover { background: var(--surface-2); }
  :is(.detail-links, .detail-closing-actions) .action-slot:first-child:hover { background: color-mix(in srgb, var(--ink) 86%, var(--paper)); color: var(--paper); }
}
.detail-hero-visual { position: relative; margin-top: 56px; }
.detail-hero-visual::before { content: ''; position: absolute; inset: 10% 8% -8%; z-index: -1; background: radial-gradient(closest-side, var(--glow-strong), transparent); filter: blur(40px); pointer-events: none; }
.detail-hero-visual .detail-figure:has(.device-scene) { max-width: 1000px; margin-inline: auto; }

/* Real interfaces take a faint outline, rounded corners and a soft shadow, no padded frame. The outline stays until each page has its own background: AgentHub's interface is as black as the page (founder, 2026-11-11). */
.detail-figure { margin: 0; min-width: 0; }
.detail-figure > .capture-link { border: 1px solid var(--hairline-strong); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-lg); }
.detail-figure > .capture-link .product-capture { display: block; border: 0; border-radius: 0; }

.detail-body > section { scroll-margin-top: 136px; }
.text-slot.detail-title { font-size: clamp(28px, 3vw, 42px); font-weight: 650; line-height: 1.2; letter-spacing: -.035em; text-wrap: balance; }

/* Claims: each of the founder's points is a chapter, with its screens beside it. */
.detail-claim { display: grid; grid-template-columns: minmax(340px, .62fr) minmax(0, 1.38fr); align-items: center; gap: 32px 56px; padding-block: clamp(56px, 6.5vw, 96px); }
.detail-claim-copy { grid-column: 1; grid-row: 1; }
/* Claim headlines are sized to stay on one line beside their screens. */
.detail-claim .text-slot.detail-title { font-size: clamp(20px, 2vw, 30px); }
.detail-claim-copy .detail-copy { margin-top: 20px; font-size: clamp(16px, 1.4vw, 18px); }
.detail-claim > :is(.detail-figure, .detail-deck) { grid-column: 2; grid-row: 1; }
.detail-claim > .detail-figure { position: relative; }
.detail-claim > .detail-figure::before { content: ''; position: absolute; inset: 15% 5% -5%; z-index: -1; background: radial-gradient(closest-side, var(--glow), transparent); filter: blur(30px); }
.detail-claim-reverse { grid-template-columns: minmax(0, 1.38fr) minmax(340px, .62fr); }
.detail-claim-reverse .detail-claim-copy { grid-column: 2; }
.detail-claim-reverse > :is(.detail-figure, .detail-deck) { grid-column: 1; }
/* A claim whose screen has not been captured yet stands as a statement. */
.detail-claim-plain { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
.detail-claim-plain .detail-claim-copy { max-width: 760px; }
.detail-claim-plain .detail-copy { margin-inline: auto; }
.consumer-detail .detail-claim { grid-template-columns: 1fr 1fr; }
.consumer-detail .detail-claim-copy { max-width: 520px; }
/* The copy beside a screen does not strand a word on its last line; on a desktop, Chinese breaks at punctuation,
   so a line ends where a clause does (app.js keeps the space beside a Latin word from ending a line). */
.detail-copy { text-wrap: pretty; }
@media (min-width: 1001px) {
  :lang(zh) .detail-copy { word-break: keep-all; overflow-wrap: anywhere; }
}
/* Several screens stack as a deck. A screen that comes to the front first changes layer where it stands, as a
   cross-fade: the part the screen above was hiding fades in over it while the veils cross-fade. Only then do the
   screens glide into their new places on an eased curve, close to a second (app.js). No layer changes within a
   single frame, so nothing flashes (founder, 2026-11-11: fade between layers, then move). */
.detail-deck { --dx: 56px; --dy: 44px; --corner: 16px; display: grid; min-width: 0; padding: 0 calc(var(--dx) * (var(--cards) - 1)) calc(var(--dy) * (var(--cards) - 1)) 0; }
.detail-deck > .detail-figure { position: relative; grid-area: 1 / 1; z-index: var(--layer); transform: translate(calc(var(--dx) * var(--pos)), calc(var(--dy) * var(--pos))); transition: transform .9s cubic-bezier(.32, .06, .22, 1); }
/* Screens underneath recede under a veil of the page colour. */
.detail-deck > .detail-figure::after { content: ''; position: absolute; inset: 0; border-radius: 16px; background: var(--paper); opacity: .26; pointer-events: none; transition: opacity .45s ease; }
.detail-deck > .detail-figure.is-top::after, .detail-deck:not([data-deck-ready]) > .detail-figure:first-child::after { opacity: 0; }
/* A screen that has just come above the one that covered it shows, at first, only what was already in view: the
   strip down its right side, the strip along its bottom, and the sliver beside the rounded corner of the screen
   that covered it. The rest is drawn at --shown, which app.js takes from 0 to 1 frame by frame. */
.detail-deck > .detail-figure.is-covered {
  --shown: 0;
  -webkit-mask-image: linear-gradient(#000, #000), linear-gradient(#000, #000), radial-gradient(circle at 0 0, transparent calc(var(--corner) - .5px), #000 var(--corner)), linear-gradient(rgb(0 0 0 / var(--shown)), rgb(0 0 0 / var(--shown)));
  mask-image: linear-gradient(#000, #000), linear-gradient(#000, #000), radial-gradient(circle at 0 0, transparent calc(var(--corner) - .5px), #000 var(--corner)), linear-gradient(rgb(0 0 0 / var(--shown)), rgb(0 0 0 / var(--shown)));
  -webkit-mask-size: var(--dx) 100%, 100% var(--dy), var(--corner) var(--corner), 100% 100%; mask-size: var(--dx) 100%, 100% var(--dy), var(--corner) var(--corner), 100% 100%;
  -webkit-mask-position: 100% 0, 0 100%, calc(100% - var(--dx)) calc(100% - var(--dy)), 0 0; mask-position: 100% 0, 0 100%, calc(100% - var(--dx)) calc(100% - var(--dy)), 0 0;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
/* The line every Tenon product with an interface closes on. */
.detail-signature { max-width: 920px; margin: clamp(40px, 6vw, 88px) auto 0; color: var(--ink); font-size: clamp(22px, 2.8vw, 36px); font-weight: 650; line-height: 1.4; letter-spacing: -.02em; text-align: center; text-wrap: balance; }
/* Flags read as typed, without the font's dash ligature. */
:is(.intent-detail, .inthub-detail) { font-variant-ligatures: none; }
/* The install command sits with the links. */
.cli-hero { width: min(100%, 420px); margin: 28px auto 0; text-align: left; }
.cli-hero + .detail-links { margin-top: 16px; }
.cli-box { position: relative; min-width: 0; border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface-1); }
.cli-box pre { margin: 0; padding: 11px 48px 11px 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cli-box code { color: var(--ink); font: 500 13px/1.7 ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace; }
.cli-copy { position: absolute; top: 7px; right: 7px; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; color: var(--muted); cursor: pointer; }
.cli-copy svg { width: 15px; height: 15px; }
.cli-copy .copy-done, .cli-copy.is-copied .copy-idle { display: none; }
.cli-copy.is-copied .copy-done { display: block; }
.cli-copy.is-copied { color: var(--accent); }

/* Phones stand on their own: a faint outline instead of a bezel, and a soft product-coloured glow. */
:root { --bezel: #ececef; --bezel-edge: #d4d4d9; --phone-shadow: #0000002e; }
:root[data-theme='dark'] { --bezel: #18181b; --bezel-edge: #38383e; --phone-shadow: #000000b3; }
.mobile-scene { position: relative; display: flex; align-items: center; justify-content: center; isolation: isolate; padding: clamp(16px, 3vw, 40px) 0; }
.mobile-scene::before { content: ''; position: absolute; inset: 4% 8%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, var(--screen-glow), transparent); filter: blur(34px); }
.wesaid-detail { --screen-glow: #b4748c5c; }
.passby-detail { --screen-glow: #f56b2c3d; }
.jig-detail { --screen-glow: #8585853d; }
.detail-figure :is(.mobile-scene, .device-scene) .phone-frame { border: 1px solid var(--hairline-strong); box-shadow: 0 36px 70px -24px var(--phone-shadow); }
.mobile-scene .phone-frame { height: auto; width: min(100%, 340px); border-radius: 34px; }
.mobile-scene .product-phone { height: auto; }

/* Closing invitation card: its own surface sets it apart, so it takes no border. */
.detail-closing { position: relative; display: grid; justify-items: center; gap: 8px; margin-block: 64px 112px; padding: clamp(56px, 8vw, 96px) 24px; border-radius: 28px; background: var(--surface-1); text-align: center; overflow: hidden; isolation: isolate; }
.detail-closing::before { content: ''; position: absolute; inset: auto -20% -60%; height: 120%; z-index: -1; background: radial-gradient(50% 50% at 50% 50%, var(--glow-strong), transparent 70%); }
.detail-closing .text-slot.detail-title { font-size: clamp(28px, 4vw, 48px); }
.detail-closing-actions { margin-top: 20px; }

@media (max-width: 1100px) {
  .detail-claim { gap: 28px 40px; }
  .mobile-scene .phone-frame { width: min(100%, 300px); }
  .detail-deck { --dx: 40px; --dy: 36px; }
}
@media (max-width: 800px) {
  .detail-hero { padding-block: 32px 48px; }
  .detail-back { margin-bottom: 28px; }
  .detail-hero-visual { margin-top: 40px; }
  .detail-claim, .detail-claim-reverse, .consumer-detail .detail-claim { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 56px; }
  .detail-claim-copy, .detail-claim-reverse .detail-claim-copy, .detail-claim > :is(.detail-figure, .detail-deck), .detail-claim-reverse > :is(.detail-figure, .detail-deck) { grid-column: 1; grid-row: auto; }
  .detail-deck { --dx: 20px; --dy: 30px; }
  .mobile-scene .phone-frame { width: min(100%, 280px); }
  .detail-figure > .capture-link, .detail-deck > .detail-figure::after { border-radius: 12px; }
  .detail-deck { --corner: 12px; }
}
@media (max-width: 520px) {
  .detail-hero { padding-top: 24px; }
  .detail-copy { font-size: 15px; }
  .mobile-scene .phone-frame { width: min(100%, 250px); border-radius: 28px; }
  :is(.detail-links, .detail-closing-actions) .action-slot { flex: 1 1 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .product-detail [data-reveal] { animation: none !important; opacity: 1 !important; transform: none !important; }
  .detail-deck > .detail-figure, .detail-deck > .detail-figure::after { transition: none; }
}
