/*
Theme Name: 3DTown Portfolio
Theme URI: https://www.3dtown.net/
Author: Federico Vidal
Author URI: https://www.3dtown.net/
Description: A lightweight, responsive block theme for an architectural visualisation portfolio. No page builder or required plugins.
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: 3dtown-portfolio
Tags: portfolio, block-patterns, full-site-editing, one-column, two-columns, wide-blocks
*/

:root {
  --tdt-transition: 220ms cubic-bezier(.2,.7,.2,1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  text-underline-offset: .18em;
  text-decoration-thickness: 1px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--wp--preset--color--background) 88%, transparent);
  border-bottom: 1px solid var(--wp--preset--color--line);
}

.admin-bar .site-header {
  top: 32px;
}

.site-header .wp-block-navigation-item__content,
.site-footer a {
  text-decoration: none;
}

.site-header .wp-block-navigation-item__content:hover,
.site-footer a:hover {
  opacity: .62;
}

.portfolio-hero {
  min-height: min(760px, 82vh);
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
}

.portfolio-hero::before {
  content: "";
  position: absolute;
  width: 42vw;
  height: 42vw;
  min-width: 340px;
  min-height: 340px;
  right: -11vw;
  top: -15vw;
  border: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 12%, transparent);
  border-radius: 50%;
  pointer-events: none;
}

.portfolio-hero::after {
  content: "";
  position: absolute;
  width: 24vw;
  height: 24vw;
  min-width: 220px;
  min-height: 220px;
  right: 8vw;
  top: 4vw;
  border: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 8%, transparent);
  border-radius: 50%;
  pointer-events: none;
}

.portfolio-hero > * {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero-title {
  max-width: 1050px;
  text-wrap: balance;
}

.hero-copy {
  max-width: 650px;
}

.section-label {
  letter-spacing: .12em;
  text-transform: uppercase;
}

.project-grid .wp-block-post-template {
  align-items: stretch;
}

.portfolio-card {
  height: 100%;
  overflow: hidden;
  border-top: 1px solid var(--wp--preset--color--line);
  transition: transform var(--tdt-transition), opacity var(--tdt-transition);
}

.portfolio-card:hover {
  transform: translateY(-4px);
}

.portfolio-card .wp-block-post-featured-image {
  overflow: hidden;
  background: var(--wp--preset--color--surface);
}

.portfolio-card .wp-block-post-featured-image img {
  transition: transform 700ms cubic-bezier(.2,.7,.2,1);
}

.portfolio-card:hover .wp-block-post-featured-image img {
  transform: scale(1.025);
}

.portfolio-card .wp-block-post-title a {
  text-decoration: none;
}

.portfolio-card .wp-block-post-title a:hover {
  opacity: .62;
}

.portfolio-card .wp-block-post-excerpt__more-link {
  display: inline-block;
  margin-top: .75rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
}

.about-panel,
.contact-panel {
  border-top: 1px solid var(--wp--preset--color--line);
}

.contact-panel .wp-block-button__link,
.portfolio-hero .wp-block-button__link {
  transition: transform var(--tdt-transition), opacity var(--tdt-transition);
}

.contact-panel .wp-block-button__link:hover,
.portfolio-hero .wp-block-button__link:hover {
  transform: translateY(-2px);
  opacity: .82;
}

.single-project-image img {
  width: 100%;
  max-height: 82vh;
  object-fit: cover;
}

.project-navigation {
  border-top: 1px solid var(--wp--preset--color--line);
}

.site-footer {
  border-top: 1px solid var(--wp--preset--color--line);
}

.wp-block-post-content > .wp-block-image.alignwide,
.wp-block-post-content > .wp-block-gallery.alignwide,
.wp-block-post-content > .wp-block-cover.alignwide {
  margin-top: clamp(2rem, 5vw, 5rem);
  margin-bottom: clamp(2rem, 5vw, 5rem);
}

.wp-block-post-content p {
  text-wrap: pretty;
}

.wp-block-query-pagination a {
  text-decoration: none;
}

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

  .portfolio-hero {
    min-height: 620px;
  }

  .portfolio-hero::before {
    right: -38vw;
    top: -12vw;
  }

  .portfolio-hero::after {
    right: -6vw;
    top: 13vw;
  }

  .site-header .wp-block-site-title {
    font-size: 1rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
