/*
Theme Name:  Raluca M. Matara
Theme URI:   https://www.ralucamatara.ro
Author:      Raluca M. Matara
Description: Author portfolio theme for ralucamatara.ro — mobile-first, elegant design for a sapphic author.
Version:     1.0.0
Text Domain: raluca-matara
*/

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

:root {
  --plum:        #3D1A5C;
  --purple:      #9B5FA5;
  --lavender:    #D9C0E8;
  --cream:       #FBF7F3;
  --rose:        #F2D7E5;
  --white:       #ffffff;
  --text:        #1C1228;
  --text-muted:  #7A6585;
  --border:      rgba(61, 26, 92, 0.12);
  --shadow:      0 4px 24px rgba(61, 26, 92, 0.10);
  --shadow-lg:   0 8px 40px rgba(61, 26, 92, 0.18);
  --radius:      12px;
  --nav-h:       70px;
  --max-w:       1120px;
  --f-heading:   'Playfair Display', Georgia, serif;
  --f-body:      'DM Sans', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--f-body);
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4 { font-family: var(--f-heading); line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 5rem 0; }
@media (max-width: 768px) { section { padding: 3.5rem 0; } }

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(251, 247, 243, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
.nav.scrolled { box-shadow: var(--shadow); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  font-family: var(--f-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--plum);
  white-space: nowrap;
}

/* desktop menu — targets the <ul> output by wp_nav_menu */
.nav__links {
  display: flex;
  gap: 2.5rem;
  padding: 0;
  margin: 0;
}
.nav__links li { list-style: none; }
.nav__links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  transition: color 0.2s;
  padding-bottom: 3px;
}
.nav__links a:hover { color: var(--plum); }
.nav__links .current-menu-item > a,
.nav__links .current_page_item > a {
  color: var(--plum);
  border-bottom: 2px solid var(--purple);
}

/* hamburger */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
}
.nav__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--plum);
  border-radius: 2px;
  transition: all 0.3s;
}
.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile drawer */
.nav__drawer {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  z-index: 199;
  padding: 0.5rem 0 1.5rem;
  box-shadow: var(--shadow);
}
.nav__drawer.open { display: block; }
.nav__drawer ul { list-style: none; padding: 0; margin: 0; }
.nav__drawer li a {
  display: block;
  padding: 1rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.nav__drawer li:last-child a { border-bottom: none; }
.nav__drawer li a:hover { background: var(--rose); }
.nav__drawer .current-menu-item > a,
.nav__drawer .current_page_item > a { color: var(--purple); font-weight: 600; }

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
}

/* ===== HERO (homepage) ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 5rem;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(30, 5, 52, 0.15) 0%,
    rgba(30, 5, 52, 0.55) 60%,
    rgba(30, 5, 52, 0.72) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  width: 100%;
}

.hero__content h1 { text-shadow: 0 2px 24px rgba(0,0,0,0.35); margin-bottom: 1rem; }
.hero__content p {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 500px;
  margin: 0 auto 2rem;
}

.hero__scroll {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: rgba(255,255,255,0.45);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:.45;transform:scaleY(1)} 50%{opacity:1;transform:scaleY(.5)} }

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
  padding-top: var(--nav-h);
  background: linear-gradient(135deg, var(--plum) 0%, #6B2FA0 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
  min-height: 42vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='rgba(255,255,255,0.06)'/%3E%3C/svg%3E");
}
.page-hero__content {
  position: relative;
  z-index: 1;
  color: var(--white);
  padding: 4rem 1.5rem;
}
.page-hero__content h1 {
  text-shadow: 0 2px 16px rgba(0,0,0,0.25);
  margin-bottom: 0.75rem;
}
.page-hero__content p {
  font-size: 1.05rem;
  opacity: 0.82;
  max-width: 500px;
  margin: 0 auto;
}

/* ===== SECTION HEADER ===== */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { color: var(--plum); margin-bottom: 0.6rem; }
.section-header p { color: var(--text-muted); font-size: 1rem; max-width: 480px; margin: 0 auto; }
.line {
  width: 44px;
  height: 3px;
  background: linear-gradient(90deg, var(--purple), var(--lavender));
  border-radius: 2px;
  margin: 0.9rem auto 0;
}

/* ===== VALUES ===== */
.values { background: var(--white); }

.values__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.value-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  transition: transform 0.25s, box-shadow 0.25s;
}
.value-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

.value-card__icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--purple), var(--lavender));
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.3rem;
}
.value-card h3 { color: var(--plum); margin-bottom: 0.7rem; }
.value-card p { color: var(--text-muted); font-size: 0.93rem; line-height: 1.75; }

@media (max-width: 900px) {
  .values__grid { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
}

/* ===== BOOKS CTA ===== */
.books-cta {
  background: linear-gradient(135deg, var(--plum) 0%, var(--purple) 100%);
  padding: 3.5rem 0;
  text-align: center;
  color: var(--white);
}
.books-cta h2 { margin-bottom: 0.5rem; }
.books-cta p { opacity: 0.82; font-size: 1rem; }

/* ===== BOOKS GRID ===== */
.books { background: var(--cream); }

.books__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
}

.book-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
  transition: transform 0.3s, box-shadow 0.3s;
  background: var(--lavender);
}
.book-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: var(--shadow-lg); }

.book-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.book-card:hover img { transform: scale(1.04); }

.book-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(25, 5, 45, 0.88) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}
.book-card:hover .book-card__overlay { opacity: 1; }

.book-card__title {
  color: var(--white);
  font-family: var(--f-heading);
  font-size: 0.82rem;
  line-height: 1.35;
}

@media (max-width: 520px)  { .books__grid { grid-template-columns: repeat(2, 1fr); } }

/* ===== TESTIMONIALS ===== */
.testimonials { background: var(--white); }

.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2rem 1.75rem;
  position: relative;
}
.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 0.75rem;
  left: 1.5rem;
  font-family: var(--f-heading);
  font-size: 4.5rem;
  line-height: 1;
  color: var(--lavender);
  pointer-events: none;
}
.testimonial-card__book {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 0.75rem;
  padding-top: 0.25rem;
}
.testimonial-card p {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
}
.testimonial-card__attr {
  margin-top: 1.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

/* ===== ABOUT (about page) ===== */
.about-section { background: var(--white); }

.about-section__inner {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 4rem;
  align-items: start;
}

.about-section__photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow-lg);
}
.about-section__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.about-section__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid rgba(217, 192, 232, 0.6);
  border-radius: var(--radius);
  pointer-events: none;
}

.about-section__text h2 { color: var(--plum); margin-bottom: 0.5rem; }
.about-section__text .line { margin: 0.75rem 0 1.75rem; }
.about-section__text p { color: var(--text-muted); font-size: 1rem; line-height: 1.85; }
.about-section__text em { color: var(--plum); font-style: italic; }

@media (max-width: 900px) {
  .about-section__inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-section__photo { max-width: 340px; margin: 0 auto; }
}

/* ===== CONTACT ===== */
.contact-section { background: var(--white); }

.contact-section__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 { color: var(--plum); margin-bottom: 0.5rem; }
.contact-info .line { margin: 0.75rem 0 2rem; }
.contact-info__item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.contact-info__icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: linear-gradient(135deg, var(--lavender), var(--rose));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.contact-info__label {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.contact-info__value { color: var(--text); font-weight: 500; font-size: 0.95rem; }
.contact-info__value a { color: var(--purple); transition: color 0.2s; }
.contact-info__value a:hover { color: var(--plum); text-decoration: underline; }

.wpcf7 { display: flex; flex-direction: column; gap: 1.25rem; }
.wpcf7 label { font-size: 0.85rem; font-weight: 600; color: var(--text); display: flex; flex-direction: column; gap: 0.4rem; }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
  padding: 0.875rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--f-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--cream);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  resize: vertical;
  width: 100%;
}
.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(155, 95, 165, 0.15);
}
.wpcf7 textarea { min-height: 130px; }

.wpcf7 input[type="submit"] {
  padding: 0.9rem 2.25rem;
  background: linear-gradient(135deg, var(--plum), var(--purple));
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-family: var(--f-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  align-self: flex-start;
  letter-spacing: 0.03em;
}
.wpcf7 input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(61, 26, 92, 0.3);
}
.wpcf7-response-output { border-radius: 8px; padding: 0.75rem 1rem; font-size: 0.9rem; }
.wpcf7-not-valid-tip { font-size: 0.8rem; color: #c0392b; margin-top: 0.25rem; }

@media (max-width: 768px) {
  .contact-section__inner { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ===== FOOTER ===== */
.footer {
  background: var(--plum);
  color: rgba(255,255,255,0.75);
  padding: 3.5rem 0 2rem;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__brand h3 {
  font-family: var(--f-heading);
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}
.footer__brand p { font-size: 0.88rem; line-height: 1.75; opacity: 0.72; }

.footer__col h4 {
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
}
.footer__col ul { padding: 0; margin: 0; }
.footer__col ul li { margin-bottom: 0.6rem; list-style: none; }
.footer__col ul li a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.62);
  transition: color 0.2s;
}
.footer__col ul li a:hover { color: var(--white); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  opacity: 0.6;
}

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

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

.stagger > *:nth-child(1) { transition-delay: 0s; }
.stagger > *:nth-child(2) { transition-delay: 0.08s; }
.stagger > *:nth-child(3) { transition-delay: 0.16s; }
.stagger > *:nth-child(4) { transition-delay: 0.24s; }
.stagger > *:nth-child(5) { transition-delay: 0.32s; }
.stagger > *:nth-child(6) { transition-delay: 0.40s; }

/* ===== WP ADMIN BAR OFFSET ===== */
.admin-bar .nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .nav { top: 46px; } }
