:root {
  --iw-orange: #e46119;
  --iw-orange-dark: #bd4610;
  --iw-ink: #151515;
  --iw-paper: #ffffff;
  --iw-soft: #f1f1f1;
  --iw-warm: #f7f3ec;
  --iw-muted: #6c6c68;
  --iw-line: #d8d8d3;
  --iw-display: "Barlow Condensed", sans-serif;
  --iw-body: "Manrope", sans-serif;
  --page-gutter: clamp(20px, 5vw, 80px);
  --focus: 3px solid #1f6feb;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--iw-paper);
  color: var(--iw-ink);
  font-family: var(--iw-body);
  font-size: 16px;
  line-height: 1.55;
}

body::selection { background: var(--iw-orange); color: var(--iw-paper); }
a { color: inherit; text-underline-offset: 0.2em; }
button, input, select { color: inherit; font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-150%);
  background: var(--iw-paper);
  color: var(--iw-ink);
  font-weight: 700;
}

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

.site-header {
  min-height: 88px;
  padding: 18px var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: var(--iw-ink);
  color: var(--iw-paper);
  border-bottom: 1px solid #30302f;
}

.brand { display: flex; align-items: center; gap: 22px; text-decoration: none; }
.brand img {
  display: block;
  width: 148px;
  height: auto;
  padding: 7px 9px;
  background: var(--iw-paper);
}

.brand span {
  padding-left: 22px;
  border-left: 1px solid #5b5b58;
  color: #c8c8c4;
  font-family: var(--iw-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.site-header nav { display: flex; align-items: center; gap: 24px; font-size: 0.86rem; font-weight: 700; }
.site-header nav > a, .text-button { border: 0; background: transparent; color: #dbdbd7; text-decoration: none; }
.site-header nav > a:hover, .text-button:hover { color: var(--iw-paper); text-decoration: underline; }
.logout-form { margin: 0; }

.notice {
  margin: 18px var(--page-gutter) 0;
  padding: 14px 18px;
  border: 1px solid var(--iw-ink);
  font-weight: 700;
}

.notice--sucesso { background: #e9f8ec; }
.notice--erro { background: #fff0e8; border-color: var(--iw-orange-dark); }

.hero {
  min-height: min(780px, calc(100vh - 88px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 0.82fr);
  background: var(--iw-ink);
  overflow: hidden;
}

.hero__copy {
  min-width: 0;
  padding: clamp(72px, 10vw, 148px) var(--page-gutter) clamp(70px, 9vw, 120px);
  align-self: center;
  color: var(--iw-paper);
}

.hero h1, .account-hero h1, .section-heading h2, .steps h2 {
  margin: 0;
  font-family: var(--iw-display);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 0.88;
  text-transform: uppercase;
}

.hero h1 { max-width: 830px; font-size: clamp(4.8rem, 9vw, 9rem); }
.hero h1 span { color: var(--iw-orange); }

.hero__copy > p:not(.privacy-note) {
  max-width: 620px;
  margin: 38px 0 34px;
  color: #d6d6d2;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
}

.steam-button, .primary-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--iw-orange);
  color: var(--iw-ink);
  font-weight: 800;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

.steam-button { padding: 14px 22px; }
.steam-button svg { width: 24px; height: 24px; fill: currentColor; }
.steam-button:hover, .primary-button:hover { transform: translateY(-1px); text-decoration: underline; }
.privacy-note { max-width: 530px; margin: 18px 0 0; color: #999994; font-size: 0.77rem; }

.hero__collection {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: var(--iw-orange);
  isolation: isolate;
}

.hero__collection::before { content: ""; position: absolute; inset: 40px; border: 1px solid rgb(255 255 255 / 42%); }

.weapon {
  position: absolute;
  z-index: 2;
  display: block;
  width: 82%;
  height: auto;
  object-fit: contain;
}

.weapon--ak { top: 25%; right: -7%; transform: rotate(-7deg); }
.weapon--awp { bottom: 18%; left: -13%; transform: rotate(8deg); }

.hero__collection > p {
  position: absolute;
  z-index: 3;
  right: 58px;
  bottom: 48px;
  margin: 0;
  text-align: right;
  font-family: var(--iw-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.25;
}

.collection-mark { position: absolute; z-index: 1; right: -80px; bottom: -30px; width: 340px; height: auto; opacity: 0.13; }

.steps { padding: clamp(80px, 10vw, 140px) var(--page-gutter); background: var(--iw-warm); }
.steps h2, .section-heading h2 { font-size: clamp(3.4rem, 7vw, 7.5rem); }

.steps ol {
  margin: 58px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  border-top: 2px solid var(--iw-ink);
}

.steps li {
  min-height: 190px;
  padding: 28px 36px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-bottom: 1px solid var(--iw-line);
}

.steps li + li { padding-left: 36px; border-left: 1px solid var(--iw-line); }
.steps strong { font-family: var(--iw-display); font-size: 2.2rem; line-height: 1; text-transform: uppercase; }
.steps span { max-width: 280px; color: var(--iw-muted); }

code { padding: 0.12em 0.36em; background: #dedbd4; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.9em; }

.account-hero {
  padding: clamp(58px, 8vw, 110px) var(--page-gutter);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 52px;
  background: var(--iw-orange);
}

.account-hero h1 { font-size: clamp(4.5rem, 9vw, 9rem); }
.account-hero p { max-width: 650px; margin: 28px 0 0; font-weight: 600; }

.profile {
  min-width: min(100%, 290px);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid rgb(21 21 21 / 55%);
  background: rgb(255 255 255 / 14%);
}

.profile img { width: 64px; height: 64px; object-fit: cover; border: 1px solid var(--iw-ink); }
.profile span { min-width: 0; display: flex; flex-direction: column; }
.profile strong, .profile small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile small { margin-top: 4px; font-size: 0.72rem; }

.knife-section, .arsenal { padding: clamp(72px, 9vw, 120px) var(--page-gutter); }

.knife-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(40px, 8vw, 130px);
  background: var(--iw-ink);
  color: var(--iw-paper);
}

.section-heading p { margin: 18px 0 0; color: var(--iw-muted); }
.knife-section .section-heading p { color: #aeadab; }

.knife-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px; }
.knife-form > label, .weapon-card label, .search-field span { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.knife-form > label { grid-column: 1 / -1; margin-bottom: -10px; }
.knife-form select { border-color: #74746e; background-color: #262624; color: var(--iw-paper); }

.knife-form img {
  grid-column: 1 / -1;
  width: min(100%, 520px);
  height: 230px;
  margin: 10px auto 12px;
  object-fit: contain;
}

select, input[type="search"], input[type="number"] {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid #aaa9a3;
  border-radius: 2px;
  background: var(--iw-paper);
}

.primary-button { padding: 12px 18px; }
.arsenal { background: var(--iw-soft); }

.section-heading--arsenal {
  margin-bottom: 50px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 42px;
}

.search-field { width: min(100%, 390px); display: grid; gap: 7px; }

.weapon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: #c6c6c1;
  border: 1px solid #c6c6c1;
}

.weapon-card { position: relative; min-width: 0; padding: 22px; background: var(--iw-paper); }

.weapon-card__index {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 20px;
  color: #a7a7a2;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
}

.weapon-card__visual { min-height: 190px; display: grid; place-items: center; background: var(--iw-warm); overflow: hidden; }
.weapon-card__visual img { width: 92%; height: 180px; object-fit: contain; transition: transform 180ms ease; }
.weapon-card:hover .weapon-card__visual img { transform: scale(1.035); }
.weapon-card form { margin-top: 20px; display: grid; gap: 10px; }

.weapon-card h3 {
  margin: 0 0 4px;
  font-family: var(--iw-display);
  font-size: 2rem;
  line-height: 1;
  text-transform: uppercase;
}

.weapon-card select { min-width: 0; text-overflow: ellipsis; }
.weapon-card details { padding: 6px 0; border-top: 1px solid var(--iw-line); border-bottom: 1px solid var(--iw-line); }
.weapon-card summary { padding: 8px 0; color: var(--iw-muted); font-size: 0.8rem; font-weight: 700; }
.fine-controls { padding: 8px 0 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fine-controls label { display: grid; gap: 5px; }
.empty-search { padding: 60px 0; text-align: center; color: var(--iw-muted); }

.site-footer {
  padding: 48px var(--page-gutter);
  display: grid;
  grid-template-columns: auto minmax(190px, 0.7fr) minmax(260px, 1fr);
  align-items: center;
  gap: 28px;
  background: var(--iw-ink);
  color: var(--iw-paper);
}

.site-footer > img { width: 54px; height: 40px; padding: 5px; object-fit: contain; background: var(--iw-paper); }
.site-footer strong { font-family: var(--iw-display); font-size: 1.25rem; text-transform: uppercase; }
.site-footer p { margin: 3px 0 0; color: #aeadab; font-size: 0.76rem; }
.source-note { max-width: 620px; justify-self: end; }

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr 0.8fr; }
  .hero__collection { min-height: 560px; }
  .weapon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .site-header { min-height: 72px; padding-block: 14px; }
  .brand img { width: 116px; }
  .brand span, .site-header nav > a { display: none; }
  .hero { min-height: auto; grid-template-columns: minmax(0, 1fr); }
  .hero__copy { padding-block: 72px 80px; }
  .hero h1 { font-size: clamp(4rem, 20vw, 7rem); }
  .hero__copy > p { width: min(100%, 350px); max-width: 350px; overflow-wrap: anywhere; }
  .hero__collection { min-height: 520px; }
  .steps ol { grid-template-columns: 1fr; }
  .steps li + li { padding-left: 0; border-left: 0; }
  .account-hero, .section-heading--arsenal { display: flex; align-items: start; flex-direction: column; }
  .profile, .search-field { width: 100%; }
  .knife-section { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: auto 1fr; align-items: start; }
  .source-note { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 560px) {
  .weapon-grid { grid-template-columns: 1fr; }
  .knife-form { grid-template-columns: 1fr; }
  .knife-form > * { grid-column: 1 !important; }
  .hero__collection::before { inset: 22px; }
  .hero__collection > p { right: 35px; bottom: 30px; }
}

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