/* ==========================================================================
   COMPONENTS
   Reusable building blocks: buttons, section headings, cards, forms,
   check lists and breadcrumbs.
   ========================================================================== */


/* ---------- Buttons ---------- */
/* Usage: <a class="btn btn--primary">  or  <a class="btn btn--ghost"> */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: 14px 28px;
  border-radius: 999px;
  font: 600 15px / 1.2 var(--font-display);
  letter-spacing: .01em;
  transition:
    background-color .25s,
    color .25s,
    border-color .25s,
    transform .25s var(--ease),
    box-shadow .25s;
}

.btn--primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 8px 24px -10px rgba(24, 166, 223, .8);
}

.btn--primary:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
}

/* Outlined button for dark backgrounds */
.btn--ghost {
  border: 1px solid rgba(255, 255, 255, .55);
  color: var(--white);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, .12);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn--block {
  width: 100%;
}

/* Solid white with dark text, for dark backgrounds */
.btn--light {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, .6);
}

.btn--light:hover {
  background: #e8f4f9;
  transform: translateY(-2px);
}

/* Rectangle with softly rounded corners (instead of a pill) */
.btn--rect {
  border-radius: 10px;
}


/* ---------- Section heading ---------- */

.section-head {
  max-width: 720px;
  margin-bottom: clamp(40px, 5vw, 64px);
}


/* ---------- Cards (used for the services grid) ---------- */

/* Dark tiles, like app-store buttons: rounded corners, soft shadow,
   grey line icon top-left, title (and a short line) at the bottom. */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));   /* 3 x 2 on desktop */
  gap: clamp(16px, 1.8vw, 24px);
}

@media (max-width: 980px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr; }
  .card { aspect-ratio: auto; min-height: 280px; }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 1 / 1.02;
  padding: clamp(24px, 2.4vw, 32px);
  border-radius: 24px;
  color: var(--white);
  background: linear-gradient(170deg, #262626 0%, #131313 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),       /* faint highlight on the top edge */
    0 22px 34px -18px rgba(0, 0, 0, .55),
    0 6px 12px -6px rgba(0, 0, 0, .25);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .1),
    0 34px 46px -22px rgba(0, 0, 0, .6),
    0 8px 16px -8px rgba(0, 0, 0, .3);
}

/* Keep the hover lift working after the reveal animation has run */
.js .card[data-reveal].is-visible:hover {
  transform: translateY(-6px);
  transition-delay: 0s;
}

.card__icon svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: #8d8d8d;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .35s;
}

.card:hover .card__icon svg {
  stroke: var(--white);
}

/* Title sits at the bottom, wrapping onto two lines like the reference */
.card h3 {
  max-width: 7em;
  margin-top: auto;
  font-weight: 400;
  font-size: clamp(1.3rem, 1.8vw, 1.7rem);
  line-height: 1.25;
  letter-spacing: 0;
}

.card p {
  margin-top: 12px;
  font-size: .85rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, .5);
}

/* "Learn more" becomes a small arrow in the top-right corner
   (the words stay for screen readers) */
.card__more {
  position: absolute;
  top: clamp(24px, 2.4vw, 32px);
  right: clamp(24px, 2.4vw, 32px);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  font-size: 0;
  color: rgba(255, 255, 255, .55);
  transition: color .35s, border-color .35s, background .35s;
}

.card__more::after {
  content: "\2197";
  font-size: 1.05rem;
  line-height: 1;
}

.card:hover .card__more {
  color: #131313;
  border-color: var(--white);
  background: var(--white);
}

/* ---------- Check list (bullets with a check mark) ---------- */

.check-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.check-list li {
  position: relative;
  padding-left: 36px;
  color: var(--muted);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e7f5fc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2313769e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.check-list strong {
  color: var(--ink);
}


/* ---------- Breadcrumb ---------- */
/* Usage: <nav class="breadcrumb"><a>Home</a><a>Services</a><span>Page</span></nav> */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  font-size: .9rem;
  color: rgba(255, 255, 255, .75);
}

.breadcrumb > * + *::before {
  content: "/";
  margin-right: 8px;
  opacity: .5;
}

.breadcrumb a:hover {
  color: var(--white);
}


/* ---------- Form fields ---------- */

.form {
  display: grid;
  gap: 16px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font: 600 .85rem / 1 var(--font-display);
  color: var(--ink);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid #d3e2ea;
  border-radius: 12px;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: var(--white);
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(24, 166, 223, .15);
}

.field .is-invalid {
  border-color: #d64545;
}

.form__status {
  min-height: 1.4em;
  font-size: .95rem;
  text-align: center;
  color: var(--teal);
}

.form__status.is-error {
  color: #c23b3b;
}

@media (max-width: 760px) {
  .form__row {
    grid-template-columns: 1fr;
  }
}
