:root {
  --bg: #FBFAF8;
  --ink: #1C1B19;
  --ink-soft: #4A4843;
  --muted: #6E6A63;
  --border: #E3E0DA;
  --accent: #A65A44;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Jost', Helvetica, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }

.mono {
  font-family: 'IBM Plex Mono', monospace;
}

/* Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 96px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav-name {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 40px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-links a:nth-child(n+2) { color: var(--muted); }
.nav-links a:hover { color: var(--accent); }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  padding: 140px 96px 120px;
}

.hero-title {
  grid-column: span 9;
  font-size: 104px;
  font-weight: 200;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero-lead {
  grid-column: 1 / span 1;
  margin-top: 56px;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink-soft);
  width: 376px;
}

.rule {
  border-top: 1px solid var(--border);
  margin: 0 96px 56px;
}

/* Projects grid */

.projects {
  padding: 0 96px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.project {
  position: relative;
  aspect-ratio: 1 / 1;
  background-color: #EFEDE9;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.project-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 24px;
  background: rgba(28, 27, 25, 0);
  color: transparent;
  transition: background 240ms ease, color 240ms ease;
}

.project:hover .project-overlay {
  background: rgba(28, 27, 25, 0.9);
  color: var(--bg);
}

/* Touch devices have no hover — show the caption as a permanent bottom
   gradient instead of leaving it invisible. */
@media (hover: none), (pointer: coarse) {
  .project-overlay {
    background: linear-gradient(to top, rgba(28, 27, 25, 0.85) 0%, rgba(28, 27, 25, 0.25) 60%, rgba(28, 27, 25, 0) 100%);
    color: var(--bg);
  }
}

.project-n {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
}

.project-title {
  font-size: 28px;
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.project-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spacer { height: 120px; }

/* O ateliéru / Kontakt */

.section-header {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  padding: 72px 96px 0;
}

.section-header h1 {
  grid-column: span 9;
  font-size: 80px;
  font-weight: 200;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.section-header--kontakt {
  border-top: 1px solid var(--border);
  margin-top: 120px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  padding: 72px 96px 0;
  border-top: 1px solid var(--border);
  margin-top: 72px;
}

.about-text {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about-text p {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.9;
  color: var(--ink-soft);
}

.about-lead {
  font-size: 22px !important;
  font-weight: 300;
  line-height: 1.6 !important;
  letter-spacing: -0.01em;
  color: var(--ink) !important;
}

.facts {
  grid-column: 9 / span 4;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fact {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.fact dt {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.fact dd {
  font-size: 14px;
  font-weight: 300;
  text-align: right;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  padding: 72px 96px 96px;
}

.contact-address {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
}

.contact-address .muted { color: var(--ink-soft); }
.contact-email { margin-top: 20px; }

.contact-hours {
  grid-column: 9 / span 4;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 2;
}

.footer {
  padding: 24px 96px 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Responsive */

@media (max-width: 1100px) {
  .nav, .hero, .rule, .projects, .section-header, .about-grid, .contact-grid, .footer {
    padding-left: 40px;
    padding-right: 40px;
  }
  .rule { margin-left: 40px; margin-right: 40px; }
  .hero-title { font-size: 72px; }
  .section-header h1 { font-size: 56px; }
}

@media (max-width: 900px) {
  .projects { grid-template-columns: repeat(2, 1fr); }
  .about-text, .facts, .contact-address, .contact-hours {
    grid-column: 1 / -1;
  }
  .about-grid, .contact-grid { gap: 48px; }
  .contact-hours { margin-top: -24px; }
  .hero-lead { grid-column: 1 / -1; width: 100%; max-width: 560px; }
}

@media (max-width: 640px) {
  .nav, .hero, .rule, .projects, .section-header, .about-grid, .contact-grid, .footer {
    padding-left: 20px;
    padding-right: 20px;
  }
  .rule { margin-left: 20px; margin-right: 20px; }
  .nav { flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 20px; padding-bottom: 20px; }
  .nav-links { gap: 24px; }
  .nav-links a { display: inline-block; padding: 4px 0; }
  .hero { padding-top: 72px; padding-bottom: 64px; }
  .hero-title { font-size: 48px; }
  .hero-lead { grid-column: 1 / -1; width: 100%; margin-top: 32px; }
  .projects { grid-template-columns: 1fr; gap: 16px; }
  .project { aspect-ratio: 4 / 3; }
  .section-header { padding-top: 48px; }
  .section-header h1 { font-size: 40px; }
  .about-grid { padding-top: 48px; margin-top: 48px; gap: 40px; }
  .section-header--kontakt { margin-top: 64px; }
  .about-text p { font-size: 14px; }
  .about-lead { font-size: 19px !important; }
  .footer { flex-direction: column; gap: 8px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 38px; }
  .section-header h1 { font-size: 32px; }
  .fact { flex-direction: column; gap: 4px; }
  .fact dd { text-align: left; }
  .contact-address { font-size: 15px; }
}
