/*
Theme Name: P76 Art Studio
Description: Motyw potomny Blocksy dla strony P76 Art Studio.
Author: P76 Art Studio
Template: blocksy
Version: 1.0.0
Text Domain: p76-artstudio
*/

:root {
  --p76-accent: var(--p76-text);
  --p76-accent-hover: #fff;
  --p76-background: #000;
  --p76-surface: #101010;
  --p76-border: rgba(255, 255, 255, 0.12);
  --p76-heading: rgba(255, 255, 255, 0.8);
  --p76-text: rgba(255, 255, 255, 0.66);
  --p76-text-soft: rgba(255, 255, 255, 0.58);
}

/* Keep page backgrounds black without recoloring the WordPress admin UI. */
body {
  --theme-page-background-color: var(--p76-background);
  background-color: var(--p76-background) !important;
}

#main {
  background-color: var(--p76-background) !important;
}

/* Blocksy cleanup */
.hero-section,
.ct-page-title,
.entry-header {
  display: none !important;
}

.ct-footer [data-row="top"],
.ct-footer [data-row="middle"],
.ct-footer [data-id="widget-area-5"],
.ct-footer .menu,
.ct-footer nav,
.ct-footer .ct-footer-menu {
  display: none !important;
}

.ct-footer {
  background: var(--p76-background) !important;
}

.ct-footer * {
  color: rgba(255, 255, 255, 0.55);
}

.ct-footer [data-id="copyright"] {
  font-size: 0 !important;
}

.ct-footer [data-id="copyright"]::before {
  content: "© 2026 P76 Art Studio";
  color: #777;
  font-size: 15px;
}

/* Frosted sticky header */
#header .ct-sticky-container > [data-sticky] > [data-row="middle"] {
  background-color: rgba(8, 8, 8, 0.52) !important;
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.24);
}

#header .ct-menu-link {
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}

#header [data-id="logo"] .site-logo-container {
  --logo-max-height: 70px !important;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  #header .ct-sticky-container > [data-sticky] > [data-row="middle"] {
    background-color: rgba(8, 8, 8, 0.92) !important;
  }
}

/* Monochrome controls: paintings provide the color. */
:is(.wp-block-button__link, input[type="submit"], .wpforms-submit, .ct-button, .ct-button-ghost, .p76-button),
.wp-block-button.is-style-outline .wp-block-button__link {
  background-color: transparent !important;
  border: 1px solid var(--p76-accent) !important;
  border-radius: 0 !important;
  color: var(--p76-accent) !important;
}

:is(.wp-block-button__link, input[type="submit"], .wpforms-submit, .ct-button, .ct-button-ghost, .p76-button):is(:hover, :focus-visible),
.wp-block-button.is-style-outline .wp-block-button__link:is(:hover, :focus-visible) {
  background-color: var(--p76-surface) !important;
  border-color: var(--p76-accent-hover) !important;
  color: var(--p76-accent-hover) !important;
}

:is(.wp-block-button__link, input[type="submit"], .wpforms-submit, .ct-button, .ct-button-ghost, .p76-button):focus-visible {
  outline: 2px solid var(--p76-accent-hover);
  outline-offset: 4px;
}

/* Header CTA uses the same text color as the other navigation items. */
.ct-header-cta {
  --p76-accent: var(--theme-text-color);
}

.entry-content a:hover {
  color: var(--p76-accent-hover) !important;
}

.p76-kicker,
.p76-artwork-price,
.p76-artwork-status {
  color: var(--p76-accent) !important;
}

header [class*="menu"] .current-menu-item > a,
header [class*="menu"] .current_page_item > a {
  color: #fff !important;
}

header [class*="menu"] .current-menu-item > a::after,
header [class*="menu"] .current_page_item > a::after,
.ct-menu-link::after {
  background-color: var(--p76-accent) !important;
  border-color: var(--p76-accent) !important;
}

.ct-panel .current-menu-item > a,
.ct-panel .current_page_item > a,
.mobile-menu .current-menu-item > a,
.mobile-menu .current_page_item > a,
[class*="offcanvas"] .current-menu-item > a,
[class*="offcanvas"] .current_page_item > a {
  color: var(--p76-accent) !important;
}

.ct-panel .ct-social-box a,
[class*="offcanvas"] .ct-social-box a,
.mobile-menu .ct-social-box a {
  background-color: var(--p76-accent) !important;
  color: #fff !important;
}

/* Typography shared by P76 pages */
.p76-home-hero h1,
.p76-page h1,
.p76-section h2,
.p76-page h2,
.p76-single-artwork h1,
.entry-content h1,
.entry-content h2 {
  color: var(--p76-heading) !important;
}

.p76-home-hero .p76-lead,
.p76-page .p76-lead {
  color: rgba(255, 255, 255, 0.62) !important;
}

.p76-home-hero p,
.p76-page p,
.p76-section p {
  color: var(--p76-text-soft) !important;
}

.p76-home-hero h1,
.p76-page h1,
.p76-section h2,
.p76-page h2,
.p76-single-artwork h1,
.entry-content h1,
.entry-content h2 {
  font-family: "Luxurious Script", cursive !important;
  font-weight: 400 !important;
  letter-spacing: 0.045em !important;
  word-spacing: 0.06em;
}

/* Homepage */
.p76-home-welcome {
  margin: 0 auto !important;
  padding-top: clamp(40px, 6vw, 72px);
  text-align: center;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.2;
}

.p76-home-hero {
  position: relative;
  min-height: 72vh;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  align-items: flex-start !important;
  overflow: hidden;
  padding-top: clamp(120px, 18vh, 220px) !important;
  padding-bottom: clamp(56px, 9vh, 110px) !important;
  background-color: var(--p76-background) !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  border-bottom: 0;
}

body.p76-has-hero-artwork .p76-home-hero {
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.42)),
    var(--p76-hero-image) !important;
}

body.p76-no-hero-artwork .p76-home-hero {
  min-height: auto !important;
  display: block !important;
  padding-top: clamp(72px, 10vh, 120px) !important;
  padding-bottom: clamp(56px, 8vh, 90px) !important;
  background: transparent !important;
  border: 0 !important;
}

.p76-home-hero h1 {
  max-width: 980px;
  margin: 0 0 28px;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 0.92;
}

.p76-kicker {
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.p76-lead {
  max-width: 680px;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.5;
}

.p76-section {
  padding: clamp(70px, 9vw, 130px) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.p76-section h2 {
  margin-bottom: 22px;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1;
}

.p76-section > p,
.p76-intro-copy > p {
  max-width: 720px;
  font-size: 18px;
}

/* Editable homepage text/image columns; core blocks stack these on mobile. */
.p76-intro-columns {
  gap: clamp(32px, 5vw, 72px);
  margin-top: 32px;
  margin-bottom: 0;
}

.p76-intro-artwork .wp-block-image {
  margin: 0;
}

.p76-intro-artwork .wp-block-image img {
  display: block;
  width: 100%;
  height: auto;
}

.p76-contact-cta {
  text-align: center;
}

.p76-contact-cta p {
  margin-right: auto;
  margin-left: auto;
}

.p76-home-closing {
  margin: clamp(70px, 9vw, 130px) auto 0 !important;
}

.p76-home-closing a,
.p76-home-closing img {
  display: block;
  width: 100%;
}

.p76-home-closing img {
  height: auto;
}

/* Standard pages */
.p76-page,
.p76-contact-page {
  padding: clamp(70px, 9vw, 130px) 0;
}

.p76-page h1,
.p76-contact-page h1 {
  margin-bottom: 28px;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 0.92;
}

.p76-page h2,
.p76-contact-page h2 {
  margin-bottom: 18px;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1;
}

.p76-text-block {
  max-width: 860px;
  margin-top: 70px;
}

.p76-text-block h2 {
  font-size: clamp(32px, 4vw, 58px);
}

.p76-text-block p {
  color: var(--p76-text) !important;
  font-size: 19px;
  line-height: 1.75;
}

/* Artwork grids and cards */
.p76-artworks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.p76-artwork-card {
  min-height: auto !important;
  overflow: hidden;
  background: #111;
  border: 1px solid var(--p76-border);
}

.p76-artwork-card:not(:has(img)) {
  min-height: 220px;
  display: flex;
  align-items: flex-end;
}

.p76-artwork-card a {
  text-decoration: none;
}

.p76-artwork-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  display: block;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.p76-artwork-card:hover img {
  transform: scale(1.04);
}

.p76-artwork-card-content {
  padding: 18px;
  background: var(--p76-surface);
}

.p76-artwork-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.p76-artwork-meta,
.p76-artwork-status,
.p76-empty {
  color: rgba(255, 255, 255, 0.62);
}

.p76-artwork-status {
  margin-bottom: 0;
  font-size: 15px;
}

/* Single artwork */
.p76-single-artwork {
  padding: clamp(60px, 8vw, 120px) 0;
  background: var(--p76-background);
  color: #fff;
}

.p76-single-artwork-inner {
  width: min(1400px, calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.p76-single-artwork-image img {
  width: 100%;
  height: auto;
  display: block;
  background: #0f0f0f;
  filter: brightness(1.08) contrast(1.03);
}

.p76-no-image {
  min-height: 320px;
  display: grid;
  place-items: center;
  background: #0f0f0f;
  color: rgba(255, 255, 255, 0.5);
}

.p76-single-artwork-content h1 {
  margin: 0 0 36px;
  overflow-wrap: anywhere;
  font-size: clamp(36px, 5vw, 72px) !important;
  line-height: 0.95;
}

.p76-artwork-details {
  margin: 0 0 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.p76-artwork-details:empty {
  display: none;
}

.p76-artwork-details > div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.p76-artwork-details span {
  color: rgba(255, 255, 255, 0.48);
}

.p76-artwork-details strong {
  color: #fff;
  font-weight: 600;
}

.p76-artwork-description {
  margin-bottom: 40px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 18px;
  line-height: 1.7;
}

.p76-artwork-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: center;
}

.p76-button {
  display: inline-block;
  padding: 14px 24px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.p76-link {
  padding: 14px 0;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
  text-decoration: none;
}

.p76-link::before {
  content: "← ";
}

.p76-link:hover {
  color: #fff;
}

/* Contact form */
.wpforms-container input,
.wpforms-container textarea {
  background: var(--p76-surface) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 0 !important;
  color: #fff !important;
}

.wpforms-container label {
  color: rgba(255, 255, 255, 0.78) !important;
}

.wpforms-submit {
  padding: 14px 24px !important;
  border-radius: 0 !important;
  color: var(--p76-accent) !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

/* Artwork lightbox */
.p76-lightbox {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.p76-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.p76-lightbox img {
  width: auto;
  max-width: min(96vw, 1600px);
  height: auto;
  max-height: 92vh;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  transform: scale(0.985);
  transition: transform 0.22s ease;
}

.p76-lightbox.is-open img {
  transform: scale(1);
}

.p76-lightbox-close {
  position: fixed;
  z-index: 1000000;
  top: 24px;
  right: 28px;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  color: #fff !important;
  font-size: 46px;
  line-height: 1;
  cursor: pointer;
}

.p76-lightbox-close:hover {
  color: var(--p76-accent) !important;
}

/* Responsive layout */
@media (max-width: 900px) {
  .p76-artworks-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .p76-single-artwork-inner {
    grid-template-columns: 1fr;
  }

  .p76-artwork-details > div {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 768px) {
  #header [data-id="logo"] .site-logo-container {
    --logo-max-height: 44px !important;
  }

  .p76-home-hero {
    justify-content: flex-end !important;
    padding-top: 120px !important;
    padding-bottom: 54px !important;
    background-position: center center !important;
  }

  body.p76-no-hero-artwork .p76-home-hero {
    padding-top: 56px !important;
    padding-bottom: 48px !important;
  }
}

@media (max-width: 600px) {
  .p76-artworks-grid {
    grid-template-columns: 1fr;
  }
}
