/* ==========================================================================
   Automation Studio — landing page styles
   Re-creation of the nvofix.com front-end. Values mirror the original
   Tailwind build (Inter, #060B18 base, blue/cyan gradient accents).
   ========================================================================== */

:root {
  --bg: #060b18;
  --panel: #0d1629;

  /* Tailwind v4 palette (oklch) used by the original design */
  --blue-200: oklch(88.2% 0.059 254.128);
  --blue-400: oklch(70.7% 0.165 254.624);
  --blue-500: oklch(62.3% 0.214 259.815);
  --blue-700: oklch(48.8% 0.243 264.376);
  --blue-900: oklch(37.9% 0.146 265.522);
  --cyan-300: oklch(86.5% 0.127 207.078);
  --cyan-400: oklch(78.9% 0.154 211.53);
  --cyan-600: oklch(60.9% 0.126 221.723);
  --indigo-700: oklch(45.7% 0.24 277.023);
  --gray-300: oklch(87.2% 0.01 258.338);
  --gray-400: oklch(70.7% 0.022 261.325);
  --gray-500: oklch(55.1% 0.027 264.364);
  --gray-600: oklch(44.6% 0.03 256.802);
  --green-400: oklch(79.2% 0.209 151.711);
  --red-400: oklch(70.4% 0.191 22.216);

  --gradient: linear-gradient(to right, var(--blue-500), var(--cyan-400));
  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------- reset --- */

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: #fff;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
p,
ul {
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
}

ul {
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}

button {
  background: none;
  cursor: pointer;
}

svg {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--cyan-400);
  outline-offset: 2px;
}

/* Page wrapper: clips the decorative art exactly like the original shell. */
.page {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

/* ------------------------------------------------------------ backdrop --- */

#grid-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 9999px;
}

.blob--1 {
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: oklch(48.8% 0.243 264.376 / 0.25);
  filter: blur(130px);
}

.blob--2 {
  bottom: 10%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: oklch(45.7% 0.24 277.023 / 0.2);
  filter: blur(100px);
}

.blob--3 {
  top: 40%;
  right: -5%;
  width: 400px;
  height: 400px;
  background: oklch(60.9% 0.126 221.723 / 0.15);
  filter: blur(100px);
}

.backdrop-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.art-hex {
  display: none;
}

@media (min-width: 1024px) {
  .art-hex {
    display: block;
  }
}

/* -------------------------------------------------------------- header --- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(6, 11, 24, 0.8);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 768px) {
  .site-header {
    padding: 16px 40px;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 0.5rem;
  background-image: linear-gradient(to bottom right, var(--blue-500), var(--cyan-400));
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
}

.brand-name {
  display: none;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

@media (min-width: 640px) {
  .brand-name {
    display: block;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-select {
  padding: 6px 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  line-height: 1.25;
  color: #fff;
  outline: none;
  cursor: pointer;
}

.lang-select option {
  background: var(--bg);
  color: #fff;
}

/* Very small phones (≤359px): tighten the header so the CTA and the language
   picker stay on one line for every language. */
@media (max-width: 359px) {
  .site-header {
    padding-left: 14px;
    padding-right: 14px;
  }

  .header-actions {
    gap: 8px;
  }

  .lang-select {
    padding: 6px 8px;
  }

  .btn--sm {
    padding: 8px 10px;
    font-size: 0.75rem;
  }
}

/* ------------------------------------------------------------- buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-weight: 600;
  text-align: center;
  transition:
    opacity var(--transition),
    background-color var(--transition),
    border-color var(--transition);
}

.btn--primary {
  background-image: var(--gradient);
  color: #fff;
}

.btn--primary:hover {
  opacity: 0.9;
}

.btn--sm {
  padding: 8px 16px;
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
}

.btn--lg {
  padding: 14px 32px;
  font-size: 0.95rem;
  box-shadow:
    0 10px 15px -3px oklch(62.3% 0.214 259.815 / 0.3),
    0 4px 6px -4px oklch(62.3% 0.214 259.815 / 0.3);
}

.btn--outline {
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* ---------------------------------------------------------------- main --- */

main {
  position: relative;
  z-index: 10;
  padding-top: 80px;
  width: 100%;
}

/* ---------------------------------------------------------------- hero --- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 64px 20px;
  text-align: center;
}

@media (min-width: 768px) {
  .hero {
    padding: 96px 20px;
  }
}

.hero-title {
  max-width: min(56rem, 100%);
  margin-bottom: 20px;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3.75rem;
  }
}

/* Very narrow phones: let long single words hyphenate instead of breaking
   mid-syllable (e.g. German "Geschäftsautomatisierung" at 320px). */
@media (max-width: 359px) {
  .hero-title {
    hyphens: auto;
  }
}

.hero-subtitle {
  max-width: 36rem;
  margin-bottom: 40px;
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
  color: oklch(88.2% 0.059 254.128 / 0.6);
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 1.125rem;
    line-height: calc(1.75 / 1.125);
  }
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 320px;
}

@media (min-width: 768px) {
  .hero-actions {
    flex-direction: row;
    justify-content: center;
    gap: 16px;
    max-width: none;
  }
}

/* ------------------------------------------------------------ sections --- */

.section {
  padding: 64px 20px;
}

@media (min-width: 768px) {
  .section {
    padding: 80px 40px;
  }
}

.section--tint {
  background: rgba(255, 255, 255, 0.02);
}

.section-title {
  margin-bottom: 32px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: calc(1.75 / 1.25);
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 1.875rem;
    line-height: calc(2.25 / 1.875);
  }
}

/* --------------------------------------------------------------- about --- */

.about {
  display: grid;
  gap: 28px;
}

@media (min-width: 900px) {
  .about {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 64px;
    align-items: start;
  }
}

.about-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 1rem;
  background-image: linear-gradient(135deg, var(--blue-500), var(--cyan-400));
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 30px -12px oklch(62.3% 0.214 259.815 / 0.6);
}

.about-name {
  margin-top: 18px;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.about-role {
  margin-top: 8px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--gray-400);
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 68ch;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--gray-300);
}

@media (min-width: 768px) {
  .about-body {
    font-size: 1rem;
  }
}

/* ----------------------------------------------------- competencies card --- */

.panel {
  padding: 24px;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

@media (min-width: 768px) {
  .panel {
    padding: 40px;
  }
}

.skills--mobile {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 24px;
  row-gap: 16px;
}

@media (min-width: 430px) {
  .skills--mobile {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .skills--mobile {
    display: none;
  }
}

.skills--mobile li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.skills--mobile .dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--cyan-400);
  flex-shrink: 0;
}

.skills--mobile .label {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.skills--desktop {
  display: none;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 768px) {
  .skills--desktop {
    display: flex;
  }
}

.skills--desktop li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.skills--desktop .dot {
  margin-top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: var(--cyan-400);
  flex-shrink: 0;
}

.skills--desktop .label {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: calc(1.75 / 1.125);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.skills--desktop .desc {
  margin-left: 12px;
  font-size: 1rem;
  color: var(--gray-400);
}

/* -------------------------------------------------------------- cards --- */

.examples-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 768px) {
  .examples-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .examples-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.example-card {
  padding: 20px;
  border-radius: 0.75rem;
  border: 1px solid oklch(62.3% 0.214 259.815 / 0.2);
  background: oklch(37.9% 0.146 265.522 / 0.1);
  cursor: pointer;
  transition: all var(--transition);
}

.example-card:hover {
  border-color: oklch(70.7% 0.165 254.624 / 0.4);
  background: oklch(37.9% 0.146 265.522 / 0.2);
}

.example-card h3 {
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  transition: color var(--transition);
}

.example-card:hover h3 {
  color: var(--cyan-300);
}

.example-card p {
  margin-bottom: 12px;
  font-size: 0.875rem;
  line-height: 1.375;
  color: var(--gray-400);
}

.example-card .more {
  font-size: 0.75rem;
  line-height: calc(1 / 0.75);
  font-weight: 500;
  color: var(--cyan-400);
}

.cases-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 512px) {
  .cases-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .cases-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.case-card {
  padding: 16px;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all var(--transition);
}

@media (min-width: 768px) {
  .case-card {
    padding: 24px;
  }
}

.case-card:hover {
  border-color: oklch(78.9% 0.154 211.53 / 0.3);
  background: rgba(255, 255, 255, 0.06);
}

.case-card h3 {
  margin-bottom: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: calc(1.25 / 0.875);
}

@media (min-width: 768px) {
  .case-card h3 {
    font-size: 1rem;
    line-height: 1.5;
  }
}

.case-card .res {
  margin-bottom: 4px;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: calc(1.75 / 1.25);
  color: var(--cyan-400);
}

@media (min-width: 768px) {
  .case-card .res {
    font-size: 1.5rem;
    line-height: calc(1 / 0.75);
  }
}

.case-card p {
  font-size: 0.75rem;
  line-height: 1.375;
  color: var(--gray-500);
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Long words (especially Russian) must never spill out of their column on
   narrow screens — the original lets them overlap the next card. */
.skills--mobile .label,
.example-card h3,
.example-card p,
.case-card h3,
.case-card .res,
.case-card p,
.modal-title,
.modal-desc,
.modal-res {
  overflow-wrap: break-word;
  hyphens: auto;
}

/* --------------------------------------------------------------- form --- */

.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.panel--form {
  width: 100%;
  max-width: 32rem;
}

/* ------------------------------------------------------------ contacts --- */

.panel--contacts {
  width: 100%;
  max-width: 32rem;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-item a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  text-decoration: none;
  transition:
    border-color var(--transition),
    background-color var(--transition);
}

.contact-item a:hover {
  border-color: oklch(78.9% 0.154 211.53 / 0.35);
  background: rgba(255, 255, 255, 0.05);
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  background: oklch(78.9% 0.154 211.53 / 0.1);
  color: var(--cyan-400);
}

.contact-body {
  display: block;
  min-width: 0;
}

.contact-label {
  display: block;
  font-size: 0.6875rem;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.contact-value {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: break-word;
}

@media (min-width: 768px) {
  .contact-value {
    font-size: 1rem;
  }
}

/* Very narrow phones: tighten the row so the e-mail address still fits on
   one line instead of breaking mid-word. */
@media (max-width: 359px) {
  .contact-item a {
    gap: 10px;
    padding: 8px 10px;
  }

  .contact-icon {
    width: 32px;
    height: 32px;
  }

  .contact-value {
    font-size: 0.875rem;
  }
}

.form-title {
  margin-bottom: 28px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: calc(1.75 / 1.25);
}

@media (min-width: 768px) {
  .form-title {
    font-size: 1.5rem;
    line-height: calc(1 / 0.75);
  }
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  width: 100%;
  padding: 14px 20px;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
  outline: none;
  transition: border-color var(--transition);
}

.field::placeholder {
  color: var(--gray-500);
  opacity: 1;
}

.field:focus {
  border-color: oklch(70.7% 0.165 254.624 / 0.5);
}

.field--area {
  height: 112px;
  resize: none;
}

.btn--submit {
  width: 100%;
  padding: 14px 0;
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
  box-shadow:
    0 10px 15px -3px oklch(62.3% 0.214 259.815 / 0.2),
    0 4px 6px -4px oklch(62.3% 0.214 259.815 / 0.2);
}

.btn--submit:disabled {
  opacity: 0.4;
  cursor: default;
}

.form-status {
  text-align: center;
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
}

.form-status--ok {
  color: var(--green-400);
}

.form-status--err {
  color: var(--red-400);
}

/* ------------------------------------------------------------- footer --- */

.site-footer {
  padding: 32px 20px;
  text-align: center;
  color: var(--gray-600);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.site-footer p {
  font-size: 0.75rem;
  line-height: calc(1 / 0.75);
}

/* Legal documents (offer, policies) — only rendered when NVOFIX_LEGAL is set */
.legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 12px;
  font-size: 0.75rem;
  line-height: calc(1 / 0.75);
}

.legal[hidden] {
  display: none;
}

.legal a {
  color: var(--gray-500);
  text-decoration: none;
  transition: color var(--transition);
}

.legal a:hover {
  color: var(--cyan-400);
}

/* -------------------------------------------------------------- modal --- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.modal[hidden] {
  display: none;
}

.modal.is-open {
  display: flex;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 32rem;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  border-radius: 1rem;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modal-in 180ms ease-out;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  transition: background-color var(--transition);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.modal-title {
  margin-bottom: 16px;
  padding-right: 32px;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: calc(1.75 / 1.25);
}

.modal-desc {
  margin-bottom: 20px;
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
  color: var(--gray-400);
}

.modal-res {
  margin-bottom: 20px;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: calc(1 / 0.75);
  color: var(--cyan-400);
}

.modal-details {
  margin-bottom: 20px;
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--gray-300);
}

.modal-block {
  margin-bottom: 20px;
}

.modal-block:last-child {
  margin-bottom: 0;
}

.modal-block h4 {
  margin-bottom: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: calc(1.25 / 0.875);
  color: #fff;
}

.modal-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
  color: var(--gray-400);
}

.modal-list li::before {
  content: "";
  margin-top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: var(--cyan-400);
  flex-shrink: 0;
}

.modal-list--accent li {
  color: var(--cyan-300);
}

/* --------------------------------------------------------- reduced motion --- */

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