/* =========================================================================
   beerbellypig — shared visual system
   Hotel Adriano interior at a rainy evening. Oiled walnut, brass, lamp glow.
   JetBrains Mono everything. Lowercase marketing copy.
   ========================================================================= */

:root {
  /* world palette */
  --bg:        #2a1f17;  /* deep oiled walnut — the bar walls */
  --surface:   #3a2c20;  /* warmer wood — counter, cards, panels */
  --surface-2: #46352763;/* nested panel wash */
  --text:      #f5e9d3;  /* warm cream — the light on the wood */
  --muted:     rgba(245,233,211,0.60);
  --faint:     rgba(245,233,211,0.38);
  --line:      rgba(245,233,211,0.13);
  --line-2:    rgba(245,233,211,0.22);

  --amber:     #ffc466;  /* lamp glow — primary CTA, must glow */
  --terracotta:#d97757;  /* warm character — hover, highlights */
  --porco:     #b8412c;  /* the seaplane. one element only. */
  --window:    #6b8294;  /* rain, water, the world outside */

  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --home: 960px;
  --prod: 640px;

  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.62;
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* faint grain of oiled wood, painted on with gradients */
  background-image:
    radial-gradient(120% 80% at 50% -10%, #3a2b1f 0%, var(--bg) 55%),
    repeating-linear-gradient(91deg, rgba(0,0,0,0.10) 0 2px, rgba(255,255,255,0.012) 2px 5px);
  background-attachment: fixed;
}

::selection { background: rgba(217,119,87,0.35); color: #fff5e9; }

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

/* ---- type scale --------------------------------------------------------- */

h1, h2, h3 { font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }

.lower { text-transform: lowercase; }

/* preserve case for app names + system strings */
.proper { text-transform: none; }

.eyebrow {
  font-size: 12.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: lowercase;
}

.muted  { color: var(--muted); }
.faint  { color: var(--faint); }
.amber  { color: var(--amber); }
.terra  { color: var(--terracotta); }

/* the one and only porco-red callback lives in .seaplane */
.seaplane { color: var(--porco); }

/* ---- layout ------------------------------------------------------------- */

.wrap { width: 100%; margin: 0 auto; padding: 0 28px; }
.wrap--home { max-width: var(--home); }
.wrap--prod { max-width: var(--prod); }

section { position: relative; }

/* hairline divider that looks like a brass rail */
.rail {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2) 12%, var(--line-2) 88%, transparent);
  border: 0;
  margin: 0;
}

/* ---- buttons : terminal links inside bordered pills --------------------- */

.btns { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--mono);
  font-size: 14px;
  text-transform: lowercase;
  letter-spacing: 0.01em;
  padding: 11px 18px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  color: var(--text);
  background: rgba(245,233,211,0.015);
  cursor: pointer;
  transition: border-color .25s var(--ease), color .25s var(--ease),
              background .25s var(--ease), box-shadow .25s var(--ease),
              transform .25s var(--ease);
  white-space: nowrap;
}
.btn:hover { border-color: var(--terracotta); color: #fff1df; transform: translateY(-1px); }
.btn .arr { color: var(--muted); transition: color .25s var(--ease); }
.btn:hover .arr { color: var(--terracotta); }

/* primary : the lamp. it must actually glow. */
.btn--amber {
  border-color: rgba(255,196,102,0.55);
  color: var(--amber);
  background:
    radial-gradient(120% 180% at 50% 120%, rgba(255,196,102,0.16), transparent 70%);
  box-shadow: 0 0 0 0 rgba(255,196,102,0), 0 6px 26px -12px rgba(255,196,102,0.55),
              inset 0 0 22px -14px rgba(255,196,102,0.9);
  text-shadow: 0 0 14px rgba(255,196,102,0.35);
}
.btn--amber .arr { color: rgba(255,196,102,0.8); }
.btn--amber:hover {
  border-color: var(--amber);
  color: #fff0d3;
  box-shadow: 0 8px 34px -12px rgba(255,196,102,0.7), inset 0 0 26px -12px rgba(255,196,102,1);
}
.btn--amber:hover .arr { color: var(--amber); }

/* placeholder CTA — present, glowing softly, not yet wired */
.btn--soon {
  cursor: not-allowed;
  color: rgba(255,196,102,0.7);
  border-color: rgba(255,196,102,0.30);
  box-shadow: inset 0 0 22px -16px rgba(255,196,102,0.9);
  text-shadow: 0 0 12px rgba(255,196,102,0.22);
}
.btn--soon:hover { transform: none; border-color: rgba(255,196,102,0.42); color: rgba(255,196,102,0.85); }
.btn--soon .tag {
  font-size: 10.5px; letter-spacing: 0.12em; color: var(--faint);
  border-left: 1px solid var(--line-2); padding-left: 0.6em; margin-left: 0.15em;
}

.btn--ghost { font-size: 13px; padding: 8px 14px; border-color: var(--line); color: var(--muted); }
.btn--ghost:hover { color: var(--text); border-color: var(--line-2); }

/* ---- the scene (reusable painted bar) ----------------------------------- */

.scene {
  position: relative;
  width: 100%;
  aspect-ratio: 1672 / 941;
  overflow: hidden;
  background: #1c140d;
}
.scene img.scene__art {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  user-select: none; -webkit-user-drag: none;
}

/* lamp glows — flicker barely perceptibly */
.scene__fx {
  position: absolute;
  pointer-events: none;
  overflow: visible;
}
.lamp {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(circle at 50% 50%,
    rgba(255,206,128,0.55) 0%, rgba(255,196,102,0.30) 32%, rgba(255,180,90,0.0) 70%);
  opacity: 0.9;
  will-change: opacity, transform;
}
.lamp--dimmed {
  opacity: 0.08 !important;
  animation-play-state: paused;
}
.lamp--table {
  background: radial-gradient(circle at 50% 50%,
    rgba(255,206,128,0.42) 0%, rgba(255,196,102,0.24) 34%, rgba(255,180,90,0.0) 72%);
}
.flicker-on .lamp { animation: flicker var(--dur,5.5s) ease-in-out infinite; }
@keyframes flicker {
  0%,100% { opacity: 0.92; transform: scale(1); }
  43%     { opacity: 0.86; transform: scale(0.992); }
  47%     { opacity: 1.0;  transform: scale(1.006); }
  62%     { opacity: 0.9;  transform: scale(1); }
  68%     { opacity: 0.97; transform: scale(1.003); }
}

/* window rain — clipped to the glass, slanted streaks via canvas */
.window {
  position: absolute;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
  contain: paint;
}
.rain-on .window { opacity: 1; }
.window canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.window--port {
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 99%, transparent 100%);
  mask-image: radial-gradient(circle at 50% 50%, #000 99%, transparent 100%);
}

/* a cool breath of outside-blue sits over the glass */
.window::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(107,130,148,0.22), rgba(107,130,148,0.05));
  mix-blend-mode: screen;
}

.scene-hotspot {
  position: absolute;
  z-index: 3;
  display: block;
  pointer-events: auto;
  cursor: pointer;
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  outline: 0;
}
.scene-hotspot::before {
  content: "";
  position: absolute;
  inset: -9%;
  border: 1px solid rgba(255,196,102,0);
  background:
    radial-gradient(circle at 50% 50%, rgba(255,196,102,0.20), rgba(255,196,102,0.06) 42%, transparent 72%);
  box-shadow: 0 0 0 rgba(255,196,102,0), inset 0 0 20px rgba(255,196,102,0);
  opacity: 0;
  transform: scale(0.94);
  transition: opacity .22s var(--ease), transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.scene-hotspot:hover::before,
.scene-hotspot:focus-visible::before {
  border-color: rgba(255,196,102,0.78);
  box-shadow: 0 0 28px -8px rgba(255,196,102,0.95), inset 0 0 22px rgba(255,196,102,0.28);
  opacity: 1;
  transform: scale(1);
}
.scene-hotspot--circle,
.scene-hotspot--circle::before {
  border-radius: 50%;
}
.show-hotspots .scene-hotspot {
  background: rgba(255, 73, 73, 0.18);
  box-shadow: inset 0 0 0 1.5px rgba(255, 73, 73, 0.86), 0 0 18px -8px rgba(255, 73, 73, 0.9);
}
.show-hotspots .scene-hotspot[href] {
  background: rgba(255, 196, 102, 0.20);
  box-shadow: inset 0 0 0 1.5px rgba(255, 196, 102, 0.92), 0 0 18px -8px rgba(255, 196, 102, 0.9);
}
.show-hotspots .scene-hotspot[data-sound] {
  background: rgba(92, 186, 255, 0.18);
  box-shadow: inset 0 0 0 1.5px rgba(92, 186, 255, 0.88), 0 0 18px -8px rgba(92, 186, 255, 0.9);
}
.show-hotspots .scene-hotspot[data-action="lamp-off"] {
  background: rgba(157, 255, 210, 0.16);
  box-shadow: inset 0 0 0 1.5px rgba(157, 255, 210, 0.86), 0 0 18px -8px rgba(157, 255, 210, 0.9);
}
.scene-hotspot[data-sound="piano"]::before {
  display: none;
}
.scene-hotspot[data-sound="piano"]::after {
  content: "";
  position: absolute;
  left: 55%;
  top: 55%;
  width: 32%;
  height: 37%;
  border-radius: 5px;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(90% 95% at 50% 55%, rgba(255,235,184,0.30), rgba(255,196,102,0.12) 48%, transparent 78%);
  box-shadow: 0 0 28px -10px rgba(255,220,160,0.88), inset 0 0 16px rgba(255,236,196,0.12);
  transform: translate(-50%, -50%) rotate(-1deg) scale(0.96);
  transition: opacity .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.scene-hotspot[data-sound="piano"]:hover::after,
.scene-hotspot[data-sound="piano"]:focus-visible::after,
.scene-hotspot[data-sound="piano"].scene-hotspot--hinted::after {
  opacity: 0.72;
  box-shadow: 0 0 34px -8px rgba(255,220,160,1), inset 0 0 18px rgba(255,236,196,0.18);
  transform: translate(-50%, -50%) rotate(-1deg) scale(1);
}
.scene-hotspot[data-sound="piano"].scene-hotspot--latched::after {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(-1deg) scale(1);
}
.scene-hotspot[data-sound="glasses"]::before {
  display: none;
}
.scene-hotspot[data-sound="storm"]::before {
  display: none;
}
.scene-hotspot[data-action="lamp-off"]::before {
  display: none;
}

/* vignette to seat overlaid type */
.scene__veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(20,14,8,0.0) 28%, rgba(20,14,8,0.62) 78%, rgba(20,14,8,0.92) 100%),
    radial-gradient(130% 90% at 50% 8%, rgba(20,14,8,0) 40%, rgba(20,14,8,0.5) 100%);
  opacity: 0;
  transition: opacity .6s var(--ease);
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .flicker-on .lamp { animation: none; }
}

/* ---- footer ------------------------------------------------------------- */

.footer {
  padding: 56px 0 60px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.9;
}
.footer a { color: var(--text); border-bottom: 1px solid var(--line-2); padding-bottom: 1px; transition: border-color .2s, color .2s; }
.footer a:hover { color: var(--terracotta); border-color: var(--terracotta); }
.footer__made { color: var(--faint); margin-top: 22px; font-style: italic; }

/* ---- small utilities ---------------------------------------------------- */
.stack > * + * { margin-top: var(--gap, 18px); }
.nowrap { white-space: nowrap; }

/* =========================================================================
   PRODUCT PAGES (max ~640px)
   ========================================================================= */

.prod-top { padding-top: 22px; }

.backlink {
  display: inline-flex; align-items: center; gap: .55em;
  font-size: 13px; color: var(--muted); white-space: nowrap;
  padding: 8px 0; margin-bottom: 30px;
  transition: color .2s var(--ease), gap .2s var(--ease);
}
.backlink:hover { color: var(--terracotta); gap: .8em; }
.backlink .arr { color: var(--faint); transition: color .2s; }
.backlink:hover .arr { color: var(--terracotta); }

/* the object on the counter — app icon foregrounded */
.phead__obj {
  display: flex; align-items: center; gap: 18px; margin-bottom: 26px;
}
.app-icon-frame {
  display: block;
  overflow: hidden;
  background: rgba(0,0,0,0.10);
}
.app-icon-frame--small {
  width: 76px;
  height: 76px;
  border-radius: 17px;
  box-shadow: 0 16px 30px -16px rgba(0,0,0,0.9);
  flex-shrink: 0;
}
.app-icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.app-icon--crop {
  transform: scale(1.045);
}
.phead__obj .crumb { font-size: 12px; color: var(--terracotta); letter-spacing: 0.04em; }
.phead__obj .objnote { font-size: 11px; color: var(--faint); margin-top: 4px; }

.ptitle { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.ptitle h1 { font-size: clamp(30px, 6vw, 40px); letter-spacing: -0.02em; flex-shrink: 0; white-space: nowrap; }
.ptitle .ver { font-size: 13px; color: var(--faint); letter-spacing: 0.06em; }

.plede { font-size: 17px; line-height: 1.6; margin: 22px 0 0; max-width: 54ch; }
.plede .proper { color: var(--text); }

.pcta { margin: 28px 0 14px; }
.osreq { font-size: 12px; color: var(--faint); letter-spacing: 0.04em; }

/* macOS-window-framed screenshot slot */
.shot {
  margin: 0 0;
  border-radius: 12px;
  overflow: hidden;
  background: #1d160f;
  border: 1px solid var(--line-2);
  box-shadow: 0 34px 70px -34px rgba(0,0,0,0.95), inset 0 1px 0 rgba(255,220,160,0.07);
}
.shot__bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px;
  background: linear-gradient(180deg, #3a2c20, #312418);
  border-bottom: 1px solid rgba(0,0,0,0.4);
}
.shot__dot { width: 11px; height: 11px; border-radius: 50%; }
.shot__dot--r { background: #c0573f; }
.shot__dot--y { background: #c9a24a; }
.shot__dot--g { background: #6f8a5a; }
.shot__title { font-size: 11px; color: var(--faint); margin-left: 10px; letter-spacing: 0.04em; }
.shot__img {
  display: block;
  width: 100%;
  height: auto;
  background: #1d160f;
}
.shot__cap { font-size: 11.5px; color: var(--faint); padding: 0; margin: 12px 2px 0; letter-spacing: 0.02em; }

/* demo panel — terminal / scenario */
.demo {
  margin: 0;
  background: #18120c;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 22px 22px;
  font-size: 13.5px;
  line-height: 1.9;
  box-shadow: inset 0 0 40px -28px rgba(0,0,0,1);
  overflow-x: auto;
}
.demo__row { white-space: pre-wrap; }
.demo .pmt { color: var(--terracotta); }
.demo .cmd { color: var(--text); }
.demo .out { color: var(--muted); }
.demo .glow { color: var(--amber); text-shadow: 0 0 12px rgba(255,196,102,0.3); }
.demo .arrow { color: var(--amber); }
.demo__gap { height: 14px; }

/* section heads on product pages */
.psec { margin-top: 64px; }
.psec__kicker { font-size: 13px; color: var(--terracotta); letter-spacing: 0.04em; font-weight: 700; margin-bottom: 18px; }
.psec p { margin: 0 0 16px; max-width: 60ch; }
.psec p:last-child { margin-bottom: 0; }

/* features as a definition grid */
.features { display: grid; gap: 0; margin-top: 8px; }
.feat {
  display: grid; grid-template-columns: 200px 1fr; gap: 18px;
  padding: 15px 0; border-top: 1px solid var(--line);
  align-items: baseline;
}
.feat:last-child { border-bottom: 1px solid var(--line); }
.feat__k { color: var(--amber); font-size: 13.5px; letter-spacing: 0.02em; }
.feat__v { color: var(--muted); font-size: 14px; }

/* support Q&A */
.qa { display: grid; gap: 24px; margin-top: 8px; }
.qa__q { color: var(--text); font-weight: 700; font-size: 14.5px; margin-bottom: 6px; }
.qa__a { color: var(--muted); font-size: 14px; max-width: 58ch; }
.qa__a .proper { color: var(--text); }

@media (max-width: 560px) {
  .feat { grid-template-columns: 1fr; gap: 4px; }
  .psec { margin-top: 48px; }
}

/* =========================================================================
   THEME: lamplit paper — product pages step into the light
   Warm parchment + dark walnut ink, a pool of lamp glow up top.
   The terminal demo stays dark on purpose (a code block on paper).
   ========================================================================= */

body.theme-paper {
  --bg:        #e9ddc4;
  --surface:   #f4ebd7;
  --surface-2: rgba(44,33,23,0.04);
  --text:      #2c2117;
  --muted:     rgba(44,33,23,0.62);
  --faint:     rgba(44,33,23,0.42);
  --line:      rgba(44,33,23,0.13);
  --line-2:    rgba(44,33,23,0.22);

  background-image:
    radial-gradient(120% 78% at 50% -14%, rgba(255,204,124,0.60) 0%, rgba(233,221,196,0) 50%),
    radial-gradient(100% 60% at 50% 0%, #f4ecd9 0%, #e9ddc4 62%);
  background-attachment: fixed;
}

/* keep the terminal panel dark; restore light text inside it */
body.theme-paper .demo {
  background: #1b140d;
  border-color: rgba(44,33,23,0.30);
  color: #ece1c9;
}
body.theme-paper .demo .cmd { color: #f4ead4; }
body.theme-paper .demo .out { color: rgba(244,234,212,0.62); }

/* screenshot window → light chrome so the eventual screenshot pops */
body.theme-paper .shot {
  background: #ddcfb2;
  border-color: rgba(44,33,23,0.18);
  box-shadow: 0 30px 60px -34px rgba(70,46,18,0.45), inset 0 1px 0 rgba(255,255,255,0.5);
}
body.theme-paper .shot__bar {
  background: linear-gradient(180deg, #f1e8d4, #e3d7be);
  border-bottom: 1px solid rgba(44,33,23,0.14);
}

/* primary CTA becomes a glowing lamp-amber pill on the light page */
body.theme-paper .btn--soon {
  background: linear-gradient(180deg, #ffd47f, #f3b250);
  color: #3a2710;
  border-color: rgba(178,118,38,0.55);
  box-shadow: 0 12px 26px -12px rgba(243,178,80,0.85), inset 0 1px 0 rgba(255,255,255,0.55);
  text-shadow: none;
}
body.theme-paper .btn--soon .arr { color: #6b4a18; }
body.theme-paper .btn--soon .tag { color: rgba(58,39,16,0.62); border-left-color: rgba(58,39,16,0.28); }
body.theme-paper .btn { background: rgba(44,33,23,0.02); }

/* feature keys → deep terracotta (bright amber would vanish on cream) */
body.theme-paper .feat__k { color: #b15730; }

/* selection on light */
body.theme-paper ::selection { background: rgba(217,119,87,0.30); color: #2c2117; }
