/* KSTRL.NET - Professional infrastructure design */

:root {
  --primary-color: #10212b;
  --secondary-color: #193946;
  --accent-color: #f26a3d;
  --accent-cool: #27b3b8;
  --text-color: #25343a;
  --light-text: #5d6d72;
  --light-bg: #f3f7f5;
  --white: #ffffff;
  --border-color: #d8e5e1;
  --font-main: "Avenir Next", Avenir, "Trebuchet MS", sans-serif;
  --font-display: "Arial Narrow", "Avenir Next", Avenir, sans-serif;
}

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

body {
  font-family: var(--font-main);
  color: var(--text-color);
  line-height: 1.6;
  background: var(--white);
  background-image: linear-gradient(rgba(39, 179, 184, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(39, 179, 184, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--light-text);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #cf4b24;
}

/* Wrapper */
.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header */
.site-header {
  background: var(--primary-color);
  color: var(--white);
  padding: 2rem 0;
  border-bottom: 3px solid var(--accent-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.site-title-section {
  margin-bottom: 1.5rem;
}

.site-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--white);
}

.site-tagline {
  font-size: 0.95rem;
  color: #a8c2c0;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* Navigation */
.site-nav {
  display: flex;
  justify-content: flex-start;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--white);
  font-weight: 500;
  font-size: 1rem;
  position: relative;
  padding-bottom: 0.25rem;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-color), var(--accent-cool));
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-trigger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* Main Content */
.main-content {
  min-height: calc(100vh - 200px);
  padding: 3rem 0;
}

/* Hero Section */
.hero {
  background: linear-gradient(120deg, var(--primary-color) 0%, var(--secondary-color) 65%, #24606a 100%);
  color: var(--white);
  padding: 5rem 0;
  margin-bottom: 3rem;
  text-align: center;
  border-bottom: 4px solid var(--accent-color);
  position: relative;
  overflow: hidden;
  animation: rise-in 0.7s ease both;
}

.hero::after {
  content: '';
  position: absolute;
  width: 16rem;
  height: 16rem;
  right: 8%;
  top: -8rem;
  border: 1px solid rgba(39, 179, 184, 0.4);
  transform: rotate(45deg);
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1rem;
  font-size: 3rem;
}

.hero-kicker {
  display: inline-block;
  margin-bottom: 1.25rem;
  padding: 0.35rem 0.6rem;
  color: var(--primary-color) !important;
  background: var(--accent-cool);
  font-family: var(--font-display);
  font-size: 0.85rem !important;
  font-style: normal !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: rotate(2deg);
}

.hero-kicker::before { content: "[ cold light / warm advice ] "; }

.hero p {
  color: #c4d9d5;
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}

.cta-button {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--white);
  padding: 0.75rem 2rem;
  border-radius: 3px;
  font-weight: 600;
  margin-top: 2rem;
  box-shadow: 4px 4px 0 var(--accent-cool);
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover {
  background-color: #d9512b;
  color: var(--white);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--accent-cool);
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.service-card {
  background-color: rgba(243, 247, 245, 0.92);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  animation: rise-in 0.7s ease both;
}

.service-card::before {
  content: '';
  display: block;
  height: 5px;
  position: absolute;
  inset: 0 0 auto;
  background: linear-gradient(90deg, var(--accent-color), var(--accent-cool));
}

.service-card:hover {
  box-shadow: 8px 8px 0 rgba(39, 179, 184, 0.22);
  transform: translateY(-6px);
  border-color: var(--accent-cool);
}

.service-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.service-card p {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.service-card a {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Content Sections */
.content-section {
  margin: 3rem 0;
  padding: 2rem;
  background-color: var(--light-bg);
  border-left: 5px solid var(--accent-color);
  border-radius: 3px;
  box-shadow: 8px 8px 0 rgba(39, 179, 184, 0.1);
}

.content-section h2 {
  color: var(--primary-color);
  margin-top: 0;
}

/* Footer */
.site-footer {
  background: var(--primary-color);
  color: var(--white);
  padding: 3rem 0 1rem;
  margin-top: 3rem;
  border-top: 3px solid var(--accent-color);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
  color: #a8c2c0;
  font-size: 0.95rem;
}

.footer-section a:hover {
  color: var(--accent-cool);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--secondary-color);
  color: #808080;
  font-size: 0.9rem;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .wrapper {
    padding: 0 1rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .site-title {
    font-size: 1.5rem;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-trigger {
    display: block;
  }

  .hero {
    padding: 3rem 0;
  }

  .hero h1 {
    font-size: 2rem;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .cta-button {
    display: none;
  }
}

/* Editorial-industrial refresh */
:root {
  --primary-color: #101820;
  --secondary-color: #20343b;
  --accent-color: #f05a28;
  --accent-cool: #25a9a5;
  --text-color: #1d2b2e;
  --light-text: #5c6867;
  --light-bg: #f2eee6;
  --white: #fffdf8;
  --border-color: #d7d1c5;
  --font-main: "Avenir Next", Avenir, "Trebuchet MS", sans-serif;
  --font-display: Impact, "Arial Narrow", "Avenir Next", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--white);
  background-image: linear-gradient(rgba(16, 24, 32, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(16, 24, 32, 0.055) 1px, transparent 1px);
  background-size: 32px 32px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

h1 { font-size: clamp(3rem, 8vw, 6.5rem); line-height: 0.95; }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1; }
h3 { font-size: clamp(1.35rem, 2vw, 1.8rem); }

p, li { letter-spacing: 0.01em; }

a {
  color: var(--accent-color);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.wrapper {
  max-width: 1280px;
  padding-right: 2.5rem;
  padding-left: 2.5rem;
}

.site-header {
  background: var(--primary-color);
  padding: 1.25rem 0;
  border-bottom: 5px solid var(--accent-color);
  box-shadow: 0 8px 0 rgba(37, 169, 165, 0.35);
}

.site-header .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-title-section { margin-bottom: 0; }
.site-title { font-family: var(--font-display); font-size: 2.2rem; letter-spacing: 0.11em; }
.site-tagline { color: #b9ceca; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.site-nav { align-items: center; }
.nav-menu { gap: 1.75rem; }
.nav-link { font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; }
.nav-link::after { height: 4px; background: var(--accent-cool); }

.main-content { padding: 0 0 4rem; }

.hero {
  min-height: 32rem;
  display: flex;
  align-items: center;
  margin-bottom: 5rem;
  padding: 6rem 0;
  text-align: left;
  background: var(--primary-color);
  border-bottom: 0;
  isolation: isolate;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0 0 0 58%;
  z-index: -1;
  background: var(--accent-color);
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
}

.hero::after {
  width: 22rem;
  height: 22rem;
  right: 14%;
  top: 5rem;
  border: 3px solid rgba(255, 253, 248, 0.45);
}

.hero h1 { max-width: 9ch; margin-bottom: 1.5rem; }
.hero p { max-width: 38rem; margin-left: 0; color: #d6e2dc; }
.hero p:first-of-type { color: var(--white); font-size: 1.35rem; font-weight: 600; }

.cta-button {
  border-radius: 0;
  background: var(--accent-color);
  padding: 1rem 1.5rem;
  box-shadow: 7px 7px 0 var(--accent-cool);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.cta-button:hover { background: var(--accent-cool); box-shadow: 7px 7px 0 var(--accent-color); }

#services > h2 { max-width: 9ch; text-align: left !important; margin-bottom: 3rem !important; }

.services-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 2rem 0 5rem;
}

.service-card {
  min-height: 20rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--light-bg);
  border: 2px solid var(--primary-color);
  border-radius: 0;
  padding: 2rem;
  box-shadow: 8px 8px 0 var(--primary-color);
}

.service-card:nth-child(2n) { transform: translateY(2rem); }
.service-card:nth-child(2n):hover { transform: translateY(calc(2rem - 6px)); }
.service-card::before { height: 8px; background: var(--accent-color); }
.service-card h3 { max-width: 10ch; font-size: 2rem; }
.service-card p { color: var(--text-color); }
.service-card a { align-self: flex-start; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }

.content-section {
  margin-right: 1rem;
  padding: 2.5rem;
  background: var(--light-bg);
  border-left: 8px solid var(--accent-color);
  border-radius: 0;
  box-shadow: 10px 10px 0 var(--accent-cool);
}

.content-section h2 { max-width: 14ch; }
.site-footer { margin-top: 6rem; padding: 4rem 0 1.5rem; border-top: 5px solid var(--accent-color); }
.footer-section h3, .footer-section h4 { font-family: var(--font-display); }
.footer-section a:hover { color: var(--accent-color); }
.footer-bottom { border-top-color: #395057; }

@media (max-width: 768px) {
  .wrapper { padding-right: 1.25rem; padding-left: 1.25rem; }
  .site-header .wrapper { display: block; }
  .site-title-section { margin-bottom: 1rem; }
  .site-nav { display: block; }
  .hero { min-height: 28rem; margin-bottom: 3.5rem; padding: 4rem 0; }
  .hero::before { inset: 58% 0 0; clip-path: polygon(0 18%, 100% 0, 100% 100%, 0 100%); }
  .hero::after { width: 10rem; height: 10rem; right: 10%; top: auto; bottom: 1rem; }
  .services-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .service-card:nth-child(2n), .service-card:nth-child(2n):hover { transform: none; }
  .content-section { margin-right: 0; padding: 1.5rem; }
}

/* Outsider-art mode: useful work, slightly strange posture. */
body {
  background-color: #efe8da;
  background-image: radial-gradient(ellipse at 20% 18%, rgba(37, 169, 165, 0.25), transparent 34%), radial-gradient(ellipse at 84% 42%, rgba(240, 90, 40, 0.2), transparent 29%), linear-gradient(120deg, #efe8da, #f7f2e9 48%, #e5eee8);
  background-size: 150% 130%, 140% 150%, 100% 100%;
  animation: weather-drift 24s ease-in-out infinite alternate;
}

.site-header {
  transform: rotate(-0.35deg) scale(1.003);
  transform-origin: top left;
}

.site-title {
  display: inline-block;
  transform: rotate(1.5deg);
  text-shadow: 4px 3px 0 var(--accent-color);
}

.site-tagline::after {
  content: " (probably)";
  color: var(--accent-color);
  font-family: Georgia, serif;
  font-style: italic;
  text-transform: lowercase;
}

.hero {
  min-height: 37rem;
  background: #17242a;
  overflow: visible;
}

.hero::marker { display: none; }

.floating-artifact {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  animation: artifact-float 9s ease-in-out infinite;
}

.artifact-orbit {
  top: 9%;
  left: 7%;
  width: 9.5rem;
  height: 9.5rem;
  display: grid;
  place-items: center;
  border: 2px solid var(--accent-cool);
  border-radius: 50%;
  color: var(--accent-cool);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-align: center;
  transform: rotate(-13deg);
}

.artifact-orbit span {
  color: var(--white);
  font-family: Georgia, serif;
  font-style: italic;
  letter-spacing: 0;
  text-transform: lowercase;
}

.artifact-swatch {
  right: 7%;
  top: 17%;
  color: var(--primary-color);
  font-family: Georgia, serif;
  font-size: 0.78rem;
  font-style: italic;
  transform: rotate(11deg);
}

.artifact-swatch span {
  display: block;
  width: 4rem;
  height: 4rem;
  margin-bottom: 0.4rem;
  border-radius: 42% 58% 61% 39%;
  background: #8ed8d1;
  box-shadow: inset 13px -8px 0 rgba(23, 36, 42, 0.2), 5px 5px 0 var(--accent-color);
  transform: rotate(-21deg);
}

.artifact-receipt {
  right: 16%;
  bottom: 7%;
  padding: 0.8rem;
  border: 1px solid var(--primary-color);
  background: #f6e1a4;
  color: var(--primary-color);
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  line-height: 1.05;
  transform: rotate(8deg);
  box-shadow: 5px 5px 0 var(--accent-color);
}

.signal-strip {
  display: flex;
  justify-content: space-around;
  gap: 1rem;
  overflow: hidden;
  padding: 0.8rem 1rem;
  background: var(--accent-cool);
  color: var(--primary-color);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  transform: rotate(0.8deg) scale(1.01);
}

.signal-strip span:nth-child(2) { transform: rotate(3deg); }
.signal-strip span:nth-child(3) { transform: rotate(-2deg); }
.signal-strip span:nth-child(4) { transform: rotate(5deg); }

.hero .wrapper {
  position: relative;
}

.hero .wrapper::before {
  content: "HELLO, DIFFICULT";
  position: absolute;
  top: -4rem;
  right: 0;
  padding: 0.45rem 0.7rem;
  color: var(--primary-color);
  background: var(--accent-cool);
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  transform: rotate(7deg);
}

.hero .wrapper::after {
  content: "↘ keep looking";
  position: absolute;
  right: 4%;
  bottom: -4rem;
  color: var(--white);
  font-family: Georgia, serif;
  font-size: 1.15rem;
  font-style: italic;
  transform: rotate(-9deg);
}

.hero::before {
  inset: -2rem 5% -3rem 62%;
  background: var(--accent-color);
  clip-path: polygon(14% 0, 100% 11%, 82% 100%, 0 87%);
  transform: rotate(2deg);
}

.hero::after {
  right: 20%;
  top: 7rem;
  width: 18rem;
  height: 18rem;
  border: 0;
  border-radius: 47% 53% 38% 62%;
  background: var(--accent-cool);
  opacity: 0.85;
  transform: rotate(21deg);
  mix-blend-mode: screen;
}

.hero h1 {
  max-width: 8ch;
  font-size: clamp(3.6rem, 10vw, 8rem);
  line-height: 0.82;
  text-shadow: 7px 7px 0 var(--accent-color);
  transform: rotate(-1.2deg);
}

.hero p:first-of-type {
  max-width: 19ch;
  font-family: Georgia, serif;
  font-size: 1.55rem;
  font-style: italic;
  font-weight: 400;
  text-transform: lowercase;
}

.hero .cta-button { transform: rotate(-2deg); }
.hero .cta-button:hover { transform: rotate(2deg) translate(-2px, -2px); }

#services > h2 {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: var(--primary-color);
  color: var(--white);
  transform: rotate(-1.5deg);
}

.service-card {
  box-shadow: 9px 9px 0 var(--primary-color);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:nth-child(1) { transform: rotate(-1.2deg); }
.service-card:nth-child(2) { transform: translateY(2rem) rotate(1.6deg); }
.service-card:nth-child(3) { transform: rotate(0.7deg); }
.service-card:nth-child(4) { transform: translateY(2rem) rotate(-1.8deg); }
.service-card:nth-child(1):hover { transform: rotate(-1.2deg) translateY(-7px); }
.service-card:nth-child(2):hover { transform: translateY(calc(2rem - 7px)) rotate(1.6deg); }
.service-card:nth-child(3):hover { transform: rotate(0.7deg) translateY(-7px); }
.service-card:nth-child(4):hover { transform: translateY(calc(2rem - 7px)) rotate(-1.8deg); }

.service-card h3::before {
  content: "✳ ";
  color: var(--accent-color);
  font-family: Georgia, serif;
}

.service-card:nth-child(3) {
  background: #dff3eb;
}

.service-card:nth-child(3)::after {
  content: "ON / OFF / WHY?";
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  color: var(--accent-cool);
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  transform: rotate(-8deg);
}

.content-section {
  position: relative;
  border-left-width: 0;
  border-top: 8px solid var(--accent-color);
  transform: rotate(0.35deg);
}

.content-section::after {
  content: "GOOD ENOUGH TO BEGIN";
  position: absolute;
  top: -1.45rem;
  right: 1rem;
  color: var(--accent-color);
  font-family: Georgia, serif;
  font-size: 0.75rem;
  font-style: italic;
  letter-spacing: 0.08em;
  transform: rotate(-3deg);
}

.site-footer {
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: "NO FINAL FORM";
  position: absolute;
  right: 4%;
  top: 1.2rem;
  color: rgba(255, 253, 248, 0.22);
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 6rem);
  transform: rotate(-6deg);
}

@keyframes weather-drift {
  0% { background-position: 0% 0%, 100% 35%, center; }
  100% { background-position: 55% 35%, 20% 70%, center; }
}

@keyframes artifact-float {
  0%, 100% { margin-top: 0; }
  50% { margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  body, .floating-artifact { animation: none; }
}

@media (max-width: 768px) {
  .site-header { transform: none; }
  .hero { min-height: 34rem; }
  .hero .wrapper::before { top: -2rem; right: 1rem; }
  .hero .wrapper::after { bottom: -3rem; right: 1rem; }
  .hero::before { inset: 62% -4% -3rem 45%; }
  .hero::after { right: 8%; top: auto; bottom: 3rem; width: 11rem; height: 11rem; }
  .artifact-orbit { left: 2%; top: 7%; width: 6rem; height: 6rem; font-size: 0.55rem; }
  .artifact-swatch { right: 3%; top: 14%; }
  .artifact-swatch span { width: 2.8rem; height: 2.8rem; }
  .artifact-receipt { right: 7%; bottom: 6%; font-size: 0.6rem; }
  .signal-strip { justify-content: flex-start; width: max-content; min-width: 100%; }
  .service-card:nth-child(1), .service-card:nth-child(2), .service-card:nth-child(3), .service-card:nth-child(4),
  .service-card:nth-child(1):hover, .service-card:nth-child(2):hover, .service-card:nth-child(3):hover, .service-card:nth-child(4):hover {
    transform: none;
  }
}
