/* Field-notes layout for circumspace. */

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

html {
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.65;
  letter-spacing: 0.005em;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-primary);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 0.96;
}

h1 {
  font-size: clamp(2.4rem, 6.3vw, 5.8rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.7rem);
}

h3 {
  font-size: clamp(1.3rem, 2.4vw, 2rem);
}

p {
  margin-bottom: 1rem;
  max-width: 68ch;
}

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

a:hover {
  color: var(--secondary);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

section,
.impressum-section {
  isolation: isolate;
  padding: clamp(3rem, 5.5vw, 5.5rem) 0;
  position: relative;
  scroll-margin-top: 3rem;
}

.container {
  margin-inline: auto;
  position: relative;
  width: min(100% - 2.5rem, 1000px);
  z-index: 1;
}

#header {
  background: color-mix(in srgb, var(--bg) 91%, transparent);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 500;
}

.logo {
  font-size: clamp(2rem, 4.3vw, 4rem);
  line-height: 1;
  margin: 0;
  padding: 1.1rem 0 1rem;
}

.logo strong {
  text-transform: lowercase;
}

.logo-link {
  display: inline-block;
}

.hero-section {
  align-items: center;
  display: grid;
  min-height: min(62vh, 40rem);
}

.hero-content {
  max-width: 820px;
  position: relative;
  z-index: 1;
}

.hero-eyebrow,
section[data-label]::before,
.section-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero-eyebrow {
  border-left: 3px solid var(--secondary);
  margin-bottom: 1.4rem;
  max-width: none;
  padding-left: 0.75rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5.4rem);
  margin-bottom: 1.35rem;
  max-width: 12ch;
}

.hero-subtitle {
  color: var(--muted);
  font-size: clamp(1.06rem, 1.7vw, 1.33rem);
  max-width: 60ch;
}

section[data-label]::before {
  content: attr(data-label);
  display: block;
  margin: 0 auto 1.2rem;
  width: min(100% - 2.5rem, 1000px);
}

.section-label {
  margin: 0 0 1.2rem;
}

.section-title {
  margin-bottom: 1.8rem;
  max-width: 12ch;
}

.section-subtitle {
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  margin: -0.9rem 0 1.8rem;
  max-width: 64ch;
}

.services-grid,
.case-studies-grid,
.contact-methods {
  display: grid;
  gap: 0;
}

.services-grid {
  border-left: 1px solid var(--surface-border);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.services-section {
  background: color-mix(in srgb, var(--secondary) 19%, var(--bg));
}

.services-section .services-grid {
  border-left: 0;
  margin-inline: auto;
  max-width: 760px;
}

.services-section .service-item {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--surface-border);
  padding: clamp(1.5rem, 2.5vw, 2.25rem) 0;
  text-align: center;
}

.services-section .service-item:nth-child(n) {
  background: transparent;
}

.services-section .service-item:first-child {
  border-top: 1px solid var(--surface-border);
}

.services-section .service-item,
.services-section .service-item:first-child {
  border-color: color-mix(in srgb, var(--fg) 30%, transparent);
}

.services-section .service-title {
  font-size: clamp(1.45rem, 2.6vw, 2.15rem);
  margin-bottom: 0.65rem;
}

.services-section .service-description {
  margin-inline: auto;
}

.experience-section .service-item:nth-child(n) {
  background: color-mix(in srgb, var(--surface) 88%, var(--fg));
  border-color: color-mix(in srgb, var(--fg) 28%, transparent);
}

.experience-section .service-title {
  color: var(--fg);
}

.service-item,
.case-study,
.contact-method {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  border: 1px solid var(--surface-border);
  border-left: 0;
  padding: clamp(1.25rem, 2vw, 1.8rem);
}

.service-item:nth-child(4n + 1),
.service-item:nth-child(4n + 4) {
  background: color-mix(in srgb, var(--surface) 90%, transparent);
}

.service-title,
.case-study-title {
  margin-bottom: 1rem;
}

.service-description,
.case-study-description,
.contact-description,
.freedom-tech-description p {
  color: var(--muted);
  margin-bottom: 0;
}

.freedom-tech-section {
  background: var(--fg);
  color: var(--bg);
}

.freedom-tech-section .section-label {
  color: color-mix(in srgb, var(--bg) 82%, transparent);
}

.freedom-tech-section .section-title {
  line-height: 1.1;
  max-width: 14ch;
}

.freedom-tech-content {
  border-left: 1px solid color-mix(in srgb, var(--bg) 45%, transparent);
  margin-left: 10%;
  max-width: 720px;
  padding-left: clamp(1.25rem, 4vw, 3rem);
}

.freedom-tech-description p {
  color: color-mix(in srgb, var(--bg) 83%, transparent);
  font-size: clamp(1.2rem, 2.1vw, 1.75rem);
  line-height: 1.45;
}

.case-studies-grid {
  border-top: 1px solid var(--surface-border);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.case-study {
  border-top: 0;
  display: flex;
  flex-direction: column;
  min-height: 17rem;
}

.case-study:nth-child(even) {
  background: color-mix(in srgb, var(--secondary) 24%, var(--surface));
}

.case-studies-section .case-study:nth-child(odd) {
  background: color-mix(in srgb, var(--surface) 88%, var(--fg));
}

.case-studies-section .case-study {
  border-color: color-mix(in srgb, var(--secondary) 48%, var(--surface-border));
}

.case-study-description {
  flex-grow: 1;
}

.project-link {
  margin-top: 1.5rem;
}

.relay-info {
  display: grid;
  gap: 1rem;
}

.code-block label {
  color: var(--muted);
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.code-display-wrapper {
  border: 1px solid var(--surface-border);
  display: grid;
  grid-template-columns: 1fr auto;
}

.code-display {
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.5;
  padding: 0.7rem 0.8rem;
  word-break: break-all;
}

.copy-btn {
  background: transparent;
  border: 0;
  border-left: 1px solid var(--surface-border);
  color: var(--fg);
  cursor: pointer;
  min-width: 2.7rem;
}

.copy-btn:hover,
.copy-btn.copied {
  background: var(--secondary);
  color: var(--bg);
}

.copy-btn.copy-error {
  background: #b83b3b;
  color: #fff;
}

.contact-section {
  background: color-mix(in srgb, var(--secondary) 19%, var(--bg));
}

.contact-section .section-title {
  margin-bottom: 1rem;
}

.contact-description {
  font-size: clamp(1.05rem, 1.55vw, 1.24rem);
  margin-bottom: 1.8rem;
}

.contact-methods {
  border-top: 1px solid var(--surface-border);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-method {
  border-top: 0;
  min-height: 13rem;
}

.contact-method {
  background: color-mix(in srgb, var(--surface) 80%, var(--secondary));
  border-color: color-mix(in srgb, var(--fg) 25%, transparent);
}

.contact-method h4 {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.07em;
  margin-bottom: 1.1rem;
  text-transform: uppercase;
}

.secure-options,
.payment-options {
  color: var(--muted);
  margin: 1rem 0 0;
}

.payment-options {
  display: grid;
  gap: 1rem;
}

.payment-option {
  align-items: center;
  display: flex;
  gap: 0.7rem;
}

.payment-icons {
  display: flex;
  flex-shrink: 0;
  gap: 0.35rem;
}

.payment-icon {
  height: 2rem;
  width: 2rem;
}

.payment-icon text {
  fill: #fff;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.bitcoin-icon circle {
  fill: #f7931a;
}

.monero-icon circle {
  fill: #ff6600;
}

.monero-icon path {
  fill: #fff;
}

.fiat-icon circle {
  fill: var(--accent);
}

.fiat-icon text {
  font-size: 9px;
}

.payment-option strong,
.payment-option small {
  display: block;
}

.payment-option small {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.1rem;
}

.cta-button {
  align-items: center;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--bg);
  display: inline-flex;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 900;
  justify-content: center;
  letter-spacing: 0.01em;
  padding: 0.78rem 1.1rem;
  text-align: center;
  transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.cta-button:hover {
  background: transparent;
  color: var(--accent);
  transform: translate(-2px, -2px);
}

#footer {
  border-top: 1px solid var(--surface-border);
  padding: 1.7rem 0;
}

.footer-text {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin: 0;
}

.impressum-content {
  max-width: 760px;
}

.legal-info {
  border-left: 1px solid var(--surface-border);
  margin-top: 2rem;
  padding-left: 1.5rem;
}

.legal-info h3 {
  color: var(--accent);
  font-size: 1.2rem;
  margin: 2rem 0 0.5rem;
}

.back-link {
  margin-top: 2rem;
}

.skip-link {
  background: var(--accent);
  color: var(--bg);
  left: 1rem;
  padding: 0.6rem 0.85rem;
  position: absolute;
  top: -4rem;
  transition: top var(--transition-fast);
  z-index: 1100;
}

.skip-link:focus {
  top: 0.75rem;
}

@media (max-width: 720px) {
  .container,
  section[data-label]::before {
    width: min(100% - 1.5rem, 1000px);
  }

  section,
  .impressum-section {
    padding: 3rem 0;
  }

  .logo {
    font-size: 2.25rem;
    padding-block: 1rem;
  }

  .hero-section {
    min-height: 32rem;
  }

  .hero-title {
    font-size: clamp(2.7rem, 14vw, 4.4rem);
  }

  .services-grid,
  .case-studies-grid,
  .contact-methods {
    grid-template-columns: 1fr;
  }

  .services-section .services-grid {
    border-left: 0;
  }

  .services-grid,
  .case-studies-grid {
    border-left: 1px solid var(--surface-border);
  }

  .service-item,
  .case-study,
  .contact-method {
    border-left: 0;
  }

  .case-study {
    min-height: 0;
  }

  .freedom-tech-content {
    margin-left: 0;
  }

  .contact-method {
    min-height: 0;
  }
}

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

@media print {
  .toggle-controls,
  .skip-link {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
