/* petal.codes. One static page in Edgetr's system (edgetr/edgetr AGENTS.md, Design language):
   ink on paper, Geist, solid fills, and one flat panel in Petal's pink.
   <html data-theme="light|dark"> is set by theme.js before the first paint. */

@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/Geist-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #f3f2ee;
  --ink: #17181c;
  --ink-2: #3c3d44;
  --sunk: #e8e6e0;
  --line: rgba(23, 24, 28, 0.16);
  --band: #d9367f;
  --on: #fff;
  --dock: #f3f2ee;
  --dock-ink: #17181c;
  --dock-well: #e2e0d9;
  --note: #f9eeb0;
  --note-ink: #2a2717;
  --note-pen: #2f43a8;
  --text: 'Geist', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --wide: 1080px;
  --gutter: clamp(20px, 4vw, 40px);
  color-scheme: light;
}
[data-theme='dark'] {
  --paper: #121316;
  --ink: #ecebe6;
  --ink-2: #c8c7c2;
  --sunk: #1d1e22;
  --line: rgba(236, 235, 230, 0.18);
  --band: #5e1f3f;
  --on: #fbe7f1;
  --dock: #17181c;
  --dock-ink: #ecebe6;
  --dock-well: #26272c;
  --note: #e6d98f;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 400 17px/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, dl, dd { margin: 0; }
button { margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--band); color: var(--on); }
.wrap { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; }
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}
.skip:focus { top: 12px; }

h1 {
  max-width: 11em;
  font: 600 clamp(38px, 5.6vw, 68px) / 1.06 var(--text);
  letter-spacing: -0.02em;
}
h2 { max-width: 20em; font: 600 clamp(26px, 3vw, 34px) / 1.2 var(--text); letter-spacing: -0.015em; }
h3 { font: 600 19px/1.3 var(--text); }
.lede, .section-head p, .facts dd, .get p, .faq p { max-width: 52ch; }
.lede { color: var(--ink-2); font-size: 19px; }
.small { color: var(--ink-2); font-size: 15px; }

.button {
  display: inline-block;
  padding: 11px 16px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font: 600 15px/1.2 var(--text);
  text-decoration: none;
  transition: transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1), background-color 200ms ease;
}
.button:hover { background: #2c2d32; transform: translateY(-2px); }
.button:active { transform: none; }
[data-theme='dark'] .button:hover { background: #d9d8d2; }

/* The header: paper on paper, one short row. */
.top { position: sticky; top: 0; z-index: 30; background: var(--paper); }
.top-in { display: flex; align-items: center; justify-content: center; gap: 2px; min-height: 52px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font: 600 18px/1 var(--text); text-decoration: none; }
.brand img { display: block; width: 24px; height: 24px; }
.top .brand { margin-right: 8px; }
.top nav { display: flex; align-items: center; }
.top nav a, .text-link { padding: 6px 8px; color: var(--ink-2); font-size: 15px; text-decoration: none; }
.top nav a:hover, .text-link:hover { color: var(--ink); }
.theme-toggle { display: grid; place-items: center; width: 32px; height: 32px; color: var(--ink); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.theme-toggle .moon { display: none; }
[data-theme='dark'] .theme-toggle .sun { display: none; }
[data-theme='dark'] .theme-toggle .moon { display: block; }
.no-js .theme-toggle { display: none; }

/* The dots rail: where you are on the page. */
.rail {
  position: fixed;
  z-index: 20;
  top: 50%;
  right: max(12px, calc((100% - var(--wide)) / 2 - 40px));
  display: grid;
  gap: 4px;
  transform: translateY(-50%);
}
.rail a { position: relative; display: grid; place-items: center; width: 18px; height: 18px; color: var(--ink-2); text-decoration: none; }
.rail .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 2px var(--paper);
  opacity: 0.45;
  transition: opacity 160ms ease, transform 160ms ease;
}
.rail a:hover .dot, .rail a:focus-visible .dot { opacity: 0.75; }
.rail a[aria-current='true'] { color: var(--ink); }
.rail a[aria-current='true'] .dot { opacity: 1; transform: scale(1.45); }
.rail-name {
  position: absolute;
  right: calc(100% + 10px);
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}
.rail a:hover .rail-name, .rail a:focus-visible .rail-name { opacity: 1; }

/* Hero */
.hero { padding-top: 56px; }
.hero-in { display: grid; justify-items: start; gap: 16px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 8px; }
/* The visitor's own system is the button; the other is a plain link beside it. */
[data-os='mac'] .actions .for-omarchy,
[data-os='linux'] .actions .for-mac {
  padding: 0;
  background: none;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transform: none;
}
[data-os='linux'] .actions .for-omarchy { order: -1; }

/* The one panel: Petal's pink, with a drawn sample of the dock. */
.band { margin-top: 56px; padding: 56px 0 44px; background: var(--band); color: var(--on); }
.sample {
  --t: 46px;
  display: grid;
  justify-items: start;
  gap: 18px;
  width: fit-content;
  margin-inline: auto;
}
.paper {
  display: grid;
  gap: 6px;
  width: 232px;
  margin-left: calc(var(--t) * 2);
  padding: 14px 16px 22px;
  background: var(--note);
  color: var(--note-ink);
  font-size: 14px;
  line-height: 1.4;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}
.paper-where { font-size: 12px; opacity: 0.62; }
.paper-ink { color: var(--note-pen); }
.dock {
  display: flex;
  align-items: center;
  gap: calc(var(--t) * 0.2);
  padding: calc(var(--t) * 0.22);
  border-radius: calc(var(--t) * 0.5);
  background: var(--dock);
  color: var(--dock-ink);
}
.tile {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: var(--t);
  height: var(--t);
  border-radius: calc(var(--t) * 0.26);
}
.tile.round { border-radius: 50%; background: var(--dock-well); }
.tile .glyph {
  width: 56%;
  height: 56%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tile.app { color: #fff; }
.a1 { background: #2a2c34; }
.a2 { background: #3f63dd; }
.a3 { background: #2f9a6b; }
.a4 { background: #e2683c; }
.a5 { background: #6a5ae0; }
.a6 { background: #1f8f9c; }
.folder { background: #c98f3a; }
[data-theme='dark'] .a1 { background: #34363f; }
.tile.run::after {
  content: '';
  position: absolute;
  bottom: calc(var(--t) * -0.15);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--dock-ink);
}
.tile b {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--band);
  box-shadow: 0 0 0 2px var(--dock);
  color: #fff;
  font: 600 11px/1 var(--text);
}
[data-theme='dark'] .tile b { background: #d9367f; }
.ai .glyph { fill: currentColor; stroke: none; width: 48%; height: 48%; }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke-width: 3; transform: rotate(-90deg); }
.ring .track { stroke: var(--dock-well); }
.ring .used { stroke: #d9367f; stroke-linecap: round; stroke-dasharray: 44 110; }
.ai { background: none !important; }
.ai::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--dock-well); }
.ai .glyph { position: relative; }
.pad i {
  position: absolute;
  width: 42%;
  height: 42%;
  background: var(--note);
  box-shadow: 0 0 0 1px rgba(23, 24, 28, 0.14);
}
.pad i:first-child { transform: translate(-2px, 2px) rotate(-8deg); }
.pad i:last-child { transform: translate(2px, -1px) rotate(4deg); }
.rule { flex: none; width: 1px; height: calc(var(--t) * 0.62); background: var(--line); }

/* Sections: a short text block, then facts in spaced rows. */
.section { padding-top: 120px; }
.section-head { display: grid; justify-items: start; gap: 12px; }
.section-head p { color: var(--ink-2); }
.facts { display: grid; gap: 18px; margin-top: 32px; }
.facts > div {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 4px 32px;
  align-items: baseline;
}
.facts dt { font-weight: 600; }
.facts dd { color: var(--ink-2); }

/* Good to know: a rule, a plus that turns when the row is open. */
.faq { max-width: 720px; margin-top: 28px; border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq-mark { flex: none; fill: none; stroke: var(--ink-2); stroke-width: 1.4; stroke-linecap: round; transition: transform 300ms cubic-bezier(0.2, 0, 0, 1); }
.faq details[open] .faq-mark { transform: rotate(45deg); }
.faq p { padding: 0 36px 26px 0; color: var(--ink-2); font-size: 16px; line-height: 1.6; }

/* Download */
.mark { display: block; width: 72px; height: 72px; margin-bottom: 4px; }
.get { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; max-width: 880px; margin-top: 36px; }
.get > div { display: grid; justify-items: start; align-content: start; gap: 8px; }
.get p { color: var(--ink-2); }
.get .button { margin-top: 8px; }
.or { margin-top: 48px; color: var(--ink-2); }
.cmd {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  margin-top: 12px;
  padding: 6px 6px 6px 14px;
  border-radius: 6px;
  background: var(--sunk);
}
.cmd code { min-width: 0; overflow-x: auto; font: 14px/1.5 var(--mono); white-space: nowrap; scrollbar-width: none; }
.cmd code::-webkit-scrollbar { display: none; }
.cmd button { flex: none; padding: 7px 10px; border-radius: 4px; background: var(--paper); font: 600 14px/1.2 var(--text); }
.cmd button:hover { background: var(--ink); color: var(--paper); }

footer.site { margin-top: 120px; padding-bottom: 40px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.foot-brand p { max-width: 22em; margin-top: 10px; color: var(--ink-2); }
.foot-label { margin-bottom: 8px; font: 600 15px/1.3 var(--text); }
.foot-grid div > a:not(.brand) { display: block; width: fit-content; padding: 3px 0; color: var(--ink-2); text-decoration: none; }
.foot-grid div > a:not(.brand):hover { color: var(--ink); }
.foot-line { margin-top: 36px; color: var(--ink-2); font-size: 15px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .rail .dot, .faq-mark { transition: none; }
  .button:hover { transform: none; }
}

@media (max-width: 800px) {
  .facts > div { grid-template-columns: minmax(0, 1fr); }
  .get { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
  .section { padding-top: 96px; }
}
@media (max-width: 720px) {
  body { padding-right: 32px; }
  .rail { right: 8px; }
  .rail-name { display: none; }
  .sample { --t: 34px; }
  .tile b { top: -6px; right: -6px; min-width: 16px; height: 16px; font-size: 10px; }
}
@media (max-width: 520px) {
  .sample { --t: 26px; }
  .tile.more { display: none; }
  .paper { width: 200px; margin-left: var(--t); font-size: 13px; }
  .ring { stroke-width: 3.6; }
  .tile b { top: -5px; right: -5px; min-width: 13px; height: 13px; padding: 0 3px; font-size: 9px; }
  .ai::before { inset: 4px; }
}
