/* Palette derived from photo/: warm taupe, amber glass, cobalt vitraz accents */
:root {
  --bg: #f5f2ed;
  --bg-alt: #ebe6df;
  --bg-dark: #2b2826;
  --text: #3a342f;
  --text-muted: #6b635c;
  --text-light: #f5f2ed;
  --accent: #b8860b;
  --accent-hover: #9a7028;
  --accent-blue: #2563eb;
  --accent-blue-muted: #1e40af;
  --border: #c9bfb5;
  --shadow: rgba(43, 40, 38, 0.12);
  --radius: 4px;
  --max-width: 1120px;
  --header-h: 72px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(245, 242, 237, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.logo {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.logo:hover {
  text-decoration: none;
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.nav a:hover {
  color: var(--accent);
}

.nav__cta {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  background: var(--accent);
  color: #fff !important;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s;
}

.nav__cta:hover {
  background: var(--accent-hover);
  color: #fff !important;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(43, 40, 38, 0.82) 0%,
    rgba(43, 40, 38, 0.55) 55%,
    rgba(43, 40, 38, 0.35) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 4rem 0;
  max-width: 640px;
  color: var(--text-light);
}

.hero__content h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem;
}

.hero__subtitle {
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 0.75rem;
  opacity: 0.95;
}

.hero__tags {
  font-size: 0.9rem;
  opacity: 0.85;
  margin: 0 0 2rem;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.btn:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.btn--outline:hover {
  background: var(--accent);
  color: #fff;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.section__lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 0 2.5rem;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--shadow);
}

.service-card__img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.service-card__img img,
.service-card__img .placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-card__body {
  padding: 1.25rem;
}

.service-card__body h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.service-card__body p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Process */
.process-intro {
  max-width: 720px;
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

.process-theses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.thesis {
  padding: 1.25rem;
  background: #fff;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: 0 2px 8px var(--shadow);
}

.thesis strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--accent-blue-muted);
}

.thesis p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.timeline__item {
  text-align: center;
}

.timeline__img {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: 0 4px 16px var(--shadow);
}

.timeline__step {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  line-height: 2rem;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.timeline__item h4 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.timeline__item p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Portfolio */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.portfolio-item {
  cursor: pointer;
  border: none;
  padding: 0;
  background: none;
  text-align: left;
  font-family: inherit;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.portfolio-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--shadow);
}

.portfolio-item__img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.portfolio-item__img img,
.portfolio-item__img .placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.portfolio-item:hover .portfolio-item__img img {
  transform: scale(1.04);
}

.portfolio-item__caption {
  padding: 0.85rem 1rem;
  background: #fff;
}

.portfolio-item__caption strong {
  display: block;
  font-size: 0.95rem;
}

.portfolio-item__caption span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.portfolio-cta {
  margin-top: 2rem;
  text-align: center;
  font-size: 1.05rem;
}

.portfolio-cta a {
  font-weight: 600;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 3rem;
}

.about__photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px var(--shadow);
}

.about__photo img,
.about__photo .placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.about__name {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--text);
}

.about__text p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.stat strong {
  display: block;
  font-size: 1.75rem;
  color: var(--accent);
  line-height: 1.2;
}

.stat span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.awards__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
}

.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.award-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px var(--shadow);
}

.award-card__img {
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.award-card__img img,
.award-card__img .placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.award-card__body {
  padding: 0.85rem;
}

.award-card__body strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.award-card__body span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Contact */
.contact-section {
  background: var(--bg-dark);
  color: var(--text-light);
}

.contact-section .section__title,
.contact-section .section__lead {
  color: var(--text-light);
}

.contact-section .section__lead {
  opacity: 0.85;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.contact-info p {
  margin: 0 0 0.75rem;
  opacity: 0.9;
}

.contact-info a {
  color: var(--accent);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  opacity: 0.9;
}

.form input,
.form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
}

.form input::placeholder,
.form textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.form input:focus,
.form textarea:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}

.form textarea {
  min-height: 120px;
  resize: vertical;
}

.form__hint {
  font-size: 0.8rem;
  opacity: 0.7;
  margin: 0;
}

.form__success {
  display: none;
  padding: 1rem;
  background: rgba(184, 134, 11, 0.2);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  margin-top: 0.5rem;
}

.form__success.visible {
  display: block;
}

.form__privacy {
  font-size: 0.75rem;
  opacity: 0.65;
  margin: 0;
}

/* Footer */
.footer {
  padding: 2rem 0;
  background: #1a1816;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.footer a {
  color: var(--accent);
}

/* Placeholder */
.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #ddd6ce 0%, #c9bfb5 100%);
  color: var(--text-muted);
  text-align: center;
  padding: 1rem;
  min-height: 100%;
}

.placeholder__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

.placeholder__label {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  max-width: 90%;
}

.placeholder--dark {
  background: linear-gradient(145deg, #4a4540 0%, #3a342f 100%);
  color: rgba(255, 255, 255, 0.7);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(43, 40, 38, 0.85);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.modal.open {
  opacity: 1;
  visibility: visible;
}

.modal__dialog {
  background: #fff;
  border-radius: var(--radius);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.25s;
}

.modal.open .modal__dialog {
  transform: translateY(0);
}

.modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: var(--bg-dark);
  color: #fff;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 1;
  line-height: 1;
}

.modal__img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.modal__body {
  padding: 1.5rem;
}

.modal__body h3 {
  margin: 0 0 0.5rem;
}

.modal__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.modal__body p {
  margin: 0;
  color: var(--text-muted);
}

/* Fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about__photo {
    max-width: 360px;
  }
}

@media (max-width: 640px) {
  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
  }

  .nav.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .form__row {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3.5rem 0;
  }

  .stats {
    gap: 1.25rem;
  }
}
