:root {
  --bg: #1e1f22;
  --bg-2: #25262a;
  --ink: #f4f4f4;
  --muted: #b2b5bb;
  --line: #3a3c42;
  --accent: #f4f4f4;
  --mono: "IBM Plex Mono", monospace;
  --sans: "Sora", sans-serif;
}

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

html {
  scroll-snap-type: none;
  scroll-padding-top: 0;
  scroll-behavior: smooth;
}

html.manual-scroll {
  scroll-snap-type: none;
}

body {
  font-family: var(--sans);
  background: linear-gradient(180deg, #202226 0%, var(--bg) 60%, #18191c 100%);
  color: var(--ink);
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
}

.grain {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  mix-blend-mode: multiply;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.hero {
  min-height: 100vh;
  padding: 96px clamp(24px, 6vw, 96px) 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
  scroll-snap-align: none;
  scroll-snap-stop: normal;
  scroll-margin-top: 96px;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  z-index: 5;
  padding: 6px 0;
  background: rgba(44, 46, 51, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  padding: 6px clamp(24px, 6vw, 96px);
}

.nav.simple {
  position: static;
  padding: 12px clamp(24px, 6vw, 96px) 0;
  background: transparent;
  backdrop-filter: none;
  border: none;
}

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

.brand-full img {
  width: clamp(180px, 16vw, 240px);
  height: auto;
}

.nav-links {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
  font-family: var(--mono);
}

.nav a {
  border-bottom: 1px solid transparent;
  padding-bottom: 4px;
}

.nav a:hover {
  border-color: var(--ink);
}

.hero-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  display: grid;
  gap: 18px;
  padding-bottom: 40px;
}

.hero-mark {
  width: min(720px, 92vw);
  margin: 0 auto;
  margin-bottom: 32px;
}

.hero-split {
  max-width: 1200px;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  text-align: left;
  gap: 48px;
}

.hero-copy {
  display: grid;
  gap: 18px;
}

.hero-title {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 600;
}

.hero-mark-right {
  width: 100%;
  margin: 0;
  justify-self: end;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  background: var(--accent);
  color: #111111;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
}

.btn-dark {
  background: #2f3136;
  color: var(--ink);
}

.link {
  font-family: var(--mono);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
}

main {
  padding: 0 clamp(24px, 6vw, 96px) 80px;
  display: grid;
  gap: 0;
  position: relative;
  z-index: 1;
}

.section {
  display: grid;
  gap: 24px;
  min-height: 100vh;
  align-content: center;
  scroll-snap-align: none;
  scroll-snap-stop: normal;
  scroll-margin-top: 96px;
  text-align: center;
  padding: 96px 0;
}

.section-header span {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--muted);
}

.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 600;
  margin-top: 12px;
}

.about p,
.contact p {
  max-width: 720px;
  color: var(--muted);
  margin: 0 auto;
}

.services .service-grid,
.blog .blog-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-width: 1040px;
  margin: 0 auto;
}

.services .service-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.services article,
.blog article,
.blog-list article {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  background: var(--bg-2);
  display: grid;
  gap: 14px;
}

.services h3,
.blog h3,
.blog-page h2 {
  font-size: 1.1rem;
}

.services p,
.blog p,
.blog-page p {
  color: var(--muted);
}

.service-cta {
  margin: 12px auto 0;
  max-width: 1040px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: #ffffff;
  color: #111111;
  border-radius: 16px;
}

.service-cta span {
  font-weight: 600;
}

.blog .link {
  width: fit-content;
}

.blog-cta {
  margin: 0 auto;
  font-size: 1rem;
}

.blog-page {
  min-height: 100vh;
  padding: 120px clamp(24px, 6vw, 96px) 80px;
  display: grid;
  gap: 32px;
  align-items: start;
  position: relative;
  z-index: 1;
}

.blog-page header,
.blog-list {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.blog-page header {
  text-align: center;
}

.blog-page header h1 {
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
}

.blog-list {
  display: grid;
  gap: 48px;
}

.blog-entry {
  display: grid;
  grid-template-columns: minmax(200px, 0.9fr) 1.4fr;
  align-items: center;
  gap: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-2);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.blog-entry:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
}

.blog-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: #1b1c20;
  border: 1px solid var(--line);
}

.blog-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-tag {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--muted);
}

.blog-copy h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  margin-top: 8px;
}

.blog-copy p {
  font-size: 1rem;
  color: var(--muted);
  margin-top: 10px;
}

.post-meta {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}

.contact-page {
  min-height: 100vh;
  padding: 120px clamp(24px, 6vw, 96px) 80px;
  display: grid;
  gap: 32px;
  align-items: start;
  position: relative;
  z-index: 1;
}

.contact-page header,
.contact-form {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.contact-page header {
  text-align: center;
}

.contact-page header h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.contact-form {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-2);
}

.form-row {
  display: grid;
  gap: 8px;
  text-align: left;
}

.form-row label {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}

.form-row input,
.form-row select,
.form-row textarea {
  background: #1b1c20;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 0.95rem;
}

.form-row textarea {
  resize: vertical;
}

.contact-form .btn {
  width: fit-content;
}

.contact .btn {
  width: fit-content;
  justify-self: center;
}

.hidden-field {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.post {
  min-height: 100vh;
  padding: 120px clamp(24px, 6vw, 96px) 80px;
  display: grid;
  gap: 28px;
  align-items: start;
  position: relative;
  z-index: 1;
}

.post header,
.post-body {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.post header {
  text-align: center;
  display: grid;
  gap: 10px;
}

.post header h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.2rem);
  margin-top: 8px;
  line-height: 1.15;
}

.post-date {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 0.85rem;
}

.post-tag {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--muted);
}

.post-meta {
  display: flex;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
}

.post-body {
  display: grid;
  gap: 18px;
  line-height: 1.95;
  font-size: 1.05rem;
  color: var(--ink);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

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

.post-body h2 {
  font-size: 1.6rem;
  margin-top: 12px;
}

.post-body h3 {
  font-size: 1.3rem;
  margin-top: 10px;
}

.post-body ul {
  padding-left: 24px;
  display: grid;
  gap: 10px;
}

.post-body ol {
  padding-left: 24px;
  margin-left: 0;
  display: grid;
  gap: 10px;
  margin-left: 0;
}

.post-body img {
  border-radius: 14px;
}

.post-body code {
  font-family: var(--mono);
  background: #2b2e34;
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.95em;
}

.post-body pre {
  background: linear-gradient(180deg, #171a1f 0%, #13161a 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px 22px;
  overflow-x: auto;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  max-width: 100%;
}

.post-body pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.97em;
  color: #e9edf5;
  display: block;
  line-height: 1.75;
  font-style: normal;
}

.post-body pre::-webkit-scrollbar {
  height: 8px;
}

.post-body pre::-webkit-scrollbar-track {
  background: transparent;
}

.post-body pre::-webkit-scrollbar-thumb {
  background: #2f333b;
  border-radius: 999px;
}

.post-body blockquote {
  border-left: 4px solid #e24a4a;
  background: #15171b;
  margin: 0;
  padding: 16px 18px;
  border-radius: 0 12px 12px 0;
  color: var(--ink);
  font-style: italic;
}

.post-body blockquote p {
  margin: 0;
}

.post-back {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  padding-top: 10px;
}

.form-legal {
  margin-top: 18px;
  text-align: center;
  font-size: 0.9rem;
}

.footer {
  padding: 24px clamp(24px, 6vw, 96px) 32px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  position: relative;
  z-index: 1;
  scroll-snap-align: none;
  scroll-snap-stop: normal;
  scroll-margin-top: 96px;
}

@media (max-width: 720px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 12px;
    row-gap: 8px;
    font-size: 1rem;
  }

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

  .brand-full img {
    width: min(280px, 78vw);
  }

  .hero {
    min-height: auto;
    padding: 140px 18px 48px;
  }

  .hero-content {
    gap: 18px;
    text-align: left;
  }

  .hero-mark {
    margin: 0;
    margin-bottom: 28px;
  }

  .hero-split {
    grid-template-columns: 1fr;
  }

  .hero-mark-right {
    width: min(900px, 100vw);
    justify-self: start;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .lead {
    font-size: 1.2rem;
  }

  .btn {
    font-size: 1rem;
  }

  .link {
    font-size: 1rem;
  }

  main {
    padding: 0 18px 64px;
    gap: 72px;
  }

  .section {
    min-height: auto;
    padding: 40px 0;
    text-align: left;
  }

  .section-header h2 {
    font-size: clamp(2rem, 7vw, 2.6rem);
  }

  .section-header span {
    font-size: 0.85rem;
  }

  .services h3,
  .blog h3,
  .blog-page h2 {
    font-size: 1.15rem;
  }

  .services p,
  .blog p,
  .blog-page p {
    font-size: 1.05rem;
  }

  .about p,
  .contact p {
    margin: 0;
  }

  .services .service-grid,
  .blog .blog-grid {
    grid-template-columns: 1fr;
  }

  .service-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .blog-page,
  .post,
  .contact-page {
    padding: 140px 18px 56px;
  }

  .contact-page header {
    text-align: left;
  }

  .contact-form {
    padding: 20px;
  }

  .blog-entry {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .post header h1,
  .blog-page header h1 {
    font-size: clamp(2rem, 7vw, 2.8rem);
  }

  .post header,
  .post-body,
  .post-back {
    max-width: 100%;
  }

  .post-body img {
    width: 100%;
    height: auto;
    margin: 0 auto;
    max-width: 100%;
  }

  .footer {
    padding: 20px;
    gap: 8px;
    font-size: 0.95rem;
  }
}
