/* ============================================================
   VisSyn AS — site stylesheet
   Responsive: mobile (<640px), tablet (640–1023px), desktop (1024px+)
   ============================================================ */

:root {
  --navy: #1b4d7e;
  --navy-dark: #12395e;
  --navy-deep: #0d2b47;
  --amber: #f9b243;
  --amber-soft: #fcd490;
  --ink: #1e2a36;
  --muted: #5b6b7a;
  --bg: #f7f9fb;
  --card: #ffffff;
  --line: #e3e9ef;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(13, 43, 71, 0.10);
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

/* ---------------- Header / nav ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

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

/* Full logo (mark + text) on tablet/desktop; bare mark on mobile */
.brand .brand-full { height: 48px; width: auto; }
.brand .brand-mark { height: 42px; width: auto; display: none; }

.brand-name {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-name .vis { color: var(--amber); }
.brand-name .syn { color: var(--navy); }
.brand-name .as  { color: var(--amber); margin-left: 0.3em; }

.nav-toggle { display: none; }

.nav-toggle-label {
  display: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: var(--navy);
  position: relative;
  transition: transform 0.25s ease, opacity 0.25s ease;
  content: "";
}

.nav-toggle-label span::before { position: absolute; top: -8px; }
.nav-toggle-label span::after  { position: absolute; top: 8px; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  display: block;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  color: var(--navy);
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-menu a:hover { background: rgba(27, 77, 126, 0.08); }

.nav-menu a.active {
  background: var(--navy);
  color: #fff;
}

/* Language switcher */
.lang-switch {
  display: flex;
  align-items: center;
  margin-left: 10px;
  font-size: 0.85rem;
}

.lang-switch span { color: var(--line); }

.nav-menu .lang-switch a {
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
}

.nav-menu .lang-switch a.on {
  color: var(--navy);
  background: rgba(27, 77, 126, 0.10);
}

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--navy-deep) url("../assets/lowpoly-hero.svg") center / cover no-repeat;
  padding-block: clamp(64px, 10vw, 128px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.12;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.hero h1 .accent { color: var(--amber); }

.hero p.lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.85);
  max-width: 34em;
  margin: 0 0 32px;
}

.hero-art {
  display: grid;
  place-items: center;
}

.hero-art img {
  width: clamp(180px, 28vw, 320px);
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.35));
}

.hero-art .logo-badge {
  background: #fff;
  border-radius: 32px;
  padding: clamp(24px, 4vw, 48px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--amber);
  color: var(--navy-deep);
  box-shadow: 0 8px 20px rgba(249, 178, 67, 0.35);
}

.btn-primary:hover { background: var(--amber-soft); }

.btn-ghost {
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  margin-left: 12px;
}

.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); }

/* ---------------- Sections ---------------- */

.section { padding-block: clamp(56px, 8vw, 96px); }

.section-alt {
  background: #fff;
  border-block: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.section-alt::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: min(440px, 55vw);
  height: 290px;
  background: url("../assets/lowpoly-corner.svg") top right / 100% 100% no-repeat;
  pointer-events: none;
}

.section-alt > .container { position: relative; }

.section-head {
  max-width: 640px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(249, 178, 67, 0.14);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 14px;
}

.section h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--navy-deep);
  letter-spacing: -0.02em;
}

.section-head p { color: var(--muted); margin: 0; }

/* Cards */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 3vw, 28px);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(13, 43, 71, 0.16);
}

.card .icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(27, 77, 126, 0.10), rgba(249, 178, 67, 0.18));
  margin-bottom: 16px;
}

.card h3 { margin: 0 0 8px; color: var(--navy-deep); font-size: 1.15rem; }
.card p  { margin: 0; color: var(--muted); font-size: 0.98rem; }

/* Stats strip */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: center;
}

.stat .num {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--navy);
}

.stat .num em { color: var(--amber); font-style: normal; }
.stat .label { color: var(--muted); font-size: 0.92rem; }

/* CTA band */

.cta-band {
  background: var(--navy-deep) url("../assets/lowpoly-hero.svg") center / cover no-repeat;
  color: #fff;
  border-radius: 24px;
  padding: clamp(32px, 6vw, 64px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, 0.8); }

/* ---------------- Page hero (sub-pages) ---------------- */

.page-hero {
  background: var(--navy-deep) url("../assets/lowpoly-hero.svg") center / cover no-repeat;
  color: #fff;
  padding-block: clamp(48px, 7vw, 88px);
}

.page-hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.page-hero p { color: rgba(255, 255, 255, 0.85); max-width: 40em; margin: 0; }

/* ---------------- Projects ---------------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 3vw, 28px);
}

.project {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(13, 43, 71, 0.16);
}

.project-cover {
  position: relative;
  height: 160px;
  display: grid;
  place-items: center;
  font-size: 3rem;
  color: #fff;
  overflow: hidden;
}

.project-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

/* covers holding a logo image get a clean white backdrop */
.project-cover:has(img) {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.cover-1 { background: linear-gradient(135deg, #1b4d7e, #2e6da4); }
.cover-2 { background: linear-gradient(135deg, #f9b243, #e08c1f); }
.cover-3 { background: linear-gradient(135deg, #0d2b47, #1b4d7e); }
.cover-4 { background: #2e6da4 url("../assets/lowpoly-cover-steel.svg") center / cover no-repeat; }
.cover-5 { background: #e08c1f url("../assets/lowpoly-cover-amber.svg") center / cover no-repeat; }
.cover-6 { background: #12395e url("../assets/lowpoly-cover-blue.svg") center / cover no-repeat; }

.project-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project-body h3 { margin: 0; color: var(--navy-deep); }
.project-body p { margin: 0; color: var(--muted); font-size: 0.96rem; flex: 1; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy);
  background: rgba(27, 77, 126, 0.08);
  border-radius: 999px;
  padding: 4px 12px;
}

/* ---------------- Contact ---------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.contact-info .card + .card { margin-top: 16px; }

.contact-info a { color: var(--navy); font-weight: 600; text-decoration: none; }
.contact-info a:hover { text-decoration: underline; }

.contact-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--navy-deep);
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27, 77, 126, 0.15);
}

.field textarea { resize: vertical; min-height: 130px; }

.contact-form .btn-primary { border: 0; cursor: pointer; font: inherit; font-weight: 700; }

/* Honeypot field: moved off-screen, invisible to humans but present for bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-notice {
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  margin: 0 0 18px;
}

.form-notice-ok  { background: #e6f6ea; color: #1e6b34; border: 1px solid #bfe5c9; }
.form-notice-err { background: #fdecec; color: #9c2b2b; border: 1px solid #f2c7c7; }

/* ---------------- Footer ---------------- */

.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.8);
  margin-top: clamp(56px, 8vw, 96px);
  padding-block: clamp(40px, 6vw, 64px) 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  margin-bottom: 40px;
}

.site-footer h4 { color: #fff; margin: 0 0 12px; }

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: rgba(255, 255, 255, 0.8); text-decoration: none; }
.site-footer a:hover { color: var(--amber); }

.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand img { height: 40px; background: #fff; border-radius: 10px; padding: 4px; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 20px;
  font-size: 0.85rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
}

/* ============================================================
   Tablet: 640px – 1023px
   ============================================================ */
@media (max-width: 1023px) {
  .card-grid,
  .project-grid { grid-template-columns: repeat(2, 1fr); }

  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }

  .hero-grid { grid-template-columns: 1fr; text-align: center; }

  .hero p.lead { margin-inline: auto; }

  .hero-art { order: -1; }

  .hero-art img { width: clamp(140px, 24vw, 220px); }

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

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

/* ============================================================
   Mobile: < 640px
   ============================================================ */
@media (max-width: 639px) {
  .card-grid,
  .project-grid,
  .form-row,
  .footer-grid { grid-template-columns: 1fr; }

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

  .brand .brand-full { height: 36px; }
  .brand-name { font-size: 1.25rem; }

  /* Hamburger menu */
  .nav-toggle-label { display: block; }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(13, 43, 71, 0.12);
    padding: 12px 16px 16px;
    display: none;
  }

  .nav-toggle:checked ~ .nav-menu { display: flex; }

  .nav-toggle:checked ~ .nav-toggle-label span { background: transparent; }
  .nav-toggle:checked ~ .nav-toggle-label span::before { top: 0; transform: rotate(45deg); }
  .nav-toggle:checked ~ .nav-toggle-label span::after  { top: 0; transform: rotate(-45deg); }

  .nav-menu a { border-radius: 10px; text-align: center; }

  .lang-switch { justify-content: center; margin-left: 0; padding-top: 4px; }

  .btn-ghost { margin-left: 0; margin-top: 12px; }

  .cta-band { text-align: center; justify-content: center; }
}

/* ============================================================
   v3 — low-poly motion layer (used by js/anim.js)
   ============================================================ */

:root { --aqua: #2fd9c7; --aqua-deep: #15897d; }

::selection { background: var(--aqua); color: var(--navy-deep); }

.hero, .page-hero, .cta-band { position: relative; overflow: hidden; }

.hero > .container,
.page-hero > .container,
.cta-band > div,
.cta-band > a { position: relative; z-index: 3; }

/* --- drifting hero background (slow Ken Burns over the facets) --- */
.hero { background: var(--navy-deep); }

.hero::before {
  content: "";
  position: absolute;
  inset: -6%;
  background: url("../assets/lowpoly-hero.svg") center / cover no-repeat;
  animation: vs-drift 26s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes vs-drift {
  from { transform: translate3d(-1.2%, -0.8%, 0) scale(1.03); }
  to   { transform: translate3d(1.2%, 0.8%, 0) scale(1.08); }
}

/* --- animated gradient on the hero accent line --- */
.hero h1 .accent {
  background: linear-gradient(90deg, var(--amber), var(--aqua), var(--amber));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: vs-hueshift 7s linear infinite;
}

@keyframes vs-hueshift {
  to { background-position: 220% 0; }
}

/* --- entrance choreography on page load --- */
@keyframes vs-enter {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

@keyframes vs-enter-pop {
  from { opacity: 0; transform: scale(0.92) translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.hero h1          { animation: vs-enter 0.7s ease 0.05s both; }
.hero p.lead      { animation: vs-enter 0.7s ease 0.2s both; }
.hero .btn-primary { animation: vs-enter 0.7s ease 0.35s both; }
.hero .btn-ghost   { animation: vs-enter 0.7s ease 0.45s both; }
.hero .hero-art    { animation: vs-enter-pop 0.9s ease 0.3s both; }

/* --- floating logo badge --- */
.hero-art .logo-badge { animation: vs-float 7s ease-in-out infinite; }

@keyframes vs-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-12px) rotate(0.8deg); }
}

/* --- buttons: breathing glow, aqua on hover --- */
.btn-primary { animation: vs-breathe 4s ease-in-out infinite; }

@keyframes vs-breathe {
  0%, 100% { box-shadow: 0 8px 20px rgba(249, 178, 67, 0.35); }
  50%      { box-shadow: 0 10px 30px rgba(47, 217, 199, 0.4); }
}

.btn-ghost:hover { border-color: var(--aqua); color: var(--aqua); background: rgba(47, 217, 199, 0.08); }

.site-footer a:hover { color: var(--aqua); }

/* --- card icons wiggle on hover --- */
.card .icon { transition: transform 0.25s ease, background 0.25s ease; }

.card:hover .icon {
  transform: rotate(-7deg) scale(1.12);
  background: linear-gradient(135deg, rgba(47, 217, 199, 0.18), rgba(249, 178, 67, 0.2));
}

/* --- shimmering facets --- */
.vs-shimmer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.vs-shimmer polygon {
  opacity: 0;
  animation: vs-glint 6s ease-in-out infinite;
}

.vs-shimmer polygon.glow { filter: blur(3px); }

@keyframes vs-glint {
  0%, 100% { opacity: 0; }
  50%      { opacity: 0.3; }
}

/* --- ambient canvas layers (particles, rings, ribbons, shards) --- */
.vs-ambient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.vs-ambient-page {
  position: fixed;
  inset: 0;
  z-index: 0;
}

main, .site-footer { position: relative; z-index: 1; }

/* --- scroll reveal --- */
.vs-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.vs-reveal.vs-in {
  opacity: 1;
  transform: none;
}

/* --- project-card tilt with 3D cover pop --- */
.vs-tilt {
  transition: transform 0.18s ease, box-shadow 0.2s ease;
  transform-style: preserve-3d;
}

.vs-tilt .project-cover { transition: transform 0.25s ease; }

.vs-tilt:hover .project-cover { transform: translateZ(30px) scale(1.04); }

.vs-tilt:hover { box-shadow: 0 24px 50px rgba(13, 43, 71, 0.22), 0 0 0 2px rgba(47, 217, 199, 0.35); }

.project:hover .tag { background: rgba(47, 217, 199, 0.16); color: var(--aqua-deep); }

.tag { transition: background 0.25s ease, color 0.25s ease; }

/* --- motion off switch --- */
@media (prefers-reduced-motion: reduce) {
  .vs-shimmer, .vs-ambient { display: none; }
  .vs-reveal { opacity: 1; transform: none; transition: none; }
  .hero::before, .hero h1, .hero p.lead, .hero .btn-primary, .hero .btn-ghost,
  .hero .hero-art, .hero-art .logo-badge, .btn-primary { animation: none; }
  .hero h1 .accent {
    background: none;
    color: var(--amber);
    -webkit-text-fill-color: currentColor;
  }
}
