/*
Theme Name: Mudioluman First Version
Theme URI: https://mudioluman.ch
Author: Mudioluman
Description: Custom theme replicating the first mockup for Mudioluman label with customizable colors.
 Version: 1.8
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mudioluman-first
*/

/*
 * CSS custom properties define the core color palette. These variables can be overridden
 * via the Customizer settings to personalise the theme colours without editing the CSS.
 */
:root {
  --background-color: #000d2e;
  --header-color: #00071c;
  --text-color: #f5f7ff;
  --intro-text-color: #ddcdc7;
  --accent-primary: #ff7a45;
  --accent-secondary: #9a6bff;
  --accent-tertiary: #4aa8ff;
  --card-bg: #111a2c;
  --hero-title-color: transparent;
  	
  --body-font: Arial;
}

body {
  margin: 0;
  padding: 0;
  font-family: --body-font, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  /*
   * Use a flexbox layout on the body to ensure that the footer
   * sticks to the bottom of the viewport even when there is little
   * or no content.  The main sections will grow to fill the
   * available space, pushing the footer down.  Without this the
   * footer can float somewhere in the middle on short pages.
   */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  background-color: var(--header-color);
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header .logo img {
  height: 40px;
  width: auto;
}

.site-nav .nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.site-nav .nav li {
  margin-left: 1.5rem;
}

.site-nav .nav li a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
}

.site-nav .nav li a:hover {
  color: var(--accent-primary);
}

/* Hero section with background image and luminous gradient text */
.hero {
  position: relative;
  background-image: url('assets/banner.png');
  background-size: cover;
  background-position: center center;
  color: #ffffff;
  padding: 4rem 1rem;
  text-align: center;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  pointer-events: none;
}

.hero h1 {
  font-size: 3rem;
  margin: 0;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
  -webkit-background-clip: text;
  /* Use the custom colour variable for the hero title. When this is set to
     'transparent', the gradient remains visible. Otherwise, the solid colour
     specified by --hero-title-color will be used. */
  -webkit-text-fill-color: var(--hero-title-color);
  text-fill-color: var(--hero-title-color);
}

.hero p {
  margin-top: 1rem;
  font-size: 1.2rem;
  font-weight: 400;
}

/* Introduction section */
.intro {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 1rem;
  text-align: center;
  line-height: 1.6;
  color: var(--intro-text-color);
}

/* Artists listing */
.artists {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.artists h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.artists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* Artist card */
.artist-card {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-color);
  background-color: var(--card-bg);
  /* Gradient border effect inspired by the first mockup.
   * We simulate a glowing, multi‑colour frame by using a solid border
   * combined with a soft box‑shadow.  The border colour uses the
   * secondary accent by default and switches to the primary accent
   * on hover.  The box shadow provides the luminous halo around the
   * card.  Adjust the opacity to taste. */
  border: 2px solid var(--accent-secondary);
  box-shadow: 0 0 12px rgba(154,107,255,0.5), 0 0 24px rgba(74,168,255,0.25);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.artist-card:hover {
  border-color: var(--accent-primary);
  /* Intensify the glow on hover to draw attention */
  box-shadow: 0 0 14px rgba(255,122,69,0.6), 0 0 28px rgba(154,107,255,0.35);
}

.artist-card .image {
  position: relative;
  width: 100%;
  height: 0;
  /* Adjust the padding to control the aspect ratio of the image.
   * A value greater than 100% yields a taller image.  We use 120%
   * here to approach the golden ratio for a more balanced card. */
  padding-bottom: 120%;
  background-size: cover;
  background-position: center center;
}

.artist-card .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  /* Extend the overlay higher to ensure text readability on images */
  height: 80%;
  /* Smooth gradient from transparent to deep background colour. */
  background: linear-gradient(rgba(0,0,0,0), var(--background-color));
}

.artist-card .info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  box-sizing: border-box;
  z-index: 2;
  pointer-events: none; /* Prevent mouse events interfering with hover glow */
}

.artist-card .info h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  /* Use a gradient on the artist name similar to the hero title
   * to create a luminous effect.  The gradient is clipped to the text. */
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-fill-color: transparent;
}

.artist-card .info .style {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--accent-primary);
  font-weight: 500;
}

.artist-card .info .bio {
  /* Hide the bio on cards.  The biography will be displayed on the
     dedicated artist page instead. */
  display: none;
}

/* Styles for the Gutenberg pattern cards (artists displayed via Query Loop) */
.wp-block-group.artist-card {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-color);
  background-color: var(--card-bg);
  border: 2px solid var(--accent-secondary);
  box-shadow: 0 0 12px rgba(154,107,255,0.5), 0 0 24px rgba(74,168,255,0.25);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.wp-block-group.artist-card:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 14px rgba(255,122,69,0.6), 0 0 28px rgba(154,107,255,0.35);
}

/* Adjust the featured image in pattern cards */
.wp-block-group.artist-card .wp-block-post-featured-image {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  background-size: cover;
  background-position: center center;
  overflow: hidden;
}
.wp-block-group.artist-card .wp-block-post-featured-image img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.wp-block-group.artist-card .info {
  padding: 1rem;
  position: relative;
}

.wp-block-group.artist-card .info h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-fill-color: transparent;
}

.wp-block-group.artist-card .info .wp-block-post-excerpt {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--intro-text-color);
}

/* Single artist page styles */
.single-artist .artist-banner {
  position: relative;
  text-align: center;
  color: var(--text-color);
}

.single-artist .artist-banner-image {
  position: relative;
  height: 300px;
  background-size: cover;
  background-position: center center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.single-artist .artist-banner-image h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-fill-color: transparent;
}

.artist-details {
  max-width: 800px;
  margin: 2rem auto;
  color: var(--intro-text-color);
  line-height: 1.6;
  padding: 0 1rem;
}

/* Single artist profile section
 *
 * The profile section displays the artiste’s portrait alongside their
 * style and biography.  We use a flex layout to align the image and
 * text neatly.  The portrait adopts rounded corners to echo the
 * card aesthetic and is constrained to a reasonable size.  The style
 * is highlighted using the primary accent colour.  The biography
 * inherits the intro text colour for readability.
 */
.single-artist .artist-profile {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.single-artist .artist-profile .profile-image img {
  border-radius: 16px;
  width: 280px;
  height: auto;
  object-fit: cover;
  box-shadow: 0 0 12px rgba(74,168,255,0.25), 0 0 24px rgba(154,107,255,0.15);
}

.single-artist .artist-profile .artist-style {
  font-size: 1.1rem;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.single-artist .artist-profile .artist-bio {
  color: var(--intro-text-color);
  max-width: 500px;
  line-height: 1.6;
}

/* Footer */
.site-footer {
  background-color: var(--header-color);
  color: var(--text-color);
  text-align: center;
  padding: 1.5rem 1rem;
  /* Allow the footer to push itself to the bottom of the page */
  margin-top: auto;
}

.site-footer p {
  margin: 0.5rem 0;
}

.site-footer a {
  color: var(--accent-primary);
  text-decoration: none;
  margin-left: 0.5rem;
}

.site-footer a:hover {
  text-decoration: underline;
}