/* ==========================================================================
   Reusable components: buttons, tags, labels, cards, icons, brush photos
   ========================================================================== */

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.55em 1.5em;
  border: 0;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.1em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.btn--orange {
  background: var(--color-orange);
  color: var(--color-white);
}

/* Orange button with dark text (e.g. "Explore more projects") */
.btn--ink {
  color: var(--color-black);
}

/* ---------- Tags (small pill links inside cards) ---------- */

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6rem;
  padding: 0.2em 0.9em;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: filter 0.15s ease;
}

.tag:hover {
  filter: brightness(1.12);
}

.tag--orange {
  background: var(--color-orange);
  color: var(--color-black);
}

.tag--outline {
  min-width: 13.5rem;
  border-color: var(--color-black);
  border-radius: 999px;
  background: var(--color-white);
  color: var(--color-black);
}

.tag--dark {
  min-width: 7rem;
  background: var(--color-black);
  color: var(--color-white);
}

/* ---------- Label (small mint pill above headings) ---------- */

.label {
  display: inline-block;
  padding: 0.1em 1.3em;
  border-radius: 6px;
  background: var(--color-mint);
  color: var(--color-ink);
  font-size: 0.875rem;
  font-weight: 700;
}

/* ---------- Cards ---------- */

.card {
  padding: clamp(1.25rem, 2.4vw, 1.75rem);
  border-radius: var(--radius);
  font-size: 1.0625rem;
  line-height: 1.4;
}

.card--white { background: var(--color-white); color: var(--color-ink); }
.card--grey { background: var(--color-grey); color: var(--color-ink); }
.card--mint { background: var(--color-mint); color: var(--color-black); }
.card--navy { background: var(--color-navy); color: var(--color-white); }

.card__title {
  font-family: var(--font-body);
  font-size: inherit;
  font-weight: 700;
  line-height: 1.4;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 1.5rem;
}

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Icons (SVG masks, so they take the current text colour) ---------- */

.icon {
  display: inline-block;
  flex-shrink: 0;
  width: 1.25em;
  height: 1.25em;
  background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
          mask: var(--icon) center / contain no-repeat;
}

.icon--arrow {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h18M15 6l6 6-6 6'/%3E%3C/svg%3E");
}

.icon--arrow-bold {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E");
}

.icon--search {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='13.5' cy='10.5' r='7'/%3E%3Cpath d='M8.5 15.5 3.5 20.5'/%3E%3C/svg%3E");
}

.icon--chevron {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8.5l7 7 7-7'/%3E%3C/svg%3E");
}

/* Arrow inside a soft circle (used in the Updates list) */
.icon-circle {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 65% 40%, var(--color-white) 45%, #dfe3f4 100%);
  box-shadow: -2px 1px 4px rgb(51 55 148 / 0.18);
  color: var(--color-black);
  font-size: 0.85rem;
}

/* ---------- Brush photo (photo cropped by the brush shape) ---------- */

.brush-photo {
  position: absolute;
  pointer-events: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  -webkit-mask: var(--brush-mask) 0 0 / 100% 100% no-repeat;
          mask: var(--brush-mask) 0 0 / 100% 100% no-repeat;
}

/* Each photo has a gradient underneath that shows until the image is added */
.brush-photo--hills {
  background-position: left top;
  background-image:
    url("../assets/images/hills.jpg"),
    linear-gradient(165deg, #f6e8bd 0%, #d6bd6a 35%, #8c8a34 65%, #59661f 100%);
}

.brush-photo--terraces {
  background-image:
    url("../assets/images/rice-terraces.jpg"),
    linear-gradient(160deg, #b9d0e4 0%, #6d9a64 35%, #b7b444 70%, #d7c45a 100%);
}
