/*
Theme Name: Nord Detektyw
Theme URI: https://norddetektyw.pl
Author: Nord Detektyw
Description: Lekki motyw stagingowy dla strony Nord Detektyw.
Version: 1.0.0
Text Domain: norddetektyw
*/

:root {
  --nord-bg: #07111c;
  --nord-panel: #101820;
  --nord-text: #f4f1ea;
  --nord-muted: #d8dde2;
  --nord-soft: #7f8790;
  --nord-gold: #b8a46f;
  --nord-olive: #6f7865;
  --nord-light: #f4f1ea;
  --nord-ink: #101820;
  --nord-line: rgba(216, 221, 226, 0.18);
  --nord-radius: 8px;
  --content: min(1120px, calc(100vw - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--nord-bg);
  color: var(--nord-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  max-width: 100%;
  border-bottom: 1px solid var(--nord-line);
  background: rgba(7, 17, 28, 0.94);
  backdrop-filter: blur(14px);
}

.site-header__inner,
.site-footer__inner,
.content-wrap {
  width: var(--content);
  margin: 0 auto;
}

.site-header__inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 230px;
}

.brand img {
  width: 230px;
  height: auto;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  min-width: 0;
  color: var(--nord-muted);
  font-size: 0.94rem;
}

.site-nav .menu-item {
  list-style: none;
}

.site-nav a {
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--nord-gold);
}

.header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.button,
.nord-form button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid var(--nord-gold);
  border-radius: var(--nord-radius);
  background: var(--nord-gold);
  color: #07111c;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button--ghost {
  background: transparent;
  color: var(--nord-text);
  border-color: var(--nord-line);
}

.site-main {
  min-height: 70vh;
  max-width: 100%;
  overflow-x: clip;
}

.page-shell {
  background: var(--nord-light);
  color: var(--nord-ink);
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 560px;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: #07111c;
  color: var(--nord-text);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(90deg, rgba(7, 17, 28, 0.95) 0%, rgba(7, 17, 28, 0.77) 44%, rgba(7, 17, 28, 0.28) 100%), var(--nord-hero);
  background-size: cover;
  background-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--nord-line);
}

.hero__inner {
  width: var(--content);
  margin: 0 auto;
  padding: 88px 0 74px;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 22px;
  font-size: clamp(2.35rem, 5vw, 4.7rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero .lead {
  max-width: 730px;
  margin: 0 0 28px;
  color: var(--nord-muted);
  font-size: 1.14rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.entry-content {
  width: var(--content);
  margin: 0 auto;
  padding: 58px 0 72px;
}

.entry-content h1,
.entry-content h2,
.entry-content h3 {
  line-height: 1.18;
  letter-spacing: 0;
}

.entry-content h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.entry-content h2 {
  margin: 56px 0 16px;
  font-size: clamp(1.55rem, 3vw, 2.28rem);
}

.entry-content h3 {
  margin: 34px 0 10px;
  font-size: 1.24rem;
}

.nord-service-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nord-service-heading__icon {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nord-service-heading__icon img {
  width: 30px;
  height: 30px;
  display: block;
}

.entry-content p,
.entry-content li {
  max-width: 860px;
}

.entry-content a {
  color: #344f6f;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.25rem;
}

.entry-content blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--nord-gold);
  background: #fff;
}

.nord-form {
  max-width: 760px;
  margin: 28px 0;
  padding: 24px;
  border: 1px solid rgba(16, 24, 32, 0.14);
  border-radius: var(--nord-radius);
  background: #fff;
}

.nord-form label {
  display: block;
  margin: 0 0 14px;
  font-weight: 700;
}

.nord-form input,
.nord-form textarea {
  width: 100%;
  margin-top: 6px;
  padding: 12px 13px;
  border: 1px solid rgba(16, 24, 32, 0.2);
  border-radius: 6px;
  color: var(--nord-ink);
  font: inherit;
}

.nord-form textarea {
  min-height: 150px;
  resize: vertical;
}

.nord-form .nord-check {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  font-weight: 500;
}

.nord-form .nord-check input {
  width: 18px;
  margin: 4px 0 0;
}

.nord-form__note {
  color: #4d5a66;
  font-size: 0.92rem;
}

.site-footer {
  max-width: 100%;
  overflow-x: clip;
  border-top: 1px solid var(--nord-line);
  background: #07111c;
  color: var(--nord-muted);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
  padding: 42px 0;
}

.site-footer a {
  color: var(--nord-muted);
}

.footer-title {
  color: var(--nord-text);
  font-weight: 800;
  margin-bottom: 10px;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-list li {
  margin: 7px 0;
}

@media (max-width: 880px) {
  :root {
    --content: min(100vw - 28px, 720px);
  }

  .site-header__inner {
    min-height: auto;
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .brand {
    min-width: 0;
    max-width: 100%;
  }

  .brand img {
    width: min(188px, calc(100vw - 28px));
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 8px 12px;
    overflow: visible;
    padding-bottom: 0;
    font-size: 0.9rem;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .button {
    flex: 1 1 142px;
    min-width: 0;
    padding: 10px 12px;
    text-align: center;
  }

  .hero {
    min-height: auto;
    align-items: start;
  }

  .hero::before {
    background-image: linear-gradient(180deg, rgba(7, 17, 28, 0.96) 0%, rgba(7, 17, 28, 0.82) 52%, rgba(7, 17, 28, 0.38) 100%), var(--nord-hero-mobile);
    background-position: center bottom;
  }

  .hero__inner {
    padding: 48px 0 230px;
  }

  .hero h1 {
    font-size: 2.25rem;
    line-height: 1.08;
  }

  .hero .lead {
    font-size: 1rem;
  }

  .hero__actions .button {
    flex: 1 1 220px;
  }

  .entry-content {
    padding: 42px 0 56px;
  }

  .entry-content h1 {
    font-size: 2rem;
  }

  .entry-content h2 {
    font-size: 1.58rem;
  }

  .entry-content h3 {
    font-size: 1.18rem;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    --content: min(100vw - 24px, 456px);
  }

  .site-nav a {
    white-space: normal;
  }

  .button,
  .nord-form button,
  .wp-block-button__link {
    width: 100%;
  }

  .hero__inner {
    padding: 42px 0 190px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .nord-form {
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .site-header__inner {
    gap: 10px;
  }

  .site-nav .menu-item:nth-child(2),
  .site-nav .menu-item:nth-child(3),
  .site-nav > a:nth-child(2),
  .site-nav > a:nth-child(3) {
    display: none;
  }

  .site-nav {
    font-size: 0.86rem;
    gap: 8px 10px;
  }

  .header-actions .button {
    min-height: 40px;
    padding: 9px 10px;
  }
}

/* Nord day 51: prevent narrow mobile overflow in article content. */
.entry-content,
.entry-content * {
    overflow-wrap: anywhere;
    word-break: normal;
}
.entry-content {
    max-width: 100%;
    overflow-x: clip;
}
.entry-content img,
.entry-content figure,
.entry-content table,
.entry-content pre {
    max-width: 100%;
}

/* Nord day 51: calmer archive publication cards. */
body.archive .entry-content > article {
    background: #fff;
    border: 1px solid rgba(177, 145, 74, 0.24);
    border-radius: 8px;
    padding: 22px 24px;
    margin: 0 0 18px;
    box-shadow: 0 10px 24px rgba(20, 32, 42, 0.06);
}
body.archive .entry-content > article h2 {
    margin: 0 0 8px;
    font-size: clamp(22px, 2.6vw, 30px);
    line-height: 1.22;
}
body.archive .entry-content > article h2 a {
    color: #14202a;
    text-decoration: none;
}
body.archive .entry-content > article h2 a:hover {
    color: #8a6a2e;
}
body.archive .entry-content > article p {
    margin: 0;
    color: #4d5a66;
    font-size: 16px;
    line-height: 1.62;
}
@media (max-width: 640px) {
    body.archive .entry-content > article {
        padding: 18px 16px;
    }
}
