/* ==========================================================================
   qloudihub.com — base stylesheet
   Brand direction: black & white primary palette, generous spacing, clear
   typography, minimal decoration, accessible focus states. Grey used only for
   hierarchy. (See docs/brand/brand-and-design-direction.md)
   ========================================================================== */

:root {
  --ink: #0a0a0a;
  --ink-soft: #333333;
  --grey: #6b6b6b;
  --grey-line: #e2e2e2;
  --grey-bg: #f6f6f6;
  --paper: #ffffff;
  --focus: #0a0a0a;

  --max: 1080px;
  --radius: 10px;
  --gap: 1.5rem;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}
h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}
h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

/* Accessible focus states — visible for keyboard users. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--grey-line);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 50;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 66px;
}

.brand {
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand span {
  color: var(--grey);
  font-weight: 500;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: block;
}

.nav-links {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-size: 0.97rem;
  color: var(--ink-soft);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--grey-line);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 1.1rem;
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.97rem;
  cursor: pointer;
  transition: transform 0.05s ease, opacity 0.15s ease;
}
.btn:hover {
  opacity: 0.88;
  text-decoration: none;
}
.btn:active {
  transform: translateY(1px);
}
.btn--ghost {
  background: var(--paper);
  color: var(--ink);
}
.btn--ghost:hover {
  background: var(--grey-bg);
  opacity: 1;
}
.btn[aria-disabled="true"] {
  border-color: var(--grey-line);
  background: var(--grey-bg);
  color: var(--grey);
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
}
.badge--free {
  background: var(--ink);
  color: var(--paper);
}
.badge--soon {
  background: var(--paper);
  color: var(--ink);
  border-style: dashed;
}
.badge--paid {
  background: var(--paper);
  color: var(--ink);
}

/* ---------- Sections ---------- */
section {
  padding: 3.5rem 0;
}
.section-tight {
  padding: 2rem 0;
}
.lead {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 46ch;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--grey);
  margin: 0 0 0.75rem;
}

/* ---------- Hero ---------- */
.hero {
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid var(--grey-line);
}
.hero .btn-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}

/* ---------- Notice banner ---------- */
.notice {
  background: var(--grey-bg);
  border: 1px dashed var(--grey);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 1.5rem 0;
}
.notice strong {
  color: var(--ink);
}

/* ---------- Grid / cards ---------- */
.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  border: 1px solid var(--grey-line);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.card:hover {
  border-color: var(--ink);
}
.card h3 {
  margin-bottom: 0.35rem;
}
.card .card-cat {
  font-size: 0.8rem;
  color: var(--grey);
  margin-bottom: 0.75rem;
}
.card .card-desc {
  color: var(--ink-soft);
  font-size: 0.95rem;
  flex: 1;
}
.card .card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 1.1rem;
}
.card-link {
  text-decoration: none;
  color: var(--ink);
}
.card-link:hover .card h3 {
  text-decoration: underline;
}

/* ---------- Category chips / filter ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 2rem;
}
.chip {
  border: 1.5px solid var(--grey-line);
  background: var(--paper);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 500;
}
.chip[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
}

/* ---------- Feature list ---------- */
.features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.features li {
  border-top: 2px solid var(--ink);
  padding-top: 0.9rem;
}
.features h3 {
  font-size: 1.05rem;
}
.features p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- Product detail ---------- */
.product-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.product-meta {
  color: var(--grey);
  margin-bottom: 1.5rem;
}
.product-body {
  max-width: 62ch;
}
.product-body ul {
  padding-left: 1.2rem;
}
.product-body li {
  margin-bottom: 0.4rem;
}
.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
}

/* ---------- Forms ---------- */
label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}
input,
textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--grey-line);
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
  margin-bottom: 1.1rem;
  background: var(--paper);
  color: var(--ink);
}
input:focus,
textarea:focus {
  border-color: var(--ink);
  outline-offset: 0;
}
.form-note {
  font-size: 0.85rem;
  color: var(--grey);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--grey-line);
  padding: 2.5rem 0;
  margin-top: 2rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.footer-cols {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.5fr 1fr 1fr;
}
.site-footer h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey);
  margin-bottom: 0.8rem;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer li {
  margin-bottom: 0.5rem;
}
.site-footer a {
  text-decoration: none;
  color: var(--ink-soft);
}
.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--grey-line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--grey);
  font-size: 0.86rem;
}

/* ---------- Utility ---------- */
.center {
  text-align: center;
}
.muted {
  color: var(--grey);
}
.mt-0 {
  margin-top: 0;
}
.empty {
  padding: 2rem 0;
  color: var(--grey);
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--grey-line);
    padding: 0.5rem 1.25rem 1rem;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links li {
    width: 100%;
    padding: 0.5rem 0;
    border-top: 1px solid var(--grey-line);
  }
  .footer-cols {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

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