@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Caveat:wght@700&family=Lora:ital,wght@0,400..700;1,400..700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

/* ==========================================================================
   DESIGN VARIABLES & SYSTEM
   ========================================================================== */
:root {
  /* Colors */
  --bg: #F5EFE0;          /* Aged cream / old parchment */
  --ink: #1A1008;         /* Near-black warm ink */
  --rust: #B8390E;        /* Deep rust / burnt sienna */
  --rust-light: #D4541A;  /* Lighter rust accent */
  --gold: #C8921A;        /* Antique gold */
  --chalk: #FAF7F0;       /* Off-white for cards/ledgers */
  --tag: #1A1008;         /* Dark for graffiti tag text */

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-street: 'Bebas Neue', Impact, sans-serif;
  --font-body: 'Lora', 'Times New Roman', serif;
  --font-accent: 'Caveat', cursive;

  /* Custom Transitions */
  --ease-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ==========================================================================
   RESET & FOUNDATIONS
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  width: 100%;
}

/* tactile cement noise texture overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  opacity: 0.045;
  pointer-events: none;
  z-index: 9999;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
  font-weight: 800;
  line-height: 1.1;
}

.font-display {
  font-family: var(--font-display);
}

.font-street {
  font-family: var(--font-street);
  letter-spacing: 1px;
}

.font-accent {
  font-family: var(--font-accent);
}

/* Selection highlight */
::selection {
  background-color: var(--rust);
  color: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

/* ==========================================================================
   NAV NAVIGATION (Sticky Baroque Glassmorphism)
   ========================================================================== */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2.5rem;
  background-color: rgba(245, 239, 224, 0.9);
  backdrop-filter: blur(12px) contrast(95%);
  border-bottom: none;
  transition: var(--transition-smooth);
}

.main-nav.scrolled {
  background-color: var(--bg);
  backdrop-filter: none;
  border-bottom: 2px solid var(--ink);
  padding: 0.75rem 2.5rem;
  box-shadow: 0 4px 20px rgba(26, 16, 8, 0.08);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.5px;
}

@media (min-width: 769px) {
  .nav-logo {
    transform: translateY(2.5px);
  }
}

.nav-logo span {
  font-family: var(--font-street);
  color: var(--rust);
  font-size: 1.5rem;
  margin-left: 2px;
  vertical-align: middle;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-links a {
  font-family: var(--font-street);
  font-size: 1.3rem;
  position: relative;
  padding: 0.25rem 0;
  text-transform: uppercase;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--rust);
  transition: var(--transition-smooth);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--rust);
}

/* Hamburger button */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
  padding: 0.5rem;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--ink);
  margin: 5px 0;
  transition: var(--transition-smooth);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 400px;
  height: 100vh;
  background-color: var(--bg);
  z-index: 1050;
  padding: 8rem 2.5rem 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  box-shadow: -10px 0 30px rgba(26, 16, 8, 0.2);
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 3px solid var(--ink);
  overflow-y: auto;
}

.mobile-nav-drawer.active {
  right: 0;
}

.mobile-nav-drawer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0.15;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ctext y='20' x='5' fill='%231a1008' font-family='sans-serif' font-weight='bold' font-size='12' opacity='0.4'%3EHARD CODED%3C/text%3E%3Ctext y='50' x='35' fill='%23b8390e' font-family='sans-serif' font-weight='bold' font-size='18' opacity='0.4'%3EEST. 2026%3C/text%3E%3Ctext y='80' x='10' fill='%231a1008' font-family='sans-serif' font-weight='bold' font-size='15' opacity='0.4'%3EBROWN MUNDE%3C/text%3E%3C/svg%3E");
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 2;
}

.mobile-nav-links a {
  font-family: var(--font-street);
  font-size: 2.2rem;
  text-transform: uppercase;
  display: inline-block;
  width: 100%;
  border-bottom: 1px dashed rgba(26, 16, 8, 0.15);
  padding-bottom: 0.5rem;
}

.mobile-nav-links a.active {
  color: var(--rust);
  border-bottom-color: var(--rust);
}

.mobile-nav-drawer .drawer-footer {
  margin-top: auto;
  font-family: var(--font-accent);
  font-size: 1.25rem;
  color: var(--rust);
  text-align: center;
  z-index: 2;
}

/* Overlay dark background for mobile drawer */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(26, 16, 8, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1020;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   BUTTONS (Organic Ink-Bleed Shadow & Slight Rotation)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-street);
  font-size: 1.25rem;
  padding: 0.75rem 2rem;
  text-transform: uppercase;
  border-radius: 0;
  cursor: pointer;
  transition: transform 0.25s var(--ease-elastic), box-shadow 0.25s ease, background-color 0.2s ease;
  position: relative;
  text-align: center;
  user-select: none;
}

.btn-primary {
  background-color: var(--rust);
  color: var(--bg);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0px var(--ink);
}

.btn-primary:hover {
  transform: rotate(-1.5deg) scale(1.03);
  background-color: var(--rust-light);
  box-shadow: 6px 6px 12px rgba(26, 16, 8, 0.3), 6px 6px 0px var(--ink);
}

.btn-secondary {
  background-color: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0px rgba(26, 16, 8, 0.25);
}

.btn-secondary:hover {
  transform: rotate(1.5deg) scale(1.03);
  background-color: var(--chalk);
  box-shadow: 6px 6px 0px var(--ink);
}

.btn-mini {
  padding: 0.4rem 1rem;
  font-size: 1rem;
  border-width: 1.5px;
  box-shadow: 2px 2px 0px var(--ink);
}

.btn-mini:hover {
  box-shadow: 4px 4px 0px var(--ink);
}

/* ==========================================================================
   SECTION DECORATIONS & DIVIDERS
   ========================================================================== */
.section-pad {
  padding: 6rem 2.5rem;
}

.section-title-wrap {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
}

.section-title {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  position: relative;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.section-title::after {
  content: "— BM —";
  font-family: var(--font-accent);
  font-size: 2rem;
  font-weight: normal;
  color: var(--rust);
  display: block;
  text-align: center;
  margin-top: 0.25rem;
  letter-spacing: 1px;
}

.section-subtitle {
  font-family: var(--font-street);
  font-size: 1.5rem;
  color: var(--rust);
  text-transform: uppercase;
}

/* Distressed Torn Divider */
.torn-divider {
  width: 100%;
  height: 25px;
  background-color: var(--ink);
  position: relative;
  overflow: hidden;
}

.torn-divider.cream {
  background-color: var(--bg);
}

.torn-divider::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: 20px 100%;
  background-repeat: repeat-x;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23FAF7F0'%3E%3Cpath d='M0,0 L20,0 L20,3 L18,7 L15,4 L12,9 L8,6 L4,10 L2,5 L0,8 Z'/%3E%3C/svg%3E");
}

.torn-divider.rust::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23B8390E'%3E%3Cpath d='M0,0 L20,0 L20,4 L17,8 L14,3 L11,9 L7,5 L3,10 L1,4 L0,8 Z'/%3E%3C/svg%3E");
}

.ornamental-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 3rem 0;
  color: var(--rust);
}

.ornamental-line::before,
.ornamental-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rust), transparent);
}

.ornamental-line span {
  font-size: 1.25rem;
}

/* ==========================================================================
   GRAFFITI TAG & DISTRESSED BADGES
   ========================================================================== */
.graffiti-tag {
  font-family: var(--font-accent);
  font-size: 1.6rem;
  color: var(--tag);
  display: inline-block;
  transform: rotate(-5deg);
  text-shadow: 2px 2px 4px rgba(26, 16, 8, 0.15);
  user-select: none;
}

.graffiti-tag.rust {
  color: var(--rust);
}

.graffiti-tag.gold {
  color: var(--gold);
}

/* Wax rubber stamp chips */
.wax-stamp-container {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  padding: 1.5rem;
  scrollbar-width: none; /* Hide default scrollbar for sleek marquee style */
}

.wax-stamp-container::-webkit-scrollbar {
  display: none;
}

.wax-stamp {
  flex: 0 0 110px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px dashed var(--rust);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-street);
  font-size: 1rem;
  color: var(--rust);
  text-transform: uppercase;
  text-align: center;
  padding: 0.5rem;
  background: var(--chalk);
  box-shadow: inset 0 0 12px rgba(184, 57, 14, 0.12), 3px 3px 0 var(--ink);
  transition: transform 0.3s var(--ease-elastic), border-color 0.3s;
  cursor: default;
  line-height: 1.15;
  user-select: none;
}

.wax-stamp:hover {
  transform: rotate(12deg) scale(1.08);
  border-style: solid;
  color: var(--rust-light);
  border-color: var(--rust-light);
}

/* ==========================================================================
   CARDS (Distressed Clip Path, Neoclassical Accents)
   ========================================================================== */
.distressed-card {
  background-color: var(--chalk);
  border: 2px solid var(--ink);
  padding: 2.5rem;
  position: relative;
  box-shadow: 6px 6px 0px var(--ink);
  transition: var(--transition-smooth);
  clip-path: polygon(
    0% 1.5%, 2% 0%, 98% 1%, 100% 2.5%, 99.2% 98%, 97.5% 100%, 1.8% 99.2%, 0% 97%
  );
}

.distressed-card:hover {
  transform: translateY(-5px);
  box-shadow: 12px 12px 24px rgba(26, 16, 8, 0.12), 8px 8px 0px var(--ink);
}

/* ==========================================================================
   PORTFOLIO ELEMENTS (Gilded Gallery Frames & Masking Tape Stencils)
   ========================================================================== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4.5rem; /* Expanded gap for visual breathing room */
}

.portfolio-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--chalk);
  border: 2px solid var(--ink);
  padding: 2.5rem;
  position: relative;
  box-shadow: 6px 6px 0px var(--ink);
  transition: transform 0.3s var(--ease-elastic), box-shadow 0.3s ease, opacity 0.3s ease;
  clip-path: polygon(
    0.5% 1.5%, 2.5% 0.5%, 97.5% 1.2%, 99.5% 2.8%, 98.8% 97.5%, 97.2% 99.5%, 2% 98.8%, 0.5% 97%
  );
}

/* Dynamic Filter Button active states */
.filter-btn {
  transition: transform 0.2s ease, background-color 0.2s, box-shadow 0.2s;
}

.filter-btn:hover {
  transform: translateY(-2px) rotate(0.5deg);
}

.filter-btn.active {
  background-color: var(--rust) !important;
  color: var(--bg) !important;
  box-shadow: 3px 3px 0 var(--ink) !important;
  transform: translateY(-2px) rotate(-1deg);
}

.portfolio-card:hover {
  transform: translateY(-8px) scale(1.01) rotate(0.5deg) !important; /* Springy lift override */
  box-shadow: 15px 15px 30px rgba(26, 16, 8, 0.18), 8px 8px 0px var(--ink);
  border-color: var(--rust);
}

/* Brass Gallery Plaque Exhibit Header */
.gallery-plaque {
  background: linear-gradient(135deg, var(--gold) 0%, #A6730F 100%);
  border: 1px solid var(--ink);
  padding: 0.35rem 0.9rem;
  font-family: var(--font-street);
  font-size: 1rem;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 1.5rem;
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-1.5deg);
  border-radius: 1px;
}

.gallery-plaque span {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: bold;
  margin-right: 6px;
}

/* Distressed Gilded Picture Frame Iframe Hosing */
.iframe-container {
  position: relative;
  width: 100%;
  height: 260px;
  background-color: var(--bg);
  border: 4px double var(--gold); /* Double gilded border */
  outline: 2px solid var(--ink); /* Outer ink border */
  overflow: hidden;
  box-shadow: inset 0 0 25px rgba(26, 16, 8, 0.15), 4px 4px 0 var(--ink);
  margin-bottom: 1.5rem;
  clip-path: polygon(
    0.2% 0.8%, 2.2% 0.2%, 97.8% 0.8%, 99.8% 2.2%, 98.8% 97.8%, 97.8% 99.8%, 1.8% 98.8%, 0.2% 97.8%
  );
}

/* Flourishes inside Gilded corners */
.iframe-container::before {
  content: "❧";
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 1.25rem;
  color: var(--gold);
  z-index: 12;
  pointer-events: none;
  opacity: 0.85;
}

.iframe-container::after {
  content: "❧";
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 1.25rem;
  color: var(--gold);
  z-index: 12;
  pointer-events: none;
  opacity: 0.85;
  transform: scaleX(-1);
}

.iframe-container iframe,
.iframe-container img.portfolio-screenshot {
  border: none;
  pointer-events: none;
  transition: filter 0.5s cubic-bezier(0.25, 1, 0.3, 1), transform 0.5s cubic-bezier(0.25, 1, 0.3, 1);
  filter: blur(4px) contrast(95%);
}

.iframe-container img.portfolio-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.iframe-container iframe {
  width: 133.33%;
  height: 133.33%;
  transform: scale(0.75) scale(1.03); /* Scale down + blur safety margin scale */
  transform-origin: top left;
}

/* Unblur and scale back on portfolio card hover */
.portfolio-card:hover .iframe-container iframe {
  filter: blur(0) contrast(100%);
  transform: scale(0.75) scale(1);
}

.portfolio-card:hover .iframe-container img.portfolio-screenshot {
  filter: blur(0) contrast(100%);
  transform: scale(1.03);
}

.portfolio-info {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 2;
}

.portfolio-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.portfolio-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.portfolio-link {
  font-family: var(--font-street);
  font-size: 1.3rem;
  color: var(--rust);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-bottom: 2px dashed transparent;
}

.portfolio-link:hover {
  color: var(--rust-light);
  transform: translateX(4px);
  border-bottom-color: var(--rust-light);
}

/* Masking-Tape Tag Badges */
.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag-badge {
  font-family: var(--font-accent);
  font-size: 1.15rem;
  color: var(--ink);
  background-color: rgba(245, 239, 224, 0.9); /* Tape Cream */
  padding: 0.25rem 0.8rem;
  border: 1px dashed rgba(26, 16, 8, 0.3);
  box-shadow: 2px 2px 4px rgba(26,16,8,0.06);
  transform: rotate(var(--rand-rot-tag, -2deg));
  display: inline-block;
  line-height: 1.2;
}

.tag-badge:nth-child(even) {
  transform: rotate(2deg);
}

.tag-badge:nth-child(3n) {
  transform: rotate(-1deg);
}

/* Splat Spray Tag popping on hover */
.card-hover-tag {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  opacity: 0;
  transform: scale(0.5) rotate(-25deg);
  transition: all 0.35s var(--ease-elastic);
  pointer-events: none;
  z-index: 5;
  background-color: var(--rust);
  color: var(--bg) !important;
  font-family: var(--font-street) !important;
  font-size: 1.1rem !important;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

.portfolio-card:hover .card-hover-tag {
  opacity: 0.95;
  transform: scale(1) rotate(-6deg);
}

/* ==========================================================================
   LEDGER-STYLE FORMS
   ========================================================================== */
.ledger-container {
  background-color: var(--chalk);
  border: 3px double var(--ink);
  padding: 4rem;
  position: relative;
  box-shadow: 8px 8px 0px var(--ink);
  clip-path: polygon(
    0.5% 0.5%, 2% 0%, 98% 0.5%, 99.5% 1%, 99% 99%, 97.5% 99.5%, 1% 99%, 0.5% 98%
  );
}

.ledger-header {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 1.5rem;
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
}

.ledger-header h3 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: -0.5px;
}

.ledger-header p {
  font-family: var(--font-street);
  font-size: 1.25rem;
  color: var(--rust);
  text-transform: uppercase;
  margin-top: 0.25rem;
}

.ledger-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.ledger-label {
  font-family: var(--font-street);
  font-size: 1.3rem;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ledger-input, .ledger-select, .ledger-textarea {
  width: 100%;
  background-color: transparent;
  border: none;
  border-bottom: 1px solid rgba(26, 16, 8, 0.4);
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: var(--ink);
  padding: 0.5rem 0;
  outline: none;
  border-radius: 0;
  transition: var(--transition-smooth);
}

.ledger-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231a1008' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 2rem;
}

.ledger-input:focus, .ledger-select:focus, .ledger-textarea:focus {
  border-bottom-color: var(--rust);
  border-bottom-width: 2px;
  background-color: rgba(184, 57, 14, 0.02);
}

.ledger-textarea {
  resize: vertical;
  min-height: 120px;
}

/* Receipt Pop-up (Interactive Hand-Torn Invoice Modal) */
.receipt-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background-color: rgba(26, 16, 8, 0.5);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.receipt-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.receipt-card {
  background-color: var(--chalk);
  border: 2px solid var(--ink);
  padding: 3rem;
  width: 100%;
  max-width: 480px;
  position: relative;
  box-shadow: 12px 12px 0 var(--ink);
  transform: scale(0.9) rotate(-2deg);
  transition: transform 0.4s var(--ease-elastic);
  clip-path: polygon(
    0% 2%, 4% 0%, 96% 1%, 100% 3%, 98.5% 97%, 96% 99.5%, 3% 98.2%, 0% 95%
  );
}

.receipt-overlay.active .receipt-card {
  transform: scale(1) rotate(-1deg);
}

.receipt-stub {
  border-bottom: 2px dashed var(--ink);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.receipt-title {
  font-family: var(--font-street);
  font-size: 2.2rem;
  color: var(--rust);
}

.receipt-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(26, 16, 8, 0.2);
  padding-bottom: 0.35rem;
}

.receipt-key {
  font-family: var(--font-street);
  text-transform: uppercase;
  color: rgba(26, 16, 8, 0.6);
}

.receipt-val {
  font-weight: bold;
}

.receipt-footer {
  margin-top: 2rem;
  text-align: center;
}

.receipt-stamp {
  border: 3px double var(--rust);
  color: var(--rust);
  font-family: var(--font-street);
  font-size: 1.5rem;
  display: inline-block;
  padding: 0.25rem 1rem;
  transform: rotate(-10deg);
  margin-bottom: 1.5rem;
  font-weight: bold;
}

/* ==========================================================================
   FLOATING ACTION MENU (Expandable Wax-Seal Menu)
   ========================================================================== */
.floating-action-menu {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  z-index: 9999;
}

.menu-items {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.85);
  transition: opacity 0.3s var(--ease-elastic), transform 0.3s var(--ease-elastic);
  transform-origin: bottom right;
}

.floating-action-menu.active .menu-items {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.fam-item {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.fam-item:hover {
  transform: translateX(-4px);
}

.fam-label {
  background-color: var(--chalk);
  border: 1px solid var(--ink);
  font-family: var(--font-street);
  font-size: 1rem;
  color: var(--ink);
  padding: 0.35rem 0.8rem;
  text-transform: uppercase;
  box-shadow: 2px 2px 0 var(--ink);
  opacity: 0;
  transform: translateX(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}

.fam-item:hover .fam-label {
  opacity: 1;
  transform: translateX(0);
}

.fam-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.3s var(--ease-elastic), box-shadow 0.3s;
}

.fam-item:hover .fam-btn {
  transform: scale(1.1) rotate(8deg);
  box-shadow: 5px 5px 0 var(--ink);
}

.fam-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.fab-whatsapp {
  background-color: #25D366;
  color: var(--chalk);
}

.fab-instagram {
  background-color: var(--rust);
  color: var(--chalk);
}

.fab-email {
  background-color: var(--gold);
  color: var(--chalk);
}

/* Main Trigger Button */
.fam-trigger {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  box-shadow: 4px 4px 0 var(--rust);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s var(--ease-elastic), box-shadow 0.4s ease;
  z-index: 1000;
  position: relative;
  outline: none;
}

.fam-trigger::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 50%;
  border: 1px dashed var(--gold);
  margin: 3px;
  pointer-events: none;
}

.trigger-icon {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  font-style: italic;
  transition: transform 0.4s var(--ease-elastic);
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 769px) {
  .fam-trigger {
    width: 48px;
    height: 48px;
  }
  .trigger-icon {
    font-size: 1.2rem;
  }
}

/* Open menu state details */
.floating-action-menu.active .fam-trigger {
  transform: rotate(45deg);
  box-shadow: 4px 4px 0 var(--gold);
  background: var(--rust);
}

.floating-action-menu.active .trigger-icon {
  transform: scale(0.9);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background-color: var(--ink);
  color: var(--bg);
  padding: 4rem 2.5rem 2rem 2.5rem;
  border-top: 3px solid var(--rust);
  position: relative;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--bg);
}

.footer-logo span {
  font-family: var(--font-street);
  color: var(--rust);
  font-size: 2rem;
  margin-left: 2px;
}

.footer-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.footer-links a {
  font-family: var(--font-street);
  font-size: 1.3rem;
  text-transform: uppercase;
  color: rgba(245, 239, 224, 0.7);
}

.footer-links a:hover {
  color: var(--rust-light);
}

.footer-note {
  font-family: var(--font-accent);
  font-size: 1.5rem;
  color: var(--gold);
  margin-top: 1rem;
}

.footer-copyright {
  width: 100%;
  border-top: 1px solid rgba(245, 239, 224, 0.15);
  padding-top: 1.5rem;
  margin-top: 2rem;
  font-size: 0.9rem;
  opacity: 0.6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.footer-socials {
  display: flex;
  gap: 1.25rem;
}

.footer-social-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(245, 239, 224, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(245, 239, 224, 0.7);
  transition: var(--transition-smooth);
}

.footer-social-icon:hover {
  color: var(--rust-light);
  border-color: var(--rust-light);
  transform: scale(1.1) rotate(5deg);
}

.footer-social-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ==========================================================================
   PAGE SPECIFIC LAYOUTS
   ========================================================================== */

/* 1. HOME HERO */
.hero-sec {
  height: 100vh;
  min-height: 650px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 2.5rem;
  background-color: var(--bg);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
}

.hero-crest-backdrop {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% - 67.5px)); /* Brought down by 2.5px on desktop */
  width: 45%;
  max-width: 480px;
  opacity: 0.08;
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 5;
  text-align: center;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 4.5rem;
  font-weight: 900;
  letter-spacing: -1.5px;
  color: var(--ink);
}

.hero-subtitle {
  font-family: var(--font-street);
  font-size: 2.2rem;
  color: var(--rust);
  text-transform: uppercase;
}

.hero-ctas {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.hero-craft-tag {
  position: absolute;
  bottom: 2.5rem;
  left: 2.5rem;
  z-index: 5;
}

/* 2. WHAT WE DO MARQUEE STRIP */
.marquee-strip {
  background-color: var(--ink);
  border-bottom: 2px solid var(--ink);
  padding: 1.5rem 0;
  overflow: hidden;
  position: relative;
}

.marquee-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marquee 35s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--bg);
  font-family: var(--font-street);
  font-size: 1.6rem;
  text-transform: uppercase;
}

.marquee-item::after {
  content: "✦";
  color: var(--gold);
  margin-left: 3rem;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* 3. WHY US GRID */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.why-card {
  padding-top: 3.5rem;
}

.why-num-bg {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-family: var(--font-display);
  font-size: 6rem;
  font-weight: 900;
  line-height: 1;
  color: var(--rust);
  opacity: 0.08;
  pointer-events: none;
}

.why-card h4 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.why-card p {
  font-size: 1.05rem;
  color: rgba(26, 16, 8, 0.8);
}

/* 4. HOME PORTFOLIO TEASER */
.teaser-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4rem;
}

/* 5. CTA RUST BANNER */
.cta-banner {
  background-color: var(--rust);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  color: var(--bg);
  padding: 5rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0.06;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 40 L70 40 L50 70 Z' fill='%23faf7f0'/%3E%3C/svg%3E");
}

.cta-banner-content {
  position: relative;
  z-index: 5;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.cta-banner h3 {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--bg);
}

.cta-banner .btn-secondary {
  color: var(--bg);
  border-color: var(--bg);
  box-shadow: 4px 4px 0 var(--ink);
}

.cta-banner .btn-secondary:hover {
  background-color: var(--bg);
  color: var(--rust);
  border-color: var(--bg);
}

/* 6. PORTFOLIO PAGE EXTRA */
.portfolio-header-strip {
  text-align: center;
  padding: 8rem 2.5rem 4rem 2.5rem;
}

/* 7. ABOUT PAGE LAYOUT */
.about-hero {
  padding: 8rem 2.5rem 4rem 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.about-avatar-container {
  display: flex;
  justify-content: center;
  position: relative;
}

.about-crest-wrap {
  width: 100%;
  max-width: 420px;
  border: 2px solid var(--ink);
  background-color: var(--chalk);
  padding: 2.5rem;
  box-shadow: 8px 8px 0 var(--ink);
  position: relative;
  clip-path: polygon(
    0.8% 0.8%, 2.2% 0%, 97.8% 0.8%, 99.2% 2.2%, 98.5% 97.8%, 97% 99.2%, 2.2% 98.5%, 0.8% 97%
  );
}

.about-avatar-img {
  width: 100%;
  height: auto;
  border: 1px solid rgba(26, 16, 8, 0.15);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
  display: block;
}

.about-story {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-story h3 {
  font-family: var(--font-display);
  font-size: 2.2rem;
}

.about-story p {
  font-size: 1.15rem;
  color: rgba(26, 16, 8, 0.85);
}

.about-story blockquote {
  border-left: 4px solid var(--rust);
  padding-left: 1.5rem;
  font-style: italic;
  font-size: 1.15rem;
  margin: 1rem 0;
  color: var(--ink);
}

/* 8. CONTACT PAGE LAYOUT */
.contact-layout {
  padding: 8rem 2.5rem 6rem 2.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info-strip {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.contact-info-link {
  font-family: var(--font-street);
  font-size: 1.4rem;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 2px dashed var(--rust);
  padding-bottom: 0.2rem;
}

.contact-info-link:hover {
  color: var(--rust);
  border-bottom-style: solid;
}

.contact-info-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ==========================================================================
   MEDIA QUERIES (Mobile First Responsiveness)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 3.5rem;
  }
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about-hero {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .tech-badges-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  .main-nav {
    padding: 1rem 1.5rem;
  }
  .main-nav.scrolled {
    padding: 0.75rem 1.5rem;
  }
  .nav-links {
    display: none;
  }
  .hamburger {
    display: block;
  }
  .hero-crest-backdrop {
    width: 85%;
    max-width: 450px;
    opacity: 0.085;
    transform: translate(-50%, calc(-50% - 70px));
  }
  .hero-title {
    font-size: 2.8rem;
    letter-spacing: -0.5px;
  }
  .hero-subtitle {
    font-size: 1.8rem;
  }
  .hero-ctas {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }
  .hero-ctas .btn {
    width: 100%;
  }
  .why-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .section-title {
    font-size: 2.25rem;
  }
  .section-pad {
    padding: 4rem 1.5rem;
  }
  .ledger-container {
    padding: 2.5rem 1.5rem;
  }
  .contact-info-strip {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }
  .tech-badges-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem;
  }
  .footer-links a {
    font-size: 1.15rem;
  }
  .footer-copyright {
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
    align-items: center;
  }
  .site-footer {
    padding: 3rem 1.5rem 2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-crest-backdrop {
    width: 95%;
    max-width: 380px;
    transform: translate(-50%, calc(-50% - 70px));
  }
  .tech-badges-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   PREMIUM REACTIVE BACKGROUNDS & CINEMATIC TRANSITIONS
   ========================================================================== */

/* 1. Interactive Cursor Spray-Glow Overlay */
.mouse-spray-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: color-burn;
  transition: background 0.1s ease-out;
}

/* 2. Dynamic Click-to-Tag Graffiti Splatters */
.graffiti-splatter {
  position: absolute;
  pointer-events: none;
  z-index: 999;
  user-select: none;
  transform-origin: center;
  animation: splatter-fade-in 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.5) forwards,
             splatter-fade-out 10s ease-in 10s forwards;
}

@keyframes splatter-fade-in {
  0% { transform: translate(-50%, -50%) scale(0.3) rotate(var(--rand-rot)); opacity: 0; filter: blur(3px); }
  100% { transform: translate(-50%, -50%) scale(1) rotate(var(--rand-rot)); opacity: var(--rand-op); filter: blur(0); }
}

@keyframes splatter-fade-out {
  0% { opacity: var(--rand-op); filter: blur(0); }
  100% { opacity: 0; filter: blur(10px); }
}

.splatter-svg {
  width: 120px;
  height: 120px;
  fill: var(--color-choice);
  opacity: 0.8;
}

.splatter-text {
  font-family: var(--font-accent);
  font-size: 2.2rem;
  color: var(--color-choice);
  white-space: nowrap;
  letter-spacing: -1px;
  text-shadow: 2px 2px 8px rgba(26, 16, 8, 0.25);
  font-weight: 900;
}

/* 4. Cinematic Page-Entrance Loader Screen */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: clip-path 1.2s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.8s ease;
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
}

/* tacticle parchment grain inside loader */
.page-loader::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0.055;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.page-loader.loaded {
  clip-path: polygon(
    0% 0%, 100% 0%,
    100% 0%, /* Tear line upper right */
    60% 45%,  /* Torn tooth 1 */
    100% 100%, /* Lower right */
    0% 100%,
    0% 55%    /* Torn tooth 2 */
  );
  opacity: 0;
  pointer-events: none;
}

.loader-monogram {
  width: 140px;
  height: 140px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--chalk);
  box-shadow: 4px 4px 0 var(--ink);
  animation: pulse-loader 1.5s infinite ease-in-out;
  position: relative;
}

@keyframes pulse-loader {
  0% { transform: scale(1); box-shadow: 4px 4px 0 var(--ink); }
  50% { transform: scale(1.05); box-shadow: 6px 6px 0 var(--rust); }
  100% { transform: scale(1); box-shadow: 4px 4px 0 var(--ink); }
}

.loader-text {
  font-family: var(--font-street);
  font-size: 1.8rem;
  color: var(--rust);
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: flicker-text 1s infinite alternate;
}

@keyframes flicker-text {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* 5. Springy stamped wax seals dynamic wobble */
.wax-stamp:active {
  transform: scale(0.9) rotate(-10deg);
}

.btn:active {
  transform: scale(0.95) rotate(-0.5deg);
}

/* ==========================================================================
   OFFLINE BRAND VAULT (Print Showcase Styles)
   ========================================================================== */
.print-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  width: 100%;
}

@media (max-width: 992px) {
  .print-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .print-gallery-grid {
    grid-template-columns: 1fr;
  }
}

.print-card {
  background-color: var(--chalk);
  border: 2px solid var(--ink);
  padding: 1.5rem;
  position: relative;
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform 0.35s var(--ease-elastic), box-shadow 0.35s ease;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  clip-path: polygon(
    0.5% 1.5%, 2% 0.5%, 98% 1%, 99.5% 2%, 99% 98.5%, 97.5% 99.5%, 1.5% 99%, 0.5% 97.5%
  );
}

.print-card:hover {
  transform: translateY(-8px) scale(1.01) rotate(0.5deg);
  box-shadow: 10px 10px 0 var(--ink);
}

.print-gallery-plaque {
  font-family: var(--font-street);
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--gold);
  border: 1px solid var(--ink);
  padding: 0.25rem 0.75rem;
  display: inline-block;
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-1.5deg);
  margin-bottom: 0.25rem;
}

.print-gallery-plaque span {
  font-weight: bold;
  border-right: 1px solid var(--ink);
  padding-right: 0.5rem;
  margin-right: 0.5rem;
}

.print-image-wrap {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  border: 2px solid var(--ink);
  position: relative;
  box-shadow: 3px 3px 0 rgba(26,16,8,0.1);
  background-color: var(--bg);
}

.print-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-elastic);
}

.print-card:hover .print-img {
  transform: scale(1.08);
}

.print-hover-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(184, 57, 14, 0.85); /* Warm Rust overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1.5rem;
  text-align: center;
  z-index: 5;
}

.print-card:hover .print-hover-overlay {
  opacity: 1;
}

.print-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.print-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.2;
}

.print-desc {
  font-size: 0.95rem;
  opacity: 0.85;
  line-height: 1.4;
}

/* ==========================================================================
   INTERACTIVE RECEIPT RIPPING ANIMATION STYLES
   ========================================================================== */
.rip-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2100;
  overflow: hidden;
  pointer-events: none;
}

/* Ripping jag paths using clip paths */
.left-rip-piece {
  clip-path: polygon(
    0% 0%, 
    53% 0%, 
    49% 12%, 
    54% 25%, 
    48% 38%, 
    53% 50%, 
    47% 63%, 
    54% 75%, 
    49% 88%, 
    52% 100%, 
    0% 100%
  ) !important;
  transition: transform 0.65s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease !important;
  box-shadow: none !important;
}

.right-rip-piece {
  clip-path: polygon(
    53% 0%, 
    100% 0%, 
    100% 100%, 
    52% 100%, 
    49% 88%, 
    54% 75%, 
    47% 63%, 
    53% 50%, 
    48% 38%, 
    54% 25%, 
    49% 12%
  ) !important;
  transition: transform 0.65s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease !important;
  box-shadow: none !important;
}

/* Animating the split apart pieces */
.rip-container.ripping .left-rip-piece {
  transform: translate(-180px, 80px) rotate(-16deg) scale(0.95) !important;
  opacity: 0;
}

.rip-container.ripping .right-rip-piece {
  transform: translate(180px, 80px) rotate(16deg) scale(0.95) !important;
  opacity: 0;
}

/* Global desktop hide for mobile modal */
.neoclassical-modal-overlay {
  display: none !important;
}

/* ==========================================================================
   MOBILE-ONLY INTERACTIVE PORTFOLIO STAMP REGISTRY & LEDGER MODALS
   ========================================================================== */
@media (max-width: 768px) {
  /* Global Grid Wrapper Adjustments */
  .portfolio-grid-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
  }

  /* Portfolio Grid restructure into a tight single-column stamp list */
  .portfolio-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  /* Portfolio Cards restructure into compact, clickable stamp rows */
  .portfolio-card {
    height: auto !important;
    padding: 0.9rem 1.25rem !important;
    box-shadow: 3px 3px 0 var(--ink) !important;
    cursor: pointer !important;
    transform: rotate(0deg) !important; /* Reset tilt */
    border-color: rgba(26, 16, 8, 0.6) !important;
    clip-path: none !important; /* Standardized shape for flat stamp alignment */
    transition: all 0.25s ease !important;
    display: flex;
    flex-direction: column !important;
    position: relative;
  }

  .portfolio-card:hover,
  .portfolio-card:active {
    border-color: var(--rust) !important;
    box-shadow: 5px 5px 0 var(--rust) !important;
    transform: translateY(-2px) !important;
  }

  /* Hide inner block components in grid items for compact mobile overview list */
  .portfolio-card .iframe-container,
  .portfolio-card p,
  .portfolio-card .portfolio-tags,
  .portfolio-card .portfolio-link,
  .portfolio-card .card-hover-tag,
  .portfolio-card .print-image-wrap {
    display: none !important;
  }

  /* Compact exhibit tag sizes */
  .portfolio-card .gallery-plaque {
    margin: 0 0 0.25rem 0 !important;
    font-size: 0.7rem !important;
    padding: 0.15rem 0.4rem !important;
  }

  /* Visual indicator for modal stamp preview */
  .portfolio-card::after {
    content: "❧ VIEW STAMP";
    position: absolute;
    top: 50%;
    right: 1.25rem;
    transform: translateY(-50%);
    font-family: var(--font-street);
    font-size: 0.85rem;
    color: var(--rust);
    letter-spacing: 0.5px;
  }

  .portfolio-card .portfolio-title {
    font-size: 1.25rem !important;
    line-height: 1.2;
    margin-right: 7.5rem;
  }

  /* ------------------------------------------------------------------------
     THE DYNAMIC NEOCLASSICAL MODAL OVERLAY STYLING
     ------------------------------------------------------------------------ */
  .neoclassical-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(26, 16, 8, 0.94); /* Distressed deep warm ink wash */
    backdrop-filter: blur(8px);
    z-index: 2500;
    display: flex !important; /* Override global display none on mobile screens */
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
  }

  .neoclassical-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
  }

  .neoclassical-modal-overlay .modal-card {
    background: var(--chalk);
    border: 3px double var(--ink);
    padding: 1.75rem 1.25rem 1.25rem 1.25rem;
    width: 100%;
    max-width: 480px;
    height: auto;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: 12px 12px 0 var(--gold);
    clip-path: polygon(
      0.5% 1.5%, 2% 0.5%, 98% 1%, 99.5% 2%, 99% 98.5%, 97.5% 99.5%, 1.5% 99%, 0.5% 97.5%
    );
    transform: scale(0.9) rotate(-1.5deg);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }

  .neoclassical-modal-overlay.active .modal-card {
    transform: scale(1) rotate(0.5deg);
  }

  .modal-close-btn {
    position: absolute;
    top: 12px;
    right: 15px;
    background: var(--rust);
    border: 1px solid var(--ink);
    color: var(--bg);
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 2px 2px 0 var(--ink);
    z-index: 100;
  }

  .modal-close-btn:active {
    transform: translateY(1px);
    box-shadow: 1px 1px 0 var(--ink);
  }

  .modal-scroll-content {
    overflow-y: auto;
    padding-right: 0.25rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--rust) var(--bg);
  }
  
  .modal-scroll-content::-webkit-scrollbar {
    width: 6px;
  }
  
  .modal-scroll-content::-webkit-scrollbar-thumb {
    background: var(--rust);
  }

  .modal-plaque {
    align-self: flex-start;
    background: var(--gold);
    border: 1px solid var(--ink);
    padding: 0.2rem 0.6rem;
    font-family: var(--font-street);
    font-size: 0.85rem;
    color: var(--ink);
    margin-bottom: 0.75rem;
    box-shadow: 2px 2px 0 var(--ink);
  }

  .modal-title {
    font-size: 1.8rem !important;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    font-weight: 900;
  }

  .modal-iframe-container {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10; /* Proportionate landscape display for desktop website screenshots */
    background: var(--bg);
    border: 3px double var(--gold);
    outline: 1.5px solid var(--ink);
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 20px rgba(26,16,8,0.1), 3px 3px 0 var(--ink);
    margin-bottom: 1rem;
  }

  .modal-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    transform: none; /* Let live site use its native mobile layout */
    transform-origin: top left;
    filter: none !important;
  }

  .modal-info p {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.9;
    margin-bottom: 1rem;
  }

  .modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }

  .modal-footer-row {
    border-top: 1px dashed rgba(26,16,8,0.3);
    padding-top: 1rem;
    display: flex;
    justify-content: flex-end;
  }

  .modal-footer-row .btn {
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    box-shadow: 3px 3px 0 var(--ink);
  }
}

/* ==========================================================================
   PRINT STYLESHEET (Receipt PDF and Paper Print Optimization)
   ========================================================================== */
@media print {
  /* Hide the rest of the page */
  body > *:not(#receipt-success-modal) {
    display: none !important;
  }
  
  #receipt-success-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    height: auto !important;
    background: none !important;
    backdrop-filter: none !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Reset receipt card styling for printing */
  .receipt-card {
    border: 2px solid #1a1008 !important;
    box-shadow: none !important;
    background: #ffffff !important;
    color: #1a1008 !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 450px !important;
    box-sizing: border-box !important;
    page-break-inside: avoid !important;
  }

  /* Hide close and print buttons in print view */
  #receipt-close-btn,
  #receipt-print-btn {
    display: none !important;
  }

  /* Force light backgrounds for ink efficiency */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}


