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

html {
  height: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background: #fafafa;
  color: #1a1a1a;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Page ─────────────────────────────────────── */

.page {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 80px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

/* ─── Header ───────────────────────────────────── */

header {
  display: flex;
  align-items: center;
  height: 68px;
  flex-shrink: 0;
}

.logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  flex-shrink: 0;
  display: block;
}

.logo-name > span {
  color: #3b82f6;
}

.nav-badge {
  margin-left: auto;
  font-size: 13px;
  font-weight: 500;
  color: #888;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  padding: 6px 16px;
  white-space: nowrap;
}

/* ─── Hero ─────────────────────────────────────── */

.hero {
  text-align: center;
  padding-top: 20px;
  padding-bottom: 4px;
  flex-shrink: 0;
}

.hero h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.15;
  margin-bottom: 10px;
  color: #111;
}

.hero-sub {
  font-size: 15px;
  color: #999;
  font-weight: 400;
}

/* ─── Cards ────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-top: 28px;
  padding-bottom: 28px;
  align-items: stretch;
}

.card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.11);
  border-color: #d5d5d5;
}

/* ─── Card preview (browser mockup) ────────────── */

.card-preview {
  width: 100%;
  height: 210px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  background: #f0eeea;
  border-bottom: 1px solid #ebebeb;
}

/* Browser chrome bar */
.card-preview::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 28px;
  background: #f7f7f7;
  border-bottom: 1px solid #e8e8e8;
  z-index: 2;
}

/* macOS traffic lights */
.card-preview::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fc625d;
  box-shadow: 13px 0 0 #fdbc40, 26px 0 0 #35cd4b;
  z-index: 3;
}

.preview-url {
  position: absolute;
  top: 7px;
  left: 50px;
  right: 12px;
  height: 15px;
  background: #e9e9e9;
  border-radius: 4px;
  z-index: 3;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 9px;
  color: #aaa;
  overflow: hidden;
  white-space: nowrap;
}

.card-preview iframe {
  position: absolute;
  top: 28px;
  left: 0;
  width: 1280px;
  height: 760px;
  border: none;
  transform-origin: top left;
  transform: scale(0.305);
  pointer-events: none;
  display: block;
}

/* ─── Soon card placeholder ─────────────────────── */

.card-preview--soon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
}

.card-preview--soon::before,
.card-preview--soon::after {
  display: none;
}

.soon-icon {
  font-size: 34px;
  opacity: 0.22;
}

.soon-label {
  font-size: 11px;
  font-weight: 600;
  color: #c8c8c8;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ─── Card body ─────────────────────────────────── */

.card-body {
  padding: 18px 22px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #111;
}

.card-tag {
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  padding: 3px 9px;
  margin-left: auto;
  white-space: nowrap;
}

.card--orange .card-tag { background: #fff3e8; color: #d97706; }
.card--blue   .card-tag { background: #eff6ff; color: #3b82f6; }
.card--green  .card-tag { background: #f0fdf4; color: #16a34a; }
.card--purple .card-tag { background: #f5f3ff; color: #7c3aed; }

.card-url {
  font-size: 11.5px;
  color: #c0c0c0;
  margin-bottom: 8px;
}

.card-desc {
  font-size: 13px;
  line-height: 1.65;
  color: #888;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: gap 0.15s;
}

.card--orange .card-link { color: #d97706; }
.card--blue   .card-link { color: #3b82f6; }
.card--green  .card-link { color: #16a34a; }
.card--purple .card-link { color: #7c3aed; }
.card--soon   .card-link { color: #c8c8c8; }

.card:hover .card-link {
  gap: 7px;
}

/* ─── Footer ────────────────────────────────────── */

footer {
  margin-top: auto;
  text-align: center;
  padding: 12px 0 20px;
  font-size: 13px;
  color: #c0c0c0;
  flex-shrink: 0;
}

footer a {
  color: #aaa;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

footer a:hover {
  color: #555;
}

/* ─── Tablet ────────────────────────────────────── */

@media (max-width: 1023px) and (min-width: 600px) {
  .page { padding: 0 40px; }

  .hero h1 { font-size: 30px; }

  .cards {
    grid-template-columns: repeat(2, 1fr);
    padding-bottom: 32px;
  }

  .card-preview iframe {
    transform: scale(0.32);
  }
}

/* ─── Mobile ────────────────────────────────────── */

@media (max-width: 599px) {
  .page { padding: 0 20px; }

  header { height: 60px; }

  .logo      { font-size: 18px; }
  .nav-badge { font-size: 12px; padding: 5px 12px; }

  .hero          { padding-top: 16px; }
  .hero h1       { font-size: 24px; letter-spacing: -0.8px; }
  .hero-sub      { font-size: 14px; }

  .cards {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 20px;
    padding-bottom: 24px;
  }

  .card-preview        { height: 180px; }
  .card-preview iframe { transform: scale(0.255); }

  .card-title { font-size: 16px; }
  .card-desc  { font-size: 13px; }

  footer { padding: 8px 0 24px; }
}
