@tailwind base;
@tailwind components;
@tailwind utilities;

.section-light {
  background-color: #F5F0E8;
  color: #1A1714;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(245, 240, 232, 0.55) 0%,
    rgba(245, 240, 232, 0.42) 35%,
    rgba(245, 240, 232, 0.68) 70%,
    rgba(245, 240, 232, 0.88) 100%
  );
  pointer-events: none;
}

.hero-bg.is-missing {
  display: none;
}

.section-dark {
  background-color: #1A1714;
  color: #F5F0E8;
}

.capability-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.3s, transform 0.3s, background 0.3s;
}

.capability-card:hover {
  border-color: rgba(196, 75, 45, 0.5);
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.06);
}

.capability-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: #F5F0E8;
}

.capability-num {
  display: block;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: #C44B2D;
  margin-bottom: 0.75rem;
  letter-spacing: 0.1em;
}

.interest-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(26, 23, 20, 0.12);
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

.section-dark .interest-tag {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #F5F0E8;
}

.pref-stage-card {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0f0d0b;
  transition: transform 0.4s ease, border-color 0.3s;
}

.pref-stage-card:hover {
  transform: translateY(-6px);
  border-color: rgba(229, 211, 82, 0.4);
}

.pref-stage-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #2D4A3E 0%, #1A1714 50%, #5B2380 100%);
  overflow: hidden;
}

.pref-stage-media::after {
  content: 'Drop video here';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  pointer-events: none;
  z-index: 0;
}

.pref-stage-media.has-media::after {
  display: none;
}

.pref-poster,
.pref-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pref-poster { z-index: 1; }

.pref-video {
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s;
}

.pref-stage-media.is-playing .pref-video {
  opacity: 1;
}

.pref-stage-media.is-playing .pref-poster {
  opacity: 0;
}

.pref-stage-caption {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.pref-stage-label {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #F5F0E8;
}

.pref-stage-tag {
  font-family: ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(229, 211, 82, 0.75);
}

.fab-toggle {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: #C44B2D;
  color: #F5F0E8;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(196, 75, 45, 0.35);
  transition: transform 0.3s, background 0.3s;
}

.fab-toggle:hover {
  transform: scale(1.05);
  background: #a83d24;
}

.fab-toggle.is-open #fab-icon {
  transform: rotate(45deg);
}

.fab-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: 9999px;
  background: #1A1714;
  color: #F5F0E8;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}

.fab-item:hover {
  background: #2a2622;
  border-color: rgba(229, 211, 82, 0.4);
}

.fab-menu:not(.hidden) {
  animation: fab-in 0.25s ease forwards;
}

@keyframes fab-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #E8E0D4; }
::-webkit-scrollbar-thumb { background: #6B6560; border-radius: 4px; }

::selection {
  background: #C44B2D;
  color: #F5F0E8;
}

.shape-morph-card {
  transition: border-radius 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: border-radius, transform;
  background-color: #F5F0E8;
}

.bento-card {
  isolation: isolate;
}

.bento-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.bento-card:hover .bento-bg {
  transform: scale(1.05);
}

.bento-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(245, 240, 232, 0.88) 0%,
    rgba(245, 240, 232, 0.62) 42%,
    rgba(245, 240, 232, 0.38) 100%
  );
  transition: background 0.4s ease;
}

.bento-overlay--tall {
  background: linear-gradient(
    to top,
    rgba(245, 240, 232, 0.94) 0%,
    rgba(245, 240, 232, 0.72) 38%,
    rgba(245, 240, 232, 0.28) 100%
  );
}

.bento-card:hover .bento-overlay {
  background: linear-gradient(
    135deg,
    rgba(245, 240, 232, 0.82) 0%,
    rgba(245, 240, 232, 0.5) 42%,
    rgba(245, 240, 232, 0.22) 100%
  );
}

.bento-card:hover .bento-overlay--tall {
  background: linear-gradient(
    to top,
    rgba(245, 240, 232, 0.9) 0%,
    rgba(245, 240, 232, 0.58) 38%,
    rgba(245, 240, 232, 0.18) 100%
  );
}

.bento-bg.is-missing {
  display: none;
}

@media (max-width: 768px) {
  #gallery-container {
    transform: none !important;
    will-change: auto;
  }

  .project-card {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .project-cover {
    object-fit: cover;
    object-position: center center;
  }
}

.timeline-card {
  position: relative;
  overflow: hidden;
}

.timeline-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: left 0.5s ease;
}

.timeline-card:hover::before { left: 100%; }

.prose-editorial p { margin: 0; }

/* About — restrained editorial */
.about-lead {
  font-size: clamp(1.35rem, 4vw, 2rem);
  line-height: 1.45;
  border-left: 2px solid #C44B2D;
  padding-left: 1.25rem;
  margin: 0;
}

.about-pill {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.8rem;
  color: #F5F0E8;
  letter-spacing: 0.02em;
}

.about-highlight-card {
  padding: 1.25rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.about-highlight-word {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
  color: #F5F0E8;
  letter-spacing: -0.02em;
}

.about-highlight-word--accent { color: #C44B2D; }

.about-principle {
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (min-width: 640px) {
  .about-principle {
    padding: 0;
    border-top: none;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    padding-left: 1rem;
  }

  .about-principle:first-child {
    border-left: none;
    padding-left: 0;
  }
}

.about-principle-title {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #F5F0E8;
}

.about-principle-title--accent { color: #C44B2D; }

.timeline-company-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
  transition: color 0.25s ease;
}

.timeline-company-link:hover { color: #E5D352; }

.timeline-company-link:hover i {
  opacity: 1;
  transform: translate(2px, -2px);
}

.timeline-company-link i {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.project-cover {
  display: block;
}

.project-cover.is-missing {
  display: none !important;
}
