/* ================= One night at Wrinkledot =================
   The home page reads as one night: 11:40 pm hero, 1:15 am build,
   5:50 am lists (the sky turns to dawn), 9:00 am client work in daylight,
   then night again for the call to action. */

:root { --night: #070a12; --night-2: #0b0f1c; --plum: #2b1b44; --rose: #57263f; --amber: #f2b23a; }

/* Chapter time: the only label above a chapter title, because the chapters are a sequence. */
.ch-time { margin: 0 0 10px; font: 600 1rem/1 "Bricolage Grotesque", sans-serif; letter-spacing: .01em; color: var(--amber); }
.ch-time b { font-size: 1.7em; font-weight: 750; letter-spacing: -.03em; margin-right: .12em; }
.ch-head { max-width: 62ch; margin-bottom: clamp(32px, 5vw, 56px); }
.ch-title { margin: 0; font: 750 clamp(2rem, 4.6vw, 3.3rem)/1.02 "Bricolage Grotesque", sans-serif; letter-spacing: -.03em; text-wrap: balance; }
.ch-sub { margin: 16px 0 0; font-size: 1.08rem; color: var(--ink-soft); }

/* ---------- Hero ---------- */
.night-time { margin-bottom: 18px; }
.night-title { max-width: 14ch; }
.night-plan { list-style: none; margin: 44px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.night-plan a { display: inline-flex; align-items: baseline; gap: 10px; min-height: 36px; color: #c3cad8; text-decoration: none; font-size: .95rem; }
.night-plan b { color: #fff; font: 700 1rem "Bricolage Grotesque", sans-serif; }
.night-plan a:hover { color: #fff; }
.night-plan a:hover b { color: var(--amber); }

/* Floating clock: moves forward as the night goes on. */
.clock {
  position: fixed; left: 16px; bottom: 16px; z-index: 20; margin: 0;
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px 8px 9px; border-radius: 999px;
  background: rgba(10,14,26,.72); color: #eef2f8; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 10px 30px -12px rgba(0,0,0,.6);
  font: 650 .9rem/1 "Bricolage Grotesque", sans-serif; letter-spacing: .01em; font-variant-numeric: tabular-nums;
  opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s; pointer-events: none;
}
.clock.is-on { opacity: 1; transform: none; }
.clock-orb { width: 16px; height: 16px; border-radius: 50%; background: #dfe6ff; box-shadow: inset -5px -2px 0 0 #7f89c9; transition: background .6s, box-shadow .6s; }
.clock[data-sun="up"] .clock-orb { background: #ffc867; box-shadow: 0 0 0 3px rgba(255,200,103,.25), 0 0 14px rgba(255,200,103,.8); }
.clock[data-sun="dawn"] .clock-orb { background: #f39a6b; box-shadow: 0 0 0 3px rgba(243,154,107,.25); }
body.home .site-head .clock { display: none; }

/* ---------- Build (1:15 am) ---------- */
.studio { background: radial-gradient(1100px 520px at 75% 0%, #1b2550 0%, rgba(11,15,28,0) 62%), var(--night-2); }
.studio .ch-time { margin-bottom: 14px; }
.studio-grid { grid-template-columns: minmax(200px, .62fr) minmax(0, .82fr) minmax(0, 1.76fr) !important; }
.pane-phones { padding: 22px 18px 16px !important; background: radial-gradient(70% 60% at 50% 40%, rgba(127,137,255,.12), rgba(127,137,255,0) 70%), rgba(255,255,255,.02); }
.phones { display: grid !important; grid-template-columns: 1fr 1fr; gap: 18px !important; align-items: start; }
.dev-ios { transform: translateY(26px); }
.pane-phones { padding-bottom: 40px !important; }
@media (max-width: 1100px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
  .pane-phones { grid-column: 1 / -1; }
  .phones { max-width: 560px; margin-inline: auto; }
}
@media (max-width: 720px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .phones { gap: 12px !important; }
  .dev-ios { transform: none; }
}

/* ---------- Lists (5:50 am): night turning to dawn ---------- */
.lists {
  position: relative; color: #eef2f8; padding-top: clamp(64px, 10vw, 120px);
  background: linear-gradient(180deg, var(--night-2) 0%, #121633 22%, #1d1a3f 48%, var(--plum) 74%, var(--rose) 100%);
}
.lists .ch-sub { color: #b9c2d3; }
.ed { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding-block: clamp(36px, 6vw, 72px); }
.ed + .ed { border-top: 1px solid rgba(255,255,255,.08); }
.ed-status { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: .85rem; font-weight: 600; color: var(--amber); }
.ed-name { margin: 10px 0 0; font: 780 clamp(2.4rem, 5vw, 3.6rem)/.95 "Bricolage Grotesque", sans-serif; letter-spacing: -.035em; }
.ed-tag { margin: 14px 0 0; font: 650 clamp(1.15rem, 2vw, 1.4rem)/1.25 "Bricolage Grotesque", sans-serif; color: #ffd589; text-wrap: balance; }
.ed-line { margin: 14px 0 0; color: #c9d0de; font-size: 1.04rem; max-width: 54ch; }
.ed-points { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; color: #dfe4ee; }
.ed-points li { padding-left: 20px; position: relative; }
.ed-points li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.ed-points em { font-style: normal; font-size: .86em; color: #9aa4b8; }
.ed .actions { margin-top: 24px; }
.ed .btn-ghost { color: #eef2f8; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.3); background: transparent; }
.ed-src { margin: 16px 0 0; font-size: .8rem; color: #98a2b6; max-width: 60ch; }
.ed-art { position: relative; min-width: 0; }
.ed-art img { display: block; max-width: 100%; height: auto; }

/* Deedline: the property file spread out like papers on a desk. */
.deed-desk { aspect-ratio: 1 / .86; }
.dd { position: absolute; filter: drop-shadow(0 22px 26px rgba(0,0,0,.5)); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.dd-owner { left: 0; top: 6%; width: 60%; transform: rotate(-5deg); }
.dd-score { right: 2%; top: 0; width: 46%; transform: rotate(4deg); }
.dd-signals { left: 6%; bottom: 3%; width: 38%; transform: rotate(-2deg); z-index: 2; }
.dd-letter { right: 0; bottom: 8%; width: 56%; transform: rotate(2.5deg); z-index: 1; }
.deed-desk:hover .dd-owner { transform: rotate(-7deg) translate(-8px, -6px); }
.deed-desk:hover .dd-score { transform: rotate(6deg) translate(8px, -8px); }
.deed-desk:hover .dd-letter { transform: rotate(4deg) translate(10px, 6px); }

/* Porchlight: the map, with the ranked list laid over it. */
.ed-porch .ed-art { order: -1; }
.porch-art { padding-bottom: 26%; }
.porch-map { width: 64%; margin-left: 0; border-radius: 20px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.7); }
.porch-leads { position: absolute; right: 0; bottom: 0; width: min(84%, 460px); border-radius: 14px; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 30px 60px -24px rgba(0,0,0,.75); }

/* Welcome Mat: the morning list, as the product shows it. */
.mat-art2 { display: grid; place-items: center; }
.mat-art2 img { width: min(100%, 520px); border-radius: 18px; transform: rotate(1.5deg); box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 36px 70px -30px rgba(0,0,0,.8), 0 0 90px -20px rgba(242,178,58,.35); }

/* Sunrise between the lists and the daytime chapters. */
.horizon {
  position: relative; height: clamp(160px, 22vw, 260px); overflow: hidden;
  background: linear-gradient(180deg, var(--rose) 0%, #9a4452 30%, #e08a5d 58%, #f6c47c 80%, var(--paper) 100%);
}
.sun {
  position: absolute; left: 50%; bottom: 0; width: clamp(160px, 20vw, 260px); aspect-ratio: 1; margin-left: calc(clamp(160px, 20vw, 260px) / -2);
  border-radius: 50%; background: radial-gradient(circle, #fff3c8 0%, #ffd27a 45%, rgba(255,190,100,0) 70%);
  transform: translateY(calc(70% - var(--rise, 0) * 45%));
}

/* ---------- Day (9:00 am) ---------- */
.builds-tabs { background: var(--paper); border-top: 0; }
.builds-tabs .ch-time, .process .ch-time, .founder .ch-time { color: #b4531a; }
.mobile-demo { grid-template-columns: minmax(0, 1fr) minmax(0, 220px) !important; gap: 24px !important; }
.dev-solo { width: 100%; max-width: 220px; justify-self: center; }
.dev-solo.dev-ios .dev-punch, .dev-solo.dev-android .dev-island { display: none; }
.dev-android .dev-island { display: none; }
@media (max-width: 900px) {
  .mobile-demo { grid-template-columns: minmax(0, 1fr) !important; }
  .dev-solo { max-width: 240px; }
}

/* Founder: brainai tag pills readable in both themes. */
.founder .product-tags li, .product-small .product-tags li { background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }

/* ---------- Tonight ---------- */
.home .start .ch-time { color: var(--amber); margin-bottom: 16px; }

/* ---------- Phones ---------- */
@media (max-width: 1299px) {
  .clock { left: 50%; right: auto; bottom: auto; top: 12px; transform: translate(-50%, -8px); }
  .clock.is-on { transform: translate(-50%, 0); }
}
@media (max-width: 900px) {
  .ed { grid-template-columns: minmax(0, 1fr); }
  .ed-porch .ed-art { order: 0; }
  .ed-art { order: -1 !important; }
  .deed-desk { max-width: 560px; }
  .clock { font-size: .82rem; padding: 7px 12px 7px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .dd, .clock, .clock-orb { transition: none; }
  .sun { transform: translateY(25%); }
}

.porch-leads { background: #fff; color: #1b2433; padding: 14px 16px 6px; font-size: .86rem; line-height: 1.4; }
.pl-head { margin: 0 0 6px; font: 700 1rem "Bricolage Grotesque", sans-serif; letter-spacing: -.01em; }
.pl-list { list-style: none; margin: 0; padding: 0; }
.pl-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid #e6e9ef; }
.pl-score { flex: none; padding: 2px 8px; border-radius: 6px; background: #fde4e4; color: #b3261e; font-weight: 700; font-size: .78rem; }
.pl-text { color: #4a5568; }
.pl-text b { display: block; color: #1b2433; font-weight: 650; }
@media (max-width: 600px) {
  .porch-art { padding-bottom: 0; }
  .porch-map { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 40%; }
  .porch-leads { position: relative; width: auto; margin: -64px 10px 0; }
}
.studio-title { text-wrap: balance; max-width: 18ch; }
.editor { font-size: .74rem !important; }
.home .step-n { background: var(--ink); color: var(--paper); }

/* ---------- Round 4 ---------- */
/* Daylight in dark mode: warmer and lighter than the night chapters. */
:root { --day: var(--paper); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --day: #1d2232; --day-2: #232839; } }
:root[data-theme="dark"] { --day: #1d2232; --day-2: #232839; }
.horizon { background: linear-gradient(180deg, var(--rose) 0%, #9a4452 30%, #e08a5d 58%, #f6c47c 80%, var(--day) 100%); }
.home .builds-tabs { background: linear-gradient(180deg, color-mix(in srgb, #f6c47c 10%, var(--day)) 0, var(--day) 320px); }
.home .process, .home .founder { background: var(--day); border-top-color: color-mix(in srgb, var(--rule) 60%, transparent); }
.home .builds-tabs .panel { background: var(--day-2, var(--panel)); }
.founder .wrap { align-items: start; }
.founder-name { margin: 12px 0 0 !important; font-weight: 600; color: var(--ink) !important; }
.founder-also { grid-column: 2; padding-top: 18px; border-top: 1px solid var(--rule); }
@media (max-width: 900px) { .founder-also { grid-column: 1; } }
.founder .section-title { margin: 0; }
.process .ch-time { margin-bottom: 12px; }
/* Studio code pane never clips */
.editor { overflow-x: auto !important; }
.pane-editor { min-width: 0; }
@media (max-width: 1100px) { .checks { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
/* Readable small print on the dark chapters */
.ed-src { color: #a9b2c5; }
.pl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pl-head span { font: 500 .72rem system-ui, sans-serif; color: #6b7385; }
/* Build -> lists spacing */
.lists { padding-top: clamp(40px, 6vw, 72px); }
/* Empty dispatch lanes */
.lane-list:empty::before { content: "Drop a job here"; display: grid; place-items: center; min-height: 64px; border: 1px dashed var(--rule); border-radius: 12px; color: var(--ink-faint); font-size: .85rem; }
@media (max-width: 900px) {
  .night-content { padding-block: calc(56vw - 64px) 40px !important; }
  .night-shade { background: linear-gradient(180deg, rgba(7,10,18,.35) 0, rgba(7,10,18,0) 90px, rgba(7,10,18,0) calc(58vw - 130px), #070a12 calc(58vw - 8px)) !important; }
  .night-title { font-size: clamp(2.3rem, 10.5vw, 3.4rem) !important; }
  .night-plan { margin-top: 32px; flex-direction: column; gap: 4px; }
}
@media (max-width: 640px) { .nav a[href="#start"] { display: inline-flex !important; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .builds-tabs .ch-time, :root:not([data-theme="light"]) .process .ch-time, :root:not([data-theme="light"]) .founder .ch-time { color: #f3a867; } }
:root[data-theme="dark"] .builds-tabs .ch-time, :root[data-theme="dark"] .process .ch-time, :root[data-theme="dark"] .founder .ch-time { color: #f3a867; }
.checks { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

/* ---------- Round 5 ---------- */
.nowrap { white-space: nowrap; }
/* Sunrise: the sun sinks into a soft horizon instead of a hard edge. */
.sun { -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 85%); mask-image: linear-gradient(to bottom, #000 45%, transparent 85%); }
.horizon::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%; background: linear-gradient(to bottom, transparent, var(--day)); }
/* The approval moment */
.studio { position: relative; }
.shipped-note { position: relative; height: 0; pointer-events: none; }
.stamp {
  position: absolute; right: 6%; top: -60px; z-index: 4;
  padding: 10px 18px; border: 3px solid #45c08a; border-radius: 10px; color: #62d69e;
  font: 800 clamp(.95rem, 1.6vw, 1.25rem)/1 "Bricolage Grotesque", sans-serif; letter-spacing: .02em;
  background: rgba(9,20,16,.72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transform: rotate(-6deg) scale(1.6); opacity: 0; transition: transform .35s cubic-bezier(.2,1.4,.4,1), opacity .2s;
}
.studio.is-shipped .stamp { opacity: 1; transform: rotate(-6deg) scale(1); }
.studio.is-shipped .dev-frame { animation: shipped 1.2s ease-out 1; }
@keyframes shipped { 0% { box-shadow: 0 0 0 0 rgba(69,192,138,.9), 0 40px 70px -34px rgba(0,0,0,.85); } 100% { box-shadow: 0 0 0 18px rgba(69,192,138,0), 0 40px 70px -34px rgba(0,0,0,.85); } }
.studio-status a { color: #f2b23a; font-weight: 650; }
@media (max-width: 720px) { .stamp { right: 4%; top: -40px; } }
@media (prefers-reduced-motion: reduce) { .stamp { transition: none; } .studio.is-shipped .dev-frame { animation: none; } }
.shipped-note { overflow: visible; }
.stamp { right: 28px; }
.shipped-note { max-width: 100%; }
.pa-sheet::before { height: auto; top: 44%; }
@media (min-width: 721px) and (max-width: 1100px) { .pane-phones { grid-column: auto !important; } .phones { max-width: none; } }
.stamp { top: -150px; }
@media (max-width: 720px) { .stamp { top: -120px; } }
.studio { overflow-x: clip; }
.stamp { transform: rotate(-6deg); display: none; }
.studio.is-shipped .stamp { display: block; animation: stampin .4s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes stampin { from { opacity: 0; transform: rotate(-6deg) scale(1.6); } to { opacity: 1; transform: rotate(-6deg) scale(1); } }
@media (prefers-reduced-motion: reduce) { .studio.is-shipped .stamp { animation: none; } }

/* ---------- Round 6 ---------- */
/* Founder: his live apps */
.app-icons { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 56px); gap: 12px; }
.app-icons img { display: block; width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 10px 22px -12px rgba(0,0,0,.6); }
.app-icons li:nth-child(odd) img { transform: translateY(6px); }
.app-icons-cap { margin: 18px 0 0 !important; font-size: .9rem; }
@media (max-width: 1100px) { .app-icons { grid-template-columns: repeat(6, 48px); } .app-icons img { width: 48px; height: 48px; border-radius: 12px; } }
@media (max-width: 420px) { .app-icons { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; } .app-icons img { width: 100%; height: auto; } }
/* Porchlight scores */
.pl-score-88 { background: #fdeadf; color: #a0421a; }
/* Welcome Mat list, drawn like the product */
.wm-card { width: min(100%, 500px); padding: 26px 26px 18px; border-radius: 18px; background: #16392d; color: #eef5f0; transform: rotate(1.2deg); box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 36px 70px -30px rgba(0,0,0,.8), 0 0 90px -20px rgba(242,178,58,.3); }
.wm-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; padding-bottom: 14px; border-bottom: 1px solid rgba(214,180,90,.45); font: 600 1.5rem/1.1 Georgia, "Times New Roman", serif; letter-spacing: -.01em; }
.wm-head span { font: 500 .85rem system-ui, sans-serif; color: #a8c7b6; }
.wm-list { list-style: none; margin: 0; padding: 0; }
.wm-list li { display: grid; gap: 6px; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.wm-name { display: block; height: 15px; border-radius: 3px; background: #0a1f17; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.wm-list li:nth-child(1) .wm-name { width: 64%; } .wm-list li:nth-child(2) .wm-name { width: 38%; }
.wm-list li:nth-child(3) .wm-name { width: 52%; } .wm-list li:nth-child(4) .wm-name { width: 70%; } .wm-list li:nth-child(5) .wm-name { width: 48%; }
.wm-meta { font-size: .9rem; color: #bcd6c7; }
.wm-foot { margin: 12px 0 0; font-size: .78rem; color: #8fb3a0; }
.founder-also { grid-column: auto; margin-top: 24px !important; }
@media (max-width: 480px) { .wm-card { padding: 20px 18px 14px; } .wm-head { font-size: 1.2rem; flex-wrap: wrap; } }

/* ---------- Porchlight daylight redesign ---------- */
.porch-art { padding: 0 0 8% 0; }
.porch-app { width: 100%; border-radius: 16px; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 34px 70px -30px rgba(0,0,0,.8); }
.porch-phone { position: absolute; right: -2%; bottom: 0; width: 24%; border-radius: 18px; border: 5px solid #11151f; box-shadow: 0 30px 60px -24px rgba(0,0,0,.85); }
@media (max-width: 600px) { .porch-art { padding-bottom: 12%; } .porch-phone { width: 30%; right: 0; border-width: 4px; border-radius: 14px; } }

/* ---------- Deedline redesign: real app screens ---------- */
.deed-art { padding: 0 0 8% 0; }
.deed-app { width: 100%; border-radius: 16px; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 34px 70px -30px rgba(0,0,0,.85); }
.deed-phone { position: absolute; right: -2%; bottom: 0; width: 24%; border-radius: 18px; border: 5px solid #11151f; box-shadow: 0 30px 60px -24px rgba(0,0,0,.85); }
@media (max-width: 600px) { .deed-art { padding-bottom: 12%; } .deed-phone { width: 30%; right: 0; border-width: 4px; border-radius: 14px; } }
