/* ==========================================================================
   hero.css — the home page's hero (v2, 2026-11-11)
   --------------------------------------------------------------------------
   The first screen is the dashboard itself: the headline where the greeting
   sits, the dashboard's composer (live: hero.js), and the panels under it
   (Projects, Tasks, Quick links, Activity), on the dotted field over Planny's
   ambient light, which also rises from the floor and veils the panels.
   Colours are the app's own: the dashboard tokens (canvas-thought-bloom
   src/styles/dashboard-home.css) and the ambient light (plani-ambient.css).
   Everything below the hero is unchanged and keeps its own files.
   ========================================================================== */

/* ---------- 0. Tokens -------------------------------------------------------- */
.hp-hero {
  /* the dashboard, light */
  --d-page: #F7F6F3; --d-surface: #FFFFFF; --d-well: #F1EFEB;
  --d-line: rgba(24, 22, 18, 0.085); --d-line2: rgba(24, 22, 18, 0.16);
  --d-ink: #1C1A16; --d-text: #34302A; --d-text2: #57524A; --d-text3: #6B665C;
  --d-dot: rgba(28, 26, 22, 0.13);
  --d-shadow: 0 1px 2px rgba(24, 22, 18, 0.05), 0 6px 18px rgba(24, 22, 18, 0.06);
  --d-pop: 0 12px 32px -8px rgba(28, 26, 22, 0.18), 0 2px 6px rgba(28, 26, 22, 0.06);
  --d-hover: rgba(24, 22, 18, 0.045);

  /* Planny's light: hue 18, saturation 92 (orbShader.ts C1, C2) */
  --sig: hsl(18 92% 53%);
  --sig-2: hsl(14 92% 74%);
  --sig-soft: hsl(18 92% 53% / 0.14);
  --sig-rgb: 245 104 33;

  /* the ambient light under the dashboard (plani-ambient.css, Light) */
  --amb-dither: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --amb:
    var(--amb-dither),
    linear-gradient(180deg, rgb(28 26 22 / 0.05) 0%, rgb(28 26 22 / 0) 24%),
    radial-gradient(78% 56% at 50% 108%, rgb(255 112 46 / 0.86) 0%, rgb(255 128 66 / 0.56) 24%, rgb(255 150 96 / 0.22) 50%, rgb(255 160 110 / 0.06) 66%, rgb(255 160 110 / 0) 80%),
    radial-gradient(50% 56% at 0% 102%, rgb(255 150 86 / 0.70) 0%, rgb(255 150 86 / 0.20) 42%, rgb(255 150 86 / 0) 74%),
    radial-gradient(50% 56% at 100% 102%, rgb(255 118 66 / 0.64) 0%, rgb(255 118 66 / 0.18) 42%, rgb(255 118 66 / 0) 74%),
    radial-gradient(140% 60% at 50% 100%, rgb(255 206 172 / 0.60) 0%, rgb(255 206 172 / 0) 80%);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --head-h: 96px;
}
:root[data-theme="dark"] .hp-hero {
  --d-page: #101214; --d-surface: #16181B; --d-well: #1A1D21;
  --d-line: rgba(255, 255, 255, 0.08); --d-line2: rgba(255, 255, 255, 0.16);
  --d-ink: #F4F3F1; --d-text: #DBD9D5; --d-text2: #A6A39E; --d-text3: #8B8783;
  --d-dot: rgba(255, 255, 255, 0.075);
  --d-shadow: 0 1px 2px rgba(0, 0, 0, 0.30), 0 6px 20px rgba(0, 0, 0, 0.22);
  --d-pop: 0 16px 40px -8px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3);
  --d-hover: rgba(255, 255, 255, 0.045);
  --sig: hsl(18 92% 60%);
  --sig-soft: hsl(18 92% 60% / 0.16);
  --amb:
    var(--amb-dither),
    linear-gradient(180deg, rgb(0 0 0 / 0.42) 0%, rgb(0 0 0 / 0) 30%),
    radial-gradient(78% 56% at 50% 108%, rgb(255 104 30) 0%, rgb(244 86 24 / 0.84) 24%, rgb(214 66 18 / 0.40) 50%, rgb(180 52 14 / 0.10) 66%, rgb(180 52 14 / 0) 80%),
    radial-gradient(50% 56% at 0% 102%, rgb(255 138 56 / 0.92) 0%, rgb(255 120 44 / 0.34) 42%, rgb(255 120 44 / 0) 74%),
    radial-gradient(50% 56% at 100% 102%, rgb(255 96 36 / 0.86) 0%, rgb(250 84 30 / 0.30) 42%, rgb(250 84 30 / 0) 74%),
    radial-gradient(140% 62% at 50% 100%, rgb(112 40 14 / 0.50) 0%, rgb(112 40 14 / 0) 80%);
}

.hp-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp-hero svg { flex: none; }

/* ---------- 3. Hero ---------------------------------------------------------------- */
.hp-hero { position: relative; min-height: 100svh; padding-top: clamp(120px, 17vh, 176px); overflow: hidden; text-align: center; isolation: isolate; }
.hp-amb {
  position: absolute; inset: 0; z-index: -1; background-color: var(--d-page);
  background-image: radial-gradient(circle at center, var(--d-dot) 0.9px, transparent 1.2px), var(--amb);
  background-size: 20px 20px, 160px 160px, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  background-repeat: repeat, repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
  background-position: 10px 10px, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
}
/* the same light, in front of the panels: it rises from the floor and veils them */
.hp-hero::after {
  content: ""; position: absolute; inset: auto 0 0; height: 46%; z-index: 2; pointer-events: none;
  background:
    radial-gradient(70% 70% at 50% 118%, rgb(255 112 46 / 0.78) 0%, rgb(255 128 66 / 0.42) 34%, rgb(255 150 96 / 0) 72%),
    radial-gradient(46% 80% at 0% 112%, rgb(255 150 86 / 0.58) 0%, rgb(255 150 86 / 0) 70%),
    radial-gradient(46% 80% at 100% 112%, rgb(255 118 66 / 0.52) 0%, rgb(255 118 66 / 0) 70%),
    linear-gradient(to top, rgb(255 190 150 / 0.55), rgb(255 190 150 / 0) 60%);
}
:root[data-theme="dark"] .hp-hero::after {
  background:
    radial-gradient(70% 70% at 50% 120%, rgb(255 104 30 / 0.95) 0%, rgb(244 86 24 / 0.55) 34%, rgb(214 66 18 / 0) 72%),
    radial-gradient(46% 80% at 0% 112%, rgb(255 138 56 / 0.7) 0%, rgb(255 120 44 / 0) 70%),
    radial-gradient(46% 80% at 100% 112%, rgb(255 96 36 / 0.66) 0%, rgb(250 84 30 / 0) 70%),
    linear-gradient(to top, rgb(16 18 20 / 0.5), rgb(16 18 20 / 0) 70%);
}
.hp-hero-in { position: relative; z-index: 1; }
.sw .hp-hero-in > p { margin-left: auto; margin-right: auto; }
.sw .hp-title { font-size: clamp(44px, 6.3vw, 100px); line-height: 0.96; letter-spacing: -0.058em; font-weight: 400; color: var(--d-ink); }
.sw .hp-sub { margin: 22px auto 0; font-size: 19px; color: var(--d-text2); }

.js .hp-hero .hp-title, .js .hp-hero .hp-sub, .js .hp-hero .hp-composer, .js .hp-hero .hp-starts, .js .hp-hero .hp-dash {
  opacity: 0; transform: translate3d(0, 18px, 0);
  transition: opacity 1000ms var(--ease), transform 1200ms var(--ease);
}
.js.hp-ready .hp-hero .hp-title, .js.hp-ready .hp-hero .hp-sub,
.js.hp-ready .hp-hero .hp-composer, .js.hp-ready .hp-hero .hp-starts, .js.hp-ready .hp-hero .hp-dash { opacity: 1; transform: none; }
.js.hp-ready .hp-hero .hp-title { transition-delay: 80ms; }
.js.hp-ready .hp-hero .hp-sub { transition-delay: 160ms; }
.js.hp-ready .hp-hero .hp-composer { transition-delay: 240ms; }
.js.hp-ready .hp-hero .hp-starts { transition-delay: 320ms; }
.js.hp-ready .hp-hero .hp-dash { transition-delay: 420ms; transition-duration: 1400ms, 1600ms; }

/* the composer (the dashboard's) */
.hp-composer {
  position: relative; width: min(760px, 100%); margin: 44px auto 0; padding: 14px 14px 10px;
  text-align: left; background: var(--d-surface); border: 1px solid var(--d-line2); border-radius: 18px; box-shadow: var(--d-pop);
  transition: border-color 200ms, box-shadow 200ms;
}
.hp-composer:focus-within { border-color: rgb(var(--sig-rgb) / 0.55); box-shadow: var(--d-pop), 0 0 0 4px var(--sig-soft); }
.hp-composer textarea {
  display: block; width: 100%; min-height: 54px; padding: 6px 8px; border: 0; outline: 0; resize: none; background: transparent;
  font: 400 17px/1.5 var(--sw-sans); color: var(--d-ink);
}
.hp-composer textarea::placeholder { color: var(--d-text3); }
.hp-composer-row { display: flex; align-items: center; gap: 4px; }
.hp-grow { flex: 1; }
.hp-ic, .hp-chip, .hp-send { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: none; color: var(--d-text2); cursor: pointer; font: 400 13.5px/1 var(--sw-sans); }
.hp-ic { width: 34px; height: 34px; border-radius: 9px; }
.hp-chip { height: 32px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--d-line2); }
.hp-chip--plain { border-color: transparent; }
.hp-ic:hover, .hp-chip:hover { background: var(--d-hover); color: var(--d-ink); }
.hp-ic svg, .hp-chip svg, .hp-send svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hp-chip svg { width: 15px; height: 15px; }
.hp-send { width: 34px; height: 34px; margin-left: 4px; border-radius: 10px; background: var(--d-ink); color: var(--d-page); }
.hp-send:hover { background: var(--sig); color: #17140F; }
/* Light: an outline until there is something to send, then Planny's orange
   with a white arrow (hero.js sets .has-text). Dark keeps its solid button. */
:root:not([data-theme="dark"]) .hp-send {
  background: transparent; color: var(--d-text2); box-shadow: inset 0 0 0 1px var(--d-line2);
  transition: background-color 220ms var(--ease), color 220ms var(--ease), box-shadow 220ms var(--ease), transform 220ms var(--ease);
}
:root:not([data-theme="dark"]) .hp-send:hover { background: var(--d-hover); color: var(--d-ink); box-shadow: inset 0 0 0 1px var(--d-text3); }
:root:not([data-theme="dark"]) .hp-composer.has-text .hp-send { background: var(--sig); color: #FFFFFF; box-shadow: 0 4px 14px -4px rgb(var(--sig-rgb) / 0.65); }
:root:not([data-theme="dark"]) .hp-composer.has-text .hp-send:hover { background: hsl(18 92% 58%); transform: translateY(-1px); box-shadow: 0 8px 20px -6px rgb(var(--sig-rgb) / 0.7); }
:root:not([data-theme="dark"]) .hp-composer.has-text .hp-send:active { transform: none; }
.hp-composer.has-text .hp-send svg { stroke-width: 2; }
.hp-starts { display: flex; justify-content: center; flex-wrap: wrap; margin: 18px auto 0 !important; max-width: none !important; }
.hp-starts button { border: 0; background: none; cursor: pointer; padding: 6px 14px; font: 400 13.5px/1 var(--sw-sans); color: var(--d-text2); }
.hp-starts button + button { border-left: 1px solid var(--d-line2); }
.hp-starts button:hover { color: var(--d-ink); }

/* the panels */
.hp-dash { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; width: min(1040px, 100%); margin: 64px auto 0; text-align: left; }
.hp-panel { padding: 14px 16px 12px; background: color-mix(in srgb, var(--d-surface) 90%, transparent); border: 1px solid var(--d-line); border-radius: 14px; box-shadow: var(--d-shadow); font-size: 14px; color: var(--d-text); }
.hp-panel--wide { grid-column: 1 / -1; }
.sw .hp-ph { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; font-size: 14px; font-weight: 500; color: var(--d-ink); }
.hp-ph svg { width: 15px; height: 15px; fill: none; stroke: var(--d-text3); stroke-width: 1.7; }
.hp-plus { color: var(--d-text3); font-weight: 400; }
.hp-plist, .hp-tlist, .hp-llist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.hp-plist li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 8px; margin: 0 -8px; border-radius: 8px; }
.hp-plist b { font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-plist span { color: var(--d-text3); font-size: 12.5px; white-space: nowrap; }
.hp-plist li.is-on { background: var(--d-hover); }
.hp-plist li.is-on b { font-weight: 500; color: var(--d-ink); }
.hp-plist li.is-on span { color: var(--d-ink); }
.sw .hp-tabs { display: flex; gap: 14px; margin: 0 0 8px; font-size: 12.5px; color: var(--d-text3); }
.hp-tabs .on { color: var(--d-ink); box-shadow: 0 1px 0 var(--d-ink); padding-bottom: 3px; }
.hp-tlist li, .hp-llist li { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.hp-tlist i { width: 15px; height: 15px; border: 1.5px solid var(--d-line2); border-radius: 4px; }
.hp-tlist .done { color: var(--d-text3); text-decoration: line-through; text-decoration-color: var(--d-line2); }
.hp-tlist .done i { background: var(--sig); border-color: var(--sig); }
.hp-llist svg { width: 15px; height: 15px; fill: currentColor; }
:root[data-theme="dark"] .hp-llist svg[style*="currentColor"] { color: #F4F3F1 !important; }
.hp-act { display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; column-gap: 6px; }
.sw .hp-act-m { grid-column: 2; display: flex; justify-content: space-between; margin: 0 0 6px; font-size: 10.5px; color: var(--d-text3); max-width: none; }
.sw .hp-act-d { grid-row: 2; display: grid; grid-template-rows: repeat(7, 1fr); gap: 3px; margin: 0; font-size: 10px; line-height: 1; color: var(--d-text3); }
.hp-act-d span { display: flex; align-items: center; }
.hp-heat { grid-row: 2; grid-column: 2; display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; }
.hp-heat i, .hp-act-k i { aspect-ratio: 1; border-radius: 2px; background: rgb(var(--tint-rgb) / 0.055); }
.sw .hp-act-f { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 0; font-size: 11.5px; color: var(--d-text3); max-width: none; }
.hp-act-k { display: inline-flex; align-items: center; gap: 3px; }
.hp-act-k i { width: 10px; }
.hp-act-k i:first-child { margin-left: 4px; } .hp-act-k i:last-of-type { margin-right: 4px; }
.hp-act i[data-l="1"], .hp-act-k i[data-l="1"] { background: rgb(var(--sig-rgb) / 0.2); }
.hp-act i[data-l="2"], .hp-act-k i[data-l="2"] { background: rgb(var(--sig-rgb) / 0.4); }
.hp-act i[data-l="3"], .hp-act-k i[data-l="3"] { background: rgb(var(--sig-rgb) / 0.68); }
.hp-act i[data-l="4"], .hp-act-k i[data-l="4"] { background: var(--sig); }

/* ---------- 15. The sign-up gate ---------------------------------------------------------------- */

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .hp-hero { padding-top: 112px; }
  .sw .hp-title { font-size: 42px; }
  .sw .hp-sub { font-size: 16px; max-width: 30ch; }
  .hp-composer { margin-top: 30px; }
  .hp-composer .hp-chip--plain { display: none; }
  .hp-starts button { padding: 6px 10px; font-size: 12.5px; }
  /* The three panels as a row you swipe through: one in view, the next one
     peeking in. Activity stays on wide screens. */
  /* The row runs edge to edge of the screen: the wide screens' width
     (min(1040px, 100%)) is undone, or the row ends short of the edge and
     cuts the next panel in two. */
  .hp-dash {
    display: flex; gap: 12px; width: auto; max-width: none; margin: 40px calc(var(--sw-pad) * -1) 0; padding: 4px var(--sw-pad) 0;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--sw-pad); scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .hp-dash::-webkit-scrollbar { display: none; }
  /* Safari drops a scroller's end padding: a spacer keeps the last panel off the edge */
  .hp-dash::after { content: ""; flex: 0 0 calc(var(--sw-pad) - 12px); }
  .hp-dash .hp-panel { flex: 0 0 calc(100vw - var(--sw-pad) * 2 - 28px); scroll-snap-align: start; transition: transform 400ms var(--ease), opacity 400ms var(--ease); }
  .hp-dash .hp-panel:not(.is-on) { transform: scale(0.96); opacity: 0.7; }
  .hp-dash .hp-panel--wide { display: none; }
}

/* ---------- The sign-up popover (hero.js) ------------------------------------
   Opens right by the control the visitor reached for, like the app's own
   menus: a mono label, Google, GitHub, a rule, Sign in. 2026-11-12, in place
   of the centred card. */
.hp-composer-row { position: relative; }
.hp-pop {
  position: absolute; bottom: calc(100% + 10px); z-index: 30; min-width: 258px; padding: 5px;
  border-radius: 12px; background: var(--d-surface); border: 1px solid var(--d-line2); box-shadow: var(--d-pop);
  text-align: left; transform-origin: bottom left; animation: hp-pop-in 200ms var(--ease) both;
}
.hp-pop[hidden] { display: none; }
.hp-pop.hp-pop-r { transform-origin: bottom right; }
@keyframes hp-pop-in { from { opacity: 0; transform: translateY(4px) scale(0.97); } }
.hp-pop-label { padding: 7px 9px 5px; font: 400 11.5px/1.3 var(--sw-mono, "IBM Plex Mono", monospace); color: var(--d-text3); white-space: nowrap; }
.hp-pop-item {
  display: flex; align-items: center; gap: 9px; width: 100%; height: 33px; padding: 0 9px; border-radius: 8px;
  font: 400 13px/1 var(--sw-sans, "IBM Plex Sans", system-ui, sans-serif); color: var(--d-text); text-decoration: none; white-space: nowrap;
  transition: background 140ms, color 140ms;
}
.hp-pop-item svg { flex: none; width: 16px; height: 16px; opacity: 0.85; }
.hp-pop-item:hover, .hp-pop-item:focus-visible { background: var(--d-hover); color: var(--d-ink); outline: none; }
.hp-pop-sep { height: 1px; margin: 5px 4px; background: var(--d-line); }
@media (prefers-reduced-motion: reduce) { .hp-pop { animation: none; } }
