/* ============ ColPat — NEO BRUTALISM theme ============ */
:root {
  --paper: #fdf3df;
  --ink: #111111;
  --text: #111111;
  --muted: #4a4a4a;

  --yellow: #ffd93d;
  --pink: #ff7aad;
  --hot: #ff4d6d;
  --cyan: #7ce0ff;
  --lime: #c9ff6e;
  --green: #6ee7a0;
  --purple: #c9a7ff;
  --orange: #ff9f45;
  --white: #ffffff;

  --bw: 3px;              /* default border weight */
  --sh: 5px 5px 0 var(--ink);
  --sh-lg: 8px 8px 0 var(--ink);
  --sh-press: 2px 2px 0 var(--ink);
  --radius: 0px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--paper);
  background-image: radial-gradient(rgba(0,0,0,0.10) 1.5px, transparent 1.6px);
  background-size: 24px 24px;
  color: var(--text);
  font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  font-weight: 500;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; cursor: pointer; }

.page { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* shared brutalist primitives */
.bx { border: var(--bw) solid var(--ink); box-shadow: var(--sh); }

/* ============ Navbar ============ */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 28px; max-width: 1280px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand .donut { width: 28px; height: 28px; animation: spin 12s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.brand .name {
  font-family: "Archivo Black", sans-serif;
  font-size: 26px; color: var(--ink); letter-spacing: 0.5px;
}
.brand .name b { color: var(--hot); }

.btn-github {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--yellow); color: var(--ink);
  font-weight: 700; font-size: 15px;
  padding: 10px 18px;
  border: var(--bw) solid var(--ink);
  box-shadow: var(--sh);
  transition: transform .1s ease, box-shadow .1s ease;
}
.btn-github:hover { transform: translate(2px, 2px); box-shadow: var(--sh-press); }
.btn-github:active { transform: translate(5px, 5px); box-shadow: none; }
.btn-github svg { width: 19px; height: 19px; }

/* ============ Hero ============ */
.hero {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  gap: 44px; max-width: 1280px; margin: 0 auto; padding: 30px 28px 80px;
}
.hero-words { display: flex; flex-direction: column; line-height: 0.92; }
.hero-words span {
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(64px, 9.2vw, 124px);
  letter-spacing: 1px;
  -webkit-text-stroke: 2px var(--ink);
}
.hero-words .w1 { color: var(--hot);    text-shadow: 6px 6px 0 var(--ink); }
.hero-words .w2 { color: var(--cyan);   text-shadow: 6px 6px 0 var(--ink); }
.hero-words .w3 { color: var(--lime);   text-shadow: 6px 6px 0 var(--ink); }

.btn-checknow {
  margin-top: 46px;
  background: var(--yellow); color: var(--ink);
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(24px, 3vw, 32px);
  padding: 20px 28px;
  width: min(440px, 100%);
  border: 4px solid var(--ink);
  box-shadow: var(--sh-lg);
  text-align: center;
  transition: transform .1s ease, box-shadow .1s ease;
}
.btn-checknow:hover { transform: translate(3px, 3px); box-shadow: 4px 4px 0 var(--ink); }
.btn-checknow:active { transform: translate(8px, 8px); box-shadow: none; }
.btn-checknow .bang { color: var(--hot); margin-left: 4px; -webkit-text-stroke: 1.5px var(--ink); }

.mosaic {
  display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px;
  background: var(--ink);
  border: 4px solid var(--ink);
  box-shadow: var(--sh-lg);
  aspect-ratio: 9/7;
  overflow: hidden;
}
.mosaic div { transition: background-color 1.1s ease, transform .2s ease; }
.mosaic div:hover { transform: scale(1.25); z-index: 2; outline: 3px solid var(--ink); }

/* ============ Section shells ============ */
.shell {
  background: var(--white);
  border: 4px solid var(--ink);
  box-shadow: var(--sh-lg);
  max-width: 1100px; margin: 60px auto;
  padding: 22px 26px 0; position: relative;
}
.shell .mini-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.shell .mini-brand .donut { width: 18px; height: 18px; }
.shell .mini-brand .name { font-family: "Archivo Black", sans-serif; font-size: 15px; color: var(--ink); }

.letterhead {
  display: block; text-align: center;
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(30px, 6vw, 64px);
  color: var(--yellow);
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 4px 4px 0 var(--ink);
  letter-spacing: 4px; white-space: nowrap;
  margin-top: 36px; margin-bottom: -14px; line-height: 1;
  cursor: pointer; user-select: none;
}
.letterhead span { display: inline-block; transition: transform .2s ease; }
.letterhead:hover span { animation: wave 1s ease infinite; }
.letterhead span:nth-child(2n) { animation-delay: .1s; }
.letterhead span:nth-child(3n) { animation-delay: .22s; }
@keyframes wave { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ============ Generic tool layout ============ */
.tool { padding: 28px 10px 42px; text-align: center; }
.tool h2 {
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(26px, 4vw, 34px); color: var(--ink);
  margin-bottom: 14px; letter-spacing: 0.5px;
}
.tool .sub { color: var(--muted); font-size: 15px; font-weight: 600; margin-bottom: 34px; }
.page-tool { padding-top: 40px; min-height: calc(100vh - 320px); }

/* brutalist buttons */
.pill {
  display: inline-flex; align-items: center; gap: 9px;
  border: var(--bw) solid var(--ink);
  box-shadow: var(--sh);
  font-weight: 700; font-size: 15px; color: var(--ink);
  padding: 12px 24px;
  transition: transform .1s ease, box-shadow .1s ease;
}
.pill:hover { transform: translate(2px, 2px); box-shadow: var(--sh-press); }
.pill:active { transform: translate(5px, 5px); box-shadow: none; }
.pill svg { width: 18px; height: 18px; }
.pill.mint { background: var(--lime); }
.pill.blue { background: var(--cyan); }
.pill.green { background: var(--green); }
.pill.dark { background: var(--ink); color: var(--white); }
.pill.dark svg { stroke: var(--white); }

/* ============ Tailwind generator ============ */
.tpg-row {
  display: flex; justify-content: center; gap: clamp(18px, 5vw, 60px);
  flex-wrap: wrap; margin-bottom: 40px;
}
.tpg-slot { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.tpg-slot .circle {
  width: 62px; height: 62px; border-radius: 50%;
  cursor: pointer; border: var(--bw) solid var(--ink);
  box-shadow: var(--sh);
  transition: transform .1s ease, box-shadow .1s ease;
}
.tpg-slot .circle:hover { transform: translate(2px, 2px); box-shadow: var(--sh-press); }
.tpg-slot input[type="color"] { width: 0; height: 0; opacity: 0; border: 0; padding: 0; position: absolute; }
.tpg-slot .hex { font-family: "Space Mono", monospace; font-size: 13px; color: var(--ink); font-weight: 700; }
.tpg-slot .role { font-family: "Archivo Black", sans-serif; font-size: 14px; color: var(--ink); }
.btn-checkname {
  background: var(--white); color: var(--ink);
  font-size: 12px; font-weight: 700;
  padding: 5px 12px; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  transition: transform .1s ease, box-shadow .1s ease;
}
.btn-checkname:hover { transform: translate(1.5px, 1.5px); box-shadow: 1.5px 1.5px 0 var(--ink); }

.tw-toggle {
  display: flex; align-items: center; gap: 10px; justify-content: flex-end;
  max-width: 760px; margin: 28px auto 0; color: var(--muted); font-size: 13px; font-weight: 700;
}
.tw-toggle .seg { background: var(--white); border: 2px solid var(--ink); padding: 3px; display: inline-flex; box-shadow: 3px 3px 0 var(--ink); }
.tw-toggle .seg button { background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; padding: 5px 14px; transition: all .12s ease; }
.tw-toggle .seg button.on { background: var(--ink); color: var(--white); }

.codeblock {
  text-align: left; background: #141414; color: #d8d6e6;
  border: var(--bw) solid var(--ink); box-shadow: var(--sh-lg);
  padding: 20px 24px; max-width: 760px; margin: 28px auto 0;
  font-family: "Space Mono", Consolas, monospace;
  font-size: 13px; line-height: 1.55; max-height: 420px; overflow: auto; white-space: pre;
}
.codeblock .k { color: #7ec3e6; }
.codeblock .s { color: #ffb27a; }
.codeblock .p { color: #9a97b0; }

/* ============ Trending ============ */
.trend-list { display: flex; flex-direction: column; gap: 28px; align-items: center; }
.trend-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; }
.trend-row .idx { font-family: "Archivo Black", sans-serif; color: var(--ink); width: 32px; text-align: right; }
.trend-swatches { display: flex; gap: 0; border: var(--bw) solid var(--ink); box-shadow: var(--sh); }
.swatch {
  width: 58px; height: 58px; cursor: pointer; position: relative;
  transition: transform .12s ease;
}
.swatch + .swatch { border-left: var(--bw) solid var(--ink); }
.swatch:hover { transform: scale(1.2); z-index: 3; outline: var(--bw) solid var(--ink); box-shadow: var(--sh); }
.swatch::after {
  content: attr(data-name);
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%) scale(.85);
  background: var(--ink); color: var(--white); font-family: "Space Mono", monospace;
  font-size: 11px; font-weight: 700; padding: 4px 9px; border: 2px solid var(--ink); white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .12s ease, transform .12s ease;
}
.swatch:hover::after { opacity: 1; transform: translateX(-50%) scale(1); }

/* ============ Gradients ============ */
.grad-box {
  width: min(680px, 92%); height: 250px; margin: 0 auto 36px;
  border: 4px solid var(--ink); box-shadow: var(--sh-lg);
  transition: background .35s ease;
}
.grad-actions { display: flex; justify-content: center; gap: clamp(28px, 12vw, 160px); flex-wrap: wrap; }

/* ============ Palette from image ============ */
.pfi-img {
  max-width: min(420px, 90%); max-height: 300px; border-radius: 0;
  border: var(--bw) solid var(--ink); box-shadow: var(--sh-lg);
  margin: 18px auto 32px; display: none;
}
.pfi-cols { display: flex; justify-content: center; gap: 64px; flex-wrap: wrap; }
.pfi-col h3 { font-family: "Archivo Black", sans-serif; font-size: 17px; margin-bottom: 5px; }
.pfi-col .hint { color: var(--muted); font-size: 12.5px; font-weight: 600; margin-bottom: 16px; }
.pfi-col .trend-swatches { justify-content: center; }

/* ============ Palette from color ============ */
.pfc-big {
  width: 96px; height: 96px; border-radius: 50%;
  margin: 8px auto 14px; cursor: pointer;
  border: 4px solid var(--ink); box-shadow: var(--sh-lg);
  transition: transform .1s ease, box-shadow .1s ease;
}
.pfc-big:hover { transform: translate(3px, 3px); box-shadow: 4px 4px 0 var(--ink); }
.pfc-out { margin-top: 40px; }

/* ============ What color says ============ */
.says-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 26px; max-width: 940px; margin: 0 auto; text-align: left; }
.says-card .chip {
  height: 88px; display: flex; align-items: center; justify-content: center;
  font-family: "Archivo Black", sans-serif; font-size: 22px;
  border: var(--bw) solid var(--ink); box-shadow: var(--sh); margin-bottom: 16px;
}
.says-card .row { display: flex; gap: 10px; margin-bottom: 10px; align-items: flex-start; }
.says-card .sign {
  flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; margin-top: 1px; border: 2px solid var(--ink);
}
.says-card .sign.plus { background: var(--green); color: var(--ink); }
.says-card .sign.minus { background: var(--hot); color: var(--ink); }
.says-card .row p { font-size: 13.5px; color: var(--ink); font-weight: 600; line-height: 1.45; }

/* ============ Feature cards ============ */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 940px; margin: 80px auto 30px; padding: 0 24px; }
.fcard {
  color: var(--ink); font-family: "Archivo Black", sans-serif; font-size: 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 16px; padding: 26px 16px; min-height: 96px;
  border: 4px solid var(--ink); box-shadow: var(--sh-lg);
  transition: transform .12s ease, box-shadow .12s ease;
}
.fcard:hover { transform: translate(-3px, -3px); box-shadow: 11px 11px 0 var(--ink); }
.fcard:active { transform: translate(4px, 4px); box-shadow: 4px 4px 0 var(--ink); }
.fcard.tall { min-height: 172px; }
.fcard svg { width: 58px; height: 58px; }

/* ============ Footer ============ */
footer { text-align: center; padding: 70px 20px 80px; }
.socials { display: flex; justify-content: center; gap: 16px; margin-bottom: 24px; }
.socials a {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink); background: var(--white);
  border: var(--bw) solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  transition: transform .1s ease, box-shadow .1s ease;
}
.socials a:nth-child(1) { background: var(--cyan); }
.socials a:nth-child(2) { background: var(--lime); }
.socials a:nth-child(3) { background: var(--yellow); }
.socials a:nth-child(4) { background: var(--pink); }
.socials a:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.socials svg { width: 19px; height: 19px; }
footer .mail { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14.5px; font-weight: 700; margin-bottom: 12px; }
footer .crafted { color: var(--muted); font-size: 13.5px; font-weight: 600; margin-bottom: 60px; }

.footer-big {
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(44px, 7vw, 72px);
  color: var(--yellow); -webkit-text-stroke: 2px var(--ink);
  text-shadow: 6px 6px 0 var(--ink);
  letter-spacing: 3px; display: inline-block;
  transition: transform .15s ease;
}
.footer-big:hover { transform: translate(-2px, -2px); }
.footer-tag {
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(22px, 3.2vw, 32px); color: var(--ink);
  margin-top: 14px; transform: rotate(-2deg);
  background: var(--lime); display: inline-block; padding: 6px 16px;
  border: var(--bw) solid var(--ink); box-shadow: var(--sh);
  animation: tagfloat 5s ease-in-out infinite;
}
@keyframes tagfloat {
  0%,100% { transform: rotate(-2deg) translateY(0); }
  50% { transform: rotate(1.5deg) translateY(-6px); }
}

/* ============ Toasts ============ */
#toasts { position: fixed; top: 16px; right: 16px; z-index: 999; display: flex; flex-direction: column; gap: 12px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  min-width: 230px; max-width: 340px; padding: 14px 16px;
  border: var(--bw) solid var(--ink); box-shadow: var(--sh);
  font-weight: 700; font-size: 14px; color: var(--ink);
  animation: slidein .2s ease; position: relative;
}
@keyframes slidein { from { transform: translate(40px, 0); opacity: 0; } to { transform: none; opacity: 1; } }
.toast.success { background: var(--lime); }
.toast.info { background: var(--cyan); }
.toast .ticon {
  width: 22px; height: 22px; flex: 0 0 22px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--white); background: var(--ink); border: 2px solid var(--ink);
}
.toast .x { position: absolute; top: 5px; right: 8px; background: none; color: var(--ink); font-size: 13px; font-weight: 900; }

/* ============ Responsive ============ */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding: 24px 22px 44px; }
  .says-grid, .cards { grid-template-columns: repeat(2, 1fr); }
  .letterhead { letter-spacing: 2px; font-size: clamp(26px, 6.4vw, 56px); }
  .cards { margin-top: 56px; }
}

@media (max-width: 600px) {
  /* lighter shadows so big offsets never push past the viewport */
  :root { --sh: 4px 4px 0 var(--ink); --sh-lg: 5px 5px 0 var(--ink); }

  .nav { padding: 16px 16px; }
  .brand .name { font-size: 22px; }
  .btn-github { font-size: 14px; padding: 9px 14px; }

  .hero { padding: 16px 16px 40px; gap: 30px; }
  .hero-words span {
    font-size: clamp(46px, 15vw, 92px);
    -webkit-text-stroke: 1.5px var(--ink);
    text-shadow: 4px 4px 0 var(--ink);
  }
  .btn-checknow { margin-top: 30px; font-size: 22px; padding: 16px 18px; box-shadow: 5px 5px 0 var(--ink); }

  .shell { margin: 40px 14px; padding: 18px 16px 0; border-width: 3px; }
  .says-grid, .cards { grid-template-columns: 1fr; }
  .cards { padding: 0 16px; gap: 22px; }
  .pfi-cols { gap: 30px; }

  .tool { padding: 22px 4px 34px; }
  .tool h2 { font-size: clamp(22px, 6vw, 30px); }
  .tool .sub { font-size: 13.5px; }

  /* letterheads must fit one line on phones */
  .letterhead {
    font-size: clamp(15px, 6vw, 34px);
    letter-spacing: 0.5px;
    -webkit-text-stroke: 1.4px var(--ink);
    text-shadow: 3px 3px 0 var(--ink);
    margin-top: 28px; margin-bottom: -10px;
  }

  .tpg-row { gap: 22px 26px; }
  .tpg-slot .circle { width: 54px; height: 54px; }

  .trend-row { gap: 14px; }
  .trend-row .idx { width: auto; }
  .swatch { width: 46px; height: 46px; }
  .shades-btn { font-size: 13px; padding: 10px 16px; }

  .grad-box { height: 200px; }
  .grad-actions { gap: 22px; }

  .says-card .chip { height: 76px; font-size: 20px; }

  .footer-big { text-shadow: 4px 4px 0 var(--ink); letter-spacing: 1px; }
  footer { padding: 56px 16px 64px; }

  #toasts { left: 12px; right: 12px; top: 12px; }
  .toast { min-width: 0; max-width: none; width: 100%; }
}

@media (max-width: 380px) {
  .hero-words span { font-size: clamp(42px, 14vw, 64px); }
  .letterhead { font-size: clamp(13px, 5.6vw, 30px); }
  .swatch { width: 42px; height: 42px; }
}
