:root {
  color-scheme: light;
  --bg: #f3ece0;
  --surface: #fff6ed;
  --text: #2e2a25;
  --muted: #6b7056;
  --accent: #a25c43;
  --accent-dark: #4a372c;
  --border: rgba(46, 42, 37, 0.12);
  --shadow: 0 22px 50px rgba(46, 42, 37, 0.08);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Quicksand', sans-serif;
  background: radial-gradient(circle at top, #ede2d5 0%, #f3ece0 55%, #f7f1e8 100%);
  color: var(--text);
}

img {
  max-width: 100%;
  display: block;
}

button, .button {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  width: 100%;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 236, 224, 0.96);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  width: 64px;
  height: auto;
  display: block;
  object-fit: contain;
}

.brand-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  text-transform: lowercase;
  letter-spacing: 0.03em;
  color: var(--accent-dark);
}

.brand-subtitle {
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 0.85rem 1.1rem;
  cursor: pointer;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.site-nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}

.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-copy {
  max-width: 640px;
}

.eyebrow {
  font-size: 0.88rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.8rem, 4vw, 4.4rem);
  line-height: 1.02;
  margin: 0;
  color: var(--accent-dark);
}

.hero p {
  margin: 1.5rem 0 0;
  max-width: 36rem;
  line-height: 1.8;
  color: var(--text);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.95rem 1.6rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--accent-dark);
  color: #fff;
  box-shadow: 0 16px 30px rgba(74, 55, 44, 0.14);
}

.button-secondary {
  background: rgba(162, 92, 67, 0.08);
  color: var(--accent-dark);
  border: 1px solid rgba(162, 92, 67, 0.14);
}

.hero-visual {
  display: flex;
  justify-content: flex-end;
}

.hero-visual-card {
  width: min(420px, 100%);
  padding: 2rem;
  background: linear-gradient(180deg, #f7f0e8 0%, #efebe5 100%);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-symbol {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin-bottom: 1.4rem;
  border-radius: 16px;
}

.service {
  margin-top: 4rem;
}

.section-header {
  max-width: 720px;
  margin-bottom: 2rem;
}

.section-label {
  display: inline-flex;
  margin-bottom: 0.85rem;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.section-header h2 {
  margin: 0 0 0.75rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 1.05;
  color: var(--accent-dark);
}

.brand-board .section-header h2 {
  margin-bottom: 1.4rem;
  font-size: clamp(2.3rem, 3.3vw, 2.8rem);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.service-card {
  padding: 1.7rem;
  background: #fff;
  border-radius: 28px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 35px rgba(46, 42, 37, 0.06);
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  height: 3.2rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: rgba(162, 92, 67, 0.08);
  color: var(--accent-dark);
}

.service-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.service-card h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--accent-dark);
}

.service-card p {
  margin: 0.85rem 0 0;
  line-height: 1.75;
  color: var(--text);
}

.brand-board {
  margin: 3rem 1.5rem;
  padding: 3rem 0 1rem;
}

.brand-content {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1.2fr 0.8fr;
}

.brand-details {
  padding-right: 1rem;
}

.brand-details p {
  line-height: 1.85;
  margin: 0 0 1.25rem;
}

.brand-details ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.9rem;
}

.brand-details li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--text);
}

.project-sibling {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.project-sibling-label {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.project-sibling-label svg {
  flex-shrink: 0;
  color: var(--accent-dark);
}

.project-sibling-label p {
  margin: 0;
  line-height: 1.7;
}

.brand-details li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 8px;
  height: 8px;
  background: var(--accent-dark);
  border-radius: 50%;
}

.color-palette {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.color-swatch {
  min-height: 120px;
  border-radius: 24px;
  background: var(--swatch);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  color: #fff;
  font-weight: 700;
  box-shadow: inset 0 -10px 20px rgba(0,0,0,0.1);
}

.color-swatch span {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.contact-panel {
  margin: 3rem 1.5rem 4rem;
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: #fff;
  border-radius: 32px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 30px rgba(46, 42, 37, 0.07);
}

.contact-panel h2 {
  margin: 0.45rem 0 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
}

.contact-panel p {
  margin: 1rem 0 0;
  max-width: 42rem;
  line-height: 1.75;
}

.site-footer {
  padding: 1.75rem 1.5rem 2.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

section#serveis, section#projecte {
    max-width: 1180px;
    margin: 0 auto;
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .brand-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 0 0;
    border-top: 1px solid var(--border);
    display: none;
  }

  .site-nav.open {
    display: flex;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .contact-panel {
    flex-direction: column;
    text-align: start;
  }
}

/* Footer Navigation */
.footer-nav {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--accent-dark);
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.modal.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(46, 42, 37, 0.6);
  cursor: pointer;
}

.modal-content {
  position: relative;
  z-index: 1001;
  background: #fff;
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.modal-content h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  color: var(--accent-dark);
  margin-top: 0;
  margin-bottom: 1rem;
}

.modal-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: var(--accent-dark);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.modal-content p {
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1rem;
}

.modal-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.modal-content li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
}

.modal-close {
  position: absolute;
  right: 1.5rem;
  top: 1.5rem;
  background: none;
  border: none;
  font-size: 2.5rem;
  cursor: pointer;
  color: var(--muted);
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  line-height: 1;
}

.modal-close:hover {
  color: var(--accent-dark);
}

@media (max-width: 760px) {
  .modal-content {
    margin: 1rem;
    max-height: 90vh;
    padding: 1.5rem;
  }

  .modal-close {
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
  }

  .modal-content h1 {
    font-size: 1.6rem;
  }

  .modal-content h2 {
    font-size: 1.2rem;
  }
}
