/* ============================================
   Romina's AI Content Studio — Main Stylesheet
   ============================================ */

/* --- Custom Properties --- */
:root {
  --color-bg: #0a0a0a;
  --color-bg-elevated: #0f0f0f;
  --color-text: #ffffff;
  --color-text-muted: #999999;
  --color-accent: #e0e0e0;
  --color-border: #1a1a1a;

  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;

  /* Fluid typography */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --text-xl: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  --text-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  --text-3xl: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
  --text-display: clamp(2.5rem, 1.5rem + 5vw, 5rem);

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;
  --space-3xl: 8rem;

  /* Layout */
  --content-max: 1200px;
  --nav-height: 4rem;

  --transition-base: 0.3s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-weight: var(--font-weight-normal);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3 {
  font-weight: var(--font-weight-medium);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 { font-size: var(--text-display); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }

p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* --- Full-Bleed Page Grid --- */
.page-grid {
  display: grid;
  grid-template-columns: 1fr min(90%, var(--content-max)) 1fr;
}

.page-grid > * {
  grid-column: 2;
}

.page-grid > .full-bleed {
  grid-column: 1 / -1;
}

/* --- Media Placeholder --- */
.media-placeholder {
  background: linear-gradient(135deg, #111 0%, #1a1a1a 50%, #111 100%);
  background-size: 200% 200%;
  animation: shimmer 3s ease-in-out infinite;
  border-radius: 2px;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* --- Scroll Reveal Animations --- */
[data-animate] {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-animate="fade-up"] {
  transform: translateY(40px);
}

[data-animate].is-visible {
  opacity: 1;
  transform: none;
}

/* --- Navigation --- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  background-color: transparent;
  transition: background-color 0.4s ease;
}

.site-nav.is-scrolled {
  background-color: var(--color-bg);
}

.nav-logo {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-medium);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

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

.nav-links a {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  transition: color var(--transition-base);
}

.nav-links a:hover {
  color: var(--color-text);
}

.nav-links .nav-icon {
  display: flex;
  align-items: center;
}

.nav-links .nav-icon svg {
  width: 18px;
  height: 18px;
  fill: var(--color-text-muted);
  transition: fill var(--transition-base);
}

.nav-links .nav-icon:hover svg {
  fill: var(--color-text);
}

/* --- Hero --- */
.hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--nav-height) 5% 0;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media .media-placeholder {
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  margin-bottom: var(--space-sm);
}

.hero-content p {
  font-size: var(--text-lg);
  color: var(--color-accent);
  max-width: 36ch;
  margin: 0 auto;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  opacity: 0.6;
  transition: opacity var(--transition-base);
}

.scroll-indicator span {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.scroll-indicator::after {
  content: '';
  width: 1px;
  height: 40px;
  background: var(--color-text-muted);
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

.scroll-indicator.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* --- Portfolio Carousel --- */
.portfolio {
  padding: var(--space-3xl) 0;
}

.portfolio h2 {
  padding: 0 5%;
  margin-bottom: var(--space-xl);
}

.carousel {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 5%;
  padding: 0 5%;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 80vw;
  scroll-snap-align: start;
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  overflow: hidden;
}

.carousel-slide .media-placeholder {
  width: 100%;
  height: 100%;
}

.carousel-slide .slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: var(--space-md);
}

.carousel-slide .slide-overlay span {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.02em;
}

@media (min-width: 768px) {
  .carousel-slide {
    flex: 0 0 45vw;
  }
}

@media (min-width: 1024px) {
  .carousel-slide {
    flex: 0 0 30vw;
  }
}

/* --- Services --- */
.services {
  padding: var(--space-3xl) 0;
}

.services h2 {
  margin-bottom: var(--space-xl);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.service-card .media-placeholder {
  aspect-ratio: 4 / 3;
  width: 100%;
}

.service-card h3 {
  margin-top: var(--space-xs);
}

.service-card p {
  font-size: var(--text-sm);
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
  }
}

/* --- About --- */
.about {
  padding: var(--space-3xl) 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.about-photo .media-placeholder {
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 400px;
}

.about-text h2 {
  margin-bottom: var(--space-md);
}

.about-text p {
  margin-bottom: var(--space-sm);
}

.about-text p:last-child {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 2fr;
    gap: var(--space-2xl);
    align-items: center;
  }
}

/* --- Contact / CTA --- */
.contact {
  background-color: var(--color-bg-elevated);
  padding: var(--space-3xl) 5%;
}

.contact h2 {
  margin-bottom: var(--space-xl);
}

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

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  transition: color var(--transition-base);
}

.contact-link:hover {
  color: var(--color-text);
}

.contact-link svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: currentColor;
}

@media (min-width: 768px) {
  .contact-links {
    flex-direction: row;
    gap: var(--space-xl);
  }
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) 5%;
  text-align: center;
}

.site-footer p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* --- Hamburger Button --- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(280px, 80vw);
    height: 100dvh;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: var(--space-lg);
    padding: var(--space-xl);
    background-color: var(--color-bg);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 105;
  }

  .nav-links.is-open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: var(--text-lg);
  }
}

/* --- Hover Effects (desktop only) --- */
@media (hover: hover) {
  .carousel-slide {
    transition: transform 0.3s ease;
  }

  .carousel-slide:hover {
    transform: scale(1.02);
  }

  .carousel-slide .slide-overlay {
    transition: opacity 0.3s ease;
    opacity: 0.7;
  }

  .carousel-slide:hover .slide-overlay {
    opacity: 1;
  }

  .service-card {
    transition: transform 0.3s ease;
  }

  .service-card:hover {
    transform: translateY(-4px);
  }
}

/* --- Carousel Polish --- */
.carousel {
  cursor: grab;
}

.carousel:active {
  cursor: grabbing;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .scroll-indicator::after {
    animation: none;
  }

  .media-placeholder {
    animation: none;
  }
}
