/* ===================================================
   A Alma do Teu Porquê — Coaching Website
   Design: Minimalista, elegante, tons creme/bege
   =================================================== */

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

:root {
  /* Palette */
  --bg-primary: #F5F0EB;
  --bg-secondary: #EDE7E0;
  --bg-card: #FAF7F4;
  --text-primary: #2C2C2C;
  --text-secondary: #5A5A5A;
  --text-muted: #8A8A8A;
  --accent: #6B5B4E;
  --accent-light: #8B7B6E;
  --border: #D9D2CB;
  --border-light: #E8E2DC;
  --white: #FFFFFF;
  --shadow: rgba(0, 0, 0, 0.06);
  --shadow-hover: rgba(0, 0, 0, 0.1);

  /* Typography */
  --font-serif: 'Cormorant Garamond', 'Georgia', serif;
  --font-sans: 'Inter', 'Helvetica Neue', sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Layout */
  --max-width: 1100px;
  --header-height: 90px;
  --border-radius: 4px;
  --transition: 0.3s ease;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 {
  font-size: 2.8rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.2rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.6rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-light);
}

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

/* --- Header & Navigation --- */
.site-header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 var(--space-md);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-md) 0 var(--space-sm);
}

.site-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
  margin-bottom: var(--space-sm);
}

.site-title:hover {
  color: var(--accent);
}

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

.main-nav a {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--space-xs) 0;
  position: relative;
  transition: color var(--transition);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--accent);
  transition: width var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text-primary);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  color: var(--text-primary);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* --- Main Content --- */
main {
  flex: 1;
  width: 100%;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
}

.section--hero {
  padding: var(--space-2xl) 0;
  text-align: center;
}

.section--alt {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

/* --- Hero / Landing Quote --- */
.hero-quote {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.hero-quote blockquote {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-primary);
  font-style: normal;
}

/* --- Frase do Dia --- */
.frase-section {
  text-align: center;
  padding: var(--space-2xl) var(--space-md);
}

.frase-section h2 {
  margin-bottom: var(--space-lg);
  font-size: 2rem;
}

.frase-content {
  max-width: 600px;
  margin: 0 auto;
}

.frase-text {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.frase-date {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-lg);
}

.frase-cta {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  padding: 0.8rem 2.5rem;
  border: 1px solid var(--text-primary);
  border-radius: 50px;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  background: none;
}

.frase-cta:hover {
  background-color: var(--text-primary);
  color: var(--bg-primary);
}



/* --- Videos Page --- */
.page-header {
  text-align: center;
  padding: var(--space-xl) 0 var(--space-lg);
}

.page-header h1 {
  margin-bottom: var(--space-xs);
}

.page-header p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* --- Vertical videos grid (Reels/Shorts) --- */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  padding-bottom: var(--space-2xl);
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.video-card:hover {
  box-shadow: 0 8px 30px var(--shadow-hover);
  transform: translateY(-2px);
}

/* 9:16 portrait ratio for Shorts/Reels */
.video-thumbnail {
  position: relative;
  width: 100%;
  padding-top: 177.78%;
  overflow: hidden;
  cursor: pointer;
  background-color: var(--bg-secondary);
}
.video-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.video-card:hover .video-thumbnail img {
  transform: scale(1.03);
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
}

.play-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--text-primary);
  margin-left: 3px;
}

.video-card:hover .play-icon {
  background: var(--white);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
  padding: var(--space-sm) var(--space-md) var(--space-md);
}

.video-info h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.video-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Video Modal — shared base */
.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.video-modal.active {
  display: flex;
}

/* Portrait (reels/shorts) */
.modal-content--portrait {
  position: relative;
  width: min(360px, calc(100vw - 2rem));
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  padding: var(--space-xs);
  line-height: 1;
  opacity: 0.8;
  transition: opacity var(--transition);
}

.modal-close:hover {
  opacity: 1;
}

/* Portrait embed 9:16 */
.video-embed--portrait {
  position: relative;
  padding-top: 177.78%;
  background: #000;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.video-embed iframe,
.video-embed--portrait iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* --- Podcasts Page (landscape 16:9) --- */
.podcasts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  padding-bottom: var(--space-2xl);
}

.podcast-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.podcast-card:hover {
  box-shadow: 0 8px 30px var(--shadow-hover);
  transform: translateY(-2px);
}

/* 16:9 landscape ratio for podcasts */
.podcast-thumbnail {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  cursor: pointer;
  background-color: var(--bg-secondary);
}

.podcast-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.podcast-card:hover .podcast-thumbnail img {
  transform: scale(1.03);
}

.podcast-card:hover .play-icon {
  background: var(--white);
  transform: translate(-50%, -50%) scale(1.1);
}

.podcast-info {
  padding: var(--space-sm) var(--space-md) var(--space-md);
}

.podcast-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.podcast-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Landscape modal (podcasts) */
.modal-content--landscape {
  position: relative;
  width: min(900px, calc(100vw - 2rem));
}

.video-embed--landscape {
  position: relative;
  padding-top: 56.25%;
  background: #000;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.video-embed--landscape iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* --- Books Page --- */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
  padding-bottom: var(--space-2xl);
}

.book-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
}

.book-card:hover {
  box-shadow: 0 8px 30px var(--shadow-hover);
  transform: translateY(-2px);
}

.book-cover {
  width: 160px;
  height: 240px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin-bottom: var(--space-md);
  box-shadow: 0 4px 15px var(--shadow);
}

.book-cover-placeholder {
  width: 160px;
  height: 240px;
  background: linear-gradient(135deg, var(--bg-secondary), var(--border));
  border-radius: var(--border-radius);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px var(--shadow);
}

.book-cover-placeholder svg {
  width: 40px;
  height: 40px;
  fill: var(--text-muted);
  opacity: 0.5;
}

.book-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.book-author {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: var(--space-sm);
}

.book-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  flex: 1;
}

.book-link {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  transition: all var(--transition);
}

.book-link:hover {
  border-color: var(--accent);
  background-color: var(--accent);
  color: var(--white);
}

/* --- About Page --- */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-xl);
  align-items: start;
  padding: var(--space-xl) 0 var(--space-2xl);
}

.about-photo {
  width: 100%;
  max-width: 400px;
  border-radius: var(--border-radius);
  box-shadow: 0 8px 30px var(--shadow);
}

.about-photo-placeholder {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, var(--bg-secondary), var(--border));
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 30px var(--shadow);
}

.about-photo-placeholder svg {
  width: 60px;
  height: 60px;
  fill: var(--text-muted);
  opacity: 0.4;
}

.about-text h1 {
  margin-bottom: var(--space-xs);
}

.about-text .subtitle {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--accent);
  font-style: italic;
  margin-bottom: var(--space-lg);
}

.about-text p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.about-text blockquote {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--accent);
  border-left: 3px solid var(--border);
  padding-left: var(--space-md);
  margin: var(--space-lg) 0;
  font-style: italic;
}

.social-links {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.social-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--bg-secondary);
}

.social-links svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
  border-top: 1px solid var(--border-light);
  background-color: var(--bg-card);
}

.site-footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* --- Utilities --- */
.text-center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* --- Loading state --- */
.loading {
  opacity: 0.5;
  animation: pulse 1.5s infinite ease-in-out;
}

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

/* Fade in animation */
.fade-in {
  animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Responsive --- */

/* Tablet */
@media (max-width: 768px) {
  :root {
    --space-xl: 3rem;
    --space-2xl: 4rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.7rem; }
  h3 { font-size: 1.3rem; }

  .header-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
  }

  .site-title {
    margin-bottom: 0;
    font-size: 0.95rem;
    letter-spacing: 0.15em;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    flex-direction: column;
    gap: 0;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 4px 15px var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: var(--space-sm) var(--space-md);
    width: 100%;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
  }

  .main-nav a:last-child {
    border-bottom: none;
  }

  .section--hero {
    padding: var(--space-xl) 0;
  }

  .hero-quote blockquote {
    font-size: 1.5rem;
    padding: 0 var(--space-sm);
  }

  .frase-section {
    padding: var(--space-xl) var(--space-sm);
  }

  .frase-text {
    font-size: 1.3rem;
  }

  .frase-cta {
    padding: 0.7rem 2rem;
    font-size: 0.8rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-lg);
  }

  .about-photo,
  .about-photo-placeholder {
    margin: 0 auto;
    max-width: 260px;
  }

  .about-text h1 {
    font-size: 2rem;
  }

  .about-text .subtitle {
    font-size: 1.1rem;
  }

  .about-text p {
    font-size: 1rem;
  }

  .about-text blockquote {
    border-left: none;
    border-top: 2px solid var(--border);
    padding: var(--space-md) 0 0;
    text-align: center;
    font-size: 1.15rem;
  }

  .social-links {
    justify-content: center;
  }

  .videos-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
  }

  .podcasts-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .podcast-info {
    padding: var(--space-xs) var(--space-sm) var(--space-sm);
  }

  .podcast-info h3 {
    font-size: 1rem;
  }

  .video-info {
    padding: var(--space-xs) var(--space-sm) var(--space-sm);
  }

  .video-info h3 {
    font-size: 0.95rem;
  }

  .books-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .book-card {
    padding: var(--space-md);
  }

  .book-cover,
  .book-cover-placeholder {
    width: 140px;
    height: 210px;
  }

  .page-header {
    padding: var(--space-lg) 0 var(--space-md);
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .site-footer {
    padding: var(--space-md) var(--space-sm);
  }
}

/* Small phones */
@media (max-width: 480px) {
  :root {
    --space-xl: 2.5rem;
    --space-2xl: 3rem;
  }

  h1 { font-size: 1.65rem; }
  h2 { font-size: 1.5rem; }

  .site-title {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
  }

  .hero-quote blockquote {
    font-size: 1.25rem;
    line-height: 1.6;
  }

  .frase-section h2 {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
  }

  .frase-text {
    font-size: 1.1rem;
    line-height: 1.7;
  }

  .frase-cta {
    padding: 0.65rem 1.8rem;
    font-size: 0.75rem;
  }

  .about-photo,
  .about-photo-placeholder {
    max-width: 220px;
  }

  .about-text h1 {
    font-size: 1.65rem;
  }

  .about-text p {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .about-text blockquote {
    font-size: 1.05rem;
  }

  .book-card h3 {
    font-size: 1.1rem;
  }

  .book-description {
    font-size: 0.85rem;
  }

  /* 2 columns for very narrow screens */
  .videos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xs);
  }

  .podcasts-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }

  .podcast-info {
    padding: var(--space-xs) var(--space-xs) var(--space-sm);
  }

  .podcast-info h3 {
    font-size: 0.95rem;
  }

  .podcast-info p {
    font-size: 0.85rem;
  }

  .video-info {
    padding: var(--space-xs) var(--space-xs) var(--space-sm);
  }

  .video-info h3 {
    font-size: 0.85rem;
  }

  .video-info p {
    display: none; /* hide description on tiny screens to save space */
  }

  .page-header h1 {
    font-size: 1.65rem;
  }

  .page-header p {
    font-size: 0.9rem;
  }

  .main-nav {
    gap: 0;
  }
}

/* Touch device optimisation */
@media (hover: none) and (pointer: coarse) {
  .main-nav a {
    padding: 0.75rem var(--space-md);
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .frase-cta {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .book-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .social-links a {
    width: 48px;
    height: 48px;
  }

  .modal-close {
    font-size: 2.2rem;
    padding: var(--space-sm);
    min-width: 44px;
    min-height: 44px;
  }
}
