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

:root {
  --color-bg: #F8F7F4;
  --color-surface: #FFFFFF;
  --color-primary: #5B3E96;
  --color-primary-light: #7B5EAE;
  --color-primary-dark: #3D286B;
  --color-primary-subtle: rgba(91, 62, 150, 0.06);
  --color-text: #1C1826;
  --color-text-secondary: #6B6780;
  --color-text-muted: #9B97A8;
  --color-line: #E8E6EC;
  --color-accent: #C9A96E;
  --color-accent-subtle: rgba(201, 169, 110, 0.15);

  --font-display: 'Syne', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --bracket-thin: 2px;
  --bracket-thick: 3px;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
}

/* ----- GRID (custom, minimal) ----- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -12px;
}

.col {
  flex: 1;
  padding: 0 12px;
}

.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-10 { flex: 0 0 83.333%; max-width: 83.333%; }
.col-9  { flex: 0 0 75%; max-width: 75%; }
.col-8  { flex: 0 0 66.666%; max-width: 66.666%; }
.col-7  { flex: 0 0 58.333%; max-width: 58.333%; }
.col-6  { flex: 0 0 50%; max-width: 50%; }
.col-5  { flex: 0 0 41.666%; max-width: 41.666%; }
.col-4  { flex: 0 0 33.333%; max-width: 33.333%; }
.col-3  { flex: 0 0 25%; max-width: 25%; }

@media (min-width: 577px) {
  .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
  .col-sm-10 { flex: 0 0 83.333%; max-width: 83.333%; }
  .col-sm-9  { flex: 0 0 75%; max-width: 75%; }
  .col-sm-8  { flex: 0 0 66.666%; max-width: 66.666%; }
  .col-sm-7  { flex: 0 0 58.333%; max-width: 58.333%; }
  .col-sm-6  { flex: 0 0 50%; max-width: 50%; }
  .col-sm-5  { flex: 0 0 41.666%; max-width: 41.666%; }
  .col-sm-4  { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-sm-3  { flex: 0 0 25%; max-width: 25%; }
  .col-sm-2  { flex: 0 0 16.666%; max-width: 16.666%; }
}

@media (min-width: 769px) {
  .col-md-12 { flex: 0 0 100%; max-width: 100%; }
  .col-md-10 { flex: 0 0 83.333%; max-width: 83.333%; }
  .col-md-6  { flex: 0 0 50%; max-width: 50%; }
  .col-md-4  { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-md-3  { flex: 0 0 25%; max-width: 25%; }
  .col-md-8  { flex: 0 0 66.666%; max-width: 66.666%; }
  .col-md-5  { flex: 0 0 41.666%; max-width: 41.666%; }
  .col-md-7  { flex: 0 0 58.333%; max-width: 58.333%; }
}

@media (min-width: 993px) {
  .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
  .col-lg-6  { flex: 0 0 50%; max-width: 50%; }
  .col-lg-4  { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-lg-3  { flex: 0 0 25%; max-width: 25%; }
  .col-lg-8  { flex: 0 0 66.666%; max-width: 66.666%; }
}

/* ----- UTILITIES ----- */
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.text-center { text-align: center; }
.m-auto { margin: auto; }
.m-0 { margin: 0; }
.mt-4 { margin-top: 24px; }
.mb-4 { margin-bottom: 24px; }
.mr-1 { margin-right: 4px; }
.mr-3 { margin-right: 12px; }
.px-4 { padding-left: 24px; padding-right: 24px; }
.p-4 { padding: 24px; }
.img-fluid { max-width: 100%; height: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ----- LOADING SPINNER ----- */
#loadingSpinner {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-line);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ----- NAV ----- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-line);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  position: relative;
  padding-left: 12px;
}
.nav-brand::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: var(--bracket-thick);
  background: var(--color-primary);
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  height: 2px;
  background: var(--color-text);
  position: absolute;
  left: 0;
  right: 0;
  transition: 0.2s;
}
.nav-toggle span { top: 9px; }
.nav-toggle span::before { content: ''; top: -8px; }
.nav-toggle span::after { content: ''; top: 8px; }
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: var(--bracket-thin);
  background: var(--color-primary);
}

/* ----- HERO ----- */
.page-home .hero {
  padding: 160px 0 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.page-home .hero .row {
  align-items: center;
}
.page-home .hero-text {
  position: relative;
  padding: 32px;
}
.hero-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: 16px;
}
.hero h1 em {
  font-style: normal;
  color: var(--color-primary);
}
.hero p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  max-width: 480px;
  margin-bottom: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 14px 28px;
  border: none;
  cursor: pointer;
  transition: 0.2s;
  border-radius: 0;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-primary-dark);
}
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary-subtle);
}
.btn-accent {
  background: var(--color-accent);
  color: var(--color-text);
}
.btn-accent:hover {
  opacity: 0.85;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.hero-bracket-frame {
  position: relative;
  padding: 20px;
}
.hero-bracket-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 48px;
  height: 48px;
  border-top: 3px solid var(--color-primary);
  border-left: 3px solid var(--color-primary);
}
.hero-bracket-frame::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 48px;
  height: 48px;
  border-bottom: 3px solid var(--color-primary);
  border-right: 3px solid var(--color-primary);
}

/* ----- SECTION ----- */
.section {
  padding: 100px 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ----- PARTNERS ----- */
.partners {
  padding: 60px 0;
  border-top: 1px solid var(--color-line);
}
.partners-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.partners-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.partners-logos img {
  opacity: 0.5;
  transition: opacity 0.3s;
  max-height: 40px;
}
.partners-logos img:hover {
  opacity: 0.8;
}

/* ----- SERVICES ----- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}
.service-card {
  background: var(--color-surface);
  padding: 40px 32px;
  border: 1px solid var(--color-line);
  position: relative;
  transition: 0.25s;
}
.service-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 24px rgba(91, 62, 150, 0.08);
}
.service-card .card-bracket {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 16px;
  height: 16px;
  border-top: 2px solid var(--color-primary);
  border-right: 2px solid var(--color-primary);
  opacity: 0;
  transition: 0.25s;
}
.service-card:hover .card-bracket {
  opacity: 1;
}
.service-card .icon {
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  object-fit: contain;
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}
.service-card p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ----- CTA BAND ----- */
.cta-band {
  padding: 80px 0;
  background: var(--color-primary-subtle);
  position: relative;
}
.cta-band .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
@media (max-width: 576px) {
  .cta-band .container {
    flex-direction: column;
    text-align: center;
  }
}
.cta-band h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text);
}
.cta-band::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

/* ----- TESTIMONIALS ----- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 992px) {
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .testimonials-grid { grid-template-columns: 1fr; }
}
.testimonial-card {
  background: var(--color-surface);
  padding: 28px 24px;
  border: 1px solid var(--color-line);
  position: relative;
}
.testimonial-card .quote-mark {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 8px;
  opacity: 0.3;
}
.testimonial-card .quote-text {
  font-size: 14px;
  font-style: italic;
  color: var(--color-text);
  margin-bottom: 12px;
  line-height: 1.6;
}
.testimonial-card .quote-from {
  font-size: 12px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

/* ----- SELLING ----- */
.selling {
  padding: 100px 0;
  text-align: center;
}
.selling h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 32px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ----- FOOTER ----- */
footer {
  border-top: 1px solid var(--color-line);
  padding: 32px 0;
  text-align: center;
}
footer p {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ----- ABOUT PAGE ----- */
.page-about .about-info {
  padding: 140px 0 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.page-about .about-info h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.page-about .about-info p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  max-width: 480px;
}

.team-section {
  padding: 80px 0;
}
.team-section h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 40px;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 768px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .team-grid { grid-template-columns: 1fr; }
}
.team-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-surface);
  padding: 20px;
  border: 1px solid var(--color-line);
  transition: 0.2s;
}
.team-card:hover {
  border-color: var(--color-primary);
}
.team-card .avatar {
  width: 56px;
  height: 56px;
  border-radius: 0;
  object-fit: cover;
  flex-shrink: 0;
}
.team-card h5 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}
.team-card p {
  font-size: 12px;
  color: var(--color-primary);
  font-weight: 500;
  margin: 0;
}

/* ----- PORTFOLIO PAGE ----- */
.page-portfolio .portfolio-header {
  padding: 140px 0 60px;
}
.page-portfolio .portfolio-header h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  margin-bottom: 4px;
}
.page-portfolio .portfolio-header small {
  font-size: 14px;
  color: var(--color-text-muted);
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-bottom: 100px;
}
@media (max-width: 768px) {
  .portfolio-grid { grid-template-columns: 1fr; }
}
.portfolio-item {
  border: 1px solid var(--color-line);
  transition: 0.25s;
}
.portfolio-item:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 24px rgba(91, 62, 150, 0.08);
}
.portfolio-item .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-primary-subtle);
}
.portfolio-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.3s;
}
.portfolio-item:hover .thumb img {
  transform: scale(1.03);
}
.portfolio-item .desc {
  padding: 20px;
  background: var(--color-surface);
}
.portfolio-item .desc h5 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}
.portfolio-item .desc p {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 0;
}

/* ----- CONTACT PAGE ----- */
.page-contact .contact-wrap {
  padding: 140px 0 100px;
  min-height: 100vh;
}
.page-contact .contact-wrap h3 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 600;
  margin-bottom: 40px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-grid iframe {
  width: 100%;
  height: 400px;
  border: none;
  filter: grayscale(0.5);
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--color-text);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  border: 1px solid var(--color-line);
  background: var(--color-surface);
  color: var(--color-text);
  transition: 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-subtle);
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ----- SCROLL REVEAL ----- */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ----- RESPONSIVE ----- */
@media (max-width: 576px) {
  .nav-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--color-line);
  }
  .nav-links.open {
    display: flex;
  }

  .page-home .hero {
    padding: 120px 0 60px;
    min-height: auto;
  }
  .page-home .hero-text {
    padding: 20px;
  }
  .hero-visual {
    margin-top: 40px;
  }

  .section {
    padding: 60px 0;
  }

  .cta-band .container {
    flex-direction: column;
    text-align: center;
  }

  .page-about .about-info {
    padding: 120px 0 60px;
    min-height: auto;
  }

  .team-grid {
    margin-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .fade-up {
    opacity: 1;
    transform: none;
  }
}

/* ----- KEYBOARD FOCUS ----- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
