:root {
  --bg: #fbfaf8;
  --paper: #ffffff;
  --ink: #161312;
  --muted: #746c66;
  --line: #ded8d2;
  --blush: #f1d5db;
  --blue: #b9dce8;
  --denim: #47758f;
  --shadow: 0 20px 60px rgba(34, 27, 22, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
  padding: 18px clamp(20px, 4vw, 58px);
  background: rgba(251, 250, 248, 0.86);
  border-bottom: 1px solid rgba(222, 216, 210, 0.75);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 34px);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.nav a {
  transition: color 160ms ease;
}

.nav a:hover {
  color: var(--ink);
}

.account-trigger {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

main {
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(360px, 1.14fr);
  gap: clamp(34px, 7vw, 100px);
  align-items: center;
  min-height: calc(100vh - 74px);
  padding: clamp(42px, 7vw, 86px) clamp(20px, 5vw, 72px) 54px;
}

.hero-copy {
  max-width: 620px;
}

.section-label {
  margin: 0 0 18px;
  color: var(--denim);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(58px, 9vw, 132px);
  line-height: 0.86;
  max-width: 760px;
}

h2 {
  font-size: clamp(36px, 5vw, 76px);
  line-height: 0.94;
}

h3 {
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1;
}

.hero-text {
  max-width: 520px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--ink);
  color: var(--paper);
}

.button.secondary {
  background: transparent;
  color: var(--ink);
}

.hero-art {
  position: relative;
  min-height: 620px;
}

.feature-card {
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.feature-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--paper);
}

.feature-main {
  width: min(64vw, 540px);
  height: min(72vh, 720px);
  margin-left: auto;
}

.feature-main img {
  object-fit: contain;
  padding: 18px;
}

.feature-small {
  position: absolute;
  left: 0;
  bottom: 22px;
  width: min(38vw, 280px);
  aspect-ratio: 0.78;
}

.feature-small img {
  object-fit: contain;
  padding: 12px;
}

.intro-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.intro-strip > div {
  min-height: 116px;
  padding: 26px clamp(18px, 3vw, 32px);
  border-right: 1px solid var(--line);
}

.intro-strip > div:last-child {
  border-right: 0;
}

.metric {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
}

.metric-label {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.works-section,
.process-section,
.contact-section {
  padding: clamp(76px, 10vw, 132px) clamp(20px, 5vw, 72px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  margin-bottom: 44px;
}

.section-heading h2 {
  max-width: 860px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.gallery-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.upload-button {
  min-height: 40px;
  border-color: var(--denim);
  background: var(--denim);
  color: var(--paper);
  cursor: pointer;
}

.auth-status {
  max-width: 260px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
}

.filter {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.filter.active,
.filter:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.work-card {
  position: relative;
  min-width: 0;
}

.work-card.large {
  grid-column: span 2;
}

.work-card button {
  display: grid;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 12px 32px rgba(34, 27, 22, 0.08);
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.work-card button:hover {
  border-color: var(--ink);
  box-shadow: 0 22px 50px rgba(34, 27, 22, 0.14);
  transform: translateY(-4px);
}

.work-card img {
  width: 100%;
  aspect-ratio: 0.72;
  object-fit: contain;
  padding: clamp(10px, 2vw, 18px);
  background: #fff;
}

.work-card.large img {
  aspect-ratio: 1.05;
}

.work-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
}

.work-meta strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 400;
}

.work-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
}

.work-card.is-hidden {
  display: none;
}

.process-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(300px, 1fr);
  gap: clamp(32px, 7vw, 90px);
  background: linear-gradient(90deg, rgba(185, 220, 232, 0.32), transparent 48%), var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.process-copy p:not(.section-label),
.contact-section p {
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.process-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.process-list > div {
  display: grid;
  grid-template-columns: 54px 170px 1fr;
  gap: 20px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.process-list span {
  color: var(--denim);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
}

.process-list strong {
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.process-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.contact-section {
  display: grid;
  justify-items: center;
  text-align: center;
}

.contact-section h2 {
  max-width: 760px;
}

.lightbox {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(22, 19, 18, 0.62);
  backdrop-filter: blur(12px);
}

.lightbox-body {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(260px, 0.28fr);
  gap: 0;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.lightbox img {
  width: 100%;
  max-height: calc(100vh - 54px);
  object-fit: contain;
  padding: 22px;
  background: #fff;
}

.lightbox-copy {
  padding: 34px;
  border-left: 1px solid var(--line);
}

.lightbox-copy span {
  color: var(--denim);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lightbox-copy h3 {
  margin-top: 8px;
  font-size: clamp(32px, 3.2vw, 52px);
}

.lightbox-copy p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.palette-panel {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.palette-panel > strong {
  display: block;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.palette-grid {
  display: grid;
  gap: 10px;
}

.palette-swatch {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 48px;
}

.swatch-color {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(22, 19, 18, 0.16);
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.52);
}

.swatch-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.swatch-copy strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.swatch-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lightbox-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(22, 19, 18, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.edit-dialog {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  background: transparent;
}

.edit-dialog::backdrop {
  background: rgba(22, 19, 18, 0.48);
  backdrop-filter: blur(10px);
}

.edit-form {
  display: grid;
  gap: 18px;
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.edit-form-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.edit-form-heading span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1;
}

.icon-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.edit-form label {
  display: grid;
  gap: 8px;
  color: var(--denim);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.form-note,
.auth-message {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.auth-message {
  min-height: 22px;
  color: var(--denim);
  font-weight: 750;
}

.edit-form input,
.edit-form textarea,
.edit-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: 600 15px/1.45 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
  outline: 0;
  padding: 12px 13px;
  text-transform: none;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 92px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateY(-50%);
}

.password-toggle:hover {
  border-color: var(--ink);
}

.edit-form textarea {
  resize: vertical;
}

.edit-form input:focus,
.edit-form textarea:focus,
.edit-form select:focus {
  border-color: var(--ink);
}

.edit-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 980px) {
  .hero,
  .section-heading,
  .process-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-art {
    min-height: 560px;
  }

  .feature-main {
    width: min(82vw, 520px);
  }

  .feature-small {
    width: min(42vw, 250px);
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters {
    justify-content: flex-start;
  }

  .lightbox-body {
    grid-template-columns: 1fr;
  }

  .lightbox-copy {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 680px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .account-trigger {
    min-height: 32px;
    padding: 0 10px;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-art {
    min-height: auto;
  }

  .feature-main,
  .feature-small {
    position: static;
    width: 100%;
  }

  .feature-small {
    margin-top: 14px;
  }

  .intro-strip,
  .gallery,
  .process-list > div {
    grid-template-columns: 1fr;
  }

  .intro-strip > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .intro-strip > div:last-child {
    border-bottom: 0;
  }

  .work-card.large {
    grid-column: span 1;
  }

  .gallery-actions {
    justify-content: flex-start;
  }

  .auth-status {
    max-width: none;
    text-align: left;
  }

  .work-meta {
    display: grid;
  }

  .work-meta span {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
