/*
  Media Fera — Components
  Typography scale, buttons, badges, cards and small reusable pieces.
*/

/* ============ Typography scale ============ */

.text-display-hero {
  font: 600 40px/46px var(--font-display);
  letter-spacing: -0.03em;
}

.text-headline-lg {
  font: 600 30px/36px var(--font-display);
  letter-spacing: -0.025em;
}

.text-headline-md {
  font: 600 28px/34px var(--font-display);
  letter-spacing: -0.02em;
}

.text-headline-sm {
  font: 600 20px/26px var(--font-display);
  letter-spacing: -0.02em;
}

.text-title-md {
  font: 700 18px/24px var(--font-display);
  letter-spacing: -0.015em;
}

.text-body-lg {
  font: 400 17px/26px var(--font-display);
  letter-spacing: -0.01em;
}

.text-body-md {
  font: 400 15px/22px var(--font-display);
  letter-spacing: -0.005em;
}

.text-body-sm {
  font: 400 13px/18px var(--font-display);
}

.text-label-md {
  font: 600 12px/16px var(--font-display);
  letter-spacing: 0.02em;
}

.text-label-xs {
  font: 600 11px/14px var(--font-display);
  letter-spacing: 0.04em;
}

.text-eyebrow {
  font: 600 11px/14px var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .text-display-hero {
    font-size: 72px;
    line-height: 78px;
    letter-spacing: -0.04em;
  }

  .text-headline-lg {
    font-size: 48px;
    line-height: 54px;
    letter-spacing: -0.035em;
  }

  .text-headline-md {
    font-size: 32px;
    line-height: 38px;
    letter-spacing: -0.025em;
  }
}

.text-primary {
  color: var(--color-on-surface);
}

.text-muted {
  color: var(--color-on-surface-variant);
}

.text-secondary {
  color: var(--color-secondary);
}

/* ============ Buttons ============ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font: 600 12px/16px var(--font-display);
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
  box-shadow: var(--shadow-cta);
}

.btn--primary:hover {
  background: var(--color-primary-container);
}

.btn--secondary {
  background: var(--color-surface-container-lowest);
  color: var(--color-on-surface);
  box-shadow: var(--shadow-hairline);
}

.btn--secondary:hover {
  background: var(--color-surface-container-low);
}

.btn--on-dark {
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-on-cinematic);
}

.btn--on-dark:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn--block {
  width: 100%;
  justify-content: center;
}

/* WhatsApp CTA — stacked on mobile (label + number on their own line, so
   the button never feels like one long crammed sentence), a single row
   again once there's room. Same .btn look, no green/brand-color treatment. */
.btn-whatsapp__lines {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.35;
}

.btn-whatsapp__phone {
  font-weight: 500;
  opacity: 0.75;
}

@media (min-width: 480px) {
  .btn-whatsapp__lines {
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }
}

/* ============ Badges & pills ============ */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--color-surface-container-lowest);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-hairline);
  white-space: nowrap;
}

.pill--experience {
  display: none;
  background: rgba(75, 65, 225, 0.1);
  color: var(--color-secondary);
  padding: 4px 12px;
}

@media (min-width: 768px) {
  .pill--experience {
    display: inline-flex;
  }
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-secondary);
  box-shadow: 0 0 12px rgba(75, 65, 225, 0.6);
  flex-shrink: 0;
}

.dot--sm {
  width: 8px;
  height: 8px;
}

.dot--xs {
  width: 6px;
  height: 6px;
}

.dot--pulse {
  animation: fera-pulse 2s ease-in-out infinite;
}

@keyframes fera-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============ Cards: shared surface ============ */

.surface-card {
  background: var(--color-surface-container-lowest);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hairline);
  border: 1px solid var(--color-border);
}

/* ============ Client cards ============ */

.client-card {
  background: var(--color-surface-container-lowest);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  min-height: 144px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-hairline);
  border: 1px solid var(--color-border);
  transition: box-shadow 0.2s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.client-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.client-card__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-surface-container);
  color: var(--color-on-surface-variant);
  display: flex;
  align-items: center;
  justify-content: center;
}

.client-card__category {
  display: block;
  color: var(--color-on-surface-variant);
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* ============ Project cards ============ */

.project-card {
  background: var(--color-surface-container-lowest);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-hairline);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}

.project-card__media {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: var(--space-md);
  background: var(--color-surface-container-high);
}

.project-card--wide .project-card__media {
  aspect-ratio: 16 / 9;
}

.project-card--narrow .project-card__media {
  aspect-ratio: 4 / 3;
}

.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-card__media img {
  transform: scale(1.05);
}

.project-card__tag {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  color: var(--color-on-cinematic);
}

.project-card__link {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  /* Fixed dark ink, not --color-on-surface: this circle is always a light
     overlay on top of a photo regardless of site theme, so its icon must
     stay dark to read against it in both themes. */
  color: #0b1c30;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.project-card:hover .project-card__link {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.project-card__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

/* Title→description rhythm for the wide card, matching the 4px used by
   the narrow cards' stacked body below — same class-free wrapper, just
   given the same spacing so both card types feel like one system. */
.project-card__body-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-card__body--stack {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.project-card__body--stack .project-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Normalizes card-bottom alignment across a row when descriptions differ
   in length by a line, without stretching the whole card (which would
   reopen the empty-gap issue this system was built to avoid). */
.project-card__body--stack p {
  min-height: 36px;
}

/* ============ Service cards ============ */

.service-card {
  background: var(--color-surface-container-low);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-hairline);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
}

.service-card--feature {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-surface), var(--color-surface-container));
}

.service-card--feature::after {
  content: "";
  position: absolute;
  top: -32px;
  right: -32px;
  width: 176px;
  height: 176px;
  border-radius: var(--radius-full);
  background: rgba(226, 223, 255, 0.4);
  filter: blur(40px);
  pointer-events: none;
}

.service-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-xs);
  background: var(--color-primary);
  color: var(--color-on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card__icon--sm {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  background: var(--color-surface-container-highest);
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

.service-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.service-card__badge {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--color-secondary);
  color: var(--color-on-secondary);
}

.service-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: var(--space-md);
  position: relative;
  z-index: 1;
}

.service-card__tag {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--color-surface-container-lowest);
  color: var(--color-on-surface);
}

.service-card__link {
  padding-top: 16px;
  color: var(--color-secondary);
  font-weight: 600;
}

/* ============ Method cards ============ */

.method-card {
  background: var(--color-surface-container-lowest);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  box-shadow: var(--shadow-hairline);
  border: 1px solid var(--color-border);
}

.method-card__index {
  color: var(--color-secondary);
  font-weight: 700;
}

/* ============ Chips (industry cloud, tags) ============ */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: var(--color-surface-container-lowest);
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.chip:hover {
  background: var(--color-surface-container);
}

@media (min-width: 640px) {
  .chip {
    padding: 10px 20px;
  }
}

/* ============ Hero deck internals ============ */

.deck__dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
}

.deck__dot--red { background: #ff5f57; }
.deck__dot--yellow { background: #febc2e; }
.deck__dot--green { background: #28c840; }

.deck__url {
  padding: 4px 16px;
  border-radius: var(--radius-full);
  background: var(--color-surface-container-low);
  color: var(--color-on-surface-variant);
}

.deck__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.04) contrast(1.02);
}

.deck__hud {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-md);
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 55%, rgba(0, 0, 0, 0.25));
  color: var(--color-on-cinematic);
}

.deck__hud-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.deck__hud-rec {
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  font-weight: 700;
}

.deck__hud-tag {
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
}

.deck__reticle {
  display: flex;
  justify-content: center;
  opacity: 0.6;
}

.deck__audio {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  color: var(--color-on-cinematic);
  box-shadow: var(--shadow-deck);
}

.deck__waveform {
  display: flex;
  align-items: center;
  gap: 3px;
}

.deck__waveform span {
  width: 3px;
  border-radius: var(--radius-full);
  background: var(--color-secondary-fixed);
}

.ai-card {
  background: var(--color-surface-container-lowest);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  box-shadow: var(--shadow-hairline);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  height: 100%;
}

.ai-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-card__label {
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  font-weight: 700;
}

.ai-card__status {
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: var(--color-secondary-fixed);
  color: var(--color-on-secondary-fixed);
}

.ai-card__prompt {
  padding: var(--space-sm);
  border-radius: var(--radius-xs);
  background: var(--color-surface-container-low);
  color: var(--color-on-surface);
}

.ai-card__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ai-card__tile {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: var(--color-surface-container-high);
}

.ai-card__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-card__tile--more {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: 700;
}

.metric-card {
  background: var(--color-surface-container-lowest);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  box-shadow: var(--shadow-hairline);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(75, 65, 225, 0.1);
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============ Geography route ============ */

.geo-panel {
  border-radius: var(--radius-lg);
  background: var(--color-surface-container);
  border: 1px solid var(--color-border);
  padding: var(--space-md);
}

.geo-route__stop {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--color-surface-container-lowest);
  text-transform: uppercase;
  font-weight: 700;
}

.geo-route__stop--hq {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.geo-route__stop--global {
  background: var(--color-secondary);
  color: var(--color-on-secondary);
  box-shadow: var(--shadow-card-hover);
}

.geo-route__arrow {
  color: var(--color-secondary);
}

.geo-highlight__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: rgba(75, 65, 225, 0.1);
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============ CTA panel ============ */

.cta-panel {
  position: relative;
  overflow: hidden;
  max-width: 64rem;
  margin-inline: auto;
  border-radius: var(--radius-2xl);
  background: linear-gradient(to bottom, var(--color-surface-container-lowest), var(--color-surface-container));
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  box-shadow: var(--shadow-hairline);
  border: 1px solid var(--color-border);
}

.cta-panel__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 384px;
  height: 384px;
  border-radius: var(--radius-full);
  background: rgba(226, 223, 255, 0.4);
  filter: blur(70px);
  pointer-events: none;
}

.cta-panel__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-panel__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

/* ============ Footer specifics ============ */

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  padding-top: var(--space-sm);
}

.footer-tag {
  padding: 4px 14px;
  border-radius: var(--radius-full);
  background: var(--color-surface-container);
  color: var(--color-on-surface);
}

.footer-nav__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-bottom__meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Small brand lockup (dot + wordmark) ahead of the copyright line — the
   closest thing to a footer logo until a real mark file exists; no <img>,
   so nothing can 404. */
.footer-bottom__brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

/* ============ Contact ============ */

.contact-info__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(75, 65, 225, 0.1);
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  color: var(--color-on-surface-variant);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-outline-variant);
  background: var(--color-surface-container-lowest);
  color: var(--color-on-surface);
  font: 400 15px/22px var(--font-display);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-on-surface-variant);
}

.form-input:focus-visible,
.form-textarea:focus-visible {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: var(--shadow-glow-secondary);
}

.form-textarea {
  min-height: 128px;
  resize: vertical;
}

/* ============ Theme toggle ============ */

.theme-toggle {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-on-surface);
  background: var(--color-surface-container-low);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
  background: var(--color-surface-container);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

.theme-toggle__icon {
  font-size: 18px;
}

.theme-toggle__icon--light {
  display: none;
}

[data-theme="dark"] .theme-toggle__icon--dark {
  display: none;
}

[data-theme="dark"] .theme-toggle__icon--light {
  display: inline-flex;
}
