/* ─── UI kit — the journal's shared pieces ───────────────────────────────────
   Handwritten notes, eyebrows, section heads, pill buttons, passport stamps,
   taped polaroids, fact rows, form fields, note cards.
   ────────────────────────────────────────────────────────────────────────── */

.hand {
  font-family: var(--hand-font);
  font-weight: 500;
  line-height: 1.15;
}

.eyebrow {
  display: inline-block;
  font: 700 12px/1.2 var(--text-font);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  text-decoration: none;
}

/* Ink colours (stamps, eyebrows, numbers) */
.ink--saffron { color: var(--saffron-dark); }
.ink--green   { color: var(--ink-green); }
.ink--teal    { color: var(--ink-teal); }
.ink--indigo  { color: var(--ink-indigo); }
.ink--ocean   { color: var(--ink-ocean); }
.ink--primary { color: var(--red); }

/* ─── Section heading ────────────────────────────────────────────────────── */

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 24px;
  margin-bottom: 32px;

  @media (min-width: 992px) {
    margin-bottom: 40px;
  }
}

.section-head__main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 680px;
}

.section-head--center {
  justify-content: center;
  text-align: center;

  .section-head__main {
    align-items: center;
    max-width: 780px;
  }
}

.section-title {
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.04;
}

.section-head__text {
  color: var(--muted);
  line-height: 1.6;
}

.section-head__note {
  font-size: 24px;
  color: var(--red);
  transform: rotate(-2deg);
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: 600 15px/1.1 var(--text-font);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--hover-duration) var(--timing), color var(--hover-duration) var(--timing), border-color var(--hover-duration) var(--timing), transform var(--hover-duration) var(--timing);

  svg {
    flex-shrink: 0;
    transition: transform var(--hover-duration) var(--timing);
  }

  &:hover svg {
    transform: translateX(3px);
  }

  &:disabled,
  &.is-busy {
    opacity: 0.6;
    cursor: progress;
  }
}

.btn--main {
  background: var(--saffron);
  border-color: var(--saffron);
  color: var(--ink);

  &:hover {
    background: var(--saffron-hover);
    border-color: var(--saffron-hover);
    color: var(--ink);
  }
}

.btn--line {
  &:hover {
    background: var(--ink);
    color: var(--paper);
  }
}

.btn--light {
  border-color: var(--on-deep);
  color: var(--on-deep);

  &:hover {
    background: var(--on-deep);
    color: var(--deep);
  }
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-row--center {
  justify-content: center;
}

/* ─── Pills (tabs, toggles, quiz answers) ────────────────────────────────── */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  font: 600 14px/1.2 var(--text-font);
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--hover-duration) var(--timing), background var(--hover-duration) var(--timing), color var(--hover-duration) var(--timing);

  &:hover {
    border-color: var(--ink);
    color: var(--ink);
  }

  &.is-on,
  &[aria-selected="true"],
  &[aria-pressed="true"] {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
  }
}

/* Pill wrapping a real radio input (quiz, apply form). */
.pill--radio {
  position: relative;

  input {
    position: absolute;
    opacity: 0;
    inset: 0;
    margin: 0;
    cursor: pointer;
  }

  &:has(input:focus-visible) {
    outline: 2px solid var(--saffron);
    outline-offset: 2px;
  }

  &:has(input:checked) {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
  }
}

/* ─── Passport stamp ─────────────────────────────────────────────────────── */

.stamp {
  --size: 96px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: var(--size);
  height: var(--size);
  padding: 8px;
  border: 3px double currentColor;
  border-radius: 50%;
  font: 700 11px/1.2 var(--text-font);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  opacity: 0.92;
  background: color-mix(in srgb, var(--surface-color) 80%, transparent);
  flex-shrink: 0;
}

.stamp__small {
  display: block;
  font-size: 9px;
  letter-spacing: 0.06em;
}

.stamp--saffron { color: var(--saffron-dark); }
.stamp--green   { color: var(--ink-green); }
.stamp--teal    { color: var(--ink-teal); }
.stamp--indigo  { color: var(--ink-indigo); }
.stamp--ocean   { color: var(--ink-ocean); }
.stamp--primary { color: var(--red); }

a.stamp {
  transition: transform var(--hover-duration) var(--timing);

  &:hover {
    transform: rotate(0deg) scale(1.05);
  }
}

/* ─── Polaroid ───────────────────────────────────────────────────────────── */

.polaroid {
  position: relative;
  margin: 0;
  padding: 12px 12px 44px;
  background: var(--card-white);
  box-shadow: var(--shadow-photo);
}

.polaroid__img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3.6;
  object-fit: cover;
}

.polaroid__img--empty {
  background: repeating-linear-gradient(45deg, var(--paper-alt) 0 12px, var(--card) 12px 24px);
}

.polaroid__tape {
  position: absolute;
  top: -12px;
  left: 50%;
  z-index: 1;
  width: 96px;
  height: 26px;
  margin-left: -48px;
  background: var(--tape);
  transform: rotate(-3deg);
}

.polaroid__cap {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 8px;
  font-size: 22px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Fact row (Length / Season / Price) ─────────────────────────────────── */

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 18px 0;
  border-top: 1px dashed var(--line-dash);
  border-bottom: 1px dashed var(--line-dash);

  dt {
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--muted);
  }

  dd {
    font-weight: 700;
    line-height: 1.3;
  }
}

.facts--strong dd {
  font-weight: 800;
}

/* ─── Fields ─────────────────────────────────────────────────────────────── */

.field {
  min-height: 48px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line-strong);
  background: var(--card-white);
  font: 500 15px var(--text-font);
  color: var(--ink);

  &:focus {
    outline: 2px solid var(--saffron);
    outline-offset: 1px;
  }
}

.ymr-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lbl {
  font: 600 14px/1.3 var(--text-font);
  color: var(--ink);
}

.lbl__opt {
  font-weight: 500;
  color: var(--muted);
}

.fieldbox {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong);
  background: var(--card-white);
  font: 500 15px/1.4 var(--text-font);
  color: var(--ink);

  &:focus {
    outline: 2px solid var(--saffron);
    outline-offset: 1px;
  }

  &[aria-invalid="true"] {
    border-color: var(--negative-color);
  }
}

select.fieldbox {
  appearance: none;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

textarea.fieldbox {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

.dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;

  &.is-on {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
  }
}

/* Honeypot */
.ymr-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ─── Cards ──────────────────────────────────────────────────────────────── */

.paper-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--card);

  p {
    font-size: 17px;
    line-height: 1.5;
  }
}

.paper-card__num,
.note-card__num {
  font-size: 36px;
  line-height: 1;
}

.note-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--card-white);
  box-shadow: var(--shadow-soft);

  &:nth-child(4n + 1) { transform: rotate(-0.6deg); }
  &:nth-child(4n + 2) { transform: rotate(0.8deg); }
  &:nth-child(4n + 3) { transform: rotate(-0.4deg); }
  &:nth-child(4n + 4) { transform: rotate(0.5deg); }
}

.note-card__title {
  font: 700 18px/1.3 var(--text-font);
}

.note-card__text {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.checklist {
  display: grid;
  gap: 6px;

  li {
    position: relative;
    padding-left: 22px;
    line-height: 1.6;

    &::before {
      content: "";
      position: absolute;
      left: 2px;
      top: 0.62em;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--saffron);
    }
  }
}

.checklist--muted li {
  color: var(--muted);

  &::before {
    background: transparent;
    border: 1.5px solid var(--line-strong);
  }
}
