/* ============================================================
   HojPoj D.S.P.
   Brutalist editorial · Catppuccin Latte / Mocha
   Archivo + IBM Plex Mono · Thin rules · Editorial grid
   ============================================================ */

:root {
  --bg:      #eff1f5;
  --surface: #dce0e8;
  --text:    #4c4f69;
  --muted:   #7c7f93;
  --accent:  #8839ef;
  --accent-h:#7528d4;
  --rule:    #9ca0b0;
  --rule-w:  1px;
  --banner-opacity: 0.05;
}

[data-theme="dark"] {
  --bg:      #1e1e2e;
  --surface: #313244;
  --text:    #cdd6f4;
  --muted:   #7f849c;
  --accent:  #cba6f7;
  --accent-h:#b48aea;
  --rule:    #585b70;
  --banner-opacity: 0.08;
}

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

html {
  font-size: clamp(16px, 1.2vw, 20px);
}

body {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }

/* --- Type scale --- */

h1, h2, h3 {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

h1 { font-size: clamp(3.5rem, 10vw, 8rem); }
h2 { font-size: clamp(2.5rem, 6vw, 5rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }

.label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* --- Rule system --- */

.ruled {
  border-top: var(--rule-w) solid var(--rule);
}

.ruled-b {
  border-bottom: var(--rule-w) solid var(--rule);
}

/* --- Grid --- */

.grid {
  display: grid;
  gap: 0;
}

.grid > * + * {
  border-top: var(--rule-w) solid var(--rule);
}

.grid--cols > * {
  border-top: none;
}

.grid--cols {
  border-top: var(--rule-w) solid var(--rule);
  border-bottom: var(--rule-w) solid var(--rule);
}

.grid--cols > *:not(:first-child) {
  border-left: var(--rule-w) solid var(--rule);
}

/* --- Nav --- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-bottom: var(--rule-w) solid var(--rule);
}

.nav__brand {
  font-family: "Archivo", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s;
}

.nav__links a:hover,
.nav__links a.active { color: var(--text); }

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 1.1rem;
  transition: color 0.15s;
}
.theme-toggle:hover { color: var(--text); }

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text);
  margin: 5px 0;
}

/* ==========  LANDING  ========== */

.landing__hero {
  position: relative;
  padding: 6rem 1.5rem 5rem;
  overflow: hidden;
}

.landing__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/BackgroundBanner.png") center / cover no-repeat;
  opacity: var(--banner-opacity);
  pointer-events: none;
}

.landing__hero h1 {
  position: relative;
}

.landing__hero p {
  position: relative;
  margin-top: 1.5rem;
  color: var(--muted);
  max-width: 52ch;
  font-size: 0.9rem;
  line-height: 1.7;
}

.landing__main {
  grid-template-columns: 1fr 2fr;
}

.landing__portrait-cell {
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.landing__portrait-cell img.portrait {
  max-width: 200px;
}

.landing__portrait-cell p {
  color: var(--muted);
  font-size: 0.8rem;
  max-width: 32ch;
  line-height: 1.7;
}

.accent-gif {
  width: 48px;
  opacity: 0.5;
}

.landing__updates {
  padding: 2rem 1.5rem;
}

.landing__updates h3 {
  margin-bottom: 1.5rem;
}

.landing__updates ul { list-style: none; }

.landing__updates li {
  padding: 0.55rem 0;
  font-size: 0.85rem;
}

.landing__updates li + li {
  border-top: var(--rule-w) solid var(--rule);
}

.update-date {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 0.1rem;
}

.landing__updates a { color: var(--text); }
.landing__updates a:hover { color: var(--accent); }

.landing__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--accent);
  color: var(--bg);
  font-family: "Archivo", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: background 0.15s;
}

.landing__cta:hover { background: var(--accent-h); color: var(--bg); }
.landing__cta .arrow { font-size: 1.4rem; }

/* --- Entrance --- */

@keyframes reveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.landing__hero,
.landing__main,
.landing__cta,
main + .footer {
  animation: reveal 0.5s ease both;
}
.landing__main { animation-delay: 0.08s; }
.landing__cta  { animation-delay: 0.16s; }
main + .footer { animation-delay: 0.22s; }

/* ==========  PLUGIN PAGE  ========== */

.plugin-hero {
  padding: 4rem 1.5rem 3rem;
  border-bottom: var(--rule-w) solid var(--rule);
}

.plugin-hero p {
  margin-top: 1rem;
  color: var(--muted);
  max-width: 52ch;
  font-size: 0.85rem;
  line-height: 1.7;
}

.plugin-hero__downloads {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.plugin-hero__download {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  padding: 0.6rem 1.3rem;
  font-family: "Archivo", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  transition: background 0.15s;
}
.plugin-hero__download:hover { background: var(--accent-h); color: var(--bg); }

.plugin-hero__download--soon {
  background: var(--surface);
  color: var(--muted);
  border: var(--rule-w) solid var(--rule);
}
.plugin-hero__download--soon:hover { background: var(--surface); color: var(--text); }

.plugin-hero__meta {
  margin-top: 0.6rem;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.plugin-image {
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: var(--rule-w) solid var(--rule);
  color: var(--muted);
  font-size: 0.8rem;
  padding: 2rem;
}
.plugin-image img { max-width: 100%; height: auto; }

.plugin-features {
  grid-template-columns: repeat(3, 1fr);
  border-bottom: var(--rule-w) solid var(--rule);
}

.plugin-features > * {
  border-top: none;
}

.plugin-features > *:not(:nth-child(3n+1)) {
  border-left: var(--rule-w) solid var(--rule);
}

.plugin-features > *:nth-child(n+4) {
  border-top: var(--rule-w) solid var(--rule);
}

.plugin-install {
  grid-template-columns: repeat(3, 1fr);
  border-bottom: var(--rule-w) solid var(--rule);
}

.plugin-install > * {
  border-top: none;
}

.plugin-install > *:not(:first-child) {
  border-left: var(--rule-w) solid var(--rule);
}

/* Section label — small uppercase divider between content blocks */
.section-label {
  padding: 0.75rem 1.5rem;
  border-top: var(--rule-w) solid var(--rule);
  border-bottom: var(--rule-w) solid var(--rule);
  background: var(--accent);
}

.section-label .label {
  color: var(--bg);
}

/* Shared cells */
.cell { padding: 2rem 1.5rem; }
.cell h3 { margin-bottom: 0.4rem; }
.cell p { color: var(--muted); font-size: 0.8rem; line-height: 1.8; }

/* ==========  INFO ROW  ========== */

.info-row { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.info-cell { padding: 1.5rem; }
.info-cell h3 { margin-bottom: 0.4rem; }
.info-cell p { color: var(--muted); font-size: 0.85rem; }

/* ==========  FAQ  ========== */

.faq-grid { grid-template-columns: 1fr; }
.faq-cell { padding: 1.2rem 1.5rem; }
.faq-cell__q { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.4rem; }
.faq-cell__a { color: var(--muted); font-size: 0.85rem; }
.faq-cell__a code { background: var(--surface); padding: 0.15em 0.4em; font-size: 0.85em; }

/* ==========  ABOUT  ========== */

.about-grid { grid-template-columns: 1fr 1fr; }
.about-text { padding: 2.5rem 1.5rem; }
.about-text p { color: var(--muted); margin-top: 0.6rem; font-size: 0.85rem; }

.about-img {
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.socials-row { grid-template-columns: repeat(3, 1fr); }
.social-cell { padding: 1.5rem; }
.social-cell h3 { margin-bottom: 0.25rem; }
.social-cell p { color: var(--muted); font-size: 0.8rem; }

/* ==========  FOOTER  ========== */

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  border-top: var(--rule-w) solid var(--rule);
}

.footer a { color: var(--muted); transition: color 0.15s; }
.footer a:hover { color: var(--text); }

.footer__socials { display: flex; gap: 1.2rem; }
.footer__socials a { display: flex; color: var(--muted); }
.footer__socials a:hover { color: var(--text); }
.footer__socials svg { width: 16px; height: 16px; }

/* ==========  RESPONSIVE  ========== */

@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    padding: 1rem 1.5rem;
    gap: 0.8rem;
    z-index: 100;
    border-bottom: var(--rule-w) solid var(--rule);
  }
  .nav__links.open { display: flex; }
  .nav { position: relative; }
  .nav-hamburger { display: block; }

  .landing__hero { padding: 4rem 1.5rem 3rem; }

  .landing__main,
  .plugin-features,
  .plugin-install,
  .about-grid { grid-template-columns: 1fr; }

  .plugin-features > *:not(:nth-child(3n+1)) { border-left: none; }
  .plugin-features > *:nth-child(n+2) { border-top: var(--rule-w) solid var(--rule); }

  .plugin-install > *:not(:first-child) { border-left: none; }
  .plugin-install > * + * { border-top: var(--rule-w) solid var(--rule); }

  .landing__main > *:not(:first-child) { border-left: none; }
  .landing__main > * + * { border-top: var(--rule-w) solid var(--rule); }

  .socials-row { grid-template-columns: 1fr; }

  .landing__portrait-cell {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
  }
  .landing__portrait-cell img.portrait { max-width: 140px; }
}
