:root {
  color-scheme: light;
  --bg: #fafafa;
  --ink: #1f2328;
  --muted: #5f6670;
  --line: #d9dee5;
  --panel: #ffffff;
  --panel-soft: #f2f6f7;
  --accent: #ef6f74;
  --accent-dark: #bd4148;
  --mint: #2f8f83;
  --blue: #3d6fba;
  --gold: #d9972d;
  --shadow: 0 22px 56px rgba(31, 35, 40, 0.14);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(250, 250, 250, 0.9), rgba(250, 250, 250, 0.9)),
    url("../images/taffypins-app-icon-1024.png") right -80px top -120px / min(52vw, 620px) no-repeat,
    var(--bg);
}

body.subpage {
  background:
    linear-gradient(rgba(250, 250, 250, 0.94), rgba(250, 250, 250, 0.94)),
    url("../images/taffypins-app-icon-1024.png") right -120px top -160px / min(48vw, 520px) no-repeat,
    var(--bg);
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 222, 229, 0.72);
  background: rgba(250, 250, 250, 0.84);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 760;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  border-radius: 999px;
  color: #424951;
  font-size: 0.94rem;
  font-weight: 650;
  padding: 8px 12px;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: #edf1f3;
  color: var(--ink);
}

.hero {
  width: min(1120px, calc(100% - 40px));
  min-height: clamp(520px, 74svh, 760px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.85fr);
  align-items: center;
  gap: clamp(32px, 6vw, 76px);
  padding: 56px 0 44px;
}

.hero-copy {
  max-width: 620px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  color: #48515a;
  font-size: 0.9rem;
  font-weight: 750;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  color: #161a1f;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.subpage h1 {
  font-size: clamp(2.7rem, 6vw, 5rem);
  line-height: 0.98;
}

.lede {
  max-width: 650px;
  margin-bottom: 30px;
  color: #424951;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.55;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 760;
  padding: 11px 16px;
  text-decoration: none;
}

.button:hover {
  background: #000;
}

.button.secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
}

.button.secondary:hover {
  background: #fff;
}

.product-shot {
  align-self: stretch;
  min-height: 360px;
  display: grid;
  align-items: center;
}

.app-window {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(31, 35, 40, 0.11);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  padding: 0 14px;
  background: #f5f7f8;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
}

.dot:nth-child(2) {
  background: var(--gold);
}

.dot:nth-child(3) {
  background: var(--mint);
}

.window-body {
  display: grid;
  grid-template-columns: 150px 1fr;
  min-height: 420px;
}

.sidebar-preview {
  border-right: 1px solid var(--line);
  background: #f2f6f7;
  padding: 18px 12px;
}

.folder-pill {
  border-radius: 8px;
  background: #fff;
}

.folder-pill {
  height: 34px;
  margin-bottom: 10px;
}

.folder-pill:nth-child(2) {
  background: #e3eef1;
}

.folder-pill:nth-child(3) {
  width: 70%;
}

.notes-preview {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
}

.markdown-preview {
  min-width: 0;
  border: 1px solid #e6eaee;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  padding: 18px;
}

.markdown-preview h2 {
  margin: 0 0 12px;
  color: #171b20;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.task-preview,
.sticky-task-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-preview li,
.sticky-task-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #424951;
  font-size: 0.92rem;
  line-height: 1.35;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 1.5px solid #a8b0b9;
  border-radius: 4px;
  background: #fff;
}

.checkbox.checked {
  border-color: var(--mint);
  background: var(--mint);
}

.checkbox.checked::after {
  content: "";
  width: 7px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

.sticky-code {
  overflow-x: auto;
  border: 0;
  border-radius: 8px;
  background: #1f2328;
  color: #f8fbff;
  font: 0.78rem/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  margin: 0;
  padding: 12px;
  white-space: pre;
}

.code-preview {
  --code-preview-line-height: 1.6;
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  border: 0;
  border-radius: 7px;
  background: #1f1f20;
  color: #f5f5f4;
  font: 0.78rem/var(--code-preview-line-height) ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  margin: 18px 0 0;
  padding: 12px 0;
  white-space: pre;
}

.code-preview::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3.1ch;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  content: "";
}

.code-preview code {
  position: relative;
  display: grid;
  min-width: max-content;
  font: inherit;
  line-height: var(--code-preview-line-height);
}

.code-preview-line {
  display: grid;
  grid-template-columns: 2.1ch max-content;
  padding-left: 5px;
}

.code-preview-line-number {
  color: rgba(245, 245, 244, 0.58);
  padding-right: 0.45ch;
  text-align: right;
  user-select: none;
}

.code-preview-command {
  padding: 0 14px 0 10px;
}

.widget-band {
  border-top: 1px solid var(--line);
  background: #eef4f3;
}

.widget-showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(320px, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}

.widget-showcase .section-header {
  margin-bottom: 0;
}

.widget-graphic {
  min-width: 0;
}

.desktop-surface {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(31, 35, 40, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(232, 242, 245, 0.76)),
    linear-gradient(135deg, #f2c56d 0%, #f9e2a5 30%, #9ed7d1 62%, #6b8ec7 100%);
  box-shadow: var(--shadow);
}

.floating-window {
  position: absolute;
  top: 42px;
  left: 34px;
  width: 52%;
  height: 250px;
  border: 1px solid rgba(31, 35, 40, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 18px 42px rgba(31, 35, 40, 0.08);
}

.floating-window span {
  position: absolute;
  left: 22px;
  right: 22px;
  height: 12px;
  border-radius: 999px;
  background: rgba(79, 91, 103, 0.12);
}

.floating-window span:nth-child(1) {
  top: 48px;
  width: 58%;
}

.floating-window span:nth-child(2) {
  top: 82px;
}

.floating-window span:nth-child(3) {
  top: 116px;
  right: 80px;
}

.sticky-widget-mock {
  position: absolute;
  right: 34px;
  bottom: 32px;
  width: min(350px, calc(100% - 68px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.94), transparent 42%),
    linear-gradient(180deg, rgba(250, 249, 247, 0.9), rgba(236, 234, 230, 0.84));
  box-shadow:
    0 24px 60px rgba(94, 90, 84, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
  padding: 14px;
  backdrop-filter: blur(16px);
}

.widget-drag-handle {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 12px;
  gap: 5px;
}

.widget-drag-handle span {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(92, 88, 82, 0.22);
}

.sticky-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
}

.sticky-widget-header p {
  margin: 0 0 4px;
  color: #706960;
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sticky-widget-header h3 {
  margin: 0;
  color: #242424;
  font-size: 1.3rem;
  letter-spacing: 0;
}

.sticky-widget-header > span {
  flex: 0 0 auto;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: #5f5a53;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 7px 10px;
}

.sticky-card {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  box-shadow:
    0 14px 30px rgba(94, 90, 84, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
  color: #242424;
  padding: 16px;
}

.sticky-card-yellow {
  background: linear-gradient(180deg, #fff6c7 0%, #f8ebaa 100%);
}

.sticky-card-blue {
  background: linear-gradient(180deg, #e3efff 0%, #d4e5ff 100%);
}

.sticky-card-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sticky-card-title strong {
  font-size: 1rem;
  line-height: 1.25;
}

.sticky-card-title small {
  flex: 0 0 auto;
  color: rgba(36, 36, 36, 0.6);
  font-size: 0.7rem;
  font-weight: 700;
}

.sticky-task-list li {
  color: rgba(36, 36, 36, 0.86);
  font-size: 0.82rem;
}

.sticky-code {
  border-radius: 10px;
  font-size: 0.72rem;
}

.band {
  border-top: 1px solid var(--line);
  background: #fff;
}

.section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0;
}

.section.compact {
  max-width: 860px;
}

.section-header {
  max-width: 720px;
  margin-bottom: 30px;
}

.section-header h2,
.content h2 {
  margin-bottom: 10px;
  color: #171b20;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-header p,
.content p,
.content li {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.68;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.info-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 22px;
}

.info-card h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
  letter-spacing: 0;
}

.info-card p {
  margin-bottom: 16px;
  color: var(--muted);
  line-height: 1.6;
}

.text-link {
  color: var(--accent-dark);
  font-weight: 760;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.page-hero {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: 88px 0 40px;
}

.content {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 76px;
}

.content-section {
  border-top: 1px solid var(--line);
  padding: 30px 0;
}

.content-section:first-child {
  border-top: 0;
}

.content h2 {
  font-size: clamp(1.55rem, 2.6vw, 2rem);
}

.content h3 {
  margin: 22px 0 8px;
  font-size: 1.05rem;
}

.content ul,
.content ol {
  margin: 0 0 0 1.2rem;
  padding: 0;
}

.contact-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 14px 36px rgba(31, 35, 40, 0.08);
  padding: 24px;
}

.contact-panel p:last-child {
  margin-bottom: 0;
}

.template-box {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f6f8fa;
  color: #2f363d;
  font: 0.92rem/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  padding: 16px;
  white-space: pre-wrap;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #171b20;
  color: #dfe4ea;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0;
}

.footer-inner p {
  margin: 0;
  color: #b6bec8;
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: #fff;
  font-weight: 680;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 840px) {
  body,
  body.subpage {
    background:
      linear-gradient(rgba(250, 250, 250, 0.95), rgba(250, 250, 250, 0.95)),
      url("../images/taffypins-app-icon-1024.png") right -120px top 72px / 380px no-repeat,
      var(--bg);
  }

  .nav {
    width: min(100% - 28px, 1120px);
  }

  .hero {
    width: min(100% - 28px, 1120px);
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 48px 0 36px;
  }

  .product-shot {
    min-height: 0;
  }

  .widget-showcase {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    width: min(100% - 28px, 1120px);
  }
}

@media (max-width: 560px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .nav-links a {
    padding: 8px 9px;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .window-body {
    grid-template-columns: 1fr;
  }

  .sidebar-preview {
    display: none;
  }

  .notes-preview {
    padding: 14px;
  }

  .markdown-preview {
    padding: 14px;
  }

  .desktop-surface {
    min-height: 500px;
  }

  .floating-window {
    top: 24px;
    left: 18px;
    width: calc(100% - 36px);
    height: 190px;
  }

  .sticky-widget-mock {
    right: 18px;
    bottom: 20px;
    width: calc(100% - 36px);
  }

  .page-hero,
  .content,
  .section {
    width: min(100% - 28px, 1120px);
  }
}
