/* ===== Reset & Base ===== */
* { box-sizing: border-box; }
html:focus-within { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #102a43;
  background: radial-gradient(1200px 800px at 10% 10%, #f2fbff 0%, #f8f4ff 30%, #fff 60%) fixed;
}

img { max-width: 100%; display: block; }

/* ===== Layout ===== */
.container {
  width: min(1200px, 92vw);
  margin-inline: auto;
}

.section {
  padding: 72px 0;
  position: relative;
}

.section.alt {
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(250,252,255,1) 100%);
}

h1,h2 { margin: 0 0 12px; }
h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.1; }
h2 { font-size: clamp(24px, 3vw, 32px); }
p { margin: 0 0 16px; }
.lead { font-size: 1.1rem; opacity: 0.9; }

/* ===== Header / Nav ===== */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(16,42,67,0.06);
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand-logo {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 12px;
  background: conic-gradient(from 0deg, #ff4d4d, #ffb84d, #ffe84d, #4dff88, #4dd2ff, #9d4dff, #ff4dce, #ff4d4d);
  color: white; font-weight: 700;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}
.brand-text { font-weight: 600; letter-spacing: 0.2px; }

.nav { display: contents; }
.menu {
  list-style: none; display: flex; gap: 8px; margin: 0; padding: 0;
}
.menu > li { position: relative; }
.nav-link, .menu > li > button {
  background: none; border: 0; padding: 10px 12px; border-radius: 10px;
  text-decoration: none; color: inherit; font-weight: 500; cursor: pointer;
}
.menu > li:hover > .nav-link,
.menu > li:focus-within > .nav-link,
.menu > li > button:hover { background: rgba(16,42,67,0.06); }

.has-sub > .submenu {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 230px; padding: 8px; margin: 0; list-style: none;
  background: #fff; border: 1px solid rgba(16,42,67,0.08);
  border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: 180ms ease;
}
.has-sub:hover > .submenu,
.has-sub:focus-within > .submenu { opacity: 1; transform: translateY(0); pointer-events: auto; }
.submenu a {
  display: block; padding: 10px 12px; border-radius: 8px; color: inherit; text-decoration: none;
}
.submenu a:hover { background: rgba(16,42,67,0.06); }

/* ===== Hamburger (mobile) ===== */
.hamburger { display: none; width: 44px; height: 44px; border: 0; background: transparent; border-radius: 10px; }
.hamburger span {
  display: block; width: 24px; height: 2px; margin: 6px auto; background: #102a43; transition: 180ms ease;
}

@media (max-width: 980px) {
  .hamburger { display: inline-block; }
  .nav {
    position: fixed; inset: 64px 0 auto 0; background: rgba(255,255,255,0.98);
    transform: translateY(-110%); transition: 220ms ease; padding: 12px 0; border-bottom: 1px solid rgba(16,42,67,0.06);
  }
  .nav.open { transform: translateY(0); }
  .menu { flex-direction: column; gap: 0; }
  .menu > li { padding: 4px 12px; }
  .has-sub > .submenu { position: static; opacity: 1; transform: none; box-shadow: none; border: 0; padding: 0; }
  .submenu a { padding-left: 22px; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-block; padding: 10px 16px; border-radius: 12px;
  text-decoration: none; font-weight: 600; border: 2px solid transparent;
  transition: 180ms ease;
}
.btn.primary { background: #2563eb; color: #fff; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { border-color: #2563eb; color: #2563eb; }
.btn.ghost:hover { background: rgba(37,99,235,0.08); }

.highlight { background: linear-gradient(90deg,#ffe84d 0%, #4dd2ff 50%, #ff9dff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== Hero ===== */
.hero { padding: 96px 0 60px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 32px; }
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; } }

/* ===== Spinning Rainbow Circular Images ===== */
.spinner-grid {
  display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 14px;
}
.spin-card {
  position: relative; display: block; width: 100%; aspect-ratio: 1/1; border-radius: 999px; overflow: hidden;
  isolation: isolate; /* ensures ring sits behind image */
}
.spin-card .ring {
  position: absolute; inset: -6px; border-radius: 999px;
  background: conic-gradient(from 0deg, #ff4d4d, #ffb84d, #ffe84d, #4dff88, #4dd2ff, #9d4dff, #ff4dce, #ff4d4d);
  filter: saturate(1.2);
  animation: spin 12s linear infinite;
  z-index: 0;
}
.spin-card img {
  position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px);
  object-fit: cover; border-radius: 999px; z-index: 1;
}
.spin-card:hover .ring,
.spin-card:focus .ring { animation-duration: 3s; }

.spin-note { margin-top: 8px; font-size: 12px; opacity: 0.7; text-align: center; }

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

/* ===== Masonry Gallery ===== */
.masonry {
  columns: 4 240px; column-gap: 16px;
}
.masonry img {
  width: 100%; border-radius: 14px; margin: 0 0 16px; break-inside: avoid;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

/* ===== Forms ===== */
.contact-form .grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid rgba(16,42,67,0.18); border-radius: 12px; font-family: inherit;
}
.contact-form button { margin-top: 10px; }

/* ===== Footer ===== */
.footer { background: #0f172a; color: #e2e8f0; padding: 20px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.footer a { color: #93c5fd; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.back-to-top {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: #1e293b; color: white; text-decoration: none;
}

/* ===== Link List ===== */
.link-list { padding-left: 18px; }
.link-list li { margin: 6px 0; }
