/* ============================================
   JOSEPH CIARROCHI — PERSONAL SITE
   Matching original WordPress/Divi design
   Josefin Sans + Open Sans, Teal/Navy palette
   ============================================ */

/* --- CUSTOM PROPERTIES --- */
:root {
  --color-dark: #161B23;
  --color-primary: #768CA5;
  --color-accent: #7EBEC5;
  --color-accent-hover: #6aacb3;
  --color-bg: #ffffff;
  --color-bg-light: #F3F8FB;
  --color-text: #333333;
  --color-text-muted: #666666;
  --color-text-light: #999999;
  --color-border: #e0e0e0;
  --color-white: #ffffff;

  --font-heading: 'Josefin Sans', Helvetica, Arial, sans-serif;
  --font-body: 'Open Sans', Helvetica, Arial, sans-serif;

  --max-width: 1200px;
  --nav-height: 80px;
  --section-padding: 54px 0;
  --transition: 0.3s ease;
  --radius: 4px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 20px rgba(0,0,0,0.12);
}

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

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.8;
  font-weight: 300;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

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

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 300;
  line-height: 1.3;
  color: var(--color-text);
}

h1 { font-size: 46px; }
h2 { font-size: 40px; }
h3 { font-size: 30px; }
h4 { font-size: 24px; }

p { margin-bottom: 1em; }

/* --- UTILITIES --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 30px;
}

.section {
  padding: var(--section-padding);
}

.section--light {
  background: var(--color-bg-light);
}

.section--dark {
  background: var(--color-dark);
  color: var(--color-white);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-white);
}

.section__header {
  text-align: center;
  margin-bottom: 40px;
}

.section__subtitle {
  font-family: var(--font-body);
  color: var(--color-text-muted);
  font-size: 18px;
  font-weight: 300;
  margin-top: 10px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.section__label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-2 { margin-bottom: 2rem; }

/* --- BUTTONS --- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: var(--color-white);
}

.btn--outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
}

.btn--outline:hover {
  background: var(--color-white);
  color: var(--color-dark);
}

.btn--white {
  background: var(--color-white);
  color: var(--color-dark);
  border: 2px solid var(--color-white);
}

.btn--white:hover {
  background: transparent;
  color: var(--color-white);
}

.btn--dark-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn--dark-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn--small {
  padding: 8px 18px;
  font-size: 15px;
}

/* --- NAVIGATION --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--color-white);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  z-index: 1000;
  transition: all var(--transition);
}

.nav--scrolled {
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 30px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo img {
  height: 44px;
  width: auto;
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 0;
  align-items: center;
}

.nav__links > li > a {
  display: block;
  padding: 8px 20px;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 300;
  transition: all var(--transition);
}

.nav__links > li > a:hover,
.nav__links > li > a.active {
  color: var(--color-accent);
}

/* Dropdown */
.nav__dropdown {
  position: relative;
}

.nav__dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-white);
  border-top: 3px solid var(--color-primary);
  box-shadow: var(--shadow-hover);
  padding: 10px 0;
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: all var(--transition);
  list-style: none;
}

.nav__dropdown:hover .nav__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__dropdown-menu a {
  display: block;
  padding: 8px 24px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 300;
  color: var(--color-text);
}

.nav__dropdown-menu a:hover {
  color: var(--color-accent);
  background: var(--color-bg-light);
}

/* Mobile nav */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-accent);
  margin: 6px 0;
  transition: all var(--transition);
}

/* --- HERO BANNER (full-width photo with book overlay on left) --- */
.hero-banner {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: var(--nav-height);
  background-size: cover;
  background-position: top center;
  overflow: hidden;
}

.hero-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
}

.hero-banner__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 60px 80px;
}

.hero-banner__book {
  max-height: 360px;
  width: auto;
  border-radius: var(--radius);
  box-shadow: 4px 6px 30px rgba(0,0,0,0.3);
  margin-bottom: 24px;
}

.hero-banner__content .btn {
  font-size: 20px;
}

/* --- CARDS --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.card__image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.card__body {
  padding: 28px;
}

.card__title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 300;
  margin-bottom: 12px;
  color: var(--color-text);
}

.card__text {
  color: var(--color-text-muted);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
}

.card__links {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e0e8ee;
}

.card__links p {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.6;
}

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

.card__links a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s;
}

.card__links a:hover {
  color: var(--color-text);
  text-decoration: underline;
}

/* --- BOOK GRID --- */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 30px;
}

.book-item {
  text-align: center;
  transition: transform var(--transition);
}

.book-item:hover {
  transform: translateY(-6px);
}

.book-item img {
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
  border: 4px solid white;
  border-radius: 10px;
  box-shadow: 4px 6px 20px rgba(0,0,0,0.15);
  transition: box-shadow var(--transition);
}

.book-item:hover img {
  box-shadow: 6px 10px 30px rgba(0,0,0,0.2);
}

/* --- LOGO GRID (Speaking) --- */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px 30px;
  align-items: center;
  padding: 20px 0;
}

.logo-grid img {
  height: 75px;
  width: 100%;
  margin: 0 auto;
  object-fit: contain;
  opacity: 0.7;
  transition: all var(--transition);
}

.logo-grid img:hover {
  opacity: 1;
}

/* --- FEATURE LIST --- */
.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
}

.feature-item__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: rgba(126, 190, 197, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-size: 1.1rem;
}

.feature-item__text h4 {
  margin-bottom: 4px;
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 20px;
}

.feature-item__text p {
  font-size: 16px;
  font-weight: 300;
  color: var(--color-text-muted);
  margin: 0;
}

/* --- TAG LIST --- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.tag {
  display: inline-block;
  padding: 8px 18px;
  background: rgba(126, 190, 197, 0.12);
  color: var(--color-primary);
  border-radius: 100px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 300;
}

/* --- SPLIT SECTION --- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.split--reverse {
  direction: rtl;
}

.split--reverse > * {
  direction: ltr;
}

.split__image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* --- DOWNLOAD LIST --- */
.download-list {
  list-style: none;
}

.download-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 14px;
}

.download-list li:last-child {
  border-bottom: none;
}

.download-list__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: rgba(126, 190, 197, 0.12);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-size: 1.1rem;
}

.download-list__text {
  flex: 1;
}

.download-list__text h4 {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 18px;
  margin-bottom: 2px;
}

.download-list__text p {
  font-size: 15px;
  font-weight: 300;
  color: var(--color-text-muted);
  margin: 0;
}

/* --- AUDIO PLAYER --- */
.audio-item {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.audio-item h4 {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 22px;
  margin-bottom: 8px;
}

.audio-item p {
  font-size: 16px;
  font-weight: 300;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.audio-item audio {
  width: 100%;
}

/* --- CONTACT --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info {
  font-size: 18px;
  font-weight: 300;
}

.contact-info h3 {
  margin-bottom: 24px;
}

.contact-info__item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.contact-info__label {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.contact-form label {
  display: block;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  color: var(--color-text);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  margin-bottom: 16px;
  transition: border-color var(--transition);
  background: #fafafa;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* --- FOOTER --- */
.footer {
  background: var(--color-dark);
  color: rgba(255,255,255,0.7);
  padding: 50px 0 24px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer__brand p {
  font-size: 16px;
  font-weight: 300;
  margin-top: 16px;
  max-width: 320px;
}

.footer h4 {
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 18px;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.footer__links {
  list-style: none;
}

.footer__links li {
  margin-bottom: 8px;
}

.footer__links a {
  color: rgba(255,255,255,0.6);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 300;
  transition: color var(--transition);
}

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

.footer__bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,0.4);
}

/* --- PAGE HEADER --- */
.page-header {
  padding: 120px 0 60px;
  background: var(--color-bg-light);
  text-align: center;
}

.page-header h1 {
  margin-bottom: 12px;
}

.page-header p {
  color: var(--color-text-muted);
  font-size: 18px;
  font-weight: 300;
  max-width: 600px;
  margin: 0 auto;
}

/* --- DNA-V CARDS --- */
.dnav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.dnav-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--color-accent);
  transition: all var(--transition);
}

.dnav-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.dnav-card h4 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 300;
  margin-bottom: 10px;
  color: var(--color-text);
}

.dnav-card p {
  font-size: 16px;
  font-weight: 300;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.7;
}

/* --- RESPONSIVE --- */
@media (max-width: 980px) {
  .hero__content {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 40px 30px;
  }

  .hero__subtitle {
    margin: 0 auto 30px;
  }

  .hero__buttons {
    justify-content: center;
  }

  .hero__image {
    order: -1;
  }

  .hero__image img {
    max-height: 300px;
  }

  .hero-banner__content {
    padding: 40px 30px;
  }

  .hero-banner__book {
    max-height: 280px;
  }

  .split {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .split--reverse {
    direction: ltr;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  h1 { font-size: 36px; }
  h2 { font-size: 30px; }
  .hero__title { font-size: 40px; }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 40px 0;
    --nav-height: 64px;
  }

  body { font-size: 16px; }

  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: 20px;
    gap: 0;
    transform: translateX(100%);
    transition: transform var(--transition);
    overflow-y: auto;
  }

  .nav__links.open {
    transform: translateX(0);
  }

  .nav__links > li > a {
    padding: 12px 16px;
    font-size: 18px;
  }

  .nav__toggle {
    display: block;
  }

  .nav__dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-top: none;
    padding-left: 16px;
    display: none;
  }

  .nav__dropdown.open .nav__dropdown-menu {
    display: block;
  }

  .hero {
    min-height: auto;
    padding-bottom: 40px;
  }

  .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
  }

  .contact-form .form-row {
    grid-template-columns: 1fr;
  }
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp 0.5s ease forwards;
}
