:root {
  --sw-ink: #070706;
  --sw-graphite: #11100e;
  --sw-panel: rgba(20, 19, 17, 0.88);
  --sw-gold: #d9aa6a;
  --sw-gold-light: #f1d2a6;
  --sw-ivory: #fff8ef;
  --sw-soft: #c9beb1;
  --sw-line: rgba(217, 170, 106, 0.2);
  --sw-danger: #ff9e8d;
}

[hidden] { display: none !important; }

.sw-app :focus-visible {
  outline: 3px solid var(--sw-gold-light);
  outline-offset: 3px;
}

.sw-app button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.sw-skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 8px;
  color: #17120d;
  background: var(--sw-gold-light);
  font-weight: 800;
  transform: translateY(-160%);
}

.sw-skip-link:focus { transform: none; }

.sw-page-hero { max-width: 1040px; }

.sw-page-hero h1 { max-width: 880px; }

.sw-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.sw-section-heading > p {
  max-width: 480px;
  margin: 0;
  text-align: right;
}

.sw-section-heading h2 { margin: 0; }

.sw-status {
  margin: 16px 0;
  color: var(--sw-soft);
}

.sw-status[data-state="error"] {
  padding: 16px 18px;
  border: 1px solid rgba(255, 158, 141, 0.35);
  border-radius: 10px;
  color: #ffd8d1;
  background: rgba(255, 90, 70, 0.08);
}

.sw-filter-bar button { white-space: nowrap; }

.sw-project-grid { align-items: stretch; }

.sw-project-card {
  min-height: 360px;
  padding: 0;
  border-radius: 14px;
  background: #15130f;
}

.sw-project-card::before,
.sw-project-card::after { display: none; }

.sw-project-card-media,
.sw-project-card-overlay {
  position: absolute;
  inset: 0;
}

.sw-project-card-media {
  background:
    radial-gradient(circle at 72% 16%, rgba(217, 170, 106, 0.18), transparent 36%),
    linear-gradient(145deg, #211b15, #090908);
}

.sw-project-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.sw-project-card:hover .sw-project-card-media img { transform: scale(1.035); }

.sw-project-card-overlay {
  background: linear-gradient(180deg, rgba(7, 7, 6, 0.05) 20%, rgba(7, 7, 6, 0.94) 100%);
}

.sw-project-card-content {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: end;
  gap: 12px;
  min-height: 360px;
  padding: 26px;
}

.sw-project-card-content span,
.sw-project-card-content a {
  color: var(--sw-gold-light);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 11px;
  font-weight: 800;
}

.sw-project-card-content h3 {
  margin: 0;
  color: var(--sw-ivory);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(25px, 2.5vw, 34px);
  line-height: 1.05;
}

.sw-project-card-content a { width: max-content; }

.sw-project-card-content a::after { content: "  →"; }

.sw-empty-state {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 30px;
  border: 1px dashed var(--sw-line);
  border-radius: 14px;
  color: var(--sw-soft);
  background: rgba(255, 255, 255, 0.025);
  text-align: center;
}

.sw-empty-state h3 { margin: 0; }

.sw-trabalhos-page .sw-page-hero {
  max-width: 960px;
}

.sw-trabalhos-page .sw-portfolio-section {
  padding-top: 42px;
}

.sw-trabalhos-page .sw-filter-bar {
  margin-bottom: 18px;
}

.sw-trabalhos-page .sw-project-grid {
  align-items: stretch;
}

.sw-trabalhos-page .sw-project-card {
  min-height: 220px;
  padding: 22px;
  border-radius: var(--radius);
  background-color: #15130f;
  background-image:
    radial-gradient(circle at 72% 16%, rgba(217, 170, 106, 0.18), transparent 36%),
    linear-gradient(145deg, #211b15, #090908);
  background-position: center;
  background-size: cover;
}

.sw-trabalhos-page .sw-project-card.is-loaded {
  background-image: var(--project-cover);
}

.sw-trabalhos-page .sw-category-card {
  background-image:
    radial-gradient(circle at 72% 17%, var(--category-glow, rgba(217, 170, 106, 0.24)), transparent 5.2rem),
    linear-gradient(145deg, var(--category-start, #211b15), #090908);
}

.sw-trabalhos-page .sw-category-count {
  color: rgba(255, 248, 239, 0.58);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.sw-trabalhos-page .sw-project-card::before,
.sw-trabalhos-page .sw-project-card::after {
  display: block;
}

.sw-trabalhos-page .sw-project-card::before {
  background:
    radial-gradient(circle at 72% 16%, rgba(241, 210, 166, 0.34), transparent 5rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent);
}

.sw-trabalhos-page .sw-project-card::after {
  background: linear-gradient(180deg, rgba(7, 7, 6, 0.08) 18%, rgba(7, 7, 6, 0.86) 100%);
}

.sw-trabalhos-page .sw-project-card-overlay {
  display: none;
}

.sw-trabalhos-page .sw-project-card-content {
  min-height: auto;
  padding: 0;
}

.sw-trabalhos-page .sw-project-card-content h3 {
  font-size: 24px;
  line-height: 1.14;
}

.sw-trabalhos-page .sw-project-card-content a::after {
  content: "";
}

.sw-project-detail { min-height: 64vh; }

.sw-project-loading { margin: 70px clamp(22px, 5vw, 82px); }

.sw-project-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  min-height: min(760px, calc(100vh - 90px));
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.sw-project-hero-media {
  min-height: 540px;
  background:
    radial-gradient(circle at 68% 18%, rgba(217, 170, 106, 0.16), transparent 30%),
    linear-gradient(145deg, #241d17, #080807);
}

.sw-project-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sw-project-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(32px, 6vw, 84px);
  background:
    radial-gradient(circle at 100% 0%, rgba(217, 170, 106, 0.13), transparent 42%),
    var(--sw-graphite);
}

.sw-project-hero-copy h1 { font-size: clamp(44px, 6vw, 80px); }

.sw-project-hero-copy p:not(.eyebrow) { font-size: 17px; }

.sw-project-photo-section { padding-top: 80px; }

.sw-project-photo-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.sw-project-photo {
  grid-column: span 6;
  margin: 0;
  overflow: hidden;
  min-height: 320px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: #12110f;
}

.sw-project-photo:nth-child(3n) { grid-column: span 12; }

.sw-project-photo img {
  display: block;
  width: 100%;
  min-height: 320px;
  max-height: 780px;
  object-fit: cover;
}

.sw-project-photo figcaption {
  padding: 14px 16px;
  color: var(--sw-soft);
  font-size: 13px;
}

.sw-auth-body {
  background:
    radial-gradient(circle at 76% 12%, rgba(217, 170, 106, 0.2), transparent 28rem),
    radial-gradient(circle at 12% 82%, rgba(83, 61, 38, 0.24), transparent 26rem),
    linear-gradient(140deg, #050505, #11100e 56%, #070706);
}

.sw-auth-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(217, 170, 106, 0.2);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(217, 170, 106, 0.12), transparent 38%),
    rgba(18, 17, 15, 0.88);
}

.sw-auth-card::after {
  content: "";
  position: absolute;
  right: -130px;
  bottom: -180px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(217, 170, 106, 0.15);
  border-radius: 50%;
  pointer-events: none;
}

.sw-auth-card > * { position: relative; z-index: 1; }

.sw-auth-intro { margin-bottom: 0; }

.sw-auth-card input,
.sw-gallery-tools select,
.sw-gallery-tools input,
.sw-print-options select,
.sw-print-options input,
.sw-print-cart input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--sw-ivory);
  background: rgba(0, 0, 0, 0.3);
  outline: 0;
}

.sw-auth-card input:focus,
.sw-gallery-tools select:focus,
.sw-gallery-tools input:focus,
.sw-print-options select:focus,
.sw-print-options input:focus,
.sw-print-cart input:focus {
  border-color: var(--sw-gold);
  box-shadow: 0 0 0 4px rgba(217, 170, 106, 0.12);
}

.sw-auth-support {
  margin: 22px 0 0;
  color: var(--sw-soft);
  font-size: 13px;
  text-align: center;
}

.sw-auth-support a { color: var(--sw-gold-light); }

.form-message.error { border-color: rgba(255, 143, 125, 0.45); }

.sw-client-topbar { border-bottom: 1px solid rgba(217, 170, 106, 0.12); }

.sw-client-identity strong,
.sw-client-identity span { display: block; }

.sw-client-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.sw-client-heading { margin-top: 38px; }

.sw-client-gallery-card { transition: transform 180ms ease, border-color 180ms ease; }

.sw-client-gallery-card:hover {
  transform: translateY(-2px);
  border-color: rgba(217, 170, 106, 0.4);
}

.sw-private-cover,
.sw-photo-thumb {
  position: relative;
  overflow: hidden;
}

.sw-private-cover.is-empty::after,
.sw-photo-thumb.is-empty::after,
.sw-project-card-media.is-empty::after,
.sw-project-hero-media.is-empty::after,
.sw-project-photo.is-empty::after {
  content: "SUBWORLD";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(241, 210, 166, 0.38);
  letter-spacing: 0.35em;
  font-size: 11px;
  font-weight: 800;
}

.sw-client-empty { grid-template-columns: 1fr; }

.sw-client-contracts { display: grid; gap: 10px; }
.sw-client-contract-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(217, 170, 106, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}
.sw-client-contract-card span { color: var(--sw-gold-light); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.sw-client-contract-card h3 { margin: 5px 0 4px; color: var(--sw-ivory); font-size: 17px; }
.sw-client-contract-card p { margin: 0; color: var(--sw-soft); font-size: 12px; }

.sw-gallery-body { padding-bottom: 120px; }

.sw-gallery-title {
  max-width: min(42vw, 520px);
  overflow: hidden;
  color: var(--sw-ivory);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sw-gallery-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 0.45fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--sw-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.sw-gallery-tools label > span {
  color: var(--sw-soft);
  font-size: 12px;
}

.sw-photo-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 72% 18%, rgba(217, 170, 106, 0.17), transparent 35%),
    linear-gradient(145deg, #211b15, #090908);
  cursor: zoom-in;
}

.sw-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.sw-photo-card:hover .sw-photo-thumb img { transform: scale(1.025); }

.sw-photo-card.selected { box-shadow: 0 0 0 1px rgba(217, 170, 106, 0.25), 0 18px 58px rgba(0, 0, 0, 0.3); }

.sw-selection-summary { flex-wrap: wrap; }

.sw-gallery-modal-panel {
  width: min(100%, 1160px);
  max-height: min(92vh, 860px);
  border-radius: 16px;
}

.sw-modal-open { overflow: hidden; }

.sw-selection-lightbox { min-height: min(78vh, 760px); }

.sw-lightbox-panel { overflow-y: auto; }

.sw-lightbox-panel textarea {
  width: 100%;
  min-height: 112px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  padding: 12px;
  color: var(--sw-ivory);
  background: rgba(0, 0, 0, 0.28);
}

.sw-print-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px;
  gap: 12px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--sw-line);
}

.sw-print-options h3,
.sw-print-options p,
.sw-print-options button { grid-column: 1 / -1; }

.sw-print-options h3 { margin: 0; color: var(--sw-gold-light); }

.sw-print-cart {
  display: grid;
  gap: 18px;
  padding: clamp(24px, 5vw, 44px);
  color: var(--sw-ivory);
}

.sw-print-cart h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(32px, 5vw, 48px);
}

.sw-print-cart > p { margin: 0; }

.sw-print-cart-list { display: grid; gap: 10px; }

.sw-print-cart-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.sw-print-cart-list article strong,
.sw-print-cart-list article span { display: block; }

.sw-print-cart-list article span { margin-top: 5px; color: var(--sw-soft); font-size: 13px; }

.sw-print-cart-total {
  padding-top: 14px;
  border-top: 1px solid var(--sw-line);
  color: var(--sw-gold-light) !important;
  font-size: 20px;
  font-weight: 800;
}

.sw-print-cart small { color: var(--sw-soft); }

.proof-toast.error {
  border-color: rgba(255, 143, 125, 0.42);
  color: #ffd8d1;
}

@media (max-width: 1100px) {
  .sw-project-detail-hero { grid-template-columns: 1fr; }
  .sw-project-hero-media { min-height: min(66vw, 620px); }
  .sw-project-hero-copy { padding-block: 54px; }
}

@media (max-width: 980px) {
  .sw-client-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .sw-selection-summary {
    position: sticky;
    right: auto;
    bottom: 10px;
    left: auto;
    z-index: 25;
    width: min(100% - 28px, 760px);
    margin: 14px auto;
    flex-direction: row;
    align-items: center;
  }

  .sw-gallery-body { padding-bottom: 12px; }
}

@media (max-width: 780px) {
  .sw-section-heading { align-items: flex-start; flex-direction: column; }
  .sw-section-heading > p { text-align: left; }
  .sw-project-photo { grid-column: span 12; }
  .sw-project-card { min-height: 310px; }
  .sw-project-card-content { min-height: 310px; }
  .sw-gallery-tools { grid-template-columns: 1fr; }
  .sw-client-summary { grid-template-columns: 1fr; }
  .sw-client-contract-card { align-items: stretch; flex-direction: column; }
  .sw-client-contract-card .btn { width: 100%; }
  .sw-print-cart-list article { grid-template-columns: minmax(0, 1fr) 76px; }
  .sw-print-cart-list article button { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .sw-project-card { min-height: 340px; }
  .sw-project-card-content { min-height: 340px; }
  .sw-project-detail-hero { min-height: 0; }
  .sw-project-hero-media { min-height: 72vw; }
  .sw-project-hero-copy { padding: 34px 20px 46px; }
  .sw-project-photo-section { padding-top: 50px; }
  .sw-project-photo,
  .sw-project-photo img { min-height: 230px; }
  .sw-gallery-title { max-width: none; }

  .sw-selection-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100% - 20px, 520px);
    gap: 10px;
  }

  .sw-selection-summary .btn { grid-column: 1 / -1; }
  .sw-print-options { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .sw-app *,
  .sw-app *::before,
  .sw-app *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
