* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-1: #07111f;
  --bg-2: #0f1d33;
  --bg-3: #091425;
  --text: #f8fafc;
  --muted: rgba(255, 255, 255, 0.72);
  --glass: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.16);
  --accent: #7dd3fc;
  --accent-2: #a78bfa;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --transition: 220ms ease;
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.2, 0.8, 0.2, 1);
}

html,
body {
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 20%, rgba(125, 211, 252, 0.12), transparent 24%),
    radial-gradient(circle at 82% 25%, rgba(167, 139, 250, 0.14), transparent 28%),
    radial-gradient(circle at 50% 82%, rgba(125, 211, 252, 0.08), transparent 22%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2) 55%, var(--bg-3));
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.anim-off canvas,
body.anim-off .background-glow {
  display: none;
}

canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.background-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(125, 211, 252, 0.08), transparent 20%),
    radial-gradient(circle at 70% 60%, rgba(167, 139, 250, 0.08), transparent 22%);
  filter: blur(18px);
}

.topbar {
  position: fixed;
  top: 18px;
  left: 18px;
  right: 18px;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 14px;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    transform 220ms var(--ease-smooth),
    background 220ms var(--ease-soft),
    border-color 220ms var(--ease-soft),
    opacity 220ms var(--ease-soft),
    box-shadow 220ms var(--ease-soft);
  font-size: 0.95rem;
  touch-action: manipulation;
  will-change: transform;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.topbar button::before {
  content: "";
  width: 16px;
  height: 16px;
  display: inline-block;
  flex-shrink: 0;
  background-color: currentColor;
  opacity: 0.95;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 16px 16px;
  mask-size: 16px 16px;
}

#langToggleBtn::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M4 5h9'/><path d='M8.5 3v2c0 4-2.2 7.5-5.5 9'/><path d='M6 11c1.2 2.1 3 4 5.4 5.5'/><path d='M14 19l4-10 4 10'/><path d='M15.5 15h5'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M4 5h9'/><path d='M8.5 3v2c0 4-2.2 7.5-5.5 9'/><path d='M6 11c1.2 2.1 3 4 5.4 5.5'/><path d='M14 19l4-10 4 10'/><path d='M15.5 15h5'/></svg>");
}

/* Dark mode: gumb nudi light mode pa pokazuje sunce */
#themeToggleBtn::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='3.2'/><path d='M12 2v2.2'/><path d='M12 19.8V22'/><path d='M2 12h2.2'/><path d='M19.8 12H22'/><path d='M4.9 4.9l1.5 1.5'/><path d='M17.6 17.6l1.5 1.5'/><path d='M19.1 4.9l-1.5 1.5'/><path d='M6.4 17.6l-1.5 1.5'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='3.2'/><path d='M12 2v2.2'/><path d='M12 19.8V22'/><path d='M2 12h2.2'/><path d='M19.8 12H22'/><path d='M4.9 4.9l1.5 1.5'/><path d='M17.6 17.6l1.5 1.5'/><path d='M19.1 4.9l-1.5 1.5'/><path d='M6.4 17.6l-1.5 1.5'/></svg>");
}

/* Light mode: gumb nudi dark mode pa pokazuje mjesec */
body.theme-light #themeToggleBtn::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z'/></svg>");
}

#animToggleBtn::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='3.2'/><path d='M12 2v2.2'/><path d='M12 19.8V22'/><path d='M2 12h2.2'/><path d='M19.8 12H22'/><path d='M4.9 4.9l1.5 1.5'/><path d='M17.6 17.6l1.5 1.5'/><path d='M19.1 4.9l-1.5 1.5'/><path d='M6.4 17.6l-1.5 1.5'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='3.2'/><path d='M12 2v2.2'/><path d='M12 19.8V22'/><path d='M2 12h2.2'/><path d='M19.8 12H22'/><path d='M4.9 4.9l1.5 1.5'/><path d='M17.6 17.6l1.5 1.5'/><path d='M19.1 4.9l-1.5 1.5'/><path d='M6.4 17.6l-1.5 1.5'/></svg>");
}

#contactOpenBtn::before {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='5' width='18' height='14' rx='2'/><path d='M3 7l9 6 9-6'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='5' width='18' height='14' rx='2'/><path d='M3 7l9 6 9-6'/></svg>");
}

.topbar button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.page {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 90px 20px 20px;
}

.hero {
  width: min(1100px, 100%);
  border: 1px solid var(--border);
  background: var(--glass);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.12),
      rgba(255, 255, 255, 0.03));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-inner {
  padding: 56px 42px 34px;
  position: relative;
  z-index: 1;
  animation: heroFadeIn 700ms var(--ease-smooth);
}

.hero-inner::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  top: -120px;
  right: -110px;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.22), transparent 70%);
  filter: blur(16px);
  pointer-events: none;
}

.hero-inner::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  bottom: -120px;
  left: -90px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.2), transparent 70%);
  filter: blur(18px);
  pointer-events: none;
}

.eyebrow {
  display: inline-block;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  margin-bottom: 18px;
  font-size: 0.92rem;
  position: relative;
  z-index: 1;
}

h1 {
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 1.02;
  letter-spacing: -2px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  max-width: 15ch;
}

.gradient-text {
  background: linear-gradient(90deg, var(--accent), #ffffff, var(--accent-2));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

body.theme-light .gradient-text {
  background: linear-gradient(90deg, #0ea5e9 0%, #4f46e5 55%, #8b5cf6 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.intro {
  max-width: 700px;
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 34px;
  position: relative;
  z-index: 1;
}

.cloud-links-title,
.future-title {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.cloud-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 34px;
  position: relative;
  z-index: 1;
}

.cloud-link {
  text-decoration: none;
  color: white;
  padding: 14px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  touch-action: manipulation;
  will-change: transform;
  transition:
    transform 240ms var(--ease-smooth),
    background 220ms var(--ease-soft),
    border-color 220ms var(--ease-soft),
    box-shadow 220ms var(--ease-soft),
    opacity 220ms var(--ease-soft);
}

.cloud-link:hover {
  transform: translateY(-4px) scale(1.03);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.cloud-link .icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.cloud-link svg {
  width: 18px;
  height: 18px;
  display: block;
  color: currentColor;
}

.typing-cursor {
  display: inline-block;
  margin-left: 0.08em;
  color: rgba(255, 255, 255, 0.9);
  animation: blinkCursor 1s steps(1) infinite;
}

@keyframes blinkCursor {
  50% {
    opacity: 0;
  }
}

.future-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  position: relative;
  z-index: 1;
}

.future-card {
  min-height: 145px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  padding: 20px;
  transition:
    transform 240ms var(--ease-smooth),
    background 220ms var(--ease-soft),
    border-color 220ms var(--ease-soft),
    box-shadow 220ms var(--ease-soft);
}

.future-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(125, 211, 252, 0.28);
}

.future-card h3 {
  font-size: 1.08rem;
  margin-bottom: 10px;
}

.future-card p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.96rem;
}

.footer-note {
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.92rem;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.site-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 12px 20px 18px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.88rem;
  letter-spacing: 0.2px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 16, 0.58);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 20px;
  transition: opacity 220ms var(--ease-soft);
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  width: min(560px, 100%);
  border-radius: 24px;
  border: 1px solid var(--border);
  background: rgba(10, 18, 33, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 26px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h2 {
  font-size: 1.35rem;
}

.close-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 1rem;
}

.contact-form {
  display: grid;
  gap: 14px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: white;
  border-radius: 14px;
  padding: 14px 15px;
  font: inherit;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(125, 211, 252, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 6px;
}

.form-actions button,
.form-actions a {
  text-decoration: none;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 0.95rem;
}

.form-actions .primary {
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.18), rgba(167, 139, 250, 0.18));
  border-color: rgba(125, 211, 252, 0.26);
}

.small-note {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.88rem;
  line-height: 1.55;
  margin-top: 4px;
}

.topbar button:focus-visible,
.cloud-link:focus-visible,
.close-btn:focus-visible,
.form-actions button:focus-visible,
.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.9);
  outline-offset: 3px;
}

.modal {
  transition:
    transform 240ms var(--ease-smooth),
    opacity 220ms var(--ease-soft);
  transform: translateY(10px) scale(0.985);
  opacity: 0;
}

.modal-backdrop.open .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(14px);
  z-index: 40;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(10, 18, 33, 0.92);
  color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 0.94rem;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 220ms var(--ease-soft),
    transform 240ms var(--ease-smooth);
  max-width: min(90vw, 420px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

body.theme-light {
  --text: #0f172a;
  --muted: rgba(15, 23, 42, 0.72);
  --glass: rgba(255, 255, 255, 0.48);
  --border: rgba(15, 23, 42, 0.12);
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  background:
    radial-gradient(circle at 15% 20%, rgba(125, 211, 252, 0.11), transparent 24%),
    radial-gradient(circle at 82% 25%, rgba(167, 139, 250, 0.10), transparent 28%),
    radial-gradient(circle at 50% 82%, rgba(125, 211, 252, 0.06), transparent 22%),
    linear-gradient(135deg, #e3e9f1, #d9e1eb 55%, #e0e6ef);
}

body.theme-light .background-glow {
  background:
    radial-gradient(circle at 20% 30%, rgba(125, 211, 252, 0.14), transparent 20%),
    radial-gradient(circle at 70% 60%, rgba(167, 139, 250, 0.12), transparent 22%);
}

body.theme-light .topbar button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

body.theme-light .topbar button:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.18);
}

body.theme-light .eyebrow {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
}

body.theme-light .cloud-links-title,
body.theme-light .future-title {
  color: rgba(15, 23, 42, 0.86);
}

body.theme-light .intro,
body.theme-light .future-card p,
body.theme-light .footer-note,
body.theme-light .small-note {
  color: rgba(15, 23, 42, 0.72);
}

body.theme-light .cloud-link {
  color: var(--text);
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(15, 23, 42, 0.10);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

body.theme-light .cloud-link:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 23, 42, 0.18);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

body.theme-light .future-card {
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(15, 23, 42, 0.12);
}

body.theme-light .site-footer {
  color: rgba(15, 23, 42, 0.55);
}

body.theme-light .modal {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(15, 23, 42, 0.10);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.14);
}

body.theme-light .modal-header {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

body.theme-light .modal-header h2,
body.theme-light .contact-form label,
body.theme-light .close-btn,
body.theme-light .form-actions button,
body.theme-light .form-actions a {
  color: var(--text);
}

body.theme-light .close-btn,
body.theme-light .form-actions button,
body.theme-light .form-actions a {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.12);
}

body.theme-light .contact-form input,
body.theme-light .contact-form textarea {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(15, 23, 42, 0.12);
  color: var(--text);
}

body.theme-light .contact-form input:focus,
body.theme-light .contact-form textarea:focus {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(125, 211, 252, 0.45);
}

body.theme-light .toast {
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

@media (max-width: 900px) {
  .future-grid {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    padding: 40px 24px 28px;
  }

  .topbar {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  h1 {
    letter-spacing: -1px;
  }

  .topbar {
    top: 12px;
    left: 12px;
    right: 12px;
    gap: 8px;
  }

  .topbar button {
    padding: 11px 13px;
    font-size: 0.9rem;
  }

  .page {
    padding-top: 92px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero {
    animation: none;
  }

  .typing-cursor {
    animation: none;
  }
}

@media (hover: none) {

  .cloud-link:hover,
  .future-card:hover,
  .topbar button:hover {
    transform: none;
  }
}