/* Fastly Swag — plain site styles, no framework, no preprocessor */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color: #24292b;
  background: #faf9f6;
  line-height: 1.5;
}

a { color: #ff282d; }

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* header / nav */

header.site {
  border-bottom: 1px solid #e2ded4;
  background: #fff;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  flex-wrap: wrap;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  color: #24292b;
  text-decoration: none;
}

.brand img { height: 28px; width: 28px; }

nav.links a {
  margin-left: 18px;
  font-size: 14.5px;
  color: #4a5450;
  text-decoration: none;
}

nav.links a:hover { color: #ff282d; }

/* hero */

.hero {
  position: relative;
}

.hero img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  display: block;
}

.hero-caption {
  padding: 22px 0 6px;
}

.hero-caption h1 {
  font-size: 26px;
  margin: 0 0 6px;
}

.hero-caption p {
  color: #5a6460;
  margin: 0;
  max-width: 560px;
}

/* generic sections */

main {
  padding: 26px 0 60px;
}

h2 {
  font-size: 19px;
  margin: 30px 0 14px;
}

/* product grid */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.card {
  background: #fff;
  border: 1px solid #e2ded4;
  border-radius: 4px;
  overflow: hidden;
}

.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 12px 14px;
}

.card-body h3 {
  font-size: 15px;
  margin: 0 0 4px;
}

.card-body .price {
  color: #ff282d;
  font-weight: 600;
  font-size: 14px;
}

.card-body p {
  color: #6a7470;
  font-size: 13px;
  margin: 6px 0 0;
}

/* forms */

form.panel {
  background: #fff;
  border: 1px solid #e2ded4;
  border-radius: 4px;
  padding: 22px;
  max-width: 380px;
}

form.panel label {
  display: block;
  font-size: 13px;
  color: #5a6460;
  margin-bottom: 4px;
}

form.panel input,
form.panel textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #d7d2c6;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 14px;
  font-family: inherit;
}

form.panel button {
  background: #ff282d;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 14.5px;
  cursor: pointer;
}

form.panel button:hover { background: #e0181d; }

/* search */

form.search {
  display: flex;
  gap: 8px;
  max-width: 420px;
}

form.search input {
  flex: 1;
  padding: 9px 10px;
  border: 1px solid #d7d2c6;
  border-radius: 4px;
  font-size: 14px;
}

form.search button {
  background: #ff282d;
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: 4px;
  cursor: pointer;
}

/* cart table */

table.cart {
  width: 100%;
  border-collapse: collapse;
  max-width: 640px;
}

table.cart th, table.cart td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #e2ded4;
  font-size: 14px;
}

table.cart th {
  color: #6a7470;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* blog */

article.post {
  max-width: 640px;
}

article.post h1 {
  font-size: 24px;
  margin-bottom: 4px;
}

article.post .meta {
  color: #8a938e;
  font-size: 13px;
  margin-bottom: 18px;
}

article.post p { margin-bottom: 16px; }

.post-list .post-item {
  margin-bottom: 22px;
  max-width: 640px;
}

.post-list h3 { margin: 0 0 4px; font-size: 17px; }
.post-list .meta { color: #8a938e; font-size: 13px; margin-bottom: 6px; }
.post-list p { color: #4a5450; margin: 0; }

/* image optimizer playground */

.io-panel {
  background: #fff;
  border: 1px solid #e2ded4;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 30px;
}

.io-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 24px;
}

.io-preview-box {
  background: #f1efe9;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  overflow: hidden;
}

.io-preview-box img {
  max-width: 100%;
  max-height: 360px;
  display: block;
}

.io-controls .group {
  margin-bottom: 16px;
}

.io-controls .group-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8a938e;
  margin-bottom: 6px;
}

.io-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.io-btn {
  font-size: 13px;
  background: #f7f5f0;
  border: 1px solid #d7d2c6;
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  color: #24292b;
}

.io-btn:hover { border-color: #ff282d; }

.io-btn.active {
  background: #ff282d;
  border-color: #ff282d;
  color: #fff;
}

.io-url-row {
  margin-top: 14px;
  font-size: 12.5px;
}

.io-url-row .label {
  color: #8a938e;
  margin-bottom: 4px;
}

.io-url-row code {
  display: block;
  background: #f1efe9;
  padding: 8px 10px;
  border-radius: 4px;
  word-break: break-all;
}

@media (max-width: 700px) {
  .io-layout { grid-template-columns: 1fr; }
}

/* footer */

footer.site {
  border-top: 1px solid #e2ded4;
  padding: 20px 0 40px;
  color: #8a938e;
  font-size: 13px;
}
