@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  color-scheme: dark;

  --bg: #0b0d12;
  --surface: #12151d;
  --surface-2: #191d27;
  --text: #f3f4f6;
  --muted: #9299a8;
  --accent: #9ebcff;
  --border: rgba(255,255,255,.09);
  --glass: rgba(22,26,37,.66);
  --shadow: 0 20px 70px rgba(0,0,0,.25);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;

  --transition: 220ms ease;
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #eceff4;
  --text: #171a22;
  --muted: #697180;
  --accent: #345eaa;
  --border: rgba(20,30,50,.09);
  --glass: rgba(255,255,255,.72);
  --shadow: 0 20px 70px rgba(30,40,60,.08);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

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

button, a {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.section-container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

/* SQUIRCLE */

.glass,
.brand-mark,
.icon-button,
.button,
.visual-card,
.gallery-card,
.blog-card,
.empty-state,
.image-dialog,
.back-top {
  border-radius: var(--radius-lg);
}

@supports (corner-shape: squircle) {
  .glass,
  .brand-mark,
  .icon-button,
  .button,
  .visual-card,
  .gallery-card,
  .blog-card,
  .empty-state,
  .image-dialog,
  .back-top {
    corner-shape: squircle;
  }
}

/* BACKGROUND */

.ambient {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: .11;
  pointer-events: none;
  z-index: -1;
}

.ambient-one {
  top: 100px;
  left: -180px;
  background: #547bff;
}

.ambient-two {
  top: 500px;
  right: -200px;
  background: #a16aff;
}

/* GLASS */

.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
}

/* NAVBAR */

.navbar {
  position: sticky;
  z-index: 100;
  top: 14px;
  width: min(1120px, calc(100% - 32px));
  min-height: 68px;
  margin: 14px auto 0;
  padding: 10px 18px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 700;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--text);
  color: var(--bg);
  font-size: 18px;
}

.brand-dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--muted);
  font-size: 14px;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: transform var(--transition), background var(--transition);
}

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

/* HERO */

.hero {
  min-height: 570px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 50px;
  padding-block: 90px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: var(--glass);
  border-radius: 100px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.status-dot,
.visual-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #67d7a2;
  box-shadow: 0 0 12px #67d7a2;
}

.hero h1 {
  margin-top: 26px;
  max-width: 650px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.12;
  letter-spacing: -3px;
}

.gradient-text {
  display: block;
  color: var(--accent);
}

.hero-description {
  max-width: 480px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  min-height: 48px;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: transform var(--transition), opacity var(--transition);
}

.button:hover {
  transform: translateY(-3px);
}

.button-primary {
  background: var(--text);
  color: var(--bg);
}

.button-secondary {
  background: var(--glass);
  color: var(--text);
}

/* HERO VISUAL */

.hero-visual {
  position: relative;
  min-height: 350px;
  display: grid;
  place-items: center;
}

.visual-card {
  position: relative;
  z-index: 2;
  width: min(100%, 350px);
  height: 340px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: linear-gradient(145deg, var(--glass), var(--surface));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px);
}

.visual-top,
.visual-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
}

.visual-top {
  justify-content: flex-start;
  gap: 10px;
}

.visual-monogram {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 150px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  color: var(--accent);
  opacity: .85;
}

.visual-orbit {
  position: absolute;
  width: 320px;
  height: 320px;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.orbit-one {
  transform: rotate(35deg) scaleX(1.3);
}

.orbit-two {
  transform: rotate(-35deg) scaleX(1.3);
}

/* SECTIONS */

.content-section {
  padding-block: 75px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 30px;
}

.section-label {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
}

.section-heading h2 {
  margin-top: 7px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 36px;
  letter-spacing: -1px;
}

.section-heading p {
  color: var(--muted);
  margin-top: 5px;
  font-size: 14px;
}

.section-count {
  color: var(--muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
}

/* GALLERY */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.gallery-card {
  position: relative;
  min-width: 0;
  height: 290px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
  padding: 0;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 500ms ease;
}

.gallery-card:hover img {
  transform: scale(1.06);
}

.gallery-overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 35px 18px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  background: linear-gradient(transparent, rgba(0,0,0,.78));
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-card:hover .gallery-overlay,
.gallery-card:focus-visible .gallery-overlay {
  opacity: 1;
}

.gallery-title {
  font-weight: 600;
}

.gallery-arrow {
  font-size: 22px;
}

/* BLOG */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.blog-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.blog-cover {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
}

.blog-body {
  padding: 22px;
}

.blog-date {
  color: var(--accent);
  font-size: 12px;
}

.blog-title {
  margin-top: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 21px;
  line-height: 1.4;
}

.blog-excerpt {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

/* EMPTY */

.empty-state {
  padding: 50px 20px;
  text-align: center;
  border: 1px solid var(--border);
  background: var(--glass);
}

.empty-icon {
  font-size: 36px;
  color: var(--accent);
}

.empty-state h3 {
  margin-top: 12px;
}

.empty-state p,
.loading-state {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* MODAL */

.image-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(900px, calc(100vw - 30px));
  max-width: calc(100vw - 30px);
  max-height: calc(100dvh - 30px);
  overflow: auto;
  padding: 24px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.image-dialog::backdrop {
  background: rgba(0, 0, 0, .8);
  backdrop-filter: blur(8px);
}

.image-dialog img {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 70dvh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.dialog-close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  font-size: 26px;
  cursor: pointer;
}

.dialog-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

/* FOOTER */

.footer {
  margin-top: 70px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  min-height: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer p {
  color: var(--muted);
  font-size: 12px;
}

.back-top {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 20px;
}

/* ACCESSIBILITY */

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* RESPONSIVE */

@media (max-width: 850px) {
  .hero {
    grid-template-columns: 1fr;
    padding-block: 70px;
  }

  .hero-visual {
    min-height: 320px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .section-container {
    width: calc(100% - 32px);
  }

  .navbar {
    width: calc(100% - 20px);
    padding: 9px 12px;
    gap: 8px;
  }

  .brand {
    font-size: 16px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-block: 75px 50px;
    gap: 35px;
  }

  .hero h1 {
    font-size: 43px;
    letter-spacing: -2px;
  }

  .hero-description {
    font-size: 14px;
  }

  .visual-card {
    height: 290px;
  }

  .visual-monogram {
    font-size: 120px;
  }

  .content-section {
    padding-block: 50px;
  }

  .section-heading h2 {
    font-size: 29px;
  }

  .gallery-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .gallery-card {
    height: 260px;
  }

  .gallery-overlay {
    opacity: 1;
  }

  .footer-inner {
    padding-block: 24px;
    flex-wrap: wrap;
  }

  .footer p {
    order: 3;
    width: 100%;
  }

  .dialog-actions {
    flex-direction: column;
  }
}

/* BLOG READING */

.blog-read-more {
  margin-top: 16px;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.blog-read-more:hover {
  opacity: .75;
}

.blog-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(760px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  padding: 0;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.blog-dialog::backdrop {
  background: rgba(0, 0, 0, .8);
  backdrop-filter: blur(8px);
}

.blog-dialog-cover {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: cover;
}

.blog-dialog-cover[hidden] {
  display: none;
}

.blog-dialog-body {
  padding: 28px;
}

.blog-dialog-title {
  margin: 12px 0 20px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.3;
}

.blog-dialog-content {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.blog-dialog .dialog-close {
  position: sticky;
  float: right;
  top: 12px;
  margin: 12px 12px -56px 0;
  z-index: 3;
}

@media (max-width: 600px) {
  .blog-dialog-body {
    padding: 20px;
  }

  .blog-dialog-content {
    font-size: 14px;
  }
}

/* MOBILE MODAL POSITION FIX */

.image-dialog,
.blog-dialog {
  position: fixed;
  inset: auto;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  box-sizing: border-box;
  width: calc(100% - 32px);
  max-width: 760px;
  max-height: calc(100dvh - 32px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.image-dialog {
  width: calc(100% - 32px);
  max-width: 900px;
}

.image-dialog img {
  width: 100%;
  max-width: 100%;
  max-height: 65dvh;
  object-fit: contain;
}

.blog-dialog {
  padding: 0;
}

.blog-dialog-cover {
  width: 100%;
  max-height: 32dvh;
  object-fit: cover;
}

.image-dialog .dialog-close,
.blog-dialog .dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  float: none;
  margin: 0;
  z-index: 5;
}

@media (max-width: 600px) {
  .image-dialog,
  .blog-dialog {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
  }

  .image-dialog {
    padding: 16px;
  }

  .image-dialog img {
    max-height: 62dvh;
  }

  .blog-dialog-body {
    padding: 20px;
  }
}

/* FINAL IMAGE MODAL SIZE */

.image-dialog {
  width: min(560px, calc(100vw - 32px));
  max-width: 560px;
  max-height: calc(100dvh - 40px);
  padding: 18px;
}

.image-dialog img {
  width: 100%;
  height: auto;
  max-height: 55dvh;
  object-fit: contain;
}

.image-dialog .dialog-actions {
  gap: 10px;
  margin-top: 14px;
}

@media (max-width: 600px) {
  .image-dialog {
    width: calc(100vw - 28px);
    padding: 14px;
  }

  .image-dialog img {
    max-height: 52dvh;
  }

  .image-dialog .dialog-actions {
    flex-direction: column;
  }

  .image-dialog .dialog-actions .button {
    width: 100%;
    text-align: center;
  }
}

/* FIX MOBILE HORIZONTAL OVERFLOW */

@media (max-width: 600px) {
  .ambient-two {
    right: 0;
    width: 180px;
    max-width: 50vw;
  }

  .ambient-one {
    left: 0;
    width: 180px;
    max-width: 50vw;
  }

  .visual-orbit {
    width: min(280px, 80vw);
    height: min(280px, 80vw);
  }

  .orbit-one,
  .orbit-two {
    transform: rotate(35deg) scaleX(1.1);
  }
}

/* =================================
   MOTION DESIGN
================================= */

/* HERO INTRO */

.hero-content > * {
  animation: heroEnter .8s cubic-bezier(.2,.7,.2,1) both;
}

.hero-content > *:nth-child(1) { animation-delay: .08s; }
.hero-content > *:nth-child(2) { animation-delay: .18s; }
.hero-content > *:nth-child(3) { animation-delay: .30s; }
.hero-content > *:nth-child(4) { animation-delay: .42s; }

.hero-visual {
  animation: heroVisualEnter 1s cubic-bezier(.2,.7,.2,1) .2s both;
}

@keyframes heroEnter {
  from {
    opacity: 0;
    translate: 0 22px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes heroVisualEnter {
  from {
    opacity: 0;
    scale: .94;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

/* SCROLL REVEAL */

.reveal-item {
  opacity: 0;
  translate: 0 28px;
  transition:
    opacity .7s ease,
    translate .7s cubic-bezier(.2,.7,.2,1);
}

.reveal-item.is-visible {
  opacity: 1;
  translate: 0 0;
}

/* CARDS */

.gallery-card,
.blog-card {
  transition:
    transform .35s cubic-bezier(.2,.7,.2,1),
    box-shadow .35s ease,
    border-color .35s ease;
}

.gallery-card:hover,
.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.gallery-card img {
  transition: transform .65s cubic-bezier(.2,.7,.2,1);
}

.gallery-card:hover img {
  transform: scale(1.045);
}

/* AMBIENT BACKGROUND */

.ambient-one {
  animation: ambientFloat 13s ease-in-out infinite alternate;
}

.ambient-two {
  animation: ambientFloat 16s ease-in-out infinite alternate-reverse;
}

@keyframes ambientFloat {
  from { translate: 0 0; }
  to { translate: 0 28px; }
}

/* VISUAL CARD */

.visual-card {
  transition: transform .5s ease, box-shadow .5s ease;
}

.visual-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 80px rgba(0,0,0,.3);
}

/* BUTTONS */

.button,
.blog-read-more {
  transition:
    transform .25s ease,
    opacity .25s ease,
    background-color .25s ease;
}

.button:active,
.blog-read-more:active {
  transform: scale(.97);
}

/* MODALS */

.image-dialog[open],
.blog-dialog[open] {
  animation: modalEnter .28s ease both;
}

@keyframes modalEnter {
  from {
    opacity: 0;
    translate: 0 12px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal-item {
    opacity: 1;
    translate: none;
  }
}
