/* ============================================
   MASHLRT — Design System
   ============================================ */

/* --- Variables --- */
:root {
  --bg:          #FAFAF7;
  --bg-2:        #F0EDE5;
  --bg-3:        #E8E4DB;
  --text:        #1A1817;
  --text-muted:  #7A746E;
  --olive:       #B8BF5C;
  --olive-dark:  #9EA34E;
  --teal:        #6FA8B8;
  --teal-dark:   #5A92A2;
  --border:      #E2DDD4;

  --font-heading: 'Cormorant Garamond', serif;
  --font-body:    'Inter', sans-serif;

  --radius:      10px;
  --radius-lg:   20px;
  --transition:  0.3s ease;
  --max-width:   1100px;
  --header-height: 68px;

  --space-xs:  8px;
  --space-sm:  16px;
  --space-md:  32px;
  --space-lg:  64px;
  --space-xl:  100px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(3.5rem, 9vw, 8rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
h4 { font-size: 1.1rem; }

p  { font-size: 1rem; color: var(--text-muted); line-height: 1.75; }

.label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

section { padding: var(--space-xl) 0; }

.section-header {
  margin-bottom: var(--space-lg);
}

.section-header .label { margin-bottom: var(--space-xs); }
.section-header h2 { margin-bottom: var(--space-sm); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover {
  background: #333;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--text);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--olive);
  color: var(--text);
}
.btn-accent:hover {
  background: var(--olive-dark);
  transform: translateY(-1px);
}

.btn-arrow::after {
  content: '→';
  transition: transform var(--transition);
}
.btn-arrow:hover::after {
  transform: translateX(4px);
}

/* --- Header --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 100;
  background: rgba(250, 250, 247, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

header.scrolled {
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  position: relative;
}
.logo span {
  color: var(--olive);
}

nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

nav a {
  font-size: 0.875rem;
  font-weight: 450;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}
nav a:hover { color: var(--text); }

nav a.active { color: var(--text); }

.nav-cta {
  background: var(--text);
  color: var(--bg) !important;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-weight: 500 !important;
  transition: background var(--transition), transform var(--transition) !important;
}
.nav-cta:hover {
  background: #333 !important;
  transform: translateY(-1px);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: var(--space-sm) var(--space-md);
  flex-direction: column;
  gap: var(--space-sm);
  z-index: 99;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 1rem;
  color: var(--text-muted);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: var(--text); }

/* --- Hero (index) --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: var(--header-height);
  padding-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
}

.hero-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-heading);
  font-size: clamp(12rem, 25vw, 22rem);
  font-weight: 700;
  color: var(--bg-2);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  letter-spacing: -0.05em;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-md);
}

.hero-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--olive);
}

.hero h1 {
  margin-bottom: var(--space-sm);
  color: var(--text);
}

.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  max-width: 540px;
  margin-bottom: var(--space-lg);
  color: var(--text-muted);
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: var(--space-md);
  right: var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
}

.hero-scroll span {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  writing-mode: vertical-rl;
}

.hero-scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%   { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(0); opacity: 0; transform-origin: top; }
}

/* --- Values strip --- */
.values-strip {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.value-item h4 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 6px;
  color: var(--text);
}

.value-item p {
  font-size: 0.875rem;
}

/* --- Services preview --- */
.services-preview {
  background: var(--bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.service-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--olive);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.service-card:hover::before { transform: scaleX(1); }
.service-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.08); }

.service-icon {
  width: 44px;
  height: 44px;
  background: var(--bg-3);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
  font-size: 1.2rem;
}

.service-card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.service-card p {
  font-size: 0.875rem;
  margin-bottom: var(--space-sm);
}

.service-link {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--olive-dark);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition);
}
.service-link:hover { gap: 8px; }

/* --- Philosophy --- */
.philosophy {
  background: var(--text);
  color: var(--bg);
  text-align: center;
}

.philosophy h2 {
  color: var(--bg);
  max-width: 720px;
  margin: 0 auto var(--space-md);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  line-height: 1.2;
}

.philosophy p {
  color: rgba(250,250,247,0.6);
  max-width: 480px;
  margin: 0 auto var(--space-lg);
}

/* --- Page hero (inner pages) --- */
.page-hero {
  padding-top: calc(var(--header-height) + var(--space-xl));
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.page-hero .label { margin-bottom: var(--space-sm); }
.page-hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  margin-bottom: var(--space-sm);
}
.page-hero p { max-width: 560px; font-size: 1.1rem; }

/* --- Process (services page) --- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  counter-reset: steps;
}

.process-step {
  position: relative;
  padding-left: 52px;
  counter-increment: steps;
}

.process-step::before {
  content: counter(steps, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
}

.process-step h4 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.process-step p { font-size: 0.875rem; }

/* --- Services detail --- */
.services-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.service-detail-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: var(--space-md);
  align-items: center;
  transition: all var(--transition);
}

.service-detail-card:hover {
  border-color: var(--olive);
  transform: translateX(4px);
}

.service-detail-left .service-icon { margin-bottom: var(--space-xs); }
.service-detail-left h3 { font-size: 1.5rem; }

.service-includes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--bg-3);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 20px;
}

.service-detail-right {
  text-align: right;
  white-space: nowrap;
}

.service-price {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-bottom: 12px;
}

/* --- Contact form --- */
.contact-section {
  background: var(--bg-2);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: var(--space-xl);
  align-items: start;
}

.contact-info h2 { margin-bottom: var(--space-sm); }
.contact-info p  { margin-bottom: var(--space-md); }

.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-detail-icon {
  width: 36px;
  height: 36px;
  background: var(--bg-3);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.contact-detail-item span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.form-group {
  margin-bottom: var(--space-sm);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--olive);
  box-shadow: 0 0 0 3px rgba(184, 191, 92, 0.15);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A746E' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-submit {
  width: 100%;
  justify-content: center;
  margin-top: var(--space-xs);
  font-size: 0.95rem;
  padding: 16px;
}

/* --- Portfolio grid --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.portfolio-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
  aspect-ratio: 4/3;
  position: relative;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.portfolio-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.1);
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.portfolio-item:hover img { transform: scale(1.04); }

.portfolio-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 24, 23, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-sm);
  opacity: 0;
  transition: opacity var(--transition);
}
.portfolio-item:hover .portfolio-item-overlay { opacity: 1; }

.portfolio-item-overlay h4 {
  color: var(--bg);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 4px;
}
.portfolio-item-overlay span {
  font-size: 0.75rem;
  color: rgba(250,250,247,0.6);
}

/* Placeholder card */
.portfolio-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  background: var(--bg-2);
}

.portfolio-placeholder .ph-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.portfolio-placeholder h4 {
  font-size: 1rem;
  color: var(--text);
}

.portfolio-placeholder span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Filter tabs */
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.filter-tab {
  padding: 8px 18px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  transition: all var(--transition);
}

.filter-tab:hover,
.filter-tab.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* --- Footer --- */
footer {
  background: var(--text);
  color: var(--bg);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(250,250,247,0.1);
  margin-bottom: var(--space-md);
}

.footer-brand .logo {
  color: var(--bg);
  font-size: 1.4rem;
  display: block;
  margin-bottom: var(--space-sm);
}

.footer-brand p {
  color: rgba(250,250,247,0.5);
  font-size: 0.875rem;
  max-width: 280px;
}

.footer-col h5 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(250,250,247,0.4);
  margin-bottom: var(--space-sm);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li a {
  color: rgba(250,250,247,0.65);
  font-size: 0.875rem;
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--bg); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  color: rgba(250,250,247,0.35);
  font-size: 0.8rem;
}

.social-links {
  display: flex;
  gap: var(--space-sm);
}

.social-link {
  width: 36px;
  height: 36px;
  background: rgba(250,250,247,0.08);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(250,250,247,0.6);
  transition: all var(--transition);
  font-size: 0.9rem;
}
.social-link:hover {
  background: rgba(250,250,247,0.15);
  color: var(--bg);
}

/* --- Reveal animations --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* --- Divider --- */
.divider {
  width: 40px;
  height: 2px;
  background: var(--olive);
  margin: var(--space-sm) 0;
}

/* --- Success page --- */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--header-height);
}

.success-content {
  max-width: 480px;
}

.success-icon {
  width: 72px;
  height: 72px;
  background: var(--olive);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto var(--space-md);
}

.success-content h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--space-sm);
}

.success-content p {
  margin-bottom: var(--space-md);
}

/* --- Legal pages --- */
.legal-content {
  max-width: 720px;
  padding-top: calc(var(--header-height) + var(--space-xl));
  padding-bottom: var(--space-xl);
}

.legal-content h1 { font-size: clamp(2rem, 4vw, 3.5rem); margin-bottom: var(--space-md); }
.legal-content h2 { font-size: 1.3rem; margin: var(--space-md) 0 var(--space-xs); }
.legal-content p  { font-size: 0.9rem; margin-bottom: var(--space-xs); color: var(--text-muted); }
.legal-content a  { color: var(--olive-dark); text-decoration: underline; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .services-grid          { grid-template-columns: 1fr 1fr; }
  .portfolio-grid         { grid-template-columns: 1fr 1fr; }
  .service-detail-card    { grid-template-columns: 1fr 2fr; }
  .service-detail-right   { display: none; }
  .contact-grid           { grid-template-columns: 1fr; gap: var(--space-lg); }
  .footer-grid            { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root {
    --space-xl: 64px;
    --space-lg: 40px;
  }

  nav  { display: none; }
  .hamburger { display: flex; }

  .services-grid   { grid-template-columns: 1fr; }
  .values-grid     { grid-template-columns: 1fr; gap: var(--space-md); }
  .process-grid    { grid-template-columns: 1fr; gap: var(--space-md); }
  .portfolio-grid  { grid-template-columns: 1fr; }
  .footer-grid     { grid-template-columns: 1fr; gap: var(--space-md); }

  .service-detail-card {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .hero-ctas { flex-direction: column; align-items: flex-start; }

  .form-row { grid-template-columns: 1fr; }

  .footer-bottom { flex-direction: column; gap: var(--space-sm); text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-sm); }
  .form-card { padding: var(--space-md); }
}
