/*
Theme Name: A Carolina Pinta
Theme URI: https://acarolinapinta.pt
Author: A Carolina Pinta
Author URI: https://acarolinapinta.pt
Description: Tema minimalista e elegante para portfólio de ilustração. Suporta galerias por categoria, página inicial com imagem destaque, menu hambúrguer, página Sobre Mim e Contactos.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: acarolinapinta
Tags: portfolio, minimal, art, gallery, custom-menu, featured-images
*/

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --cream: #F5F0E8;
  --warm: #FDFAF5;
  --bege: #E8E0D0;
  --dark: #2A2520;
  --mid: #7A7068;
  --accent: #C8A882;
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Jost', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--warm);
  color: var(--dark);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

/* =============================================
   NAVIGATION
   ============================================= */
#site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem 2.5rem;
  transition: background 0.4s, border-color 0.4s;
  border-bottom: 0.5px solid transparent;
}

#site-nav.is-home {
  position: absolute;
  background: transparent;
  border-bottom-color: transparent;
}

#site-nav.scrolled,
#site-nav.solid {
  background: rgba(253, 250, 245, 0.95);
  border-bottom-color: var(--bege);
  backdrop-filter: blur(6px);
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--warm);
  transition: color 0.4s;
}

#site-nav.scrolled .site-logo,
#site-nav.solid .site-logo {
  color: var(--dark);
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  z-index: 200;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--warm);
  transition: background 0.4s, transform 0.3s, opacity 0.3s;
}

#site-nav.scrolled .hamburger span,
#site-nav.solid .hamburger span {
  background: var(--dark);
}

.hamburger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Menu overlay */
#menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

#menu-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

#menu-overlay nav ul {
  list-style: none;
  text-align: center;
}

#menu-overlay nav ul li {
  overflow: hidden;
  margin-bottom: 0.25rem;
}

#menu-overlay nav ul li a {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  font-style: italic;
  color: var(--cream);
  letter-spacing: 0.02em;
  transform: translateY(40px);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease, color 0.25s;
}

#menu-overlay.is-open nav ul li a {
  transform: translateY(0);
  opacity: 1;
}

#menu-overlay nav ul li:nth-child(1) a { transition-delay: 0.05s; }
#menu-overlay nav ul li:nth-child(2) a { transition-delay: 0.1s; }
#menu-overlay nav ul li:nth-child(3) a { transition-delay: 0.15s; }
#menu-overlay nav ul li:nth-child(4) a { transition-delay: 0.2s; }
#menu-overlay nav ul li:nth-child(5) a { transition-delay: 0.25s; }
#menu-overlay nav ul li:nth-child(6) a { transition-delay: 0.3s; }
#menu-overlay nav ul li:nth-child(7) a { transition-delay: 0.35s; }

#menu-overlay nav ul li a:hover { color: var(--accent); }

.menu-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.3);
  font-family: var(--font-body);
}

/* =============================================
   HOME PAGE
   ============================================= */
.home-hero {
  min-height: 100vh;
  background: #1E1A16;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.home-hero img {
  width: min(600px, 90vw);
  height: auto;
  transition: transform 0.6s ease;
  object-fit: cover;
}

.home-hero:hover img {
  transform: scale(1.018);
}

.home-hero-hint {
  position: absolute;
  bottom: 2rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.25);
  animation: pulse 2.5s ease-in-out infinite;
}

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

/* =============================================
   GALLERY PAGES
   ============================================= */
.gallery-page {
  padding: 8rem 3rem 5rem;
  min-height: 100vh;
}

.page-heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  font-weight: 300;
  font-style: italic;
  margin-bottom: 3rem;
  color: var(--dark);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--bege);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1.2rem;
  background: linear-gradient(to top, rgba(42, 37, 32, 0.65) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
}

.gallery-caption span {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 300;
  font-style: italic;
  color: #FDFAF5;
  letter-spacing: 0.02em;
}

/* =============================================
   SOBRE MIM
   ============================================= */
.sobre-page {
  padding: 8rem 3rem 5rem;
  min-height: 100vh;
}

.sobre-inner {
  max-width: 680px;
  margin: 0 auto;
}

.sobre-portrait {
  width: 100%;
  margin-bottom: 2.5rem;
  overflow: hidden;
}

.sobre-portrait img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.sobre-content p {
  font-size: 0.92rem;
  color: var(--mid);
  line-height: 1.9;
  margin-bottom: 1.2rem;
}

/* =============================================
   CONTACTOS
   ============================================= */
.contact-page {
  padding: 8rem 3rem 5rem;
  min-height: 100vh;
}

.contact-inner {
  max-width: 520px;
}

.contact-field {
  margin-bottom: 1.5rem;
}

.contact-field label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.5rem;
}

.contact-field input,
.contact-field textarea,
.contact-field select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 0.5px solid var(--bege);
  padding: 0.6rem 0;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--dark);
  outline: none;
  transition: border-color 0.25s;
  resize: none;
}

.contact-field input:focus,
.contact-field textarea:focus {
  border-bottom-color: var(--dark);
}

.contact-field textarea {
  min-height: 110px;
}

.contact-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: none;
  border: none;
  border-bottom: 0.5px solid var(--dark);
  padding: 0.25rem 0;
  cursor: pointer;
  color: var(--dark);
  margin-top: 1rem;
  font-family: var(--font-body);
  transition: gap 0.3s;
}

.contact-submit:hover { gap: 1.2rem; }

.contact-success {
  font-size: 0.85rem;
  color: var(--mid);
  margin-top: 1.5rem;
  font-style: italic;
  font-family: var(--font-display);
}

/* =============================================
   FOOTER
   ============================================= */
#site-footer {
  background: var(--dark);
  color: var(--warm);
  padding: 2.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 300;
  font-style: italic;
}

.footer-copy {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: rgba(253, 250, 245, 0.4);
  text-transform: uppercase;
}

.footer-social a {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: rgba(253, 250, 245, 0.55);
  text-transform: uppercase;
  transition: color 0.2s;
  margin-left: 1.5rem;
}

.footer-social a:hover { color: var(--warm); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 640px) {
  #site-nav { padding: 1.2rem 1.5rem; }
  .gallery-page,
  .sobre-page,
  .contact-page { padding: 6rem 1.5rem 3rem; }
  .gallery-grid { gap: 0.75rem; }
  #site-footer { flex-direction: column; text-align: center; }
  .footer-social a { margin: 0 0.75rem; }
}
