/* =====================
   RISETECH – style.css
   ===================== */

:root {
  --bg: #F0F3F7;
  --bg-alt: #E4E8EF;
  --surface: #FFFFFF;
  --text: #0D1118;
  --text-secondary: #5A6270;
  --accent: #E8650A;
  --amber: #F5A020;
  --border: #D4DAE4;
  --hero-bg: #0D1118;
  --hero-surface: #161C28;
  --hero-text: #EDF0F5;
  --hero-text-secondary: #8B94A3;
  --hero-border: #252E40;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D1118;
    --bg-alt: #111720;
    --surface: #161C28;
    --text: #EDF0F5;
    --text-secondary: #8B94A3;
    --border: #252E40;
  }
}
:root[data-theme="dark"] {
  --bg: #0D1118;
  --bg-alt: #111720;
  --surface: #161C28;
  --text: #EDF0F5;
  --text-secondary: #8B94A3;
  --border: #252E40;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(13,17,24,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 clamp(20px, 5vw, 60px);
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  text-decoration: none;
  display: flex; align-items: center;
}
.nav-logo-img {
  height: 32px;
  width: auto;
  display: block;
}
.footer-logo-img {
  height: 28px;
  width: auto;
  display: block;
}
.nav-links {
  display: flex; gap: 32px; list-style: none;
}
.nav-links a {
  font-size: 0.875rem; font-weight: 500;
  color: #8B94A3; text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav-links a:hover { color: #EDF0F5; }
.nav-cta {
  background: var(--accent); color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem; font-weight: 500;
  padding: 10px 22px; border: none; cursor: pointer;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition: background 0.2s;
  text-decoration: none; display: inline-block;
}
.nav-cta:hover { background: #D4570A; }
.nav-cta:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.nav-toggle { display: none; }

/* ── HERO ── */
.hero {
  background: var(--hero-bg);
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 100px clamp(20px, 6vw, 80px) 80px;
  gap: 40px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 65% 50%, rgba(232,101,10,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 30% 40% at 70% 30%, rgba(245,160,32,0.07) 0%, transparent 60%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 28px;
}
.hero-eyebrow::before {
  content: ''; display: block;
  width: 28px; height: 1px; background: var(--accent);
}
.hero h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--hero-text);
  text-wrap: balance;
  margin-bottom: 24px;
}
.hero h1 em {
  font-style: normal;
  color: transparent;
  background: linear-gradient(90deg, var(--accent) 0%, var(--amber) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-sub {
  font-size: 1.05rem; font-weight: 300;
  color: var(--hero-text-secondary);
  max-width: 440px; line-height: 1.7;
  margin-bottom: 44px;
}
.hero-actions {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.btn-primary {
  background: var(--accent); color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem; font-weight: 500;
  padding: 14px 32px; border: none; cursor: pointer;
  clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
  transition: background 0.2s, transform 0.15s;
  text-decoration: none; display: inline-block;
}
.btn-primary:hover { background: #D4570A; transform: translateY(-1px); }
.btn-primary:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.btn-ghost {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem; font-weight: 400;
  color: var(--hero-text-secondary);
  text-decoration: none;
  display: flex; align-items: center; gap: 8px;
  transition: color 0.2s;
}
.btn-ghost:hover { color: var(--hero-text); }
.btn-ghost::after { content: '→'; transition: transform 0.2s; }
.btn-ghost:hover::after { transform: translateX(4px); }

.hero-stats {
  display: flex; gap: 32px;
  margin-top: 56px; padding-top: 32px;
  border-top: 1px solid var(--hero-border);
}
.stat-val {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem; font-weight: 700;
  color: var(--hero-text);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.stat-val span { color: var(--accent); }
.stat-label {
  font-size: 0.75rem; color: var(--hero-text-secondary);
  margin-top: 4px; letter-spacing: 0.04em;
}

/* Hero visual — left column, logo full-bleed */
.hero-visual {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  /* pull out to the left edge of the hero padding */
  margin-left: calc(-1 * clamp(20px, 6vw, 80px));
  margin-top: calc(-1 * 80px);
  margin-bottom: calc(-1 * 80px);
  align-self: stretch;
  overflow: hidden;
}
.logo-wrap {
  position: relative;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px 40px 0;
}
.hero-logo {
  width: min(480px, 100%);
  display: block;
  filter: drop-shadow(0 0 60px rgba(232,101,10,0.4)) drop-shadow(0 0 120px rgba(245,160,32,0.15));
}
.logo-fallback {
  display: none;
  align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 3.5rem;
  background: linear-gradient(135deg, #E8650A 0%, #F5A020 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.04em;
}
.orbit-ring,
.orbit-ring-2,
.orbit-ring-3,
.orbit-ring-4,
.orbit-ring-5 {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  aspect-ratio: 1;
}

/* Ring 1 — mały, szybki, oranż */
.orbit-ring {
  width: min(460px, 88%);
  border: 1px solid rgba(232,101,10,0.22);
  animation: spin 11s linear infinite;
}
.orbit-ring::before {
  content: '';
  position: absolute; top: -4px; left: 50%;
  transform: translateX(-50%);
  width: 8px; height: 8px;
  background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 12px var(--accent), 0 0 24px rgba(232,101,10,0.4);
}

/* Ring 2 — duży, wolny, przeciwny kierunek, amber */
.orbit-ring-2 {
  width: min(620px, 108%);
  border: 1px solid rgba(245,160,32,0.12);
  animation: spin 19s linear infinite reverse;
}
.orbit-ring-2::before {
  content: '';
  position: absolute; bottom: -4px; left: 50%;
  transform: translateX(-50%);
  width: 6px; height: 6px;
  background: var(--amber); border-radius: 50%;
  box-shadow: 0 0 10px var(--amber), 0 0 20px rgba(245,160,32,0.4);
}

/* Ring 3 — średni, pochylony 45°, biały, przeciwny */
.orbit-ring-3 {
  width: min(520px, 96%);
  border: 1px solid rgba(255,255,255,0.07);
  animation: spin 15s linear infinite reverse;
  transform: rotate(45deg);
}
.orbit-ring-3::before {
  content: '';
  position: absolute; top: -3px; left: 50%;
  transform: translateX(-50%);
  width: 5px; height: 5px;
  background: #fff; border-radius: 50%;
  box-shadow: 0 0 8px rgba(255,255,255,0.6);
}

/* Ring 4 — mały, pochylony -30°, szybki, oranż */
.orbit-ring-4 {
  width: min(380px, 72%);
  border: 1px solid rgba(232,101,10,0.1);
  animation: spin 8s linear infinite;
  transform: rotate(-30deg);
}
.orbit-ring-4::before {
  content: '';
  position: absolute; top: -3px; left: 50%;
  transform: translateX(-50%);
  width: 5px; height: 5px;
  background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
}
.orbit-ring-4::after {
  content: '';
  position: absolute; bottom: -3px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  background: var(--amber); border-radius: 50%;
  box-shadow: 0 0 8px var(--amber);
}

/* Ring 5 — największy, bardzo wolny, przeciwny, delikatny */
.orbit-ring-5 {
  width: min(740px, 130%);
  border: 1px solid rgba(232,101,10,0.05);
  animation: spin 32s linear infinite;
}
.orbit-ring-5::before {
  content: '';
  position: absolute; top: -3px; right: 20%;
  width: 4px; height: 4px;
  background: var(--amber); border-radius: 50%;
  box-shadow: 0 0 8px var(--amber);
}

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Ring 3 i 4 mają własny punkt startowy — nadpisujemy transform przez animację */
.orbit-ring-3 { transform-origin: center; animation: spin3 15s linear infinite reverse; }
.orbit-ring-4 { transform-origin: center; animation: spin4 8s linear infinite; }
@keyframes spin3 { from { transform: rotate(45deg); } to { transform: rotate(405deg); } }
@keyframes spin4 { from { transform: rotate(-30deg); } to { transform: rotate(330deg); } }

@media (prefers-reduced-motion: reduce) {
  .orbit-ring, .orbit-ring-2, .orbit-ring-3, .orbit-ring-4, .orbit-ring-5 { animation: none; }
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .orbit-ring, .orbit-ring-2 { animation: none; }
}

/* ── SERVICES ── */
.services {
  background: var(--bg);
  padding: 100px clamp(20px, 6vw, 80px);
}
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 64px; flex-wrap: wrap;
}
.section-eyebrow {
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.section-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  letter-spacing: -0.025em; line-height: 1.1;
  text-wrap: balance;
}
.section-title.light { color: var(--hero-text); }
.section-link {
  font-size: 0.875rem; color: var(--accent);
  text-decoration: none; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.section-link:hover { border-color: var(--accent); }

.services-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0; border: 1px solid var(--border);
}
.service-item {
  padding: 44px 40px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.service-item:hover { background: var(--surface); }
.service-item:nth-child(2n) { border-right: none; }
.service-item:nth-last-child(-n+2) { border-bottom: none; }

.service-index {
  font-family: 'Syne', sans-serif;
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.1em; color: var(--accent); margin-bottom: 20px;
}
.service-icon {
  width: 44px; height: 44px; margin-bottom: 20px;
  color: var(--text); opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
}
.service-item:hover .service-icon { opacity: 1; color: var(--accent); }
.service-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700; font-size: 1.25rem;
  letter-spacing: -0.01em; margin-bottom: 12px;
}
.service-desc {
  font-size: 0.9rem; color: var(--text-secondary);
  line-height: 1.65; max-width: 360px;
}
.service-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.tag {
  font-size: 0.7rem; letter-spacing: 0.05em;
  padding: 3px 10px;
  background: var(--bg-alt); color: var(--text-secondary);
  clip-path: polygon(4px 0%, 100% 0%, calc(100% - 4px) 100%, 0% 100%);
}

/* ── PROCESS ── */
.process {
  background: var(--hero-bg);
  padding: 100px clamp(20px, 6vw, 80px);
  position: relative; overflow: hidden;
}
.process::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.process-steps {
  margin-top: 56px;
  position: relative; z-index: 1;
}
.process-step {
  display: grid; grid-template-columns: 80px 1fr;
  gap: 0 32px; padding: 36px 0;
  border-bottom: 1px solid var(--hero-border);
  align-items: start;
}
.process-step:last-child { border-bottom: none; }
.step-num {
  font-family: 'Syne', sans-serif;
  font-size: 2.5rem; font-weight: 800;
  color: rgba(232,101,10,0.2); line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  padding-top: 4px;
  transition: color 0.3s;
}
.process-step:hover .step-num { color: var(--accent); }
.step-title {
  font-family: 'Syne', sans-serif;
  font-weight: 600; font-size: 1.1rem;
  color: var(--hero-text); margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.step-desc {
  font-size: 0.9rem; color: var(--hero-text-secondary);
  line-height: 1.65; max-width: 520px;
}

/* ── ABOUT ── */
.about {
  background: var(--bg);
  padding: 100px clamp(20px, 6vw, 80px);
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center;
}
.about-text .section-title { margin-bottom: 24px; }
.about-body {
  font-size: 0.95rem; color: var(--text-secondary);
  line-height: 1.75; margin-bottom: 16px;
}
.about-highlights { margin-top: 36px; }
.highlight-row {
  display: flex; align-items: baseline; gap: 16px;
  padding: 18px 0; border-bottom: 1px solid var(--border);
}
.highlight-row:first-child { border-top: 1px solid var(--border); }
.hl-num {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem; font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums; min-width: 80px;
}
.hl-text { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.5; }

.about-visual {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 40px; position: relative;
}
.about-visual::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--amber));
}
.coverage-label {
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-secondary); margin-bottom: 32px;
}
.tech-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tech-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--bg-alt);
  font-size: 0.85rem; font-weight: 500; color: var(--text);
}
.tech-dot {
  width: 8px; height: 8px; background: var(--accent);
  flex-shrink: 0;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}
.tech-dot.amber { background: var(--amber); }
.tech-dot.muted { background: var(--border); }

/* ── CONTACT ── */
.contact {
  background: var(--hero-bg);
  padding: 100px clamp(20px, 6vw, 80px);
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: start;
  position: relative; overflow: hidden;
}
.contact::before {
  content: '';
  position: absolute; bottom: 0; right: 0;
  width: 40%; height: 100%;
  background: radial-gradient(ellipse 80% 60% at 80% 50%, rgba(232,101,10,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.contact-info-col { position: relative; z-index: 1; }
.contact-sub {
  font-size: 0.95rem; color: var(--hero-text-secondary);
  line-height: 1.7; margin-bottom: 40px;
}
.contact-details { display: flex; flex-direction: column; gap: 20px; }
.contact-row { display: flex; align-items: center; gap: 16px; }
.contact-icon {
  width: 40px; height: 40px;
  border: 1px solid var(--hero-border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--accent);
}
.contact-detail { font-size: 0.9rem; color: var(--hero-text-secondary); }
.contact-detail strong {
  display: block; color: var(--hero-text);
  font-weight: 500; font-size: 0.85rem; margin-bottom: 2px;
}

/* Form */
.contact-form { position: relative; z-index: 1; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.75rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--hero-text-secondary);
  margin-bottom: 8px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--hero-surface);
  border: 1px solid var(--hero-border);
  color: var(--hero-text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem; padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-submit {
  width: 100%;
  background: var(--accent); color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem; font-weight: 500;
  padding: 15px 32px; border: none; cursor: pointer;
  clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
  transition: background 0.2s;
  margin-top: 8px;
}
.form-submit:hover { background: #D4570A; }
.form-submit:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.form-notice {
  margin-top: 12px; padding: 12px 16px;
  font-size: 0.875rem; border-left: 3px solid var(--accent);
  background: rgba(232,101,10,0.08); color: var(--hero-text);
}
.form-notice.success { border-color: #22C55E; background: rgba(34,197,94,0.08); }
.form-notice.error { border-color: #EF4444; background: rgba(239,68,68,0.08); }

/* ── FOOTER ── */
footer {
  background: #080C12;
  padding: 32px clamp(20px, 6vw, 80px);
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.footer-brand {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 1rem;
  color: #EDF0F5; letter-spacing: -0.02em;
}
.footer-brand span { color: var(--accent); }
.footer-copy { font-size: 0.8rem; color: #4A5464; }
.footer-links { display: flex; gap: 24px; list-style: none; }
.footer-links a {
  font-size: 0.8rem; color: #4A5464;
  text-decoration: none; transition: color 0.2s;
}
.footer-links a:hover { color: #8B94A3; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 90px; padding-bottom: 60px;
  }
  .hero-visual {
    order: -1;
    margin: 0 auto;
    align-self: auto;
  }
  .logo-wrap {
    width: min(280px, 80%);
    height: auto;
    margin: 0 auto;
    padding: 20px;
  }
  .hero-logo { width: 100%; }
  .hero-stats { gap: 20px; }
  nav .nav-links { display: none; }
  nav .nav-cta { display: none; }
  .nav-toggle {
    display: flex; flex-direction: column;
    gap: 5px; background: none; border: none;
    cursor: pointer; padding: 8px;
  }
  .nav-toggle span {
    display: block; width: 22px; height: 2px;
    background: #8B94A3;
    transition: transform 0.2s, opacity 0.2s;
  }
  .services-grid { grid-template-columns: 1fr; }
  .service-item { border-right: none !important; }
  .service-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .service-item:last-child { border-bottom: none; }
  .process-step { grid-template-columns: 60px 1fr; gap: 0 16px; }
  .about { grid-template-columns: 1fr; gap: 48px; }
  .contact { grid-template-columns: 1fr; gap: 48px; }
  .form-row { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; align-items: flex-start; }
  footer { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-links { flex-wrap: wrap; }
}
