/* ==========================================================================
   Jenna Garden Portfolio - Stylesheet

   Color Palette:
   - Primary (dark purple): #5B21B6
   - Primary light: #7C3AED
   - Primary dark: #4C1D95
   - Text: #1F2937
   - Text light: #6B7280
   - Background: #FFFFFF
   - Background alt: #F9FAFB
   ========================================================================== */

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1F2937;
  line-height: 1.6;
  background: #FFFFFF;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #5B21B6;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #7C3AED;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
  color: #1F2937;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }

p {
  margin-bottom: 1rem;
  color: #4B5563;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: 800px;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid #E5E7EB;
}

.nav__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.nav__logo {
  font-weight: 600;
  font-size: 1.1rem;
  color: #1F2937;
}

.nav__logo:hover {
  color: #5B21B6;
}

.nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav__link {
  color: #4B5563;
  font-size: 0.95rem;
  position: relative;
}

.nav__link:hover {
  color: #5B21B6;
}

.nav__link--active {
  color: #5B21B6;
}

.nav__link--active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: #5B21B6;
  border-radius: 1px;
}

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #1F2937;
  margin: 5px 0;
  transition: 0.3s;
}

@media (max-width: 640px) {
  .nav__toggle {
    display: block;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid #E5E7EB;
  }

  .nav__links--open {
    display: flex;
  }
}

/* --------------------------------------------------------------------------
   Hero Section (Home page)
   -------------------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 4rem;
  position: relative;
  overflow: hidden;
}

/* Animated gradient background - soft, centered */
.hero__gradient {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(91, 33, 182, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 30% 40%, rgba(124, 58, 237, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 70% 60%, rgba(167, 139, 250, 0.1) 0%, transparent 60%);
  animation: gradientPulse 12s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes gradientPulse {
  0%, 100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  33% {
    opacity: 0.85;
    transform: translate(-48%, -52%) scale(1.02);
  }
  66% {
    opacity: 0.9;
    transform: translate(-52%, -48%) scale(0.98);
  }
}

.hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero__text h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero__text h1 span {
  background: linear-gradient(135deg, #5B21B6 0%, #7C3AED 50%, #A78BFA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__intro {
  font-size: 1.25rem;
  color: #4B5563;
  margin-bottom: 1rem;
}

.hero__tagline {
  font-size: 1.1rem;
  color: #6B7280;
}

.hero__image {
  position: relative;
}

/* Window shape: rounded top corners, square bottom */
.hero__image img,
.hero__image .placeholder-image {
  border-radius: 6rem 6rem 0.25rem 0.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 900px) {
  .hero__content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .hero__image {
    order: -1;
    max-width: 300px;
    margin: 0 auto;
  }

  .hero__text h1 {
    font-size: 2.25rem;
  }
}

/* --------------------------------------------------------------------------
   Section Styles
   -------------------------------------------------------------------------- */
.section {
  padding: 5rem 0;
}

.section--alt {
  background: #F9FAFB;
}

.section__title {
  margin-bottom: 2rem;
}

/* --------------------------------------------------------------------------
   Work History (Two-column layout)
   -------------------------------------------------------------------------- */
.work-history {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.work-history__text h2 {
  margin-bottom: 1rem;
}

.work-history__text p {
  color: #4B5563;
}

.work-history__text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 800px) {
  .work-history {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #5B21B6 0%, #A78BFA 60%, transparent 100%);
}

.timeline__item {
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  width: 10px;
  height: 10px;
  background: #5B21B6;
  border-radius: 50%;
  transform: translateX(-4px);
}

.timeline__role {
  font-weight: 600;
  color: #1F2937;
}

.timeline__company {
  color: #5B21B6;
  font-weight: 500;
}

.timeline__date {
  font-size: 0.875rem;
  color: #6B7280;
}

/* --------------------------------------------------------------------------
   Work Grid (Portfolio cards)
   -------------------------------------------------------------------------- */
.work-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.work-grid .work-card {
  width: calc(50% - 1rem);
}

@media (max-width: 700px) {
  .work-grid .work-card {
    width: 100%;
  }
}

.work-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid #E5E7EB;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: transform 0.25s ease, box-shadow 0.3s ease, opacity 0.25s ease;
}

.work-card--faded {
  opacity: 0.35;
  pointer-events: none;
}

/* Coming Soon Card Variant */
.work-card--coming-soon {
  opacity: 0.5;
  filter: grayscale(100%);
  cursor: default;
}

.work-card--coming-soon:hover {
  transform: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.work-card--coming-soon .work-card__image {
  position: relative;
}

.work-card--coming-soon .work-card__image::after {
  content: 'Coming soon';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.work-card--coming-soon:hover .work-card__image::after {
  opacity: 1;
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.work-card__image {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #E5E7EB 0%, #D1D5DB 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9CA3AF;
  font-size: 0.875rem;
}

.work-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-card__content {
  padding: 1.5rem;
}

.work-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.25rem;
}

.work-card__company {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5B21B6;
  font-weight: 600;
}

.work-card__tag {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6B7280;
  font-weight: 600;
  background: rgba(124, 58, 237, 0.12);
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
}

.work-card__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 0.5rem;
}

.work-card__description {
  font-size: 0.9rem;
  color: #6B7280;
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Work Sections (Company groupings)
   -------------------------------------------------------------------------- */
.work-section {
  width: 100%;
  overflow: hidden;
}

.work-section--hidden {
  display: none;
}

.work-section__header {
  font-size: 1rem;
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  margin-top: 2.5rem;
  border-bottom: 1px solid #E5E7EB;
}

.work-section:first-of-type .work-section__header {
  margin-top: 0;
}

/* --------------------------------------------------------------------------
   Work Header
   -------------------------------------------------------------------------- */
.work-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  gap: 1rem;
}

.work-header h1 {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Filter Chips
   -------------------------------------------------------------------------- */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.filter-chip {
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  border: none;
  background: rgba(124, 58, 237, 0.12);
  color: #5B21B6;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.filter-chip:hover {
  background: rgba(124, 58, 237, 0.22);
}

.filter-chip--active {
  background: #5B21B6;
  color: white;
}

.filter-chip--active:hover {
  background: #7C3AED;
}

@media (max-width: 640px) {
  .work-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-chips::-webkit-scrollbar {
    display: none;
  }

  .filter-chip {
    flex-shrink: 0;
  }

  .work-card__meta {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .work-card__meta::-webkit-scrollbar {
    display: none;
  }

  .work-card__tag {
    flex-shrink: 0;
  }

  .work-card__company {
    flex-shrink: 0;
  }
}

/* --------------------------------------------------------------------------
   Case Study Page
   -------------------------------------------------------------------------- */
.case-study {
  padding-top: 6rem;
}

.case-study__header {
  padding-top: 3rem;
  margin-bottom: 3rem;
}

.case-study__company {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5B21B6;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.case-study__title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.case-study__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1.5rem;
}

.case-study__meta-item {
  font-size: 0.9rem;
}

.case-study__meta-label {
  color: #6B7280;
  display: block;
  margin-bottom: 0.25rem;
}

.case-study__meta-value {
  font-weight: 500;
  color: #1F2937;
}

/* Case study content sections */
.case-study__section {
  margin-bottom: 3rem;
}

.case-study__section h2 {
  color: #1F2937;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #E5E7EB;
}

.case-study__section h3 {
  color: #5B21B6;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.case-study__section ul {
  list-style-position: inside;
  padding-left: 0;
  margin: 1rem 0;
}

.case-study__section li {
  margin-bottom: 0.5rem;
}

.case-study__image {
  margin: 2rem 0;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.case-study__image--no-shadow {
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}

.case-study__image img {
  width: 100%;
}

.case-study__image figcaption {
  padding: 0.75rem 1rem;
  background: #F9FAFB;
  font-size: 0.875rem;
  color: #6B7280;
}

.case-study__image--no-shadow figcaption {
  background: none;
  padding: 0.75rem 0;
}

/* Outcome/metric highlight boxes */
.outcome-box {
  background: linear-gradient(135deg, rgba(91, 33, 182, 0.05) 0%, rgba(124, 58, 237, 0.08) 100%);
  border-left: 4px solid #5B21B6;
  padding: 1.5rem;
  border-radius: 0 0.5rem 0.5rem 0;
  margin: 1.5rem 0;
}

.outcome-box__metric {
  font-size: 2rem;
  font-weight: 700;
  color: #5B21B6;
  margin-bottom: 0.25rem;
}

.outcome-box__label {
  color: #4B5563;
  font-size: 0.95rem;
}

/* Case study navigation */
.case-study__nav {
  display: flex;
  justify-content: space-between;
  padding: 2rem 0;
  margin-top: 3rem;
  border-top: 1px solid #E5E7EB;
}

.case-study__nav a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.case-study__nav-label {
  font-size: 0.8rem;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.case-study__nav-title {
  font-weight: 600;
  color: #5B21B6;
}

.case-study__nav a:hover .case-study__nav-title {
  color: #7C3AED;
}

/* --------------------------------------------------------------------------
   Contact Page
   -------------------------------------------------------------------------- */
.contact {
  padding-top: 6rem;
  min-height: 80vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Mouse-following gradient for contact page */
.contact__gradient {
  --mouse-x: 50%;
  --mouse-y: 50%;
  position: absolute;
  top: 1rem;
  left: 0;
  transform: translateY(-50%);
  width: 400px;
  height: 400px;
  background:
    radial-gradient(ellipse 60% 60% at var(--mouse-x) var(--mouse-y), rgba(91, 33, 182, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 45% 55% at var(--mouse-x) var(--mouse-y), rgba(124, 58, 237, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.contact__layout {
  display: flex;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.contact__image {
  width: 400px;
  height: auto;
  border-radius: 48px;
  flex-shrink: 0;
}

.contact__content {
  text-align: left;
  max-width: 500px;
  position: relative;
}

.contact__title {
  font-size: 2rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.contact__text {
  color: #6B7280;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.contact__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #5B21B6;
  color: white;
  padding: 0.875rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: background 0.2s ease, transform 0.2s ease;
  position: relative;
  z-index: 1;
}

.contact__link:hover {
  background: #7C3AED;
  color: white;
  transform: translateY(-2px);
}

.contact__link svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 800px) {
  .contact__layout {
    flex-direction: column;
    align-items: center;
  }

  .contact__image {
    width: 100%;
    max-width: 300px;
  }

  .contact__content {
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  padding: 2rem 0;
  border-top: 1px solid #E5E7EB;
  margin-top: 4rem;
}

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

.footer__text {
  font-size: 0.875rem;
  color: #6B7280;
  margin: 0;
}

.footer__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer__link {
  font-size: 0.875rem;
  color: #6B7280;
}

.footer__link:hover {
  color: #5B21B6;
}

@media (max-width: 640px) {
  .footer__inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Image placeholder */
.placeholder-image {
  background: linear-gradient(135deg, #E5E7EB 0%, #D1D5DB 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9CA3AF;
  font-size: 0.875rem;
  min-height: 200px;
}

/* --------------------------------------------------------------------------
   Phone Mockup Carousel
   -------------------------------------------------------------------------- */
.phone-carousel {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  align-items: start;
  margin: 2rem 0;
}

.phone-carousel__device-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-carousel__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 450px;
}

@media (max-width: 800px) {
  .phone-carousel {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .phone-carousel__device-wrapper {
    justify-self: center;
  }

  .phone-carousel__content {
    min-height: auto;
  }
}

/* iPhone 15 Bezel */
.phone-carousel__device {
  position: relative;
  width: 220px;
  height: 450px;
  background: #1a1a1a;
  border-radius: 28px;
  padding: 8px;
  box-shadow:
    0 0 0 1px #333,
    0 20px 40px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Dynamic Island */
.phone-carousel__device::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 20px;
  background: #000;
  border-radius: 12px;
  z-index: 10;
}

/* Screen area */
.phone-carousel__screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 22px;
  overflow: hidden;
}

.phone-carousel__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.phone-carousel__image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #E5E7EB 0%, #D1D5DB 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9CA3AF;
  font-size: 0.75rem;
  text-align: center;
  padding: 1rem;
}

/* Navigation dots */
.phone-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.phone-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #D1D5DB;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.phone-carousel__dot:hover {
  background: #9CA3AF;
}

.phone-carousel__dot--active {
  background: #5B21B6;
  transform: scale(1.25);
}

/* Arrow navigation */
.phone-carousel__arrows {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.phone-carousel__arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #E5E7EB;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.phone-carousel__arrow:hover {
  border-color: #5B21B6;
  background: #F9FAFB;
}

.phone-carousel__arrow svg {
  width: 18px;
  height: 18px;
  color: #4B5563;
}

.phone-carousel__arrow:hover svg {
  color: #5B21B6;
}

/* Content/rationale side - padding handled above */

.phone-carousel__counter {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5B21B6;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.phone-carousel__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 1rem;
}

.phone-carousel__description {
  color: #4B5563;
  line-height: 1.7;
}

.phone-carousel__description p {
  margin-bottom: 1rem;
}

.phone-carousel__description p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Case Study H4 Styling
   -------------------------------------------------------------------------- */
.case-study__section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #1F2937;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   Three-Column Content Layout
   -------------------------------------------------------------------------- */
.content-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 1.5rem 0;
}

.content-column__header {
  font-size: 1rem;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 0.5rem;
}

.content-column__text {
  font-size: 0.9rem;
  color: #4B5563;
  line-height: 1.6;
}

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

/* --------------------------------------------------------------------------
   Centered Image with Caption
   -------------------------------------------------------------------------- */
.case-study__centered-image {
  text-align: center;
  margin: 2rem 0;
}

.case-study__centered-image img,
.case-study__centered-image video {
  max-width: 100%;
  border-radius: 0.5rem;
}

.case-study__image-caption {
  font-size: 0.85rem;
  color: #6B7280;
  margin-top: 1rem;
  line-height: 1.6;
  text-align: left;
}

/* --------------------------------------------------------------------------
   Monitor/Desktop Carousel
   -------------------------------------------------------------------------- */
.monitor-carousel {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem 0;
}

.monitor-carousel__device {
  position: relative;
  width: 100%;
  max-width: 700px;
  background: #1a1a1a;
  border-radius: 12px;
  padding: 12px 12px 40px 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.monitor-carousel__device::after {
  content: '';
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 8px;
  background: #333;
  border-radius: 4px;
}

.monitor-carousel__device--no-bezel {
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.monitor-carousel__device--no-bezel::after {
  display: none;
}

.monitor-carousel__device--no-bezel .monitor-carousel__screen {
  background: transparent;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  aspect-ratio: auto;
}

.monitor-carousel__device--no-bezel .monitor-carousel__image {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.monitor-carousel__screen {
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.monitor-carousel__screen--auto-height {
  aspect-ratio: auto;
}

.monitor-carousel__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.monitor-carousel__screen--auto-height .monitor-carousel__image,
.monitor-carousel__screen--auto-height video {
  height: auto;
  object-fit: contain;
}

.monitor-carousel__screen video {
  width: 100%;
  display: block;
}

.monitor-carousel__controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  width: 100%;
  max-width: 700px;
}

.monitor-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.monitor-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #D1D5DB;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.monitor-carousel__dot:hover {
  background: #9CA3AF;
}

.monitor-carousel__dot--active {
  background: #5B21B6;
  transform: scale(1.25);
}

.monitor-carousel__arrows {
  display: flex;
  gap: 0.75rem;
}

.monitor-carousel__arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #E5E7EB;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.monitor-carousel__arrow:hover {
  border-color: #5B21B6;
  background: #F9FAFB;
}

.monitor-carousel__arrow svg {
  width: 16px;
  height: 16px;
  color: #4B5563;
}

.monitor-carousel__arrow:hover svg {
  color: #5B21B6;
}

.monitor-carousel__caption {
  width: 100%;
  max-width: 700px;
  margin: 1rem 0 0.25rem 0;
  text-align: center;
}

.monitor-carousel__caption-text {
  font-size: 0.9rem;
  color: #4B5563;
  line-height: 1.6;
}

.monitor-carousel__caption-text strong {
  color: #1F2937;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Comparison Table
   -------------------------------------------------------------------------- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 2rem 0;
}

.comparison-table th,
.comparison-table td {
  border: 1px solid #E5E7EB;
  padding: 1rem;
  text-align: center;
  vertical-align: top;
}

.comparison-table th {
  background: #F9FAFB;
  font-weight: 600;
  font-size: 0.9rem;
  color: #1F2937;
}

.comparison-table tbody th {
  white-space: nowrap;
  min-width: 5.5rem;
}

.comparison-table td {
  background: white;
  font-size: 0.75rem;
}

.comparison-table__placeholder {
  background: linear-gradient(135deg, #E5E7EB 0%, #D1D5DB 100%);
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9CA3AF;
  font-size: 0.875rem;
  border-radius: 0.25rem;
}

.comparison-table img {
  max-width: 100%;
  height: auto;
  border-radius: 0.25rem;
}

@media (max-width: 640px) {
  .comparison-table th,
  .comparison-table td {
    padding: 0.5rem;
    font-size: 0.8rem;
  }

  .comparison-table__placeholder {
    min-height: 100px;
    font-size: 0.75rem;
  }
}

/* Zoom trigger for table images */
.comparison-table__zoom-trigger {
  position: relative;
  cursor: zoom-in;
}

.comparison-table__zoom-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.comparison-table__zoom-icon svg {
  width: 24px;
  height: 24px;
  color: #5B21B6;
}

.comparison-table__zoom-trigger:hover .comparison-table__zoom-icon {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Phone Comparison (Before/After)
   -------------------------------------------------------------------------- */
.phone-comparison {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin: 2rem 0;
}

.phone-comparison__item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-comparison__label {
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  color: #6B7280;
}

@media (max-width: 640px) {
  .phone-comparison {
    flex-direction: column;
    align-items: center;
  }
}

/* --------------------------------------------------------------------------
   Three-Phone Display with Captions
   -------------------------------------------------------------------------- */
.phone-triple {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin: 2rem 0;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.phone-triple__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.phone-triple__device {
  position: relative;
  width: 180px;
  height: 368px;
  background: #1a1a1a;
  border-radius: 24px;
  padding: 6px;
  box-shadow:
    0 0 0 1px #333,
    0 15px 30px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.phone-triple__device::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 16px;
  background: #000;
  border-radius: 10px;
  z-index: 10;
}

.phone-triple__screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 20px;
  overflow: hidden;
}

.phone-triple__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.phone-triple__image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #E5E7EB 0%, #D1D5DB 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9CA3AF;
  font-size: 0.7rem;
  text-align: center;
  padding: 1rem;
}

.phone-triple__caption {
  font-size: 0.8rem;
  color: #6B7280;
  margin-top: 1rem;
  text-align: center;
  line-height: 1.5;
  max-width: 180px;
}

@media (max-width: 640px) {
  .phone-triple {
    justify-content: flex-start;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    -webkit-overflow-scrolling: touch;
  }

  .phone-triple__device {
    width: 160px;
    height: 326px;
  }

  .phone-triple__caption {
    max-width: 160px;
  }
}

/* --------------------------------------------------------------------------
   Prompt Structure Diagram
   -------------------------------------------------------------------------- */
.prompt-diagram {
  margin: 2rem 0;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  transition: all 0.3s ease;
}

.prompt-diagram__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
  transition: all 0.3s ease;
}

.prompt-diagram--preview-open .prompt-diagram__visual {
  flex: 0 0 40%;
  max-width: 280px;
}

.prompt-diagram__main {
  background: #1F2937;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  width: 100%;
}

.prompt-diagram__main:hover {
  background: #374151;
}

.prompt-diagram__main:hover .prompt-diagram__expand-hint {
  color: #D1D5DB;
}

.prompt-diagram__main--active {
  background: #374151;
  box-shadow: 0 0 0 2px #3B82F6;
}

.prompt-diagram__filename {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.85rem;
  display: block;
}

.prompt-diagram__main-label {
  font-size: 0.7rem;
  color: #9CA3AF;
  margin-top: 0.25rem;
  font-family: 'Inter', sans-serif;
}

.prompt-diagram__expand-hint {
  display: block;
  font-size: 0.6rem;
  color: #9CA3AF;
  margin-top: 0.4rem;
  opacity: 1;
  transition: color 0.2s ease;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prompt-diagram__arrow {
  color: #6B7280;
  font-size: 1.25rem;
}

.prompt-diagram__inject-label {
  font-size: 0.75rem;
  color: #6B7280;
  font-style: italic;
  margin: 0.25rem 0;
  text-align: center;
}

.prompt-diagram__partials {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
  flex-wrap: wrap;
  justify-content: center;
  border: 2px dashed #D1D5DB;
  padding: 1rem;
  border-radius: 0.5rem;
  width: 100%;
}

.prompt-diagram--preview-open .prompt-diagram__partials {
  flex-direction: column;
  align-items: stretch;
}

.prompt-diagram__partial {
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  padding: 0.6rem 0.75rem;
  border-radius: 0.375rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.prompt-diagram__partial .prompt-diagram__filename {
  font-size: 0.75rem;
  color: #374151;
}

.prompt-diagram__partial:hover {
  background: #E5E7EB;
  border-color: #D1D5DB;
}

.prompt-diagram__partial:hover .prompt-diagram__expand-hint {
  color: #6B7280;
}

.prompt-diagram__partial .prompt-diagram__expand-hint {
  font-size: 0.55rem;
  margin-top: 0.3rem;
  color: #9CA3AF;
}

.prompt-diagram__partial--active {
  background: #DBEAFE;
  border-color: #3B82F6;
}

.prompt-diagram__more {
  background: #EDE9FE;
  color: #5B21B6;
  padding: 0.6rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Preview container */
.prompt-diagram__preview-container {
  flex: 0;
  width: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.prompt-diagram--preview-open .prompt-diagram__preview-container {
  flex: 1;
  width: auto;
}

.prompt-diagram__preview {
  display: none;
  background: #1E1E1E;
  border-radius: 0.5rem;
  overflow: hidden;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.prompt-diagram__preview--visible {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

.prompt-diagram__preview-header {
  background: #2D2D2D;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prompt-diagram__preview-filename {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.75rem;
  color: #9CA3AF;
}

.prompt-diagram__preview-close {
  background: none;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
  line-height: 1;
}

.prompt-diagram__preview-close:hover {
  color: #fff;
}

.prompt-diagram__preview-code {
  padding: 1rem;
  max-height: 350px;
  overflow-y: auto;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.65rem;
  line-height: 1.5;
  color: #D4D4D4;
  white-space: pre-wrap;
  margin: 0;
}

@media (max-width: 768px) {
  .prompt-diagram {
    flex-direction: column;
  }

  .prompt-diagram--preview-open .prompt-diagram__visual {
    flex: none;
    max-width: 100%;
  }

  .prompt-diagram__partials {
    flex-direction: row;
  }

  .prompt-diagram--preview-open .prompt-diagram__partials {
    flex-direction: row;
  }

  .prompt-diagram__preview-container {
    width: 100%;
  }

  .prompt-diagram--preview-open .prompt-diagram__preview-container {
    flex: none;
  }
}

/* --------------------------------------------------------------------------
   Lightbox
   -------------------------------------------------------------------------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox--open {
  display: flex;
}

.lightbox__image {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 0.5rem;
}

.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.lightbox__close svg {
  width: 24px;
  height: 24px;
  color: white;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.lightbox__nav svg {
  width: 24px;
  height: 24px;
  color: white;
}

.lightbox__nav--prev {
  left: 1.5rem;
}

.lightbox__nav--next {
  right: 1.5rem;
}

.lightbox__counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
}

@media (max-width: 640px) {
  .lightbox__close,
  .lightbox__nav {
    width: 40px;
    height: 40px;
  }

  .lightbox__close svg,
  .lightbox__nav svg {
    width: 20px;
    height: 20px;
  }

  .lightbox__close {
    top: 1rem;
    right: 1rem;
  }

  .lightbox__nav--prev {
    left: 1rem;
  }

  .lightbox__nav--next {
    right: 1rem;
  }
}

/* --------------------------------------------------------------------------
   Password Modal
   -------------------------------------------------------------------------- */
.password-modal {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.98);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.password-modal--hidden {
  display: none;
}

.password-modal__content {
  background: white;
  padding: 2.5rem;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  border: 1px solid #E5E7EB;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.password-modal__title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 1.5rem;
}

.password-modal__input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 1px solid #E5E7EB;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.password-modal__input:focus {
  outline: none;
  border-color: #5B21B6;
  box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.1);
}

.password-modal__input--error {
  border-color: #DC2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.password-modal__button {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: #5B21B6;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease;
}

.password-modal__button:hover {
  background: #7C3AED;
}

.password-modal__error {
  color: #DC2626;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: none;
}

.password-modal__error--visible {
  display: block;
}
