/* Patch — the felted tradesperson. Shared by index.html and brand.html. */
@import url("https://fonts.googleapis.com/css2?family=Gabarito:wght@500..900&family=Rethink+Sans:ital,wght@0,400..700;1,400..600&display=swap");

:root {
  --white: #ffffff;
  --ink: #24211f;
  --ink-2: #57524c;
  --cobalt: #2440c4;
  --cobalt-deep: #172b8f;
  --cobalt-ink: #0f1c63;
  --cobalt-wash: #eef1fd;
  --mustard: #d6a024;
  --mustard-wash: #fbf1d6;
  --tomato: #d8452f;
  --pink: #f6d3d8;
  --thread: var(--cobalt);
  --line: rgba(36, 33, 31, 0.14);

  --display: "Gabarito", "Rethink Sans", system-ui, sans-serif;
  --text: "Rethink Sans", system-ui, -apple-system, sans-serif;

  --felt: url("../../assets/generated/02-patch-wool/web/felt-grain.webp");
  --wrap: 1280px;
  --gutter: clamp(20px, 5vw, 64px);
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
  --shadow: 0 14px 34px -14px rgba(36, 33, 31, 0.24), 0 3px 8px -4px rgba(36, 33, 31, 0.16);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 18px/1.55 var(--text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--mustard); color: var(--ink); }

img, video, svg { display: block; max-width: 100%; }

a { color: var(--cobalt); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { color: var(--cobalt-deep); }

/* Focus is a stitch, like everything else that joins things up. */
:focus-visible {
  outline: 3px dashed var(--cobalt);
  outline-offset: 4px;
  border-radius: 6px;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
  text-wrap: balance;
  color: var(--ink);
}
h2 { font-size: clamp(38px, 5.4vw, 76px); }
h3 { font-size: clamp(24px, 2.2vw, 30px); letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; text-wrap: pretty; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Wordmark ---------- */
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font: 900 30px/1 var(--display); letter-spacing: -0.04em;
}
.wordmark svg { width: 38px; height: 38px; flex: none; }
.wordmark b { font-weight: inherit; }
.wordmark span { color: var(--cobalt); }
.wordmark:hover { color: var(--ink); }

/* ---------- Felt-patch buttons: felt fibres + a stitched inner edge ---------- */
.btn {
  --bg: var(--cobalt);
  --fg: #fff;
  --stitch: rgba(255, 255, 255, 0.78);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px;
  padding: 15px 28px 16px;
  border: 0; border-radius: 16px;
  background: var(--felt) center / 440px, var(--bg);
  background-blend-mode: soft-light, normal;
  color: var(--fg);
  font: 700 18px/1 var(--display); letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 22px -12px rgba(36, 33, 31, 0.5), inset 0 -3px 0 rgba(0, 0, 0, 0.12);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), background-color 0.2s;
}
.btn::after {
  content: "";
  position: absolute; inset: 5px;
  border: 2px dashed var(--stitch);
  border-radius: 11px;
  pointer-events: none;
}
.btn svg { width: 20px; height: 20px; }
.btn:hover { color: var(--fg); transform: translateY(-2px); box-shadow: 0 16px 28px -14px rgba(36, 33, 31, 0.55), inset 0 -3px 0 rgba(0, 0, 0, 0.12); }
.btn:active { transform: translateY(1px); box-shadow: 0 6px 12px -8px rgba(36, 33, 31, 0.55), inset 0 2px 0 rgba(0, 0, 0, 0.12); }
.btn:focus-visible { outline-offset: 5px; }
.btn--mustard { --bg: var(--mustard); --fg: var(--ink); --stitch: rgba(36, 33, 31, 0.6); box-shadow: 0 10px 22px -12px rgba(36, 33, 31, 0.6), inset 0 -3px 0 rgba(0, 0, 0, 0.1); }
.btn--mustard:hover { color: var(--ink); }
.btn--small { min-height: 46px; padding: 11px 20px 12px; font-size: 16px; }
.btn--small::after { inset: 4px; border-radius: 10px; }
.btn[disabled] { --bg: #b9b5b0; cursor: not-allowed; transform: none; box-shadow: none; }

.link-stitch {
  color: var(--ink); font-weight: 600;
  text-decoration: underline dashed var(--cobalt) 2px; text-underline-offset: 6px;
}
.link-stitch:hover { color: var(--cobalt); }

/* ---------- Labels ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 5px;
  border-radius: 999px;
  font: 600 12.5px/1.3 var(--text); letter-spacing: 0.01em;
  white-space: nowrap;
}
.chip--ill { background: #fff; color: var(--ink-2); border: 1.5px dashed rgba(36, 33, 31, 0.35); }
.chip--planned { background: var(--mustard-wash); color: #6b4c05; border: 1.5px dashed var(--mustard); }
.chip--addon { background: #fff; color: var(--cobalt-deep); border: 1.5px dashed rgba(36, 64, 196, 0.55); }
.chip--live { background: #e3f3e8; color: #1c5b33; }
.chip--wait { background: #fff4dc; color: #6b4c05; }

/* ---------- Cards that look sewn on ---------- */
.card {
  position: relative;
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}
.card::before {
  content: "";
  position: absolute; inset: 6px;
  border: 1.5px dashed rgba(36, 64, 196, 0.3);
  border-radius: 13px;
  pointer-events: none;
}

/* ---------- Inputs (brand board + future form) ---------- */
.field { display: grid; gap: 8px; }
.field label { font: 700 16px/1.2 var(--display); }
.field input {
  min-height: 54px; padding: 12px 16px;
  border: 2px solid rgba(36, 33, 31, 0.22); border-radius: 14px;
  font: 400 18px/1.3 var(--text); color: var(--ink); background: #fff;
}
.field input::placeholder { color: #736d66; }
.field input:focus-visible { outline: 3px dashed var(--cobalt); outline-offset: 3px; border-color: var(--cobalt); }
.field .hint { font-size: 14px; color: var(--ink-2); }
.field--error input { border-color: var(--tomato); }
.field--error .hint { color: #a3301f; }

/* ---------- Review layer adjustments ---------- */
html.ide-clean body { padding-bottom: 0; }
