/*
Theme Name: Miligrama Portfolio
Theme URI:
Author: Miligrama
Description: Tema customizado do portfólio Miligrama — HTML/CSS próprios, sem depender de tema pai. Página de projeto (CPT "projeto") gerenciada via ACF.
Version: 1.0
Requires PHP: 7.4
Text Domain: miligrama
*/

:root {
  --gutter: clamp(14px, 1.6vw, 28px);
  --radius: clamp(10px, 1.4vw, 20px);
  --black: #111111;
  --white: #ffffff;
  --font: "Helvetica Neue", Helvetica, Arial, "Inter", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

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

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

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: clamp(16px, 2vw, 24px) var(--gutter);
}

.site-header .logo {
  flex-shrink: 0;
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.back-link {
  min-width: 0;
  text-align: right;
  font-size: clamp(12px, 1vw, 15px);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.back-link:hover {
  opacity: 1;
}

/* Nav de volta dentro da página de projeto (não faz parte do header global) */

.project-nav {
  padding: clamp(16px, 2vw, 24px) 0 0;
}

/* Layout */

.wrap {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(60px, 6vw, 120px);
}

/* Hero */

.hero {
  width: 100%;
  aspect-ratio: 1892 / 1064;
  border-radius: var(--radius);
  overflow: hidden;
  background: #f2c400;
}

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

/* Info */

.info {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(24px, 6vw, 60px) clamp(24px, 4vw, 60px);
  padding: clamp(28px, 3vw, 48px) 0 clamp(40px, 4vw, 64px);
}

.info__title {
  flex: 1 1 320px;
  max-width: 560px;
}

.info__title h1 {
  margin: 0;
  font-size: clamp(30px, 3vw, 58px);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.01em;
}

.info__text {
  flex: 1 1 420px;
  max-width: 940px;
}

.info__text p {
  margin: 0;
  font-size: clamp(18px, 2.3vw, 44px);
  font-weight: 400;
  line-height: 1.15;
}

/* Gallery */

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gutter);
}

.gallery__item {
  border-radius: var(--radius);
  overflow: hidden;
  background: #ececec;
}

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

.gallery__item--full {
  width: 100%;
  aspect-ratio: 1892 / 1064;
}

.gallery__item--square {
  width: calc(50% - var(--gutter) / 2);
  aspect-ratio: 1 / 1;
}

.gallery__item--empty {
  background: repeating-linear-gradient(
    135deg,
    #f2f2f2,
    #f2f2f2 10px,
    #ececec 10px,
    #ececec 20px
  );
}

/* Footer */

.site-footer {
  padding: clamp(24px, 3vw, 40px) 0;
  border-top: 1px solid #ececec;
}

.site-footer__inner {
  padding-bottom: 0;
  font-size: clamp(12px, 1vw, 14px);
  opacity: 0.7;
}

@media (max-width: 640px) {
  .gallery__item--square {
    width: calc(50% - var(--gutter) / 2);
  }

  .info {
    flex-direction: column;
  }

  .info__title,
  .info__text {
    max-width: 100%;
  }
}
