/*
 Theme Name:   Aspect Architects
 Theme URI:    https://aspectarchitects.me
 Description:  Minimalist architecture portfolio theme - Divi Child Theme
 Author:       Aspect Architects
 Author URI:   https://aspectarchitects.me
 Template:     Divi
 Version:      1.0.0
 Text Domain:  aspect-architects
*/

/* ==========================================================================
   CSS VARIABLES
   ========================================================================== */

:root {
  --color-black: #1a1a1a;
  --color-dark: #333333;
  --color-gray: #888888;
  --color-light-gray: #cccccc;
  --color-border: #e0e0e0;
  --color-white: #ffffff;
  --color-bg: #ffffff;

  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --max-width: 1200px;
  --header-height: 80px;
  --section-padding: 100px;
  --gap: 4px;
}

/* ==========================================================================
   DIVI OVERRIDES & RESET
   ========================================================================== */

/* Hide Divi default header/footer when our custom ones are active */
#main-header,
#top-header,
#main-footer,
#footer-bottom,
.et-fixed-header,
#et-secondary-nav {
  display: none !important;
}

/* Reset Divi page container */
#page-container {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

#et-main-area {
  padding-top: 0 !important;
}

.et_pb_section {
  padding: 0 !important;
}

/* Remove Divi default styles */
body.et_divi_theme #page-container,
body.et_divi_theme .container {
  width: 100% !important;
  max-width: 100% !important;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-dark);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

a {
  color: var(--color-dark);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

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

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.aspect-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

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

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--color-white);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header--transparent {
  background: transparent;
}

.site-header--transparent .site-logo,
.site-header--transparent .site-nav a {
  color: var(--color-white);
}

.site-header--scrolled {
  background: var(--color-white);
  box-shadow: 0 1px 0 var(--color-border);
}

.site-header--scrolled .site-logo,
.site-header--scrolled .site-nav a {
  color: var(--color-black);
}

.site-logo {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--color-black);
  text-decoration: none;
}

.site-logo:hover {
  color: var(--color-black);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.site-nav a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-dark);
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--color-gray);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 10001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--color-black);
  margin: 6px 0;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px;
  border-top: 1px solid var(--color-border);
  margin-top: 60px;
}

.footer-email {
  font-size: 13px;
  color: var(--color-dark);
}

.footer-email a {
  color: var(--color-dark);
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--color-gray);
  transition: color 0.3s ease;
}

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

.footer-social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ==========================================================================
   PAGE TITLE
   ========================================================================== */

.page-title,
h1.page-title,
.projects-page .page-title,
.about-page .page-title,
.contact-page .page-title {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 48px;
  color: #1a1a1a !important;
  margin-bottom: 40px;
  padding-top: calc(var(--header-height) + 40px);
}

/* ==========================================================================
   HERO SLIDER (Home)
   ========================================================================== */

.hero-slider {
  width: 100%;
  height: 100vh;
  position: relative;
}

.hero-slider .swiper {
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

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

.hero-slide__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 60px 40px;
  background: linear-gradient(transparent, rgba(0,0,0,0.4));
  color: var(--color-white);
}

.hero-slide__title {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 300;
  color: var(--color-white);
  margin-bottom: 10px;
}

.hero-slide__link {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.hero-slide__link:hover {
  color: var(--color-white);
}

.hero-slider .swiper-pagination {
  bottom: 30px !important;
}

.hero-slider .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: rgba(255,255,255,0.5);
  opacity: 1;
}

.hero-slider .swiper-pagination-bullet-active {
  background: var(--color-white);
}

/* Scroll down indicator */
.hero-scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  cursor: pointer;
  animation: bounceDown 2s infinite;
}

.hero-scroll-down svg {
  width: 24px;
  height: 24px;
  fill: var(--color-white);
}

@keyframes bounceDown {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-8px); }
  60% { transform: translateX(-50%) translateY(-4px); }
}

/* ==========================================================================
   PORTFOLIO INTRO (Home)
   ========================================================================== */

.portfolio-intro {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 40px 0;
}

.portfolio-intro__subtitle {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-gray);
  letter-spacing: 0.05em;
}

/* ==========================================================================
   NEWS / PRESS GRID (Home)
   ========================================================================== */

.news-section {
  padding: 80px 40px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.news-header {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 40px;
}

.news-header a {
  font-size: 13px;
  color: var(--color-gray);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.news-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: auto;
}

.news-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.news-item:hover img {
  transform: scale(1.03);
  opacity: 0.9;
}

.news-more {
  text-align: left;
  margin-top: 40px;
}

.news-more a {
  font-size: 13px;
  color: var(--color-gray);
}

/* ==========================================================================
   PROJECTS GRID
   ========================================================================== */

.projects-page {
  padding-top: calc(var(--header-height) + 20px);
}

.projects-filters {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  padding: 0 40px;
}

.projects-filters button {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-gray);
  cursor: pointer;
  padding: 0;
  transition: color 0.3s ease;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.projects-filters button:hover,
.projects-filters button.active {
  color: var(--color-dark);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  padding: 0;
}

.project-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.project-card:hover img {
  transform: scale(1.05);
  opacity: 0.85;
}

.project-card__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-card__overlay {
  opacity: 1;
}

.project-card__title {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-white);
  font-weight: 400;
}

/* Hide filtered items */
.project-card.hidden {
  display: none;
}

/* ==========================================================================
   SINGLE PROJECT
   ========================================================================== */

.single-project {
  padding-top: calc(var(--header-height) + 20px);
}

.project-back {
  display: inline-block;
  font-size: 13px;
  color: var(--color-gray);
  margin-bottom: 30px;
  padding: 0 40px;
}

.project-back:hover {
  color: var(--color-dark);
}

.project-gallery {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 20px;
}

.project-gallery .swiper {
  width: 100%;
}

.project-gallery .swiper-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.project-gallery__counter {
  text-align: right;
  font-size: 13px;
  color: var(--color-gray);
  padding: 10px 0;
  max-width: 900px;
  margin: 0 auto;
}

.project-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 40px 0;
}

.project-content h1 {
  font-family: var(--font-heading);
  font-size: 42px;
  font-weight: 300;
  color: var(--color-dark);
  margin-bottom: 30px;
}

.project-description {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-dark);
  text-align: justify;
  margin-bottom: 40px;
}

.project-specs {
  margin-top: 40px;
  padding-top: 20px;
}

.project-spec {
  margin-bottom: 10px;
}

.project-spec__value {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 300;
  color: var(--color-dark);
}

.project-spec__label {
  font-size: 12px;
  color: var(--color-gray);
  text-transform: lowercase;
}

.project-team-count {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-gray);
  margin-top: 10px;
}

.project-team-count svg {
  width: 20px;
  height: 20px;
  fill: var(--color-gray);
}

/* ==========================================================================
   ABOUT PAGE
   ========================================================================== */

.about-page {
  padding-top: calc(var(--header-height) + 20px);
}

.about-subnav {
  display: flex;
  gap: 20px;
  margin-bottom: 50px;
}

.about-subnav a {
  font-size: 12px;
  color: var(--color-gray);
  text-decoration: none;
  transition: color 0.3s ease;
}

.about-subnav a:hover,
.about-subnav a.active {
  color: var(--color-dark);
}

.about-hero-image {
  width: 100%;
  max-width: 700px;
  margin: 0 auto 80px;
}

.about-hero-image img {
  width: 100%;
  height: auto;
}

/* Studio Section */
.about-section {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 60px;
  margin-bottom: 80px;
  max-width: var(--max-width);
  padding: 0 40px;
}

.about-section__label {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 300;
  color: var(--color-dark);
}

.about-section__content {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-dark);
  text-align: justify;
}

.about-section__content p {
  margin-bottom: 20px;
}

/* Team Grid */
.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 60px;
}

.team-member {
  position: relative;
}

.team-member__name {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-dark);
  cursor: default;
  transition: font-weight 0.2s ease;
}

.team-member:hover .team-member__name {
  font-weight: 700;
}

.team-member__role {
  font-size: 12px;
  color: var(--color-gray);
  margin-top: 2px;
}

.team-member__photo {
  position: absolute;
  right: -180px;
  top: -60px;
  width: 160px;
  height: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.team-member:hover .team-member__photo {
  opacity: 1;
}

/* ==========================================================================
   CONTACT PAGE
   ========================================================================== */

.contact-page {
  padding-top: calc(var(--header-height) + 20px);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  max-width: var(--max-width);
  padding: 0 40px;
}

.contact-locations {
  list-style: none;
  padding: 0;
}

.contact-location {
  padding-bottom: 25px;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--color-border);
}

.contact-location:last-child {
  border-bottom: none;
}

.contact-location__city {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 8px;
}

.contact-location__address,
.contact-location__phone {
  font-size: 13px;
  color: var(--color-gray);
  line-height: 1.6;
}

.contact-location__phone a {
  color: var(--color-gray);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
}

.contact-form__group {
  margin-bottom: 5px;
}

.contact-form__input,
.contact-form__textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--color-border);
  padding: 12px 0;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-dark);
  background: transparent;
  outline: none;
  transition: border-color 0.3s ease;
  resize: none;
}

.contact-form__input::placeholder,
.contact-form__textarea::placeholder {
  color: var(--color-gray);
}

.contact-form__input:focus,
.contact-form__textarea:focus {
  border-bottom-color: var(--color-dark);
}

.contact-form__textarea {
  min-height: 80px;
}

.contact-form__submit {
  align-self: flex-end;
  margin-top: 30px;
  padding: 12px 40px;
  background: var(--color-gray);
  color: var(--color-white);
  border: none;
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.contact-form__submit:hover {
  background: var(--color-dark);
}

.contact-form__message {
  margin-top: 15px;
  font-size: 13px;
  text-align: right;
}

.contact-form__message--success {
  color: #4a9e4a;
}

.contact-form__message--error {
  color: #c0392b;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  :root {
    --section-padding: 60px;
  }

  .about-section {
    grid-template-columns: 150px 1fr;
    gap: 40px;
  }

  .contact-layout {
    gap: 50px;
  }

  .team-member__photo {
    display: none;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  .site-header {
    padding: 0 20px;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--color-white);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    transition: right 0.4s ease;
    z-index: 10000;
  }

  .site-nav.open {
    right: 0;
  }

  .site-nav a {
    font-size: 18px;
    color: var(--color-dark) !important;
  }

  .page-title {
    font-size: 32px;
    padding-top: calc(var(--header-height) + 20px);
  }

  .aspect-container {
    padding: 0 20px;
  }

  /* Projects Grid - 2 columns on tablet */
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-filters {
    padding: 0 20px;
  }

  /* News Grid */
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-section {
    padding: 60px 24px;
  }

  .portfolio-intro {
    padding: 40px 24px 0;
  }

  /* About */
  .about-section {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 24px;
  }

  .about-page .aspect-container {
    padding: 0 24px;
  }

  .about-section__content {
    text-align: left;
  }

  /* Contact */
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 0 20px;
  }

  /* Single Project */
  .project-content {
    padding: 30px 20px 0;
  }

  .project-content h1 {
    font-size: 30px;
  }

  .project-back {
    padding: 0 20px;
  }

  /* Footer */
  .site-footer {
    padding: 30px 20px;
  }
}

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

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

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

  .hero-slide__title {
    font-size: 24px;
  }

  .site-logo {
    font-size: 13px;
    letter-spacing: 0.25em;
  }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* WordPress admin bar adjustment */
body.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}
