/* ============================================
   Early Wireframes — hand-drawn "notebook" system
   Ink-on-paper sketches with handwritten annotations.
   Loaded after case-study.css.
   ============================================ */

:root {
  --wf-paper: #f3efe4;
  --wf-paper-2: #ebe6d8;
  --wf-ink: #2a2b31;
  --wf-ink-soft: #6f6e69;
  --wf-line: #cfc9b8;
  --wf-line-2: #ddd7c7;
  --wf-accent: #7c5cff;
  --wf-rough: 255px 14px 235px 14px / 14px 235px 14px 255px;
  --wf-rough-2: 14px 235px 14px 255px / 235px 14px 255px 14px;
}

/* ---- Section frame ---- */
.cs-wireframes .wf-lead {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 680px;
  line-height: 1.7;
  margin-top: -8px;
}
.cs-wireframes .wf-lead strong { color: var(--text); font-weight: 600; }

.wf-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 24px;
  margin-top: 48px;
}

/* ---- Paper sheet ---- */
.wf-item { display: flex; flex-direction: column; }
.wf-sheet {
  position: relative;
  flex: 1;
  background-color: var(--wf-paper);
  background-image:
    radial-gradient(circle, rgba(42, 43, 49, 0.10) 1px, transparent 1.4px);
  background-size: 17px 17px;
  background-position: 9px 11px;
  border-radius: 8px;
  padding: 34px 26px 30px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.5) inset,
    0 18px 36px -18px rgba(0,0,0,0.65),
    0 2px 6px rgba(0,0,0,0.3);
  overflow: hidden;
  min-height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wf-item:nth-child(2) .wf-sheet { transform: rotate(-0.6deg); }
.wf-item:nth-child(3) .wf-sheet { transform: rotate(0.5deg); }
/* dog-eared corner */
.wf-sheet::after {
  content: '';
  position: absolute;
  right: 0; bottom: 0;
  border-width: 0 0 20px 20px;
  border-style: solid;
  border-color: transparent transparent var(--wf-paper-2) transparent;
  filter: drop-shadow(-1px -1px 1px rgba(0,0,0,0.12));
}

/* ---- Caption ---- */
.wf-cap {
  margin-top: 18px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.wf-cap .n {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  font-weight: 500;
}
.wf-cap .t {
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 500;
}

/* ============================================
   ANNOTATIONS (handwritten notes + arrows)
   ============================================ */
.wf-note {
  position: absolute;
  font-family: 'Caveat', cursive;
  font-size: 19px;
  line-height: 1.05;
  color: var(--wf-accent);
  z-index: 5;
  max-width: 120px;
  text-align: center;
  transform: rotate(-4deg);
  pointer-events: none;
}
.wf-note.ink { color: #c0392b; }
.wf-note.dark { color: #2a2b31; }
.wf-note.r { transform: rotate(3deg); }
.wf-note.flat { transform: rotate(-1deg); }

/* curved arrow drawn with svg, positioned absolutely */
.wf-arrow {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  overflow: visible;
}
.wf-arrow path,
.wf-arrow line { stroke: var(--wf-accent); stroke-width: 2; fill: none; stroke-linecap: round; }
.wf-arrow.ink path,
.wf-arrow.ink line { stroke: #c0392b; }
.wf-arrow polygon { fill: var(--wf-accent); }
.wf-arrow.ink polygon { fill: #c0392b; }

/* circle-highlight around an element */
.wf-ring {
  position: absolute;
  border: 2.4px solid #c0392b;
  border-radius: 60% 40% 55% 45% / 45% 55% 45% 55%;
  z-index: 4;
  pointer-events: none;
}

/* ============================================
   DEVICE FRAMES (drawn in ink on the sheet)
   ============================================ */
.wf-device {
  position: relative;
  background: #fbfaf6;
  border: 2px solid var(--wf-ink);
  z-index: 2;
}

/* phone */
.wf-device.phone {
  width: 150px;
  aspect-ratio: 9 / 18.5;
  border-radius: 20px;
  border-width: 2.5px;
  padding: 16px 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wf-device.phone::before {
  content: '';
  position: absolute;
  top: 7px; left: 50%;
  transform: translateX(-50%);
  width: 38px; height: 5px;
  border-radius: 3px;
  background: var(--wf-ink);
}

/* browser / desktop */
.wf-device.browser {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 4 / 3.2;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.wf-device.browser .wf-chrome {
  height: 22px;
  border-bottom: 2px solid var(--wf-ink);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  flex: none;
}
.wf-device.browser .wf-chrome i {
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--wf-ink);
  display: block;
}
.wf-device.browser .wf-chrome .wf-url {
  margin-left: 6px;
  height: 8px;
  flex: 1;
  max-width: 130px;
  border: 1.5px solid var(--wf-line);
  border-radius: 4px;
}
.wf-device.browser .wf-app {
  flex: 1;
  display: flex;
  min-height: 0;
}
.wf-device.browser .wf-side {
  width: 48px;
  border-right: 2px solid var(--wf-ink);
  padding: 9px 7px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: none;
}
.wf-device.browser .wf-main {
  flex: 1;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

/* ============================================
   PRIMITIVES (sketch elements)
   ============================================ */
.wf-h {
  height: 9px;
  background: var(--wf-ink);
  border-radius: 2px;
  width: 60%;
}
.wf-h.sm { height: 7px; }
.wf-h.lg { height: 12px; }
.wf-h.w40 { width: 40%; }
.wf-h.w80 { width: 80%; }

.wf-l {
  height: 5px;
  background: var(--wf-line);
  border-radius: 3px;
  width: 100%;
}
.wf-l.s { width: 55%; }
.wf-l.m { width: 75%; }

.wf-lines { display: flex; flex-direction: column; gap: 5px; }

.wf-input {
  height: 22px;
  border: 1.8px solid var(--wf-ink-soft);
  border-radius: var(--wf-rough);
  display: flex;
  align-items: center;
  padding: 0 8px;
  flex: none;
}
.wf-input::before {
  content: '';
  height: 4px; width: 45%;
  background: var(--wf-line);
  border-radius: 3px;
}

.wf-btn {
  height: 24px;
  background: var(--wf-ink);
  border-radius: var(--wf-rough-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.wf-btn::before {
  content: '';
  height: 5px; width: 44%;
  background: var(--wf-paper);
  border-radius: 3px;
  opacity: 0.85;
}
.wf-btn.ghost { background: transparent; border: 1.8px solid var(--wf-ink); }
.wf-btn.ghost::before { background: var(--wf-ink); }

.wf-box {
  border: 1.8px solid var(--wf-ink-soft);
  border-radius: var(--wf-rough);
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wf-box.alt { border-radius: var(--wf-rough-2); }
.wf-box.fill { background: var(--wf-paper-2); }

.wf-row2 { display: flex; gap: 7px; }
.wf-row2 > * { flex: 1; }
.wf-grow { flex: 1; }

.wf-circle {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.8px solid var(--wf-ink);
  flex: none;
}
.wf-circle.fill { background: var(--wf-ink); }
.wf-circle.sm { width: 11px; height: 11px; }
.wf-circle.lg { width: 26px; height: 26px; }

.wf-ic {
  width: 16px; height: 16px;
  border: 1.8px solid var(--wf-ink);
  border-radius: 4px;
  flex: none;
}
.wf-ic.fill { background: var(--wf-ink); }

.wf-chip {
  height: 16px;
  border: 1.6px solid var(--wf-ink-soft);
  border-radius: 20px;
  min-width: 34px;
  flex: none;
}
.wf-chip.fill { background: var(--wf-ink); border-color: var(--wf-ink); }

.wf-tabs {
  margin-top: auto;
  border-top: 2px solid var(--wf-ink);
  padding-top: 8px;
  display: flex;
  justify-content: space-around;
}
.wf-tabs .wf-circle { width: 13px; height: 13px; }

.wf-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 40px;
}
.wf-chart i {
  flex: 1;
  background: var(--wf-line);
  border-radius: 2px 2px 0 0;
  display: block;
}
.wf-chart i.k { background: var(--wf-ink); }

.wf-table { display: flex; flex-direction: column; gap: 0; }
.wf-table .tr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1.4px solid var(--wf-line-2);
}
.wf-table .tr:last-child { border-bottom: 0; }
.wf-table .tr .wf-l { height: 4px; }

.wf-div { height: 0; border-top: 1.6px dashed var(--wf-line); margin: 2px 0; }
.wf-sp { flex: 1; }

.wf-check {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 2.5px solid var(--wf-ink);
  position: relative;
  margin: 4px auto;
  flex: none;
}
.wf-check::before {
  content: '';
  position: absolute;
  left: 13px; top: 22px;
  width: 9px; height: 17px;
  border: solid var(--wf-ink);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(43deg);
}

/* ---- responsive ---- */
@media (max-width: 880px) {
  .wf-row { grid-template-columns: 1fr; max-width: 360px; margin-inline: auto; }
  .wf-item:nth-child(n) .wf-sheet { transform: none; }
}
