/* HabitBUILT.com: black, white, gray, red accent only */
:root {
  --ink: #141414;
  --ink-2: #4a4a4a;
  --ink-3: #6e6e6e;
  --line: #e2e0dc;
  --paper: #ffffff;
  --card: #f4f2ee;
  --red: #c8102e;
  --radius: 18px;
  --max: 1080px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
}
h1, h2, h3 { font-family: "Lato", system-ui, sans-serif; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(34px, 5.4vw, 56px); font-weight: 900; letter-spacing: -.01em; }
h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 900; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 1em; max-width: 60ch; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 10; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.logo img { height: 26px; width: auto; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--red); }

/* Buttons */
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 16px;
  padding: 12px 22px; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--ink); color: #fff; cursor: pointer; font-family: inherit;
}
.btn:hover { background: #000; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--card); }
.nav .btn { padding: 8px 16px; font-size: 15px; color: #fff; }
.nav .btn:hover, .nav .btn[aria-current="page"] { color: #fff; box-shadow: none; }

/* Sections */
section { padding: 64px 0; scroll-margin-top: 72px; }
section + section { border-top: 1px solid var(--line); }
.kicker { color: var(--red); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.lead { font-size: 19px; color: var(--ink-2); }
.hero { padding: 72px 0 56px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* Bites: short, one idea each */
.bites { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.bites li { background: var(--card); border-radius: var(--radius); padding: 22px; }
.bites b { display: block; font-family: "Lato", sans-serif; font-size: 18px; margin-bottom: 4px; }
.bites span { color: var(--ink-2); }

/* App cards */
.apps { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); margin-top: 28px; }
.app {
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column; gap: 8px; text-decoration: none; background: #fff;
}
a.app:hover { border-color: var(--ink); }
.app .name { font-family: "Lato", sans-serif; font-size: 20px; font-weight: 400; letter-spacing: .02em; }
.app .name b { font-weight: 900; color: var(--red); letter-spacing: 0; }
.app p { color: var(--ink-2); margin: 0; }
.tag { align-self: flex-start; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--card); color: var(--ink-2); }
.tag.on { background: var(--ink); color: #fff; }

/* Tool detail rows */
.tool { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.tool ul { padding-left: 20px; margin: 0 0 1em; }
.tool li { margin-bottom: 6px; }
.media { background: var(--card); border-radius: var(--radius); padding: 18px; }
.media video { width: 100%; max-height: 560px; border-radius: 12px; background: #000; display: block; }
.media figcaption { color: var(--ink-3); font-size: 14px; margin-top: 10px; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.jump a { text-decoration: none; font-size: 15px; font-weight: 700; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--line); }
.jump a:hover { border-color: var(--ink); }

/* Who */
.who { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.who > div { background: var(--card); border-radius: var(--radius); padding: 26px; }
.who img { height: 30px; width: auto; margin-bottom: 14px; }
.who .tg { font-family: "Lato", sans-serif; font-weight: 900; font-size: 24px; margin-bottom: 10px; }

/* Form */
form { max-width: 560px; display: grid; gap: 16px; }
label { display: block; font-weight: 700; }
label input, label textarea, label select { margin-top: 6px; }
label small { font-weight: 400; color: var(--ink-3); }
input, textarea, select {
  font: inherit; font-size: 16px; /* 16px: no zoom on phones */
  padding: 12px 14px; border: 1.5px solid #cfccc6; border-radius: 12px; background: #fff; color: var(--ink); width: 100%;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
textarea { min-height: 110px; resize: vertical; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.msg { border-radius: 12px; padding: 14px 16px; background: var(--card); }
.msg.err { box-shadow: inset 4px 0 0 var(--red); }
.done { background: var(--card); border-radius: var(--radius); padding: 28px; max-width: 560px; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--ink-3); font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; justify-content: space-between; align-items: center; }
.foot .by { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.foot .by img { height: 18px; width: auto; }
.foot nav { display: flex; gap: 18px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

@media (max-width: 860px) {
  .apps, .bites { grid-template-columns: 1fr 1fr; }
  .tool, .who { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 18px; }
  .top .wrap { min-height: 58px; gap: 10px; }
  .logo img { height: 18px; }
  section { scroll-margin-top: 66px; }
  .nav { gap: 14px; }
  .nav a { font-size: 14px; }
  .nav .btn { padding: 7px 12px; font-size: 14px; }
  .apps, .bites { grid-template-columns: 1fr; }
  section { padding: 44px 0; }
  .hero { padding: 40px 0 36px; }
  .lead { font-size: 17px; }
}
