/* ============================================================================
 * components.css — Card and panel styles for the individual sections.
 *
 * Everything here is hover state that used to be React state. Each card
 * previously tracked `hovered` in useState and recomputed a dozen inline
 * style objects on mouse enter and leave; the browser does the same job for
 * free with :hover, with no render pass at all.
 *
 * Accent colours are passed in as the --accent custom property, then blended
 * with color-mix() where a translucent tint is needed. The old code built
 * these by string concatenation (`accent + '55'`), which produced invalid
 * values like "var(--blue)55" — so the tinted borders, shadows and cursor
 * spotlight never actually rendered. They work now.
 * ==========================================================================*/

/* ─── Service card ───────────────────────────────────────────────────────── */

.svc-card {
  --accent: var(--blue);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 2rem 1.75rem;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  box-shadow: 0 1px 3px oklch(0% 0 0 / 0.04);
  overflow: hidden;
  cursor: default;
  transition: transform 0.4s cubic-bezier(0.34, 1.3, 0.64, 1),
              border-color 0.4s ease,
              box-shadow 0.4s ease;
}

/* Cursor-tracking spotlight. --mx / --my are written directly to the element
   by a mousemove handler, which repaints without a React render. */
.svc-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(
    circle 240px at var(--mx, 50%) var(--my, 50%),
    color-mix(in oklch, var(--accent) 14%, transparent),
    transparent 60%
  );
}

/* Accent bar that sweeps across the top edge on hover. */
.svc-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@media (hover: hover) {
  .svc-card:hover {
    transform: translateY(-6px);
    border-color: color-mix(in oklch, var(--accent) 34%, transparent);
    box-shadow: 0 16px 50px color-mix(in oklch, var(--accent) 16%, transparent);
  }

  .svc-card:hover::before,
  .svc-card:hover::after {
    opacity: 1;
    transform: scaleX(1);
  }

  .svc-card:hover .svc-watermark {
    color: var(--accent);
    opacity: 0.18;
    transform: translateY(2px) scale(1.05);
  }

  .svc-card:hover .svc-dot {
    box-shadow: 0 0 12px var(--accent);
    transform: scale(1.4);
  }

  .svc-card:hover .svc-explore {
    color: var(--accent);
    opacity: 1;
    transform: translateX(4px);
  }

  .svc-card:hover .svc-explore::before {
    width: 22px;
  }
}

/* Oversized italic number in the top-right corner. */
.svc-watermark {
  position: absolute;
  top: -0.4rem;
  right: 0.75rem;
  font-family: var(--serif);
  font-size: 6rem;
  line-height: 1;
  font-style: italic;
  color: var(--card-border);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
  transition: color 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
}

.svc-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}

.svc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.svc-title {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.8vw, 1.55rem);
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 0.85rem;
  letter-spacing: -0.015em;
  position: relative;
  z-index: 1;
}

.svc-desc {
  font-size: 0.93rem;
  color: var(--ink-light);
  line-height: 1.65;
  flex: 1;
  position: relative;
  z-index: 1;
}

.svc-explore {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-faint);
  opacity: 0.7;
  position: relative;
  z-index: 1;
  transition: color 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.svc-explore::before {
  content: '';
  width: 14px;
  height: 1px;
  background: currentColor;
  transition: width 0.3s ease;
}

/* Segmented filter above the service grid. */
.svc-tabs {
  display: inline-flex;
  background: var(--card-bg);
  border-radius: 10px;
  padding: 4px;
  border: 1px solid var(--card-border);
  gap: 2px;
  margin-top: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.svc-tab {
  min-height: 40px;
  padding: 0.5rem 1.2rem;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--ink-light);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: background 0.2s, color 0.2s;
}

.svc-tab[aria-selected='true'] {
  background: var(--ink);
  color: var(--bg);
}

/* Sub-heading that introduces each discipline. */
.svc-group-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.svc-group-rule {
  width: 3px;
  height: 28px;
  border-radius: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

.svc-group-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.svc-group-sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin-top: 4px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ─── Process step ───────────────────────────────────────────────────────── */

.process-step {
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  height: 100%;
  cursor: pointer;
  background: oklch(100% 0 0 / 0.1);
  border: 1.5px solid oklch(100% 0 0 / 0.22);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  text-align: left;
  transition: background 0.3s, border-color 0.3s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s;
}

.process-step.is-active {
  background: var(--blue);
  border-color: var(--blue);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px oklch(0% 0 0 / 0.4);
}

.process-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--blue);
  box-shadow: 0 4px 16px var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: white;
  letter-spacing: -0.02em;
  transition: background 0.3s, box-shadow 0.3s;
}

.process-step.is-active .process-badge {
  background: oklch(100% 0 0 / 0.2);
  box-shadow: none;
}

.process-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--on-dark);
  line-height: 1.3;
  font-family: var(--sans);
}

.process-desc {
  font-size: 0.82rem;
  color: var(--on-dark-mid);
  line-height: 1.65;
  font-weight: 300;
  flex: 1;
  transition: color 0.3s;
}

.process-step.is-active .process-desc {
  color: oklch(100% 0 0 / 0.85);
}

.process-rule {
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
  transition: width 0.4s ease, background 0.4s ease;
}

.process-step.is-active .process-rule {
  width: 100%;
  background: oklch(100% 0 0 / 0.4);
}

/* ─── Person card ────────────────────────────────────────────────────────── */

.person-card {
  --accent: var(--blue);
  position: relative;
  background: var(--card-bg);
  border-radius: 20px;
  padding: clamp(2rem, 3.5vw, 3rem);
  border: 1.5px solid var(--card-border);
  overflow: hidden;
  box-shadow: 0 20px 60px oklch(0% 0 0 / 0.06);
  transition: transform 0.4s cubic-bezier(0.34, 1.3, 0.64, 1), box-shadow 0.4s ease;
}

/* Coloured rule along the top edge. */
.person-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    color-mix(in oklch, var(--accent) 50%, transparent) 50%,
    transparent 100%
  );
}

@media (hover: hover) {
  .person-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 80px color-mix(in oklch, var(--accent) 16%, transparent);
  }
}

.person-monogram {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  background: var(--accent);
  background-image: linear-gradient(135deg, oklch(100% 0 0 / 0.18), transparent 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 10px 30px color-mix(in oklch, var(--accent) 40%, transparent),
              inset 0 1px 0 oklch(100% 0 0 / 0.3);
  font-family: var(--serif);
  font-size: 2.6rem;
  color: white;
  line-height: 1;
  font-style: italic;
  letter-spacing: -0.02em;
}

.person-name {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 400;
}

.person-role {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.35rem;
}

.person-bio {
  font-size: clamp(0.98rem, 1.1vw, 1.08rem);
  color: var(--ink-light);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.person-tag {
  font-size: 0.78rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 500;
  border: 1px solid color-mix(in oklch, var(--accent) 20%, transparent);
  cursor: default;
  opacity: 0;
  animation: tagIn 0.6s cubic-bezier(0.34, 1.4, 0.64, 1) both;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

@media (hover: hover) {
  .person-tag:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
  }
}

/* ─── Product card ───────────────────────────────────────────────────────── */

.product-card {
  --accent: var(--blue);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  box-shadow: 0 2px 12px oklch(0% 0 0 / 0.05);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
}

@media (hover: hover) {
  .product-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 24px 60px oklch(0% 0 0 / 0.13);
  }
}

.product-visual {
  height: 190px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Grid texture over the product artwork. */
.product-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 75% 75% at center, black, transparent 82%);
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at center, black, transparent 82%);
}

.product-icon-tile {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.25);
  position: relative;
}

.product-body {
  padding: 1.5rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1;
}

.product-badge {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

.product-title {
  font-family: var(--serif);
  font-size: 1.55rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.product-desc {
  color: var(--ink-light);
  font-size: 0.92rem;
  line-height: 1.6;
}

.product-tag {
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--ink-light);
  background: var(--bg-alt);
  border: 1px solid var(--card-border);
  padding: 0.22rem 0.55rem;
  border-radius: 20px;
}

/* Compact button used inside product cards. */
.btn-sm {
  min-height: 40px;
  padding: 0.7rem 1.3rem;
  border-radius: 8px;
  font-size: 0.85rem;
  align-self: flex-start;
  margin-top: 0.4rem;
}

.btn-sm:disabled {
  background: var(--bg-alt);
  color: var(--ink-faint);
  border: 1px dashed var(--card-border);
  cursor: not-allowed;
}

/* ─── Contact ────────────────────────────────────────────────────────────── */

.contact-info {
  background: var(--ink);
  color: var(--on-dark);
  border-radius: 18px;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  height: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px oklch(0% 0 0 / 0.18);
}

.contact-info-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.contact-info-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: oklch(100% 0 0 / 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-mid);
  margin-bottom: 0.15rem;
}

.contact-info-value {
  font-size: 0.92rem;
  font-weight: 500;
  word-break: break-word;
}

a.contact-info-value {
  border-bottom: 1px solid var(--on-dark-mid);
  transition: border-color 0.2s;
}

a.contact-info-value:hover {
  border-bottom-color: var(--on-dark);
}

.contact-form {
  background: var(--card-bg);
  border-radius: 18px;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border: 1.5px solid var(--card-border);
  box-shadow: 0 20px 60px oklch(0% 0 0 / 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  height: 100%;
}
