/*
Theme Name: MattsRate Portfolio
Theme URI: https://mattsrate.com
Author: MattsRate
Author URI: https://mattsrate.com
Description: A sleek, dimension-shifting portfolio theme custom built for MattsRate.
Version: 1.0.0
Text Domain: mattsrate
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

/* Default Properties */
:root {
  --bg: #0a0a0a;
  --text: #ffffff;
  --accent: #3b82f6; 
  --card-bg: #1f1f1f;
  --border: #333333;
  --radius: 16px;
  --shadow: 0 10px 15px -3px rgba(0,0,0,0.5);
  --header-bg: rgba(10, 10, 10, 0.8);
  --font-base: 'Outfit', sans-serif;
  --btn-text-primary: #000;
}

/* Restaurant Theme */
[data-dimension="restaurant"] {
  --bg: #1c1917; 
  --text: #fefce8; 
  --accent: #ea580c; 
  --card-bg: #292524;
  --border: #44403c;
  --radius: 24px;
  --shadow: 0 20px 25px -5px rgba(234,88,12,0.1);
  --header-bg: rgba(28, 25, 23, 0.8);
  --btn-text-primary: #fff;
}

/* Law Firm Theme */
[data-dimension="law"] {
  --bg: #0f172a; 
  --text: #f8fafc;
  --accent: #94a3b8; 
  --card-bg: #1e293b;
  --border: #334155;
  --radius: 2px; 
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.5);
  --header-bg: rgba(15, 23, 42, 0.8);
  --btn-text-primary: #000;
}

/* Online Shop Theme */
[data-dimension="shop"] {
  --bg: #ffffff;
  --text: #09090b;
  --accent: #ec4899; 
  --card-bg: #f4f4f5;
  --border: #e4e4e7;
  --radius: 12px;
  --shadow: 0 4px 20px -2px rgba(0,0,0,0.05);
  --header-bg: rgba(255, 255, 255, 0.8);
  --btn-text-primary: #fff;
}

/* Clinic Theme */
[data-dimension="clinic"] {
  --bg: #f0fdf4; 
  --text: #14532d;
  --accent: #16a34a; 
  --card-bg: #ffffff;
  --border: #bbf7d0;
  --radius: 32px; 
  --shadow: 0 10px 15px -3px rgba(22,163,74,0.1);
  --header-bg: rgba(240, 253, 244, 0.8);
  --btn-text-primary: #fff;
}

/* Bakery Theme */
[data-dimension="bakery"] {
  --bg: #fef2f2; 
  --text: #7f1d1d; 
  --accent: #fbbf24; 
  --card-bg: #ffffff;
  --border: #fca5a5;
  --radius: 40px;
  --shadow: 0 10px 15px -3px rgba(251,191,36,0.1);
  --header-bg: rgba(254, 242, 242, 0.8);
  --btn-text-primary: #7f1d1d;
}

/* Reset Layout and Globals */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  /* WP Admin Bar Fix */
  margin-top: 0 !important; 
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-base);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.4s ease;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

/* Utility / Typo */
.text-accent { color: var(--accent); transition: color 0.8s ease; }
.flex-center { display: flex; align-items: center; justify-content: center; gap: 0.5rem; }

/* The Ambient Glow */
.glow-bg {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60vw;
  height: 60vw;
  background: var(--accent);
  filter: blur(150px);
  opacity: 0.1;
  z-index: -1;
  border-radius: 50%;
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 2rem;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 1px;
}

nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  opacity: 0.8;
}
.nav-link:hover {
  opacity: 1;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--btn-text-primary);
}
.btn-outline {
  border: 1px solid var(--border);
  background: transparent;
}
.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nav-cta {
  padding: 0.5rem 1.25rem;
  background: var(--text);
  color: var(--bg);
}

/* Layout Blocks */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10rem 2rem 4rem;
}

.transition-layer {
  opacity: 0;
  animation: fadeInUp 0.8s forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 8rem;
}

.hero-title {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.8;
  line-height: 1.6;
}

.hero-actions {
  margin-top: 3rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Section Common */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto;
}

/* Elements / Cards common styling */
.element-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.pointer:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

/* Dimensions Menu */
.dimensions { margin-bottom: 8rem; }

.dimension-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.dimension-btn {
  padding: 1.25rem 2.5rem;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 1.1rem;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.dimension-btn:hover {
  border-color: var(--accent);
}

.dimension-btn.active {
  border-color: var(--accent);
  background: var(--card-bg);
  font-weight: 600;
  box-shadow: var(--shadow);
}

/* Reviews */
.reviews { margin-bottom: 8rem; }
.review-card {
  padding: 4rem 2rem;
  text-align: center;
}
.stars {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  color: #fbbf24;
}
.review-text {
  font-size: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
  font-style: italic;
  line-height: 1.6;
}
.review-author {
  margin-top: 2rem;
  font-weight: 600;
}

/* Process */
.process { margin-bottom: 8rem; }
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.process-card {
  padding: 2rem;
}

.process-step {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--btn-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.card-desc {
  opacity: 0.8;
  line-height: 1.6;
}

/* Portfolio */
.portfolio { margin-bottom: 8rem; }
.portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.portfolio-card {
  padding: 2rem;
}
.placeholder-img {
  height: 240px;
  background: var(--border);
  border-radius: calc(var(--radius) / 2);
  margin-bottom: 2rem;
  transition: all 0.8s ease;
}
.read-more {
  font-weight: 600;
  margin-top: 1.5rem;
  justify-content: flex-start;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(5px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -40%);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 101;
  padding: 3rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal.active {
  opacity: 1;
  transform: translate(-50%, -50%);
  pointer-events: all;
}

.close-modal {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  color: var(--text);
  font-size: 2rem;
  background: transparent;
}

.modal-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--accent);
  transition: color 0.8s ease;
}

.modal-content p {
  font-size: 1.15rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.modal-btn {
  margin-top: 1.5rem;
  width: 100%;
}

/* Footer (Contact) */
.footer-card {
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  padding: 6rem 2rem;
  text-align: center;
  border-bottom: none;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  max-width: 400px;
  margin: 0 auto;
}

.contact-btn {
  padding: 1.5rem;
  background: var(--bg);
  width: 100%;
  font-size: 1.25rem;
  font-weight: 600;
}

.copyright {
  margin-top: 4rem;
  opacity: 0.5;
}

@media (max-width: 768px) {
  nav { display: none; }
  .portfolio-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .modal { padding: 2rem; width: 95%; }
}
