/*
===============================================================================
PRIMERISE DEVELOPMENT LLC - CUSTOM DESIGN SYSTEM
===============================================================================
Framework: Hybrid Tailwind + Custom CSS
Built on: Tailwind CSS + DaisyUI with custom design system overlay
Theme: Deep Navy & Gold with grid-based architecture
Version: 1.0 - Initial Integration

This file extends the existing Tailwind/DaisyUI setup with custom design
system components while maintaining full compatibility with existing utilities.
===============================================================================
*/

/* CSS Custom Properties - Design Tokens */
:root {
  /* Base Colors - Light Theme */
  --bg: #ffffff;
  --ink: #1e293b;
  --muted: #64748b;
  --accent: #f59e0b;
  --accent2: #f59e0b;
  --line: #e2e8f0;
  --card: #f8fafc;
  --success: #4caf50;
  --error: #f44336;

  /* PrimeRise Brand Colors */
  --prime-brand-amber: #fbbf24;
  --prime-brand-amber-hover: #f59e0b;
  --prime-brand-slate: #0f172a;
  --prime-brand-slate-800: #1e293b;
}

/* Base HTML & Body Styling */
html, body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent 0 49px, var(--line) 49px 50px, transparent 50px) repeat-x,
    linear-gradient(0deg, transparent 0 49px, var(--line) 49px 50px, transparent 50px) repeat-y,
    #ffffff;
  background-size: 50px 100%, 100% 50px, auto;
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* Container System */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 48px);
}

/* Header Styling */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: clamp(16px, 3vw, 32px) clamp(16px, 3vw, 48px);
  position: relative;
}

.mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--accent);
  position: relative;
}

.mark:before, .mark:after {
  content: "";
  position: absolute;
  background: var(--accent);
}

.mark:before {
  width: 70%;
  height: 1px;
}

.mark:after {
  height: 70%;
  width: 1px;
}

.brand {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Navigation */
nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s;
}

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

.theme-toggle {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--accent);
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  background: rgba(214, 167, 108, 0.1);
}

/* Grid System */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(12px, 2vw, 24px);
  margin: 4rem 0;
}

.section-title {
  grid-column: 1/-1;
  font: 700 1.8rem ui-serif, Georgia, serif;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin: 3rem 0 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
}

/* Work Cards */
.work-card {
  grid-column: span 4;
  background: white;
  border: 2px solid var(--line);
  padding: clamp(20px, 3vw, 32px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.work-card:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.work-card:hover:before {
  transform: scaleX(1);
}

.work-meta {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.work-card h3 {
  font: 600 1.4rem ui-serif, Georgia, serif;
  color: var(--ink);
  margin: 0.5rem 0;
}

.work-card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Tags */
.tag {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 6px 12px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s;
}

.btn:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
}

/* Footer */
footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Project Cards */
.project-card {
  grid-column: span 4;
  background: white;
  border: 2px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.project-card:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.project-card:hover:before {
  transform: scaleX(1);
}

.card-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-thumbnail svg {
  width: 48px;
  height: 48px;
  color: var(--muted);
}

.card-content {
  padding: clamp(16px, 3vw, 24px);
}

.card-number {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.card-title {
  font: 600 1.3rem ui-serif, Georgia, serif;
  margin: 0.5rem 0;
  color: var(--ink);
}

.card-summary {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Album Cards */
.album-card {
  background: white;
  border: 2px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.album-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.album-cover {
  height: 250px;
  background: #0e1219;
  display: grid;
  place-items: center;
}

.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.album-card:hover .album-cover img {
  transform: scale(1.05);
}

.album-info {
  padding: clamp(16px, 3vw, 24px);
}

.album-info h3 {
  margin: 0 0 0.4rem;
  font: 600 1.2rem ui-serif, Georgia, serif;
  color: var(--accent);
}

.album-info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.album-meta {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Hero - Split Layout */
.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: 0;
  margin: 0 0 4rem;
  border: 1px solid var(--line);
  overflow: hidden;
}

.hero-image {
  position: relative;
  min-height: 400px;
  background:
    radial-gradient(600px 400px at 70% 50%, rgba(214, 167, 108, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.4)),
    var(--bg);
  background-size: cover;
  background-position: center;
  background-blend-mode: screen, multiply, normal;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 4rem);
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  min-height: 400px;
}

/* Desktop: side by side */
@media (min-width: 901px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    min-height: 70vh;
  }
  .hero-image {
    border-right: 1px solid var(--line);
    min-height: 70vh;
  }
  .hero-content {
    min-height: 70vh;
  }
}

/* Mobile: stacked */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-image {
    border-bottom: 1px solid var(--line);
    min-height: clamp(300px, 50vh, 500px);
  }
  .hero-content {
    min-height: auto;
  }
}

.kicker {
  color: #f59e0b;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  font-weight: 600;
  display: inline-block;
}

.hero h1 {
  font: 700 clamp(2rem, 5vw, 3.5rem)/1.1 ui-serif, Georgia, serif;
  margin: 0 0 1.5rem;
  color: #ffffff;
}

.hero .poem {
  font: 300 clamp(1.1rem, 2vw, 1.4rem)/1.8 ui-serif, Georgia, serif;
  color: #cbd5e1;
  font-style: italic;
  margin: 2rem 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--accent);
}

.poem p {
  margin: 0.5rem 0;
}

.cta {
  display: inline-block;
  padding: 14px 32px;
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s;
  align-self: flex-start;
}

.cta:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
}

/* Contact Section */
.contact-section {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(20px, 3vw, 40px);
  margin: 3rem 0;
}

.contact-form {
  background: white;
  border: 2px solid var(--line);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.contact-form label {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  background: #0e1219;
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: inherit;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}

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

.contact-form button {
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  transition: all 0.2s;
}

.contact-form button:hover {
  background: var(--accent);
  color: var(--bg);
}

.studio-info {
  background: white;
  border: 2px solid var(--line);
  padding: clamp(24px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.studio-info h4 {
  color: var(--accent);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.studio-info p {
  color: var(--muted);
  line-height: 1.8;
}

/* Fullscreen Viewer */
.fullscreen-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 17, 21, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.fullscreen-viewer.active {
  opacity: 1;
  visibility: visible;
}

.fullscreen-image-container {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
}

.fullscreen-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
}

.fullscreen-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30, 30, 30, 0.5);
  border: 1px solid var(--line);
  color: var(--ink);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s;
}

.fullscreen-nav:hover {
  background: var(--accent);
  color: var(--bg);
}

.fullscreen-nav.prev {
  left: -60px;
}

.fullscreen-nav.next {
  right: -60px;
}

.fullscreen-close {
  position: absolute;
  top: -40px;
  right: -40px;
  background: rgba(30, 30, 30, 0.5);
  border: 1px solid var(--line);
  color: var(--ink);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s;
}

.fullscreen-close:hover {
  background: var(--error);
  color: var(--bg);
}

.fullscreen-counter {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 30, 30, 0.5);
  padding: 5px 15px;
  border-radius: 15px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Featured Gallery Carousel */
.featured-gallery {
  grid-column: 1 / -1;
  margin: 2rem 0;
}

.carousel-wrapper {
  position: relative;
}

.carousel-container {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: clamp(12px, 2vw, 24px);
  padding: 0.5rem 0;
  scrollbar-width: none;
}

.carousel-container::-webkit-scrollbar {
  display: none;
}

.carousel-item {
  flex: 0 0 clamp(280px, 60vw, 400px);
  background: white;
  border: 2px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.carousel-item:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.carousel-image {
  height: 220px;
  background: #0e1219;
}

.carousel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-caption {
  padding: 1rem;
}

.carousel-caption h4 {
  margin: 0 0 0.3rem;
  font: 600 1.1rem ui-serif, Georgia, serif;
  color: var(--accent);
}

.carousel-caption p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30, 30, 30, 0.5);
  border: 1px solid var(--line);
  color: var(--ink);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.carousel-nav:hover {
  background: var(--accent);
  color: var(--bg);
}

.carousel-nav.prev {
  left: -20px;
}

.carousel-nav.next {
  right: -20px;
}

/* Flash Messages */
.flash-messages {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  grid-column: 1 / -1;
}

.flash {
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 4px;
}

.flash.success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.flash.error {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

/* Blog Preview */
.blog-preview {
  grid-column: 1/-1;
  background:
    radial-gradient(800px 300px at 70% 50%, rgba(214, 167, 108, 0.08), transparent),
    linear-gradient(180deg, var(--card), #0e1219);
  border: 1px solid var(--line);
  padding: clamp(32px, 5vw, 64px);
  margin: 2rem 0;
}

.blog-preview h3 {
  font: 700 1.6rem ui-serif, Georgia, serif;
  color: var(--accent);
  margin-bottom: 1rem;
}

.blog-preview .excerpt {
  font: 300 1.1rem/1.7 ui-serif, Georgia, serif;
  color: var(--muted);
  font-style: italic;
}

/* Breadcrumb */
.detail-header {
  grid-column: 1/-1;
  margin-bottom: 2rem;
}

.breadcrumb {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--accent2);
}

.breadcrumb span {
  color: var(--line);
}

/* Work Card Variations */
.work-card-half {
  grid-column: span 6;
}

/* Footer Styles */
footer a:hover {
  color: var(--accent) !important;
  opacity: 0.9;
}

footer .footer-column {
  margin-bottom: 2rem;
}

/* Responsive Utilities */
@media (max-width: 900px) {
  .work-card, .project-card {
    grid-column: span 6;
  }
  .work-card-half {
    grid-column: span 6;
  }
  nav ul {
    gap: 16px;
    font-size: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  header {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  .contact-section {
    grid-template-columns: 1fr;
  }

  /* Footer responsive adjustments */
  footer .footer-column {
    grid-column: span 6 !important;
  }
}

@media (max-width: 640px) {
  .work-card, .project-card, .work-card-half {
    grid-column: span 12 !important;
  }

  /* Footer stacks on mobile */
  footer .footer-column {
    grid-column: span 12 !important;
    text-align: left;
  }
}
